diff --git a/lms/static/sass/course/wiki/_wiki.scss b/lms/static/sass/course/wiki/_wiki.scss index a053946a80..23b032a4e9 100644 --- a/lms/static/sass/course/wiki/_wiki.scss +++ b/lms/static/sass/course/wiki/_wiki.scss @@ -1,7 +1,7 @@ section.wiki { padding-top: 25px; - header { + > header { height: 33px; margin-bottom: 36px; padding-bottom: 26px; @@ -406,6 +406,7 @@ section.wiki { letter-spacing: 0 !important; &:hover { + color: $base-font-color; text-decoration: none; } @@ -621,14 +622,58 @@ section.wiki { .attachment-options { height: 40px; - margin-bottom: 30px; - padding: 20px 0 2px; - border-bottom: 1px solid $light-gray; - border-top: 1px solid $light-gray; + margin: 40px 0 30px; } .attachment-list { - + ul { + list-style: none; + padding: 0; + } + + li { + margin-bottom: 15px; + border: 1px solid #DDD; + background: #F9F9F9; + @include border-radius(5px); + } + + header, + .attachment-details { + padding: 12px 15px; + } + + .attachment-details { + background: #eee; + @include border-radius(0 0 5px 5px); + } + + h3 { + a { + font-weight: bold; + font-size: 0.9em; + } + + .badge { + float: right; + font-size: 0.6em; + line-height: 20px; + color: #aaa; + } + } + + .attachment-description { + font-size: 0.8em; + } + + table { + width: 100%; + font-size: 0.8em; + } + + .attachment-actions .btn { + float: right; + } } diff --git a/lms/templates/wiki/plugins/attachments/index.html b/lms/templates/wiki/plugins/attachments/index.html index d110bc709e..d448392933 100644 --- a/lms/templates/wiki/plugins/attachments/index.html +++ b/lms/templates/wiki/plugins/attachments/index.html @@ -62,66 +62,68 @@
-

{% trans "The following files are available for this article. Copy the markdown tag to directly refer to a file from the article text." %}

- {% for attachment in attachments %} - - - - - - - - - - - - - - - -
-

- {{ attachment.current_revision.get_filename }} - {{ attachment.current_revision.created|naturaltime }} - {% if attachment.current_revision.deleted %} - {% trans "deleted" %} - {% endif %} -

- {{ attachment.current_revision.description }} -
{% trans "Markdown tag" %}{% trans "Uploaded by" %}{% trans "Size" %} - {% if attachment|can_write:user %} -

- {% if not attachment.current_revision.deleted %} - {% trans "Replace" %} - {% if attachment.article = article %} - {% trans "Delete" %} - {% else %} - {% trans "Detach" %} + +

[attachment:{{ attachment.id }}] - {% if attachment.current_revision.user %}{{ attachment.current_revision.user }}{% else %}{% if user|is_moderator %}{{ attachment.current_revision.ip_address|default:"anonymous (IP not logged)" }}{% else %}{% trans "anonymous (IP logged)" %}{% endif %}{% endif %} - {{ attachment.current_revision.get_size|filesizeformat }}
- {% empty %} -

{% trans "There are no attachments for this article." %}

- {% endfor %} + +
+ + + + + + + + + + + + + + +
{% trans "Markdown tag" %}{% trans "Uploaded by" %}{% trans "Size" %}{% trans "File History" %} + {% if attachment|can_write:user %} + {% if not attachment.current_revision.deleted %} + {% if attachment.article = article %} + {% trans "Delete" %} + {% else %} + {% trans "Detach" %} + {% endif %} + + {% trans "Replace" %} + + {% else %} + {% if attachment.current_revision.previous_revision.id %} +
+ {% csrf_token %} + +
+ {% endif %} + {% endif %} + {% endif %} +
[attachment:{{ attachment.id }}] + {% if attachment.current_revision.user %}{{ attachment.current_revision.user }}{% else %}{% if user|is_moderator %}{{ attachment.current_revision.ip_address|default:"anonymous (IP not logged)" }}{% else %}{% trans "anonymous (IP logged)" %}{% endif %}{% endif %} + {{ attachment.current_revision.get_size|filesizeformat }}{{ attachment.attachmentrevision_set.all.count }} {% trans "revisions" %}
+
+ + {% empty %} +

{% trans "There are no attachments for this article." %}

+ {% endfor %} +