From 65b148ea1215cc35a047538f28456f0bc7420939 Mon Sep 17 00:00:00 2001 From: vintorez Date: Wed, 14 May 2014 13:52:38 +0400 Subject: [PATCH] =?UTF-8?q?User=20Story=20#1963=20=D0=9E=D1=82=D0=BE=D0=B1?= =?UTF-8?q?=D1=80=D0=B0=D0=B6=D0=B0=D1=82=D1=8C=20=D0=BF=D0=BE=D1=81=D0=BB?= =?UTF-8?q?=D0=B5=D0=B4=D0=BD=D0=B5=D0=B3=D0=BE=20=D0=B0=D0=B2=D1=82=D0=BE?= =?UTF-8?q?=D1=80=D0=B0=20=D0=BF=D0=B5=D1=80=D0=B2=D0=B8=D1=87=D0=BD=D0=BE?= =?UTF-8?q?=D0=B9=20=D0=B8=20=D0=B8=D1=82=D0=BE=D0=B3=D0=BE=D0=B2=D0=BE?= =?UTF-8?q?=D0=B9=20=D0=BE=D1=86=D0=B5=D0=BD=D0=BA=D0=B8=20=D0=B4=D0=BB?= =?UTF-8?q?=D1=8F=20=D1=80=D1=83=D0=BA=D0=BE=D0=B2=D0=BE=D0=B4=D0=B8=D1=82?= =?UTF-8?q?=D0=B5=D0=BB=D1=8F=20=D1=86=D0=B8=D0=BA=D0=BB=D0=B0.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Руководители циклов хотят видеть на странице оценок каждого параметра ФИО эксперта, ответственного за выставление как первичных, так и итоговых оценок, и время изменения оценки. К score должны быть добавлены два новых поля: автор и время. Автор - пользователь, создавший или изменивший score, время - время изменения. Значения этих полей должны обновляться при каждом создании или изменении score. При создании или изменении ревизии 0 в качестве автора должен быть записан текущий пользователь, в качестве времени - текущее время. При создании ревизии 1 (первичной оценки), в нее должны быть скопированы вместе с оценками также автор и время (в этот момент изменилась ревизия 0, и обновились ее автор и время). Изменения на странице Добавляется блок "Автор оценки" состоящий из двух столбцов. Столбцы имеют одинаковую ширину. Блок расположен в 20 px под блоком "Примечание". Заголовки: левой колонки "Автор первичной оценки" формата h2; правой колонки "Автор текущей оценки" формата h2. В 3 px от заголовков расположен текст с автором и датой изменения: левая колонка содержит данные о последнем изменении первичной оценки; правая колонка содержит данные о последнем изменении текущей оценки. Формат текста: Автор изменения отображается как "Имя + Отчество + Фамилия" или при их отсутствии его логин; Через запятую от автора изменения отображается дата изменения в формате "5 сентября 2012". Пример текста: "Владимир Томко, 5 сентября 2012" Поведение Блок показывается только руководителю цикла. На этапе "подготовка" данный блок не отображается. На этапах "первичная оценка" и "результаты": блок не отображается если нет оценки; если есть оценка, то отображается только левая колонка блока. На этапах "взаимодействие", "подведение итогов" и публикация результатов: блок не отображается если нет оценки; если есть только одна ревизия оценки, то отображается только левая колонка блока; если есть две ревизии оценки, отображается и левая и правая колонка блока. http://cdn.joxi.ru/uploads/prod/2014/02/28/086/381/e3360bdf1e2bf0b4541e1a730f51400ca5e4cc7b.jpg --- exmo/auth/helpers.py | 5 +- ...dd_field_score_last_modified__add_field.py | 316 ++++++++++++++++++ exmo/exmo2010/models/score.py | 6 +- exmo/locale/en/LC_MESSAGES/django.po | 128 +++---- exmo/locale/ru/LC_MESSAGES/django.po | 128 +++---- exmo/scores/views.py | 9 +- exmo/static/scores/score.css | 13 +- exmo/templates/scores/score.html | 14 + helpers/export_gosbook_xml.py | 8 +- 9 files changed, 497 insertions(+), 130 deletions(-) create mode 100644 exmo/exmo2010/migrations/0031_auto__del_field_score_edited__add_field_score_last_modified__add_field.py diff --git a/exmo/auth/helpers.py b/exmo/auth/helpers.py index 30635bcc..67403790 100644 --- a/exmo/auth/helpers.py +++ b/exmo/auth/helpers.py @@ -17,12 +17,9 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . # - -""" - Помощники для бекенда. По помощнику на каждый класс модели. -""" import re from types import NoneType + from exmo2010.models import Task, Score, Parameter from exmo2010.models.monitoring import Monitoring, RATE, RES, INT, PUB, FIN diff --git a/exmo/exmo2010/migrations/0031_auto__del_field_score_edited__add_field_score_last_modified__add_field.py b/exmo/exmo2010/migrations/0031_auto__del_field_score_edited__add_field_score_last_modified__add_field.py new file mode 100644 index 00000000..8f5f8069 --- /dev/null +++ b/exmo/exmo2010/migrations/0031_auto__del_field_score_edited__add_field_score_last_modified__add_field.py @@ -0,0 +1,316 @@ +# -*- coding: utf-8 -*- +# This file is part of EXMO2010 software. +# Copyright 2014 Foundation "Institute for Information Freedom Development" +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +from south.utils import datetime_utils as datetime +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + + +class Migration(SchemaMigration): + + def forwards(self, orm): + # Rename 'Score.edited' field to 'Score.last_modified' + db.rename_column(u'exmo2010_score', 'edited', 'last_modified') + + # Adding field 'Score.last_modified' + db.alter_column(u'exmo2010_score', 'last_modified', + self.gf('django.db.models.fields.DateTimeField')(auto_now=True, null=True)) + + # Adding field 'Score.editor' + db.add_column(u'exmo2010_score', 'editor', + self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True, blank=True), + keep_default=False) + + + def backwards(self, orm): + # Rename 'Score.last_modified' field to 'Score.edited' + db.rename_column(u'exmo2010_score', 'last_modified', 'edited') + + # Changing field 'Score.edited' + db.alter_column(u'exmo2010_score', 'edited', + self.gf('django.db.models.fields.DateTimeField')(auto_now=True, null=True)) + + # Deleting field 'Score.editor' + db.delete_column(u'exmo2010_score', 'editor_id') + + + models = { + u'auth.group': { + 'Meta': {'object_name': 'Group'}, + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), + 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) + }, + u'auth.permission': { + 'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'}, + 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) + }, + u'auth.user': { + 'Meta': {'object_name': 'User'}, + 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), + 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), + 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), + 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + u'contenttypes.contenttype': { + 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, + 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) + }, + 'exmo2010.answervariant': { + 'Meta': {'object_name': 'AnswerVariant'}, + 'answer': ('django.db.models.fields.CharField', [], {'max_length': '300'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'qquestion': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['exmo2010.QQuestion']"}) + }, + 'exmo2010.claim': { + 'Meta': {'object_name': 'Claim'}, + 'addressee': ('django.db.models.fields.related.ForeignKey', [], {'default': '1', 'related_name': "'addressee'", 'to': u"orm['auth.User']"}), + 'answer': ('ckeditor.fields.RichTextField', [], {'blank': 'True'}), + 'close_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'close_user': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'close_user'", 'null': 'True', 'to': u"orm['auth.User']"}), + 'comment': ('ckeditor.fields.RichTextField', [], {'blank': 'True'}), + 'creator': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'creator'", 'to': u"orm['auth.User']"}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'open_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), + 'score': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['exmo2010.Score']"}) + }, + 'exmo2010.clarification': { + 'Meta': {'object_name': 'Clarification'}, + 'answer': ('ckeditor.fields.RichTextField', [], {'blank': 'True'}), + 'close_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'close_user': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'clarification_close_user'", 'null': 'True', 'to': u"orm['auth.User']"}), + 'comment': ('ckeditor.fields.RichTextField', [], {'blank': 'True'}), + 'creator': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'open_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), + 'score': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['exmo2010.Score']"}) + }, + 'exmo2010.inviteorgs': { + 'Meta': {'object_name': 'InviteOrgs'}, + 'comment': ('ckeditor.fields.RichTextField', [], {}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'inv_status': ('django.db.models.fields.CharField', [], {'default': "'ALL'", 'max_length': '3'}), + 'monitoring': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['exmo2010.Monitoring']"}), + 'subject': ('django.db.models.fields.TextField', [], {}), + 'timestamp': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}) + }, + 'exmo2010.licensetextfragments': { + 'Meta': {'object_name': 'LicenseTextFragments'}, + 'csv_footer': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}), + 'csv_footer_az': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True', 'blank': 'True'}), + 'csv_footer_en': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True', 'blank': 'True'}), + 'csv_footer_ka': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True', 'blank': 'True'}), + 'csv_footer_ru': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'primary_key': 'True'}), + 'json_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255', 'blank': 'True'}), + 'json_rightsholder': ('django.db.models.fields.URLField', [], {'default': "''", 'max_length': '255', 'blank': 'True'}), + 'json_source': ('django.db.models.fields.URLField', [], {'default': "''", 'max_length': '255', 'blank': 'True'}), + 'json_url': ('django.db.models.fields.URLField', [], {'default': "''", 'max_length': '255', 'blank': 'True'}), + 'page_footer': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}), + 'page_footer_az': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True', 'blank': 'True'}), + 'page_footer_en': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True', 'blank': 'True'}), + 'page_footer_ka': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True', 'blank': 'True'}), + 'page_footer_ru': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True', 'blank': 'True'}) + }, + 'exmo2010.monitoring': { + 'Meta': {'ordering': "('name',)", 'object_name': 'Monitoring'}, + 'finishing_date': ('django.db.models.fields.DateField', [], {}), + 'hidden': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'interact_date': ('django.db.models.fields.DateField', [], {}), + 'map_link': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), + 'name_az': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), + 'name_en': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), + 'name_ka': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), + 'name_ru': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), + 'no_interact': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'openness_expression': ('django.db.models.fields.related.ForeignKey', [], {'default': '8', 'to': "orm['exmo2010.OpennessExpression']"}), + 'publish_date': ('django.db.models.fields.DateField', [], {}), + 'rate_date': ('django.db.models.fields.DateField', [], {}), + 'status': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), + 'time_to_answer': ('django.db.models.fields.PositiveSmallIntegerField', [], {'default': '3'}) + }, + 'exmo2010.opennessexpression': { + 'Meta': {'object_name': 'OpennessExpression'}, + 'code': ('django.db.models.fields.PositiveIntegerField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'default': "'-'", 'max_length': '255'}) + }, + 'exmo2010.organization': { + 'Meta': {'ordering': "('name',)", 'unique_together': "(('name_ru', 'monitoring'), ('name_en', 'monitoring'), ('name_ka', 'monitoring'), ('name_az', 'monitoring'))", 'object_name': 'Organization'}, + 'email': ('exmo2010.models.organization.EmailsField', [], {'null': 'True', 'blank': 'True'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'inv_code': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '6', 'blank': 'True'}), + 'inv_status': ('django.db.models.fields.CharField', [], {'default': "'NTS'", 'max_length': '3'}), + 'monitoring': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['exmo2010.Monitoring']"}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), + 'name_az': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), + 'name_en': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), + 'name_ka': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), + 'name_ru': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), + 'phone': ('exmo2010.models.organization.PhonesField', [], {'null': 'True', 'blank': 'True'}), + 'url': ('django.db.models.fields.URLField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}) + }, + 'exmo2010.parameter': { + 'Meta': {'ordering': "('code', 'name')", 'unique_together': "(('name_ru', 'monitoring'), ('name_en', 'monitoring'), ('name_ka', 'monitoring'), ('name_az', 'monitoring'), ('code', 'monitoring'))", 'object_name': 'Parameter'}, + 'accessible': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'code': ('django.db.models.fields.PositiveIntegerField', [], {}), + 'complete': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'document': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'exclude': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['exmo2010.Organization']", 'null': 'True', 'blank': 'True'}), + 'grounds': ('ckeditor.fields.RichTextField', [], {'blank': 'True'}), + 'grounds_az': ('ckeditor.fields.RichTextField', [], {'null': 'True', 'blank': 'True'}), + 'grounds_en': ('ckeditor.fields.RichTextField', [], {'null': 'True', 'blank': 'True'}), + 'grounds_ka': ('ckeditor.fields.RichTextField', [], {'null': 'True', 'blank': 'True'}), + 'grounds_ru': ('ckeditor.fields.RichTextField', [], {'null': 'True', 'blank': 'True'}), + 'hypertext': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'image': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'monitoring': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['exmo2010.Monitoring']"}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '1000'}), + 'name_az': ('django.db.models.fields.CharField', [], {'max_length': '1000', 'null': 'True', 'blank': 'True'}), + 'name_en': ('django.db.models.fields.CharField', [], {'max_length': '1000', 'null': 'True', 'blank': 'True'}), + 'name_ka': ('django.db.models.fields.CharField', [], {'max_length': '1000', 'null': 'True', 'blank': 'True'}), + 'name_ru': ('django.db.models.fields.CharField', [], {'max_length': '1000', 'null': 'True', 'blank': 'True'}), + 'notes': ('ckeditor.fields.RichTextField', [], {'blank': 'True'}), + 'notes_az': ('ckeditor.fields.RichTextField', [], {'null': 'True', 'blank': 'True'}), + 'notes_en': ('ckeditor.fields.RichTextField', [], {'null': 'True', 'blank': 'True'}), + 'notes_ka': ('ckeditor.fields.RichTextField', [], {'null': 'True', 'blank': 'True'}), + 'notes_ru': ('ckeditor.fields.RichTextField', [], {'null': 'True', 'blank': 'True'}), + 'npa': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'rating_procedure': ('ckeditor.fields.RichTextField', [], {'blank': 'True'}), + 'rating_procedure_az': ('ckeditor.fields.RichTextField', [], {'null': 'True', 'blank': 'True'}), + 'rating_procedure_en': ('ckeditor.fields.RichTextField', [], {'null': 'True', 'blank': 'True'}), + 'rating_procedure_ka': ('ckeditor.fields.RichTextField', [], {'null': 'True', 'blank': 'True'}), + 'rating_procedure_ru': ('ckeditor.fields.RichTextField', [], {'null': 'True', 'blank': 'True'}), + 'topical': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'weight': ('django.db.models.fields.IntegerField', [], {}) + }, + 'exmo2010.qanswer': { + 'Meta': {'unique_together': "(('task', 'question'),)", 'object_name': 'QAnswer'}, + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'numeral_answer': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}), + 'question': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['exmo2010.QQuestion']"}), + 'task': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['exmo2010.Task']"}), + 'text_answer': ('django.db.models.fields.CharField', [], {'max_length': '300', 'blank': 'True'}), + 'variance_answer': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['exmo2010.AnswerVariant']", 'null': 'True', 'blank': 'True'}) + }, + 'exmo2010.qquestion': { + 'Meta': {'object_name': 'QQuestion'}, + 'comment': ('django.db.models.fields.CharField', [], {'max_length': '600', 'blank': 'True'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'qtype': ('django.db.models.fields.PositiveSmallIntegerField', [], {}), + 'question': ('django.db.models.fields.CharField', [], {'max_length': '300'}), + 'questionnaire': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['exmo2010.Questionnaire']"}) + }, + 'exmo2010.questionnaire': { + 'Meta': {'object_name': 'Questionnaire'}, + 'comment': ('django.db.models.fields.CharField', [], {'max_length': '600', 'blank': 'True'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'monitoring': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['exmo2010.Monitoring']", 'unique': 'True'}), + 'title': ('django.db.models.fields.CharField', [], {'max_length': '300', 'blank': 'True'}) + }, + 'exmo2010.score': { + 'Meta': {'ordering': "('task__user__username', 'task__organization__name', 'parameter__code')", 'unique_together': "(('task', 'parameter', 'revision'),)", 'object_name': 'Score'}, + 'accessible': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'accomplished': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'complete': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}), + 'document': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'editor': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'null': 'True', 'blank': 'True'}), + 'found': ('django.db.models.fields.IntegerField', [], {}), + 'hypertext': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'image': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'last_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'null': 'True', 'blank': 'True'}), + 'links': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'parameter': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['exmo2010.Parameter']"}), + 'recommendations': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'revision': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), + 'task': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['exmo2010.Task']"}), + 'topical': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) + }, + 'exmo2010.staticpage': { + 'Meta': {'object_name': 'StaticPage'}, + 'content': ('ckeditor.fields.RichTextField', [], {'default': "''", 'blank': 'True'}), + 'content_az': ('ckeditor.fields.RichTextField', [], {'default': "''", 'null': 'True', 'blank': 'True'}), + 'content_en': ('ckeditor.fields.RichTextField', [], {'default': "''", 'null': 'True', 'blank': 'True'}), + 'content_ka': ('ckeditor.fields.RichTextField', [], {'default': "''", 'null': 'True', 'blank': 'True'}), + 'content_ru': ('ckeditor.fields.RichTextField', [], {'default': "''", 'null': 'True', 'blank': 'True'}), + 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}), + 'description_az': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True', 'blank': 'True'}), + 'description_en': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True', 'blank': 'True'}), + 'description_ka': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True', 'blank': 'True'}), + 'description_ru': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'primary_key': 'True'}) + }, + 'exmo2010.task': { + 'Meta': {'ordering': "('organization__name', 'user__username')", 'unique_together': "(('user', 'organization'),)", 'object_name': 'Task'}, + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'organization': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['exmo2010.Organization']"}), + 'status': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}) + }, + 'exmo2010.taskhistory': { + 'Meta': {'ordering': "('timestamp',)", 'object_name': 'TaskHistory'}, + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'status': ('django.db.models.fields.PositiveSmallIntegerField', [], {'default': '0'}), + 'task': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['exmo2010.Task']"}), + 'timestamp': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}) + }, + 'exmo2010.userprofile': { + 'Meta': {'object_name': 'UserProfile'}, + 'digest_date_journal': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'language': ('django.db.models.fields.CharField', [], {'max_length': '2', 'null': 'True', 'blank': 'True'}), + 'notification_interval': ('django.db.models.fields.PositiveSmallIntegerField', [], {'default': '1'}), + 'notification_self': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'notification_thread': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'notification_type': ('django.db.models.fields.PositiveSmallIntegerField', [], {'default': '0'}), + 'organization': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['exmo2010.Organization']", 'null': 'True', 'blank': 'True'}), + 'phone': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'position': ('django.db.models.fields.CharField', [], {'max_length': '48', 'blank': 'True'}), + 'rt_comment_quantity': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'rt_difference': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'rt_final_openness': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'rt_initial_openness': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'rt_representatives': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'sex': ('django.db.models.fields.PositiveSmallIntegerField', [], {'default': '0', 'db_index': 'True'}), + 'show_score_rev1': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'subscribe': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'unique': 'True'}) + } + } + + complete_apps = ['exmo2010'] \ No newline at end of file diff --git a/exmo/exmo2010/models/score.py b/exmo/exmo2010/models/score.py index 8b7c4e4b..7164cffb 100644 --- a/exmo/exmo2010/models/score.py +++ b/exmo/exmo2010/models/score.py @@ -17,6 +17,7 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . # +from django.contrib.auth.models import User from django.core.exceptions import ValidationError from django.db import models from django.utils.translation import ugettext, ugettext_lazy as _ @@ -71,8 +72,9 @@ class Meta(BaseModel.Meta): links = models.TextField(null=True, blank=True, verbose_name=_('Links')) recommendations = models.TextField(null=True, blank=True, verbose_name=_('Recommendations')) - created = models.DateTimeField(null=True, blank=True, auto_now_add=True) - edited = models.DateTimeField(null=True, blank=True, auto_now=True) + created = models.DateTimeField(auto_now_add=True, null=True) + last_modified = models.DateTimeField(auto_now=True, null=True) + editor = models.ForeignKey(User, null=True, blank=True, verbose_name=_('Editor')) revision = models.PositiveIntegerField(default=REVISION_DEFAULT, choices=REVISION_CHOICE) accomplished = models.BooleanField(default=True) diff --git a/exmo/locale/en/LC_MESSAGES/django.po b/exmo/locale/en/LC_MESSAGES/django.po index 88e613d4..245c807c 100644 --- a/exmo/locale/en/LC_MESSAGES/django.po +++ b/exmo/locale/en/LC_MESSAGES/django.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-05-16 13:20+0400\n" +"POT-Creation-Date: 2014-05-16 17:00+0400\n" "PO-Revision-Date: 2014-03-07 11:21+0400\n" "Last-Translator: Roman Evstifeev \n" "Language-Team: Russian \n" @@ -121,8 +121,8 @@ msgstr "" #: monitorings/templates/monitoring_form.html:57 #: monitorings/templates/set_npa_params.html:54 #: organizations/templates/_organization_form.html:42 -#: parameters/templates/parameter_form.html:75 templates/scores/score.html:196 -#: templates/scores/score.html.py:222 templates/scores/score.html:279 +#: parameters/templates/parameter_form.html:75 templates/scores/score.html:210 +#: templates/scores/score.html.py:236 templates/scores/score.html:293 #: templates/scores/task_scores.html:201 msgid "Save" msgstr "" @@ -222,7 +222,7 @@ msgstr "" #: monitorings/views.py:482 monitorings/views.py:574 monitorings/views.py:636 #: monitorings/views.py:687 monitorings/views.py:1179 #: monitorings/views.py:1181 organizations/views.py:55 -#: organizations/views.py:112 scores/views.py:327 tasks/views.py:52 +#: organizations/views.py:112 scores/views.py:330 tasks/views.py:52 #: tasks/views.py:272 tasks/views.py:313 msgid "Forbidden" msgstr "" @@ -235,7 +235,7 @@ msgstr "" #: claims/views.py:166 dashboard/dashboard.py:119 dashboard/menu.py:76 #: exmo2010/urls.py:219 #: templates/exmo2010/nav_sidebar/monitoring_utility.html:82 -#: templates/scores/score.html:368 +#: templates/scores/score.html:382 msgid "Claims" msgstr "" @@ -253,7 +253,7 @@ msgstr "" #: claims/templates/claim.html:62 #: clarifications/templates/clarification.html:56 -#: templates/scores/score.html:103 templates/scores/score.html.py:348 +#: templates/scores/score.html:117 templates/scores/score.html.py:362 msgid "Reply" msgstr "" @@ -321,7 +321,7 @@ msgstr "" #: clarifications/views.py:154 dashboard/dashboard.py:115 dashboard/menu.py:75 #: exmo2010/urls.py:220 #: templates/exmo2010/nav_sidebar/monitoring_utility.html:78 -#: templates/scores/score.html:367 +#: templates/scores/score.html:381 msgid "Clarifications" msgstr "" @@ -385,7 +385,7 @@ msgstr "" #: custom_comments/views.py:42 dashboard/dashboard.py:111 dashboard/menu.py:74 #: exmo2010/urls.py:218 #: templates/exmo2010/nav_sidebar/monitoring_utility.html:70 -#: templates/scores/score.html:288 +#: templates/scores/score.html:302 msgid "Comments" msgstr "" @@ -493,7 +493,7 @@ msgstr "" msgid "Certificate order notification email" msgstr "" -#: exmo/config.py:96 exmo2010/models/score.py:72 +#: exmo/config.py:96 exmo2010/models/score.py:73 msgid "Links" msgstr "" @@ -718,7 +718,7 @@ msgstr "" #: exmo2010/models/parameter.py:33 #: monitorings/templates/monitoring_parameter_filter.html:179 #: monitorings/templates/monitoring_parameter_found_report.html:63 -#: parameters/forms.py:47 scores/views.py:295 +#: parameters/forms.py:47 scores/views.py:298 #: templates/exmo2010/score_legend.html:91 #: templates/exmo2010/score_legend.html:123 msgid "Parameter" @@ -1194,23 +1194,23 @@ msgstr "" msgid "Variant choice" msgstr "" -#: exmo2010/models/score.py:54 +#: exmo2010/models/score.py:55 msgid "latest revision" msgstr "" -#: exmo2010/models/score.py:55 +#: exmo2010/models/score.py:56 msgid "pre-interact revision" msgstr "" -#: exmo2010/models/score.py:58 exmo2010/models/task.py:249 +#: exmo2010/models/score.py:59 exmo2010/models/task.py:249 msgid "task" msgstr "" -#: exmo2010/models/score.py:59 +#: exmo2010/models/score.py:60 msgid "parameter" msgstr "" -#: exmo2010/models/score.py:64 parameters/forms.py:49 scores/views.py:296 +#: exmo2010/models/score.py:65 parameters/forms.py:49 scores/views.py:299 #: templates/exmo2010/score_legend.html:33 #: templates/exmo2010/score_legend.html:58 #: templates/exmo2010/score_legend.html:79 @@ -1218,7 +1218,7 @@ msgstr "" msgid "Found" msgstr "" -#: exmo2010/models/score.py:65 parameters/forms.py:51 scores/views.py:297 +#: exmo2010/models/score.py:66 parameters/forms.py:51 scores/views.py:300 #: templates/exmo2010/score_legend.html:34 #: templates/exmo2010/score_legend.html:42 #: templates/exmo2010/score_legend.html:50 @@ -1229,7 +1229,7 @@ msgstr "" msgid "Complete" msgstr "" -#: exmo2010/models/score.py:66 parameters/forms.py:53 scores/views.py:298 +#: exmo2010/models/score.py:67 parameters/forms.py:53 scores/views.py:301 #: templates/exmo2010/score_legend.html:34 #: templates/exmo2010/score_legend.html:42 #: templates/exmo2010/score_legend.html:50 @@ -1240,7 +1240,7 @@ msgstr "" msgid "Topical" msgstr "" -#: exmo2010/models/score.py:67 parameters/forms.py:55 scores/views.py:299 +#: exmo2010/models/score.py:68 parameters/forms.py:55 scores/views.py:302 #: templates/exmo2010/score_legend.html:34 #: templates/exmo2010/score_legend.html:42 #: templates/exmo2010/score_legend.html:50 @@ -1251,7 +1251,7 @@ msgstr "" msgid "Accessible" msgstr "" -#: exmo2010/models/score.py:68 parameters/forms.py:57 +#: exmo2010/models/score.py:69 parameters/forms.py:57 #: templates/exmo2010/score_legend.html:33 #: templates/exmo2010/score_legend.html:59 #: templates/exmo2010/score_legend.html:67 @@ -1259,7 +1259,7 @@ msgstr "" msgid "Hypertext" msgstr "" -#: exmo2010/models/score.py:69 parameters/forms.py:59 scores/views.py:301 +#: exmo2010/models/score.py:70 parameters/forms.py:59 scores/views.py:304 #: templates/exmo2010/score_legend.html:33 #: templates/exmo2010/score_legend.html:59 #: templates/exmo2010/score_legend.html:67 @@ -1268,7 +1268,7 @@ msgstr "" msgid "Document" msgstr "" -#: exmo2010/models/score.py:70 parameters/forms.py:61 scores/views.py:302 +#: exmo2010/models/score.py:71 parameters/forms.py:61 scores/views.py:305 #: templates/exmo2010/score_legend.html:33 #: templates/exmo2010/score_legend.html:59 #: templates/exmo2010/score_legend.html:67 @@ -1277,26 +1277,30 @@ msgstr "" msgid "Image" msgstr "" -#: exmo2010/models/score.py:73 templates/scores/score.html:214 -#: templates/scores/score.html.py:271 +#: exmo2010/models/score.py:74 templates/scores/score.html:228 +#: templates/scores/score.html.py:285 #: templates/scores/task_scores_print.html:84 msgid "Recommendations" msgstr "" -#: exmo2010/models/score.py:103 +#: exmo2010/models/score.py:77 +msgid "Editor" +msgstr "" + +#: exmo2010/models/score.py:105 #, python-format msgid "%(criterion)s must be set" msgstr "" -#: exmo2010/models/score.py:111 +#: exmo2010/models/score.py:113 scores/tests.py:255 msgid "Recommendations should change when score is changed" msgstr "" -#: exmo2010/models/score.py:117 +#: exmo2010/models/score.py:119 msgid "Score is not maximum, recommendations should exist" msgstr "" -#: exmo2010/models/score.py:125 +#: exmo2010/models/score.py:127 msgid "A technical error of scores evaluation. To edit the score start from the go back to task page and skip to page of parameter evaluation by link from score table." msgstr "" @@ -1888,8 +1892,8 @@ msgstr "" msgid "Change" msgstr "" -#: monitorings/templates/rating.html:350 templates/scores/score.html:198 -#: templates/scores/score.html.py:224 +#: monitorings/templates/rating.html:350 templates/scores/score.html:212 +#: templates/scores/score.html.py:238 msgid "Cancel" msgstr "" @@ -2048,15 +2052,15 @@ msgstr "" msgid "Save questionnaire" msgstr "" -#: scores/views.py:294 +#: scores/views.py:297 msgid "Code" msgstr "" -#: scores/views.py:300 templates/scores/task_scores_print.html:54 +#: scores/views.py:303 templates/scores/task_scores_print.html:54 msgid "HTML" msgstr "" -#: scores/views.py:303 templates/scores/task_scores_print.html:58 +#: scores/views.py:306 templates/scores/task_scores_print.html:58 msgid "Weight" msgstr "" @@ -2778,7 +2782,7 @@ msgid "You must have approved task for export" msgstr "" #: templates/exmo2010/nav_sidebar/organization_utility.html:26 -#: templates/scores/score.html:91 +#: templates/scores/score.html:105 msgid "Scores" msgstr "" @@ -3133,106 +3137,114 @@ msgstr "" msgid "Notes" msgstr "" -#: templates/scores/score.html:95 +#: templates/scores/score.html:92 +msgid "Initial score`s author" +msgstr "" + +#: templates/scores/score.html:98 +msgid "Current score`s author" +msgstr "" + +#: templates/scores/score.html:109 msgid "show explanations" msgstr "" -#: templates/scores/score.html:96 +#: templates/scores/score.html:110 msgid "hide initial scores" msgstr "" -#: templates/scores/score.html:96 +#: templates/scores/score.html:110 msgid "show initial scores" msgstr "" -#: templates/scores/score.html:104 templates/scores/score.html.py:349 +#: templates/scores/score.html:118 templates/scores/score.html.py:363 msgid "Change score" msgstr "" -#: templates/scores/score.html:112 +#: templates/scores/score.html:126 msgid "Availability ('Found') describes the fact of publishing the information or service corresponding to the particular parameter at the official website (0; 1)." msgstr "" -#: templates/scores/score.html:114 +#: templates/scores/score.html:128 msgid "Comprehensiveness ('Complete') describes the sufficiency of the information published at the official websites for forming an integral idea by the particular parameter (1; 2; 3)." msgstr "" -#: templates/scores/score.html:117 +#: templates/scores/score.html:131 msgid "Relevance ('Topical') describes the updating rate of the information available at the official website as well as its relevance at the moment of the expert analyzes (1; 2; 3)." msgstr "" -#: templates/scores/score.html:120 +#: templates/scores/score.html:134 msgid "Navigability ('Accessible') describes convenience for finding information relevant to the given parameter at the official website. It takes in consideration whether the information is placed in a correct section, and how many consecutive hyperlinks, starting from the home page, are to be followed (1; 2; 3)." msgstr "" -#: templates/scores/score.html:123 +#: templates/scores/score.html:137 msgid "HTML accessibility ('Hypertext') describes the fact of placing the parameter information at the official website in HTML format, facilitating the search (0; 1)." msgstr "" -#: templates/scores/score.html:126 +#: templates/scores/score.html:140 msgid "File accessibility ('Document') describes the fact of placing the document required by the given parameter at the official website in a format that allows the user to store it at his/her hardware devices, to search for and to copy extracts of the text in the document so that the users can further use the information (0; 1)." msgstr "" -#: templates/scores/score.html:129 +#: templates/scores/score.html:143 msgid "Graphic accessibility ('Image') describes the fact of placing the document required by the given parameter at the official website in the graphic format the actual image of the document so that the users can read its original version (0; 1)." msgstr "" -#: templates/scores/score.html:131 +#: templates/scores/score.html:145 msgid "Parameter`s score is the openness of the parameter calculated as a product of criteria fines." msgstr "" -#: templates/scores/score.html:132 +#: templates/scores/score.html:146 msgid "Score changes is the difference between current parameter`s score and the parameter`s score after the initial evaluation." msgstr "" -#: templates/scores/score.html:148 +#: templates/scores/score.html:162 msgid "Parameter`s score" msgstr "" -#: templates/scores/score.html:151 +#: templates/scores/score.html:165 msgid "Score changes" msgstr "" -#: templates/scores/score.html:188 templates/scores/score.html.py:266 +#: templates/scores/score.html:202 templates/scores/score.html.py:280 #: templates/scores/task_scores_print.html:77 msgid "Found information links" msgstr "" -#: templates/scores/score.html:191 templates/scores/score.html.py:217 +#: templates/scores/score.html:205 templates/scores/score.html.py:231 msgid "edit" msgstr "" -#: templates/scores/score.html:203 templates/scores/score.html.py:207 +#: templates/scores/score.html:217 templates/scores/score.html.py:221 #: templates/scores/task_scores_print.html:81 msgid "No links" msgstr "" -#: templates/scores/score.html:229 templates/scores/score.html.py:233 +#: templates/scores/score.html:243 templates/scores/score.html.py:247 #: templates/scores/task_scores_print.html:88 msgid "No recommendations" msgstr "" -#: templates/scores/score.html:319 +#: templates/scores/score.html:333 msgid "Close without answer" msgstr "" -#: templates/scores/score.html:321 +#: templates/scores/score.html:335 msgid "Open comment" msgstr "" -#: templates/scores/score.html:331 +#: templates/scores/score.html:345 msgid "Deadline for answer to your comment is" msgstr "" -#: templates/scores/score.html:340 +#: templates/scores/score.html:354 msgid "There are no comments" msgstr "" -#: templates/scores/score.html:357 +#: templates/scores/score.html:371 msgid "Post comment" msgstr "" -#: templates/scores/score.html:359 +#: templates/scores/score.html:373 msgid "Post comment and change score" msgstr "" diff --git a/exmo/locale/ru/LC_MESSAGES/django.po b/exmo/locale/ru/LC_MESSAGES/django.po index 7e2c2d88..71cdbef2 100644 --- a/exmo/locale/ru/LC_MESSAGES/django.po +++ b/exmo/locale/ru/LC_MESSAGES/django.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-05-16 13:21+0400\n" +"POT-Creation-Date: 2014-05-16 17:00+0400\n" "PO-Revision-Date: 2014-05-15 18:38+0400\n" "Last-Translator: Edited with Lokalize\n" "Language-Team: Russian <>\n" @@ -124,8 +124,8 @@ msgstr "Электронная почта" #: monitorings/templates/monitoring_form.html:57 #: monitorings/templates/set_npa_params.html:54 #: organizations/templates/_organization_form.html:42 -#: parameters/templates/parameter_form.html:75 templates/scores/score.html:196 -#: templates/scores/score.html.py:222 templates/scores/score.html:279 +#: parameters/templates/parameter_form.html:75 templates/scores/score.html:210 +#: templates/scores/score.html.py:236 templates/scores/score.html:293 #: templates/scores/task_scores.html:201 msgid "Save" msgstr "Сохранить" @@ -225,7 +225,7 @@ msgstr "все аналитики" #: monitorings/views.py:482 monitorings/views.py:574 monitorings/views.py:636 #: monitorings/views.py:687 monitorings/views.py:1179 #: monitorings/views.py:1181 organizations/views.py:55 -#: organizations/views.py:112 scores/views.py:327 tasks/views.py:52 +#: organizations/views.py:112 scores/views.py:330 tasks/views.py:52 #: tasks/views.py:272 tasks/views.py:313 msgid "Forbidden" msgstr "Запрещено" @@ -238,7 +238,7 @@ msgstr "Отчет по претензиям для \"%s\"" #: claims/views.py:166 dashboard/dashboard.py:119 dashboard/menu.py:76 #: exmo2010/urls.py:219 #: templates/exmo2010/nav_sidebar/monitoring_utility.html:82 -#: templates/scores/score.html:368 +#: templates/scores/score.html:382 msgid "Claims" msgstr "Претензии" @@ -256,7 +256,7 @@ msgstr "Ваш ответ на претензию" #: claims/templates/claim.html:62 #: clarifications/templates/clarification.html:56 -#: templates/scores/score.html:103 templates/scores/score.html.py:348 +#: templates/scores/score.html:117 templates/scores/score.html.py:362 msgid "Reply" msgstr "Ответить" @@ -324,7 +324,7 @@ msgstr "Отчет по уточнениям для \"%s\"" #: clarifications/views.py:154 dashboard/dashboard.py:115 dashboard/menu.py:75 #: exmo2010/urls.py:220 #: templates/exmo2010/nav_sidebar/monitoring_utility.html:78 -#: templates/scores/score.html:367 +#: templates/scores/score.html:381 msgid "Clarifications" msgstr "Уточнения" @@ -388,7 +388,7 @@ msgstr "статус" #: custom_comments/views.py:42 dashboard/dashboard.py:111 dashboard/menu.py:74 #: exmo2010/urls.py:218 #: templates/exmo2010/nav_sidebar/monitoring_utility.html:70 -#: templates/scores/score.html:288 +#: templates/scores/score.html:302 msgid "Comments" msgstr "Комментарии" @@ -496,7 +496,7 @@ msgstr "Адрес техподдержки по умолчанию" msgid "Certificate order notification email" msgstr "Адресат уведомлений о заказах сертификатов" -#: exmo/config.py:96 exmo2010/models/score.py:72 +#: exmo/config.py:96 exmo2010/models/score.py:73 msgid "Links" msgstr "Ссылки" @@ -721,7 +721,7 @@ msgstr "Импортировать задачу" #: exmo2010/models/parameter.py:33 #: monitorings/templates/monitoring_parameter_filter.html:179 #: monitorings/templates/monitoring_parameter_found_report.html:63 -#: parameters/forms.py:47 scores/views.py:295 +#: parameters/forms.py:47 scores/views.py:298 #: templates/exmo2010/score_legend.html:91 #: templates/exmo2010/score_legend.html:123 msgid "Parameter" @@ -1198,23 +1198,23 @@ msgstr "Ответ числом" msgid "Variant choice" msgstr "Ответ-выбор варианта" -#: exmo2010/models/score.py:54 +#: exmo2010/models/score.py:55 msgid "latest revision" msgstr "последняя ревизия" -#: exmo2010/models/score.py:55 +#: exmo2010/models/score.py:56 msgid "pre-interact revision" msgstr "ревизия до взаимодействия" -#: exmo2010/models/score.py:58 exmo2010/models/task.py:249 +#: exmo2010/models/score.py:59 exmo2010/models/task.py:249 msgid "task" msgstr "задача" -#: exmo2010/models/score.py:59 +#: exmo2010/models/score.py:60 msgid "parameter" msgstr "Параметр" -#: exmo2010/models/score.py:64 parameters/forms.py:49 scores/views.py:296 +#: exmo2010/models/score.py:65 parameters/forms.py:49 scores/views.py:299 #: templates/exmo2010/score_legend.html:33 #: templates/exmo2010/score_legend.html:58 #: templates/exmo2010/score_legend.html:79 @@ -1222,7 +1222,7 @@ msgstr "Параметр" msgid "Found" msgstr "Наличие" -#: exmo2010/models/score.py:65 parameters/forms.py:51 scores/views.py:297 +#: exmo2010/models/score.py:66 parameters/forms.py:51 scores/views.py:300 #: templates/exmo2010/score_legend.html:34 #: templates/exmo2010/score_legend.html:42 #: templates/exmo2010/score_legend.html:50 @@ -1233,7 +1233,7 @@ msgstr "Наличие" msgid "Complete" msgstr "Полнота" -#: exmo2010/models/score.py:66 parameters/forms.py:53 scores/views.py:298 +#: exmo2010/models/score.py:67 parameters/forms.py:53 scores/views.py:301 #: templates/exmo2010/score_legend.html:34 #: templates/exmo2010/score_legend.html:42 #: templates/exmo2010/score_legend.html:50 @@ -1244,7 +1244,7 @@ msgstr "Полнота" msgid "Topical" msgstr "Актуальность" -#: exmo2010/models/score.py:67 parameters/forms.py:55 scores/views.py:299 +#: exmo2010/models/score.py:68 parameters/forms.py:55 scores/views.py:302 #: templates/exmo2010/score_legend.html:34 #: templates/exmo2010/score_legend.html:42 #: templates/exmo2010/score_legend.html:50 @@ -1255,7 +1255,7 @@ msgstr "Актуальность" msgid "Accessible" msgstr "Навигационная доступность" -#: exmo2010/models/score.py:68 parameters/forms.py:57 +#: exmo2010/models/score.py:69 parameters/forms.py:57 #: templates/exmo2010/score_legend.html:33 #: templates/exmo2010/score_legend.html:59 #: templates/exmo2010/score_legend.html:67 @@ -1263,7 +1263,7 @@ msgstr "Навигационная доступность" msgid "Hypertext" msgstr "HTML доступность" -#: exmo2010/models/score.py:69 parameters/forms.py:59 scores/views.py:301 +#: exmo2010/models/score.py:70 parameters/forms.py:59 scores/views.py:304 #: templates/exmo2010/score_legend.html:33 #: templates/exmo2010/score_legend.html:59 #: templates/exmo2010/score_legend.html:67 @@ -1272,7 +1272,7 @@ msgstr "HTML доступность" msgid "Document" msgstr "Файловая доступность" -#: exmo2010/models/score.py:70 parameters/forms.py:61 scores/views.py:302 +#: exmo2010/models/score.py:71 parameters/forms.py:61 scores/views.py:305 #: templates/exmo2010/score_legend.html:33 #: templates/exmo2010/score_legend.html:59 #: templates/exmo2010/score_legend.html:67 @@ -1281,26 +1281,30 @@ msgstr "Файловая доступность" msgid "Image" msgstr "Графическая доступность" -#: exmo2010/models/score.py:73 templates/scores/score.html:214 -#: templates/scores/score.html.py:271 +#: exmo2010/models/score.py:74 templates/scores/score.html:228 +#: templates/scores/score.html.py:285 #: templates/scores/task_scores_print.html:84 msgid "Recommendations" msgstr "Рекомендации" -#: exmo2010/models/score.py:103 +#: exmo2010/models/score.py:77 +msgid "Editor" +msgstr "Редактор" + +#: exmo2010/models/score.py:105 #, python-format msgid "%(criterion)s must be set" msgstr "Критерий '%(criterion)s' не оценен" -#: exmo2010/models/score.py:111 +#: exmo2010/models/score.py:113 scores/tests.py:255 msgid "Recommendations should change when score is changed" msgstr "Рекомендации должны измениться, если оценка изменена" -#: exmo2010/models/score.py:117 +#: exmo2010/models/score.py:119 msgid "Score is not maximum, recommendations should exist" msgstr "Оценка не максимальная, рекомендации должны быть заданы." -#: exmo2010/models/score.py:125 +#: exmo2010/models/score.py:127 msgid "A technical error of scores evaluation. To edit the score start from the go back to task page and skip to page of parameter evaluation by link from score table." msgstr "Техническая ошибка оценки параметра. Для изменения оценки параметра вернитесь на страницу задачи и перейдите к странице оценки параметра по ссылке из таблицы оценок." @@ -1906,8 +1910,8 @@ msgstr "Настройка таблицы" msgid "Change" msgstr "Изменить" -#: monitorings/templates/rating.html:350 templates/scores/score.html:198 -#: templates/scores/score.html.py:224 +#: monitorings/templates/rating.html:350 templates/scores/score.html:212 +#: templates/scores/score.html.py:238 msgid "Cancel" msgstr "Отмена" @@ -2066,15 +2070,15 @@ msgstr "Добавить вопрос" msgid "Save questionnaire" msgstr "Сохранить анкету" -#: scores/views.py:294 +#: scores/views.py:297 msgid "Code" msgstr "Код" -#: scores/views.py:300 templates/scores/task_scores_print.html:54 +#: scores/views.py:303 templates/scores/task_scores_print.html:54 msgid "HTML" msgstr "Html доступность" -#: scores/views.py:303 templates/scores/task_scores_print.html:58 +#: scores/views.py:306 templates/scores/task_scores_print.html:58 msgid "Weight" msgstr "КСЗ" @@ -2796,7 +2800,7 @@ msgid "You must have approved task for export" msgstr "Для экспорта необходима одобренная задача" #: templates/exmo2010/nav_sidebar/organization_utility.html:26 -#: templates/scores/score.html:91 +#: templates/scores/score.html:105 msgid "Scores" msgstr "Оценки" @@ -3163,106 +3167,114 @@ msgstr "Порядок оценки" msgid "Notes" msgstr "Примечание" -#: templates/scores/score.html:95 +#: templates/scores/score.html:92 +msgid "Initial score`s author" +msgstr "Автор первичной оценки" + +#: templates/scores/score.html:98 +msgid "Current score`s author" +msgstr "Автор текущей оценки" + +#: templates/scores/score.html:109 msgid "show explanations" msgstr "показать пояснения" -#: templates/scores/score.html:96 +#: templates/scores/score.html:110 msgid "hide initial scores" msgstr "скрыть первичные оценки" -#: templates/scores/score.html:96 +#: templates/scores/score.html:110 msgid "show initial scores" msgstr "показать первичные оценки" -#: templates/scores/score.html:104 templates/scores/score.html.py:349 +#: templates/scores/score.html:118 templates/scores/score.html.py:363 msgid "Change score" msgstr "Изменить оценку" -#: templates/scores/score.html:112 +#: templates/scores/score.html:126 msgid "Availability ('Found') describes the fact of publishing the information or service corresponding to the particular parameter at the official website (0; 1)." msgstr "Наличие — факт размещения на официальном сайте информации или сервиса, соответствующих параметру (0; 1)." -#: templates/scores/score.html:114 +#: templates/scores/score.html:128 msgid "Comprehensiveness ('Complete') describes the sufficiency of the information published at the official websites for forming an integral idea by the particular parameter (1; 2; 3)." msgstr "Полнота — достаточность объема размещенной на официальном сайте информации для формирования целостного представления по соответствующему параметру (1; 2; 3)." -#: templates/scores/score.html:117 +#: templates/scores/score.html:131 msgid "Relevance ('Topical') describes the updating rate of the information available at the official website as well as its relevance at the moment of the expert analyzes (1; 2; 3)." msgstr "Актуальность — частота обновления информации на официальном сайте и сохранение ценности информации на момент ее анализа экспертами (1; 2; 3)." -#: templates/scores/score.html:120 +#: templates/scores/score.html:134 msgid "Navigability ('Accessible') describes convenience for finding information relevant to the given parameter at the official website. It takes in consideration whether the information is placed in a correct section, and how many consecutive hyperlinks, starting from the home page, are to be followed (1; 2; 3)." msgstr "Навигационная доступность — удобство поиска размещенной на официальном сайте соответствующей параметру информации, с учетом логичности раздела и количества переходов с главной страницы сайта (1; 2; 3)." -#: templates/scores/score.html:123 +#: templates/scores/score.html:137 msgid "HTML accessibility ('Hypertext') describes the fact of placing the parameter information at the official website in HTML format, facilitating the search (0; 1)." msgstr "HTML доступность — факт размещения на официальном сайте соответствующей параметру информации на языке гипертекстовой разметки HTML, который обеспечивает для пользователей удобство ее поиска средствами веб-обозревателя (0; 1)." -#: templates/scores/score.html:126 +#: templates/scores/score.html:140 msgid "File accessibility ('Document') describes the fact of placing the document required by the given parameter at the official website in a format that allows the user to store it at his/her hardware devices, to search for and to copy extracts of the text in the document so that the users can further use the information (0; 1)." msgstr "Файловая доступность — факт размещения на официальном сайте соответствующего параметру документа в формате, обеспечивающем возможность его сохранения на технические средства пользователя и допускающем возможность поиска и копирования фрагмента текста в документе, которая обеспечивает для пользователей дальнейшее использование информации (0; 1)." -#: templates/scores/score.html:129 +#: templates/scores/score.html:143 msgid "Graphic accessibility ('Image') describes the fact of placing the document required by the given parameter at the official website in the graphic format the actual image of the document so that the users can read its original version (0; 1)." msgstr "Графическая доступность — факт размещения на официальном сайте соответствующего параметру документа в графическом формате точного образа документа, который обеспечивает для пользователей возможность ознакомиться с оригиналом документа (0; 1)." -#: templates/scores/score.html:131 +#: templates/scores/score.html:145 msgid "Parameter`s score is the openness of the parameter calculated as a product of criteria fines." msgstr "Оценка параметра — оценка открытости параметра, вычисляемая перемножением штрафов критериев, подробности см. в методике." -#: templates/scores/score.html:132 +#: templates/scores/score.html:146 msgid "Score changes is the difference between current parameter`s score and the parameter`s score after the initial evaluation." msgstr "Изменение оценки — разница между текущей оценкой параметра и оценкой параметра после первоначальной оценки." -#: templates/scores/score.html:148 +#: templates/scores/score.html:162 msgid "Parameter`s score" msgstr "Оценка параметра" -#: templates/scores/score.html:151 +#: templates/scores/score.html:165 msgid "Score changes" msgstr "Изменение оценки" -#: templates/scores/score.html:188 templates/scores/score.html.py:266 +#: templates/scores/score.html:202 templates/scores/score.html.py:280 #: templates/scores/task_scores_print.html:77 msgid "Found information links" msgstr "Ссылки на найденную информацию" -#: templates/scores/score.html:191 templates/scores/score.html.py:217 +#: templates/scores/score.html:205 templates/scores/score.html.py:231 msgid "edit" msgstr "редактировать" -#: templates/scores/score.html:203 templates/scores/score.html.py:207 +#: templates/scores/score.html:217 templates/scores/score.html.py:221 #: templates/scores/task_scores_print.html:81 msgid "No links" msgstr "Нет ссылок" -#: templates/scores/score.html:229 templates/scores/score.html.py:233 +#: templates/scores/score.html:243 templates/scores/score.html.py:247 #: templates/scores/task_scores_print.html:88 msgid "No recommendations" msgstr "Нет рекомендаций" -#: templates/scores/score.html:319 +#: templates/scores/score.html:333 msgid "Close without answer" msgstr "Закрыть без ответа" -#: templates/scores/score.html:321 +#: templates/scores/score.html:335 msgid "Open comment" msgstr "Открыть комментарий" -#: templates/scores/score.html:331 +#: templates/scores/score.html:345 msgid "Deadline for answer to your comment is" msgstr "Крайний срок ответа на ваш комментарий" -#: templates/scores/score.html:340 +#: templates/scores/score.html:354 msgid "There are no comments" msgstr "Комментариев нет" -#: templates/scores/score.html:357 +#: templates/scores/score.html:371 msgid "Post comment" msgstr "Оставить комментарий" -#: templates/scores/score.html:359 +#: templates/scores/score.html:373 msgid "Post comment and change score" msgstr "Оставить комментарий и изменить оценку" diff --git a/exmo/scores/views.py b/exmo/scores/views.py index 62883e37..1f11e02b 100644 --- a/exmo/scores/views.py +++ b/exmo/scores/views.py @@ -77,7 +77,7 @@ def score_view(request, **kwargs): try: score = Score.objects.get(parameter=param, task=task, revision=Score.REVISION_DEFAULT) except Score.DoesNotExist: - # OK, score deos not exist and can be created. + # OK, score does not exist and can be created. score = Score(parameter=param, task=task, revision=Score.REVISION_DEFAULT) else: # User requested score creation by task and param, but score already exist. @@ -95,7 +95,7 @@ def score_view(request, **kwargs): ScoreForm = modelform_factory( Score, - fields=criteria + ['recommendations', 'links'], + fields=criteria + ['recommendations', 'links', 'editor'], widgets=dict((crit, RadioSelect) for crit in criteria)) ScoreForm.base_fields['comment'] = RichTextFormField(config_name='advanced', required=False) @@ -121,7 +121,9 @@ def score_view(request, **kwargs): if 'comment' in request.POST: _add_comment(request, score) - form.save() + score = form.save(commit=False) + score.editor = request.user + score.save() if org.monitoring.is_interact or org.monitoring.is_finishing: return HttpResponseRedirect(reverse('exmo2010:score_view', args=[score.pk])) else: @@ -166,6 +168,7 @@ def score_view(request, **kwargs): context = { 'form': form, 'score': annotate_exmo_perms(score, request.user), + 'score_rev1': annotate_exmo_perms(score_rev1[0] if score_rev1 else None, request.user), 'param': annotate_exmo_perms(param, request.user), 'org': org, 'score_table': score_table, diff --git a/exmo/static/scores/score.css b/exmo/static/scores/score.css index 87ee8b5a..c4410371 100644 --- a/exmo/static/scores/score.css +++ b/exmo/static/scores/score.css @@ -34,11 +34,22 @@ h1 { margin: 20px 0 3px 0; } +.score-header-block p { + margin: 0; +} + +.score-editor { + width: 50%; + float: left; +} + /* == PSEUDO-LINKS BLOCK == */ .pseudo-links-block { - padding-top: 10px; + width: 100%; + overflow: hidden; + padding-top: 20px; margin-bottom: 5px; } diff --git a/exmo/templates/scores/score.html b/exmo/templates/scores/score.html index f2d06513..50ecda56 100644 --- a/exmo/templates/scores/score.html +++ b/exmo/templates/scores/score.html @@ -85,6 +85,20 @@

{% trans "Rating procedure" %}:

{% trans "Notes" %}:

{{ param.notes|safe }} {% endif %} + + {% if request.user.is_expertA and param.monitoring.status != 0 and score.pk %} + {% if score_rev1 %} +
+

{% trans 'Initial score`s author' %}

+

{% if score_rev1.editor %}{{ score_rev1.editor.legal_name }}, {% endif %}{{ score_rev1.last_modified|date:"DATE_FORMAT" }}

+
+ {% endif %} + +
+

{% trans 'Current score`s author' %}

+

{% if score.editor %}{{ score.editor.legal_name }}, {% endif %}{{ score.last_modified|date:"DATE_FORMAT" }}

+
+ {% endif %}