mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-01 13:13:22 +08:00
Fix displaying projects when all are archived [SCI-2787]
This commit is contained in:
parent
43fdab561f
commit
c89488e105
2 changed files with 12 additions and 4 deletions
|
@ -435,7 +435,14 @@
|
|||
sort: projectsViewSort
|
||||
},
|
||||
success: function(data) {
|
||||
viewContainer.html(data.html);
|
||||
if (data.html.search('id="edit-project-cards-form-') > 0) {
|
||||
$('#projects-absent').hide();
|
||||
$('#projects-present').show();
|
||||
viewContainer.html(data.html);
|
||||
} else {
|
||||
$('#projects-present').hide();
|
||||
$('#projects-absent').show();
|
||||
}
|
||||
initFormSubmitLinks(viewContainer);
|
||||
init();
|
||||
},
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
<div class="content-pane" id="projects-index">
|
||||
|
||||
<% if @projects_tree.empty? %>
|
||||
<div id="projects-absent" style="<%= 'display:none' if @projects_tree.any? %>">
|
||||
<div class="jumbotron text-center" style="margin-top:12%">
|
||||
<strong><%=t 'projects.index.no_projects.text' %></strong>
|
||||
<% if @teams.exists? && can_create_projects?(current_team) %>
|
||||
|
@ -44,7 +44,8 @@
|
|||
<p><strong><%=t 'projects.index.no_projects.no_permission_title' %></strong></p>
|
||||
<% end %>
|
||||
</div>
|
||||
<% else %>
|
||||
</div>
|
||||
<div id="projects-present" style="<%= 'display:none' if @projects_tree.empty? %>">
|
||||
<!-- Edit project modal -->
|
||||
<div class="modal" id="edit-project-modal" tabindex="-1" role="dialog" aria-labelledby="edit-project-modal-label">
|
||||
<div class="modal-dialog" role="document">
|
||||
|
@ -146,7 +147,7 @@
|
|||
<%= render partial: "projects/index/team_projects_table" %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in a new issue