mirror of
https://github.com/haiwen/seahub.git
synced 2025-08-02 07:47:32 +00:00
Merge pull request #1298 from haiwen/file-view
[file view] use icons for operations
This commit is contained in:
commit
9dcd6cdc7f
@ -20,6 +20,7 @@
|
||||
* common class ..........common class
|
||||
*
|
||||
* Widget
|
||||
* (ui widgets)
|
||||
* (...)
|
||||
* discussions/comments
|
||||
* custom select2
|
||||
@ -160,6 +161,8 @@
|
||||
.sf2-icon-move:before { content: "\e029"; }
|
||||
.sf2-icon-reply:before { content: "\e02a"; }
|
||||
.sf2-icon-invite:before { content: "\e02b"; }
|
||||
.sf2-icon-lock:before { content: "\e02c"; }
|
||||
.sf2-icon-unlock:before { content: "\e02d"; }
|
||||
|
||||
/******* tags **********/
|
||||
body,
|
||||
@ -596,6 +599,30 @@ textarea:-moz-placeholder {/* for FF */
|
||||
padding:0 5px;
|
||||
color:#818a91;
|
||||
}
|
||||
/**** btn-group ****/
|
||||
.sf-btn-group {
|
||||
}
|
||||
.sf-btn-group-btn {
|
||||
float:left;
|
||||
padding: 5px 10px;
|
||||
margin:0;
|
||||
background:#fff;
|
||||
border-radius:0;
|
||||
border-right-width:0;
|
||||
}
|
||||
.sf-btn-group-btn-first {
|
||||
border-top-left-radius:2px;
|
||||
border-bottom-left-radius:2px;
|
||||
}
|
||||
.sf-btn-group-btn-last {
|
||||
border-right-width:1px;
|
||||
border-top-right-radius:2px;
|
||||
border-bottom-right-radius:2px;
|
||||
}
|
||||
.sf2-icon-edit.sf-btn-group-btn {
|
||||
font-size:20px;
|
||||
opacity:1;
|
||||
}
|
||||
/****paginator****/
|
||||
#paginator {
|
||||
text-align:center;
|
||||
@ -2012,7 +2039,6 @@ button.sf-dropdown-toggle:focus {
|
||||
text-align:right;
|
||||
margin-bottom:4px;
|
||||
}
|
||||
#file-op button,
|
||||
.repo-op .op-btn {
|
||||
*margin-left:5px;/* for ie 7*/
|
||||
}
|
||||
@ -2496,10 +2522,6 @@ button.sf-dropdown-toggle:focus {
|
||||
-moz-border-radius:3px;
|
||||
margin-top:12px;
|
||||
}
|
||||
#file-op .op-btn,
|
||||
#file-op .sf-btn-link {
|
||||
padding:2px 8px;
|
||||
}
|
||||
#file-enc-cont {
|
||||
width:950px;
|
||||
margin:-20px auto 6px;
|
||||
|
Binary file not shown.
@ -51,4 +51,6 @@
|
||||
<glyph glyph-name="move241" unicode="" d="M256 386l0 51-203 0 0-362 406 0 0 311z m55-226l0 53-181 0 0 52 184 0 0 53 76-77z"/>
|
||||
<glyph glyph-name="reply" unicode="" d="M235 326c108 0 207-98 213-217-53 47-119 77-192 77-6 0-15 0-21 0l0-94c0-7-5-9-9-5l-158 160c-4 5-4 11 0 15l158 163c4 4 9 2 9-5z"/>
|
||||
<glyph glyph-name="invite" unicode="" d="M303 286l177 0 0-43-177 0z m68 72l39 0 0-189-39 0z m-170-125c53 0 85 87 85 136 0 49-39 92-85 92-47 0-86-41-86-92 0-51 32-136 86-136z m0-184c147 0 168 0 168 45 0 64-75 115-168 115-94 0-169-51-169-115 0-45 21-45 169-45z"/>
|
||||
<glyph glyph-name="lock" unicode="" d="M405 337l-10 0 0 98c0 17-11 28-26 28l-232 0c-11 0-20-9-20-19l0-109-10 0c-7 0-11-4-11-11l0-264c0-5 4-11 11-11l298 0c7 0 11 6 11 11l0 264c2 9-4 13-11 13z m-241 53c0 17 11 28 26 28l141 0c10 0 19-8 19-19l0-62-186 0z m169-155c0-5-4-7-7-7l-34 0c-4 0-6-4-6-6l0-58c0-4-4-6-7-6l-34 0c-4 0-6 4-6 6l0 56c0 4-4 6-6 6l-39 0c-4 0-6 4-6 7l0 34c0 4 4 6 6 6l126 0c4 0 11 0 11-2 2-2 2-4 2-4z"/>
|
||||
<glyph glyph-name="unlock" unicode="" d="M405 337l-241 0 0 53c0 17 11 28 26 28l141 0c10 0 19-8 19-19l0-19 45 0 0 55c0 17-11 28-26 28l-232 0c-11 0-20-9-20-19l0-109-10 0c-7 0-11-4-11-11l0-264c0-5 4-11 11-11l298 0c7 0 11 6 11 11l0 264c2 9-4 13-11 13z m-72-102c0-5-4-7-7-7l-34 0c-4 0-6-4-6-6l0-58c0-4-4-6-7-6l-34 0c-4 0-6 4-6 6l0 56c0 4-4 6-6 6l-39 0c-4 0-6 4-6 7l0 34c0 4 4 6 6 6l126 0c4 0 11 0 11-2 2-2 2-4 2-4z"/>
|
||||
</font></defs></svg>
|
||||
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 17 KiB |
Binary file not shown.
Binary file not shown.
@ -53,25 +53,25 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div class="fright">
|
||||
<div class="fright sf-btn-group">
|
||||
{% if can_lock_unlock_file %}
|
||||
{% if not file_locked %}
|
||||
<button id="lock-file" class="op-btn">{% trans "Lock" %}</button>
|
||||
<button id="unlock-file" class="op-btn hide">{% trans "Unlock" %}</button>
|
||||
<button id="lock-file" class="sf-btn-group-btn sf-btn-group-btn-first op-icon sf2-icon-lock" title="{% trans "Lock" %}"></button>
|
||||
<button id="unlock-file" class="sf-btn-group-btn sf-btn-group-btn-first op-icon sf2-icon-unlock hide" title="{% trans "Unlock" %}"></button>
|
||||
{% elif locked_by_me %}
|
||||
<button id="unlock-file" class="op-btn">{% trans "Unlock" %}</button>
|
||||
<button id="lock-file" class="op-btn hide">{% trans "Lock" %}</button>
|
||||
<button id="unlock-file" class="sf-btn-group-btn sf-btn-group-btn-first op-icon sf2-icon-unlock" title="{% trans "Unlock" %}"></button>
|
||||
<button id="lock-file" class="sf-btn-group-btn sf-btn-group-btn-first op-icon sf2-icon-lock hide" title="{% trans "Lock" %}"></button>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if not repo.encrypted %}
|
||||
{% if request.user.permissions.can_generate_shared_link %}
|
||||
<button id="share" class="op-btn" data-link="{{ file_shared_link }}" data-token="{{ fileshare.token }}">{% trans "Share" %}</button>
|
||||
<button id="share" class="sf-btn-group-btn op-icon sf2-icon-share" data-link="{{ file_shared_link }}" data-token="{{ fileshare.token }}" title="{% trans "Share" %}"></button>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if file_perm == 'rw' %}
|
||||
<a class="sf-btn-link" id="history" href="{% url 'file_revisions' repo.id %}?p={{ path|urlencode }}">{% trans "History" %}</a>
|
||||
<a class="sf-btn-group-btn sf-btn-link op-icon sf2-icon-clock" id="history" href="{% url 'file_revisions' repo.id %}?p={{ path|urlencode }}" title="{% trans "History" %}"></a>
|
||||
{% endif %}
|
||||
|
||||
{% if request.user.is_authenticated and can_edit_file %}
|
||||
@ -79,9 +79,9 @@
|
||||
{% endblock %}
|
||||
{% endif %}
|
||||
|
||||
<a class="sf-btn-link" href="?dl=1" id="download">{% trans "Download"%}</a>
|
||||
<a class="sf-btn-group-btn sf-btn-link op-icon sf2-icon-download" href="?dl=1" id="download" title="{% trans "Download"%}"></a>
|
||||
|
||||
<button id="discuss" class="op-btn">{% trans "Comment" %}</button>
|
||||
<button id="discuss" class="sf-btn-group-btn sf-btn-group-btn-last op-icon sf2-icon-msgs" title="{% trans "Comment" %}"></button>
|
||||
</div>
|
||||
|
||||
<div id="file-discussions" class="right-side-panel"></div>
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
{% block edit_file %}
|
||||
{% if file_perm == 'rw' and not err%}
|
||||
<a class="sf-btn-link" href="{{ SITE_ROOT }}repo/{{ repo.id }}/file/edit/?p={{ path|urlencode }}&file_enc={{file_enc}}" id="edit">{% trans "Edit"%}</a>
|
||||
<a class="sf-btn-group-btn sf-btn-link op-icon sf2-icon-edit" href="{{ SITE_ROOT }}repo/{{ repo.id }}/file/edit/?p={{ path|urlencode }}&file_enc={{file_enc}}" id="edit" title="{% trans "Edit"%}"></a>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
{% block edit_file %}
|
||||
{% if file_perm == 'rw' and not err%}
|
||||
<a class="sf-btn-link" href="{{ SITE_ROOT }}repo/{{ repo.id }}/file/edit/?p={{ path|urlencode }}&file_enc={{file_enc}}" id="edit">{% trans "Edit"%}</a>
|
||||
<a class="sf-btn-group-btn sf-btn-link op-icon sf2-icon-edit" href="{{ SITE_ROOT }}repo/{{ repo.id }}/file/edit/?p={{ path|urlencode }}&file_enc={{file_enc}}" id="edit" title="{% trans "Edit" %}"></a>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user