mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-27 01:05:21 +08:00
Fixies after code review [SCI-2730]
This commit is contained in:
parent
d0112bebb5
commit
7d995189bd
3 changed files with 53 additions and 19 deletions
|
@ -653,6 +653,16 @@ ul.double-line > li {
|
|||
.panel-project {
|
||||
color: $color-silver-chalice;
|
||||
|
||||
&:not(.selected) .panel-heading .project-card-selector,
|
||||
&:not(.selected) .panel-heading .dropdown {
|
||||
display: none;
|
||||
}
|
||||
|
||||
&:not(.selected):hover .project-card-selector,
|
||||
&:not(.selected):hover .dropdown {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.nav .btn-link {
|
||||
padding: 10px 5px;
|
||||
}
|
||||
|
@ -674,10 +684,12 @@ ul.double-line > li {
|
|||
|
||||
.panel-heading {
|
||||
background-color: $color-white;
|
||||
border-top-left-radius: 4px;
|
||||
border-top-right-radius: 4px;
|
||||
color: $color-silver-chalice;
|
||||
|
||||
.dropdown-toggle {
|
||||
padding: 6px;
|
||||
.fas {
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -689,12 +701,25 @@ ul.double-line > li {
|
|||
}
|
||||
}
|
||||
|
||||
.panel-body .row {
|
||||
padding: 5px;
|
||||
.panel-body {
|
||||
padding: 10px 15px;
|
||||
|
||||
.row {
|
||||
padding: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
.panel-footer .nav {
|
||||
padding: 0 10px;
|
||||
.panel-footer {
|
||||
border-bottom-left-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
|
||||
.nav {
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
.nav-tabs {
|
||||
border-bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
Canaid::Permissions.register_for(Project) do
|
||||
# Project must be active for all the specified permissions
|
||||
%i(manage_project
|
||||
%i(read_project
|
||||
manage_project
|
||||
archive_project
|
||||
create_experiments
|
||||
create_comments_in_project
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
data-project-users-tab-url="<%= url_for project_user_projects_path(project_id: project.id, format: :json) %>">
|
||||
<div class="panel-heading">
|
||||
|
||||
<% if (active && can_manage_project?(project)) || (!active && can_restore_project?(project)) %>
|
||||
<% if (active && (can_manage_project?(project) || can_archive_project?(project))) || (!active && can_restore_project?(project)) %>
|
||||
<div class="dropdown pull-right">
|
||||
<button class="btn btn-link dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
|
||||
<span class="caret"></span>
|
||||
|
@ -17,10 +17,11 @@
|
|||
<% end %>
|
||||
<ul class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenu1" style="top: 105%;">
|
||||
<li class="dropdown-header"><%= t('projects.index.options_header') %></li>
|
||||
<% if active %>
|
||||
<% if active && can_manage_project?(project) %>
|
||||
<li>
|
||||
<%= link_to t("projects.index.edit_option"), edit_project_path(project, format: :json), remote: true, "data-action" => "edit" %>
|
||||
</li>
|
||||
<% elsif active && can_archive_project?(project) %>
|
||||
<li>
|
||||
<a href="#"
|
||||
class="form-submit-link"
|
||||
|
@ -44,29 +45,28 @@
|
|||
<input class="project-card-selector" type="checkbox" name="project-<%= project.id %>">
|
||||
</div>
|
||||
|
||||
<h3 class="panel-title">
|
||||
<div class="panel-title">
|
||||
<span class="fas <%= active ? 'fa-arrow-alt-circle-right' : 'fa-archive' %> "></span>
|
||||
<% if active %>
|
||||
<i class="fas fa-arrow-alt-circle-right"></i>
|
||||
<%= link_to project.name, project_path(project), id: "#{project.id}-project-canvas-link" %>
|
||||
<% else %>
|
||||
<i class="fas fa-archive"></i>
|
||||
<%= project.name %>
|
||||
<% end %>
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<% if project.hidden? %>
|
||||
<div class="col-xs-1">
|
||||
<i class="fas fa-eye-slash" aria-hidden="true" title="<%= t("projects.index.hidden") %>"></i>
|
||||
<i class="fas fa-lg fa-eye-slash" aria-hidden="true" title="<%= t("projects.index.hidden") %>"></i>
|
||||
</div>
|
||||
<div class="col-xs-10">
|
||||
<span><%= t("projects.index.hidden") %></span>
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="col-xs-1">
|
||||
<i class="fas fa-eye" aria-hidden="true" title="<%= t("projects.index.visible") %>"></i>
|
||||
<i class="fas fa-lg fa-eye" aria-hidden="true" title="<%= t("projects.index.visible") %>"></i>
|
||||
</div>
|
||||
<div class="col-xs-10">
|
||||
<span><%= t("projects.index.visible") %></span>
|
||||
|
@ -87,12 +87,16 @@
|
|||
<!-- Nav tabs -->
|
||||
<ul class="nav nav-tabs nav-tabs-less" role="tablist" data-hook="project-footer-icons">
|
||||
<li role="presentation">
|
||||
<a class="btn btn-link" href="<%= url_for project_project_activities_path(project_id: project.id, format: :json) %>" aria-controls="activities-<%= project.id %>" role="tab" data-remote="true">
|
||||
<a class="btn btn-link <%= 'disabled' unless active %>"
|
||||
href="<%= url_for project_project_activities_path(project_id: project.id, format: :json) %>"
|
||||
aria-controls="activities-<%= project.id %>" role="tab" data-remote="true">
|
||||
<span class="fas fa-list"></span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="pull-right" role="presentation">
|
||||
<a class="btn btn-link" href="<%= url_for project_project_comments_path(project_id: project.id, format: :json) %>" aria-controls="comments-<%= project.id %>" role="tab" data-remote="true">
|
||||
<a class="btn btn-link <%= 'disabled' unless active %>"
|
||||
href="<%= url_for project_project_comments_path(project_id: project.id, format: :json) %>"
|
||||
aria-controls="comments-<%= project.id %>" role="tab" data-remote="true">
|
||||
<span class="fas fa-comment"></span>
|
||||
<span class="badge badge-indicator comments-badge-indicator <%= 'hidden' unless project.comment_count.positive? %>"
|
||||
data-linked-id="<%= project.id %>">
|
||||
|
@ -101,7 +105,9 @@
|
|||
</a>
|
||||
</li>
|
||||
<li class="pull-right" role="presentation">
|
||||
<a class="btn btn-link" href="<%= url_for notifications_project_path(id: project.id, format: :json) %>" aria-controls="notifications-<%= project.id %>" role="tab" data-remote="true">
|
||||
<a class="btn btn-link <%= 'disabled' unless active %>"
|
||||
href="<%= url_for notifications_project_path(id: project.id, format: :json) %>"
|
||||
aria-controls="notifications-<%= project.id %>" role="tab" data-remote="true">
|
||||
<span class="fas fa-bell"></span>
|
||||
<% if project.notification_count.positive? %>
|
||||
<span class="badge badge-indicator"><%= project.notification_count %></span>
|
||||
|
@ -109,7 +115,9 @@
|
|||
</a>
|
||||
</li>
|
||||
<li class="pull-right" role="presentation">
|
||||
<a class="btn btn-link" href="<%= url_for project_user_projects_path(project_id: project.id, format: :json) %>" aria-controls="users-<%= project.id %>" role="tab" data-remote="true">
|
||||
<a class="btn btn-link <%= 'disabled' unless active %>"
|
||||
href="<%= url_for project_user_projects_path(project_id: project.id, format: :json) %>"
|
||||
aria-controls="users-<%= project.id %>" role="tab" data-remote="true">
|
||||
<span class="fas fa-users"></span>
|
||||
<span class="badge badge-indicator users-badge-indicator <%= 'hidden' unless project.user_count.positive? %>"
|
||||
data-linked-id="<%= project.id %>">
|
||||
|
|
Loading…
Reference in a new issue