date_modified = models.DateTimeField(_('date modified'), blank=True, null=True)
def __unicode__(self):
- return ' - '.join([self.seminar.title, self.user.username, str(self.date)])
+ return ' - '.join([self.seminar.title, self.user.username, str(self.date), str(self.date_modified)])
class Meta(MetaCore):
db_table = app_label + '_' + 'seminar_revisions'
new Messi(gettext('You must reach the required number of characters.'), {buttons: [{id: 0, label: gettext('OK'), val: 'X'}], modal: true});
}
if (c.hasClass('exceed')){
- b1.unbind('click');
$('#id_status').val("3");
$('#_AnswerForm').submit();
}
var b2 = $('#save_button');
b2.unbind('click').click(function() {
$(window).unbind('beforeunload');
- b2.unbind('click');
$('#_AnswerForm').submit();
});
p.html('{% trans " rejected" %}')
});
}
+ load : function(id, username){
+ json([id, username],'teleforma.seminar_load',function(){
+ return false
+ });
+ },
+
+ unload : function(id, username){
+ json([id, username],'teleforma.seminar_unload',function(){
+ return false
+ });
+ },
+
}
$(window).ready(function(){
- var p = $('#publish');
var f = seminarUtils;
+ f.load('{{seminar.id}}','{{user.username}}');
+
+ var p = $('#publish');
p.unbind('click').click(function() {
if (p.hasClass('icon_ok')){
f.unpublish('{{seminar.id}}');
});
+$(window).unload(function(){
+ var f = seminarUtils;
+ f.unload('{{seminar.id}}','{{user.username}}');
+ });
+
</script>
{% endif %}
<div class="course">
<div class="course_title">
-
+
<div style="float: right; font-size: 0.9em;">
{% if seminar_progress == 100 and not user.is_staff %}
<img src="{{ STATIC_URL }}telemeta/images/ok.png" title="{% trans "validated" %}" alt="{% trans "validated" %}"/>
{% endif %}
-
+
{% if user.is_staff %}
<a id="publish" href="#" class="{% if seminar.status == 2 %}component_icon button icon_ok{% else %}component_icon button icon_delete{% endif %}">{% if seminar.status == 2 %}{% trans " published" %}{% else %}{% trans " rejected" %}{% endif %}</a>
{% endif %}