diff --git a/apps/versions/models.py b/apps/versions/models.py index 73bb77eed5a..119bce68fc6 100644 --- a/apps/versions/models.py +++ b/apps/versions/models.py @@ -184,4 +184,4 @@ class Meta: unique_together = (("application", "version"),) def __unicode__(self): - return u'%s: %s - %s' % (self.application, self.min, self.max) + return u'%s %s - %s' % (self.application, self.min, self.max) diff --git a/apps/versions/templates/versions/version.html b/apps/versions/templates/versions/version.html index 9951755bb8e..ab7d9863148 100644 --- a/apps/versions/templates/versions/version.html +++ b/apps/versions/templates/versions/version.html @@ -45,16 +45,16 @@
{{ version.license.name }} {% endif %} - + {% if addon.view_source and request.user.is_authenticated() and version.has_files %} + {# TODO reverse URL #} + + {{ _('View the source') }} + {% endif %} + {% if show_versions_link and not addon.is_selfhosted() %} + + {% endif %} diff --git a/media/css/main-mozilla.css b/media/css/main-mozilla.css index 606570163a2..48bded6b09b 100644 --- a/media/css/main-mozilla.css +++ b/media/css/main-mozilla.css @@ -1085,7 +1085,8 @@ h4.author a { #version-history .oldversion ul.legal li.license { background: url(../../img/amo2009/icons/script_code_red.png) left no-repeat; } -#version-history .oldversion ul.legal li.source { +#version-history .oldversion ul.legal li.source, +.version a.source-code { background: url(../../img/amo2009/icons/page_code.png) left no-repeat; } diff --git a/media/css/main.css b/media/css/main.css index 759e5faf8a0..d2581b32a8b 100644 --- a/media/css/main.css +++ b/media/css/main.css @@ -3019,7 +3019,8 @@ ol.pagination + .num-results { margin: 1.2em 0; padding-top:1px; } -.item blockquote { +.item blockquote, +.version blockquote { font-style: normal; margin: 0; margin-bottom: 0.5em; @@ -3047,7 +3048,8 @@ ol.pagination + .num-results { font-weight: normal; display:block; } -.item h5 span { +.item h5 span, +.version h5 span { font-size: 0.857em; font-weight:normal; white-space: nowrap; diff --git a/media/css/zamboni/zamboni.css b/media/css/zamboni/zamboni.css index a677bc9735d..0707cb077d0 100644 --- a/media/css/zamboni/zamboni.css +++ b/media/css/zamboni/zamboni.css @@ -5,7 +5,8 @@ .section:after, .notification .aux:after, .aux .button-wrapper:after, -.object-lead .button-wrapper:after { +.object-lead .button-wrapper:after, +.article.version:after { content: "."; display: block; clear: both; @@ -1696,8 +1697,23 @@ form .error .note.error { margin-top: .5em; } -.version nav.further-navigation{ +.version nav.further-navigation { + display: block; + padding-top: .5em; + margin-top: 1em; + clear: right; + border-top: 1px dotted #B5D9E5; +} + +.version a.source-code { + display: block; + margin-top: 1em; + padding-left: 20px; +} + +.version a.more-info { float:right; + margin: 0; } .item.version { @@ -1713,6 +1729,10 @@ form .error .note.error { font-size: 1em; } +.article.version { + overflow: visible; +} + .article.version blockquote { padding-right: 16em; clear: left;