mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-14 22:33:17 +00:00
[starred files] bugfix
This commit is contained in:
@@ -70,7 +70,7 @@ def prepare_starred_files(files):
|
|||||||
array = []
|
array = []
|
||||||
for f in files:
|
for f in files:
|
||||||
sfile = {'org' : f.org_id,
|
sfile = {'org' : f.org_id,
|
||||||
'repo' : f.repo.id,
|
'repo_id' : f.repo.id,
|
||||||
'repo_name' : f.repo.name,
|
'repo_name' : f.repo.name,
|
||||||
'path' : f.path,
|
'path' : f.path,
|
||||||
'icon_path' : file_icon_filter(f.path),
|
'icon_path' : file_icon_filter(f.path),
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<ul class="side-tabnav-tabs">
|
<ul class="side-tabnav-tabs">
|
||||||
<li class="tab {% block cur_my_lib %}{% endblock %}"><a href="{{ SITE_ROOT }}" class="lib">{% trans "Libraries" %}</a></li>
|
<li class="tab {% block cur_my_lib %}{% endblock %}"><a href="{{ SITE_ROOT }}" class="lib">{% trans "Libraries" %}</a></li>
|
||||||
<li class="tab {% block cur_stars %}{% endblock %}"><a href="{% url 'starred' %}" class="star">{% trans "Starred" %}</a></li>
|
<li class="tab {% block cur_stars %}{% endblock %}"><a href="{{ SITE_ROOT }}#starred/" class="star">{% trans "Starred" %}</a></li>
|
||||||
{% if events_enabled %}
|
{% if events_enabled %}
|
||||||
<li class="tab {% block cur_activities %}{% endblock %}"><a href="{% url 'activities' %}" class="activity">{% trans "Activities" %}</a></li>
|
<li class="tab {% block cur_activities %}{% endblock %}"><a href="{% url 'activities' %}" class="activity">{% trans "Activities" %}</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@@ -723,14 +723,12 @@
|
|||||||
<td class="alc"><img src="{{ MEDIA_URL }}img/file/<%= icon_path %>" alt="{% trans "icon" %}" /></td>
|
<td class="alc"><img src="{{ MEDIA_URL }}img/file/<%= icon_path %>" alt="{% trans "icon" %}" /></td>
|
||||||
<td>
|
<td>
|
||||||
<% if (is_img) { %>
|
<% if (is_img) { %>
|
||||||
<a class="normal img-name-link" href="{{ SITE_ROOT }}lib/<%= repo %>/file<%- encoded_path %>" target="_blank" data-mfp-src="{{ SITE_ROOT }}repo/<%= repo %>/raw<%- encoded_path %>"><%- file_name %></a>
|
<a class="img-name-link" href="{{ SITE_ROOT }}lib/<%= repo_id %>/file<%- encoded_path %>" target="_blank" data-mfp-src="{{ SITE_ROOT }}repo/<%= repo_id %>/raw<%- encoded_path %>"><%- file_name %></a>
|
||||||
<% } else { %>
|
<% } else { %>
|
||||||
<a href="{{ SITE_ROOT }}lib/<%= repo %>/file<%- encoded_path %>" target="_blank"><%- file_name %></a>
|
<a href="{{ SITE_ROOT }}lib/<%= repo_id %>/file<%- encoded_path %>" target="_blank"><%- file_name %></a>
|
||||||
<% } %>
|
<% } %>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td><%- repo_name %></td>
|
||||||
<a href="{{ SITE_ROOT }}#my-libs/lib/<%= repo %>"><%- repo_name %></a>
|
|
||||||
</td>
|
|
||||||
<td><%= mtime_relative %></td>
|
<td><%= mtime_relative %></td>
|
||||||
<td>
|
<td>
|
||||||
<img src="{{MEDIA_URL}}img/rm.png" alt="" class="unstar op-icon vh" title="{% trans "Unstar" %}" />
|
<img src="{{MEDIA_URL}}img/rm.png" alt="" class="unstar op-icon vh" title="{% trans "Unstar" %}" />
|
||||||
|
@@ -32,12 +32,12 @@ define([
|
|||||||
|
|
||||||
removeShare: function() {
|
removeShare: function() {
|
||||||
var _this = this,
|
var _this = this,
|
||||||
repo_id = this.model.get('repo'),
|
repo_id = this.model.get('repo_id'),
|
||||||
file_name = this.model.get('file_name'),
|
file_name = this.model.get('file_name'),
|
||||||
path = this.model.get('path');
|
path = this.model.get('path');
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: Common.getUrl({name: 'starred_files'}) + '?p=' + encodeURIComponent(path) + '&repo_id=' + repo_id,
|
url: Common.getUrl({name: 'starred_files'}) + '?p=' + encodeURIComponent(path) + '&repo_id=' + encodeURIComponent(repo_id),
|
||||||
type: 'DELETE',
|
type: 'DELETE',
|
||||||
beforeSend: Common.prepareCSRFToken,
|
beforeSend: Common.prepareCSRFToken,
|
||||||
success: function() {
|
success: function() {
|
||||||
|
Reference in New Issue
Block a user