# HG changeset patch # User gibus # Date 1358773930 -3600 # Node ID c9a646707d86cf4d255e2fd1517d0de9f6ec7e90 # Parent af74b898d551d4fdb80bc30e2a07ff852ebaaffb Clean versions list/comparison/view and add original version. diff -r af74b898d551 -r c9a646707d86 src/cm/locale/bg/LC_MESSAGES/django.mo Binary file src/cm/locale/bg/LC_MESSAGES/django.mo has changed diff -r af74b898d551 -r c9a646707d86 src/cm/locale/bg/LC_MESSAGES/django.po --- a/src/cm/locale/bg/LC_MESSAGES/django.po Mon Jan 21 09:41:46 2013 +0100 +++ b/src/cm/locale/bg/LC_MESSAGES/django.po Mon Jan 21 14:12:10 2013 +0100 @@ -1181,6 +1181,13 @@ msgid "Most recent version" msgstr "Най—нова версия" +#: templates/site/text_history.html:63 +#: templates/site/text_history_compare.html:30 +#: templates/site/text_history_version.html:31 +#, fuzzy +msgid "Original version" +msgstr "Оригинална версия" + #: templates/site/text_history.html:67 msgid "Compare selected versions" msgstr "Сравнете избраните версий" diff -r af74b898d551 -r c9a646707d86 src/cm/locale/en/LC_MESSAGES/django.po --- a/src/cm/locale/en/LC_MESSAGES/django.po Mon Jan 21 09:41:46 2013 +0100 +++ b/src/cm/locale/en/LC_MESSAGES/django.po Mon Jan 21 14:12:10 2013 +0100 @@ -1144,6 +1144,12 @@ msgid "Most recent version" msgstr "" +#: templates/site/text_history.html:63 +#: templates/site/text_history_compare.html:30 +#: templates/site/text_history_version.html:31 +msgid "Original version" +msgstr "" + #: templates/site/text_history.html:67 msgid "Compare selected versions" msgstr "" diff -r af74b898d551 -r c9a646707d86 src/cm/locale/es/LC_MESSAGES/django.po --- a/src/cm/locale/es/LC_MESSAGES/django.po Mon Jan 21 09:41:46 2013 +0100 +++ b/src/cm/locale/es/LC_MESSAGES/django.po Mon Jan 21 14:12:10 2013 +0100 @@ -1252,6 +1252,13 @@ msgid "Most recent version" msgstr "Versión más reciente" +#: templates/site/text_history.html:63 +#: templates/site/text_history_compare.html:30 +#: templates/site/text_history_version.html:31 +#, fuzzy +msgid "Last version" +msgstr "Versión original" + #: templates/site/text_history.html:67 msgid "Compare selected versions" msgstr "Comparar las versiones seleccionada" diff -r af74b898d551 -r c9a646707d86 src/cm/locale/fr/LC_MESSAGES/django.mo Binary file src/cm/locale/fr/LC_MESSAGES/django.mo has changed diff -r af74b898d551 -r c9a646707d86 src/cm/locale/fr/LC_MESSAGES/django.po --- a/src/cm/locale/fr/LC_MESSAGES/django.po Mon Jan 21 09:41:46 2013 +0100 +++ b/src/cm/locale/fr/LC_MESSAGES/django.po Mon Jan 21 14:12:10 2013 +0100 @@ -1262,6 +1262,12 @@ msgid "Most recent version" msgstr "Version la plus récente" +#: templates/site/text_history.html:63 +#: templates/site/text_history_compare.html:30 +#: templates/site/text_history_version.html:31 +msgid "Original version" +msgstr "Version originale" + #: templates/site/text_history.html:67 msgid "Compare selected versions" msgstr "Comparer les versions selectionnées" diff -r af74b898d551 -r c9a646707d86 src/cm/locale/it/LC_MESSAGES/django.mo Binary file src/cm/locale/it/LC_MESSAGES/django.mo has changed diff -r af74b898d551 -r c9a646707d86 src/cm/locale/it/LC_MESSAGES/django.po --- a/src/cm/locale/it/LC_MESSAGES/django.po Mon Jan 21 09:41:46 2013 +0100 +++ b/src/cm/locale/it/LC_MESSAGES/django.po Mon Jan 21 14:12:10 2013 +0100 @@ -1323,6 +1323,13 @@ msgid "Most recent version" msgstr "Versioni più recenti" +#: templates/site/text_history.html:63 +#: templates/site/text_history_compare.html:30 +#: templates/site/text_history_version.html:31 +#, fuzzy +msgid "Last version" +msgstr "Versione originale" + #: templates/site/text_history.html:67 msgid "Compare selected versions" msgstr "Compara le versioni selezionate" diff -r af74b898d551 -r c9a646707d86 src/cm/locale/no/LC_MESSAGES/django.mo Binary file src/cm/locale/no/LC_MESSAGES/django.mo has changed diff -r af74b898d551 -r c9a646707d86 src/cm/locale/no/LC_MESSAGES/django.po --- a/src/cm/locale/no/LC_MESSAGES/django.po Mon Jan 21 09:41:46 2013 +0100 +++ b/src/cm/locale/no/LC_MESSAGES/django.po Mon Jan 21 14:12:10 2013 +0100 @@ -1166,6 +1166,13 @@ msgid "Most recent version" msgstr "Nyeste versjon" +#: templates/site/text_history.html:63 +#: templates/site/text_history_compare.html:30 +#: templates/site/text_history_version.html:31 +#, fuzzy +msgid "Last version" +msgstr "Original versjon" + #: templates/site/text_history.html:67 msgid "Compare selected versions" msgstr "Sammenlikn valgte versjoner" diff -r af74b898d551 -r c9a646707d86 src/cm/locale/pt_BR/LC_MESSAGES/django.mo Binary file src/cm/locale/pt_BR/LC_MESSAGES/django.mo has changed diff -r af74b898d551 -r c9a646707d86 src/cm/locale/pt_BR/LC_MESSAGES/django.po --- a/src/cm/locale/pt_BR/LC_MESSAGES/django.po Mon Jan 21 09:41:46 2013 +0100 +++ b/src/cm/locale/pt_BR/LC_MESSAGES/django.po Mon Jan 21 14:12:10 2013 +0100 @@ -1161,18 +1161,28 @@ msgstr "Versões" #: templates/site/text_history.html:59 +#, fuzzy msgid "Compare last two versions" -msgstr "" +msgstr "Comparar duas últimas versões" #: templates/site/text_history.html:61 #: templates/site/text_history_compare.html:37 #: templates/site/text_history_version.html:38 +#, fuzzy msgid "Most recent version" -msgstr "" +msgstr "Versão mais recente" + +#: templates/site/text_history.html:63 +#: templates/site/text_history_compare.html:30 +#: templates/site/text_history_version.html:31 +#, fuzzy +msgid "Last version" +msgstr "Versão original" #: templates/site/text_history.html:67 +#, fuzzy msgid "Compare selected versions" -msgstr "" +msgstr "Compare as versões seleccionadas" #: templates/site/text_history.html:77 #, fuzzy @@ -1189,8 +1199,9 @@ msgstr "Autor" #: templates/site/text_history.html:82 +#, fuzzy msgid "Created" -msgstr "" +msgstr "Criado" #: templates/site/text_history.html:83 templates/site/text_list.html:141 #, fuzzy @@ -1203,8 +1214,9 @@ #: templates/site/text_history.html:106 #: templates/site/text_history_version.html:32 +#, fuzzy msgid "Compare with previous version" -msgstr "" +msgstr "Comparar com versão anterior" #: templates/site/text_history.html:108 #, fuzzy diff -r af74b898d551 -r c9a646707d86 src/cm/templates/site/text_history.html --- a/src/cm/templates/site/text_history.html Mon Jan 21 09:41:46 2013 +0100 +++ b/src/cm/templates/site/text_history.html Mon Jan 21 14:12:10 2013 +0100 @@ -59,6 +59,8 @@
  • {% blocktrans %}Compare last two versions{% endblocktrans %}
  • /
  • {% blocktrans %}Most recent version{% endblocktrans %}
  • +
  • /
  • +
  • {% blocktrans %}Original version{% endblocktrans %}
  • {% endif %} diff -r af74b898d551 -r c9a646707d86 src/cm/templates/site/text_history_compare.html --- a/src/cm/templates/site/text_history_compare.html Mon Jan 21 09:41:46 2013 +0100 +++ b/src/cm/templates/site/text_history_compare.html Mon Jan 21 14:12:10 2013 +0100 @@ -27,14 +27,16 @@
    diff -r af74b898d551 -r c9a646707d86 src/cm/templates/site/text_history_version.html --- a/src/cm/templates/site/text_history_version.html Mon Jan 21 09:41:46 2013 +0100 +++ b/src/cm/templates/site/text_history_version.html Mon Jan 21 14:12:10 2013 +0100 @@ -28,13 +28,18 @@
  • {% blocktrans %}Version list{% endblocktrans %}
  •  /
  • {% if text_version.get_previous_version %} +
  •  ««{{ first_version.get_version_number }}
  • +
  •  title=
  • + {% ifnotequal text_version.get_previous_version.key first_version.key %}
  •  «{{ text_version.get_previous_version.get_version_number }}
  • -
  •  title=
  • + {% endifnotequal %} {% endif %}
  • {% blocktrans with text_version.get_version_number as version_number %}Version {{ version_number }}{% endblocktrans %}
  • {% if text_version.get_next_version %} + {% ifnotequal text_version.get_next_version.key text.last_text_version.key %} +
  •  {{ text_version.get_next_version.get_version_number }}»
  • + {% endifnotequal %}
  •  {% blocktrans %}Compare with next version{% endblocktrans %}
  • -
  •  {{ text_version.get_next_version.get_version_number }}»
  •  {{ text.last_text_version.get_version_number }}»»
  • {% endif %} diff -r af74b898d551 -r c9a646707d86 src/cm/views/texts.py --- a/src/cm/views/texts.py Mon Jan 21 09:41:46 2013 +0100 +++ b/src/cm/views/texts.py Mon Jan 21 14:12:10 2013 +0100 @@ -443,9 +443,12 @@ def text_history_version(request, key, version_key): text = get_text_by_keys_or_404(key) text_version = get_textversion_by_keys_or_404(version_key, key=key) + text_versions = text.get_versions() + first_version = text_versions[len(text_versions) - 1] template_dict = {'text' : text, 'text_version' : text_version, 'embed_code' : embed_html(key, 'id="text_view_frame" name="text_view_frame"', version_key), + 'first_version':first_version, } return render_to_response('site/text_history_version.html', template_dict, @@ -470,12 +473,15 @@ dif = diff_match_patch2() content = dif.diff_prettyHtml_one_way(dif.diff_main(v1.get_content(), v2.get_content()), mode='ins_del') + text_versions = text.get_versions() + first_version = text_versions[len(text_versions) - 1] template_dict = { 'text' : text, 'v1': v1, 'v2': v2, 'content' : content.strip(), 'empty' : '
    '==content, + 'first_version':first_version, } return render_to_response('site/text_history_compare.html', template_dict, @@ -495,7 +501,8 @@ paginate_by = get_int(request.GET,'paginate',TEXT_PAGINATION) last_last_version = text_versions[1] if len(text_versions)>1 else None - context = {'text':text, 'last_version':text.last_text_version, 'last_last_version':last_last_version} + first_version = text_versions[len(text_versions) - 1] + context = {'text':text, 'last_version':text.last_text_version, 'last_last_version':last_last_version, 'first_version':first_version} return object_list(request, text_versions, template_name = 'site/text_history.html', paginate_by = paginate_by,