diff --git a/media/css/seahub.css b/media/css/seahub.css index e29f4cc11b..ec7690d41f 100644 --- a/media/css/seahub.css +++ b/media/css/seahub.css @@ -2629,6 +2629,16 @@ button.sf-dropdown-toggle:focus { } /* file view online, file edit */ +.file-view-hd { + font-size:1.4em; + margin-bottom:0px; +} +.file-view-op { + margin-top:10px; +} +.file-view-meta-info { + margin:0; +} #shared-link, #shared-upload-link, #shared-link-text, @@ -2664,7 +2674,7 @@ button.sf-dropdown-toggle:focus { #file-view-tip { height:130px; padding:30px 10px 10px; - width:930px; + width:950px; background:#fff; text-align:center; } @@ -2674,24 +2684,28 @@ button.sf-dropdown-toggle:focus { font-family: Consolas,"Liberation Mono",Courier,monospace;/*override .ace_editor*/ min-height: 200px; } -#img-prev { +#img-prev, +#img-next { position:absolute; + top:48%; + text-decoration:none; + color:#888; + width:50px; + height:50px; + background:#fff; + border-radius:100%; + line-height:50px; +} +#img-prev { left:15px; } #img-next { - position:absolute; right:15px; } -#img-prev, -#img-next { - top:48%; - text-decoration:none; - color: #333; - width: 50px; - height: 50px; - background: #fff; - border-radius: 100%; - line-height: 50px; + +#img-prev:hover, +#img-next:hover { + color:#333; } #image-view { padding:1px; @@ -3465,7 +3479,7 @@ button.sf-dropdown-toggle:focus { } .shared-file-op-btn { padding:7px; - margin-top:11px; + margin-top:9px; } /*random password */ #share-popup .passwd-wrapper, diff --git a/seahub/templates/shared_file_view.html b/seahub/templates/shared_file_view.html index ceb0df1937..8ef2fdde11 100644 --- a/seahub/templates/shared_file_view.html +++ b/seahub/templates/shared_file_view.html @@ -13,7 +13,7 @@ {% endif %}
-

{{ file_name }}

+

{{ file_name }}

{% if zipped %}

{% trans "Current path: "%} @@ -42,10 +42,7 @@

-
- {% include 'snippets/file_content_html.html' %} -
- + {% include 'snippets/file_content_html.html' %}
{% csrf_token %}

{% trans "Save To:" %}

diff --git a/seahub/templates/snippets/file_content_html.html b/seahub/templates/snippets/file_content_html.html index 5552c1be68..e323792f7f 100644 --- a/seahub/templates/snippets/file_content_html.html +++ b/seahub/templates/snippets/file_content_html.html @@ -4,7 +4,7 @@ content of files that can be viewed online shows here. For details please refer to 'snippets/file_content_js.html'. {% endcomment %} -
+
{% include 'snippets/file_encoding.html' %} {% if not err %} {% if filetype == 'Text' or filetype == 'Markdown' %} diff --git a/seahub/templates/view_file_base.html b/seahub/templates/view_file_base.html index 005b567f42..674ee6afec 100644 --- a/seahub/templates/view_file_base.html +++ b/seahub/templates/view_file_base.html @@ -13,47 +13,32 @@ {% block main_css_class %}{% endblock %} {# remove the padding-top css #} {% block main_content %} -
-

{{ filename }} - {% if is_starred %} - - {% else %} - - {% endif %} +
+
+

+ {{ filename }} + {% if is_starred %} + + {% else %} + + {% endif %} - {% if is_pro %} - {% trans - {% endif %} -

-
- -
-

- {% trans "Current Path: "%} - {% for name, link in zipped %} - {% if not forloop.last %} - {{ name }} / - {% else %} - {{ name }} - {% endif %} - {% endfor %} -

-
- -
-
-
- {% avatar latest_contributor 24 %} {{ latest_contributor|email2nickname }} + {% if is_pro %} + {% trans + {% endif %} +

+
+ {{ latest_contributor|email2nickname }} {{ last_modified|translate_seahub_time}} {% block update_detail %} {% if last_commit_id %} {% trans "updated this file"%}. {% endif %} {% endblock %} -
+
-
+
{% if can_lock_unlock_file %} {% if not file_locked %} @@ -82,22 +67,21 @@ -
- -
-
- {% if err %} -
- {% if err != 'invalid extension' %} -

{{ err }}

- {% endif %} -
- {% else %} +
+
+ +
+ {% if err %} +
+ {% if err != 'invalid extension' %} +

{{ err }}

+ {% endif %} +
+ {% else %} {% block file_view %}{% endblock %} - {% endif %} -
+ {% endif %}
{% include "snippets/file_share_popup.html" %} @@ -301,7 +285,7 @@ if (ref_list.length > 1 && ref_list[0].indexOf('search') > 0) { $(window).load(function() { if (highlight_kw) { // hl kw in file title - highlight_kw($('#view-hd')[0]); + highlight_kw($('.file-view-hd span')[0]); // hl kw in file content if ('{{filetype}}' == 'Markdown') { diff --git a/seahub/templates/view_history_file.html b/seahub/templates/view_history_file.html index 61043b4e5b..894070151b 100644 --- a/seahub/templates/view_history_file.html +++ b/seahub/templates/view_history_file.html @@ -12,30 +12,18 @@ {% block main_css_class %}{% endblock %} {# remove the padding-top css #} {% block main_content %} -
- {% block view_hd %} -

- {{file_name}} - ({{ current_commit.props.ctime|tsstr_sec }}) -

- {% endblock %} -
- -
-
-

- {% block file_path %} - {% trans "Current Path: "%} - {% for name, link in zipped %} - {% if not forloop.last %} {{ name }} / {% else %} {{ name }} {% endif %} - {% endfor %} - {% endblock %} -

- - {% trans "Download"%} +
+
+

{{file_name}}

+ {% block file_path %} +

{{ current_commit.props.ctime|tsstr_sec }}

+ {% endblock %}
- {% include 'snippets/file_content_html.html' %} + + {% trans "Download"%}
+ + {% include 'snippets/file_content_html.html' %} {% endblock %} {% block extra_script %} diff --git a/seahub/templates/view_snapshot_file.html b/seahub/templates/view_snapshot_file.html index c76e4bede7..05486b7ddf 100644 --- a/seahub/templates/view_snapshot_file.html +++ b/seahub/templates/view_snapshot_file.html @@ -1,17 +1 @@ {% extends 'view_history_file.html' %} -{% load seahub_tags i18n %} -{% load url from future %} - -{% block view_hd %} -

- {{file_name}} - ({{ current_commit.props.ctime|tsstr_sec }}) -

-{% endblock %} - -{% block file_path %} - {% trans "Current Path: "%} - {% for name, link in zipped %} - {% if not forloop.last %} {{ name }} / {% else %} {{ name }} {% endif %} - {% endfor %} -{% endblock %} diff --git a/seahub/templates/view_trash_file.html b/seahub/templates/view_trash_file.html index bfff09ceca..221d4f2fcf 100644 --- a/seahub/templates/view_trash_file.html +++ b/seahub/templates/view_trash_file.html @@ -2,10 +2,6 @@ {% load i18n %} {% load url from future %} -{% block view_hd %} -

{{file_name}}

-{% endblock %} - {% block file_path %} - {% trans "Current Path: "%}{% trans "Trash" %} +

{% trans "Current Path: "%}{% trans "Trash" %}

{% endblock %}