mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-18 01:36:12 +08:00
Merge latest features/export-all [SCI-2731]
This commit is contained in:
commit
ba58eec2e2
5 changed files with 60 additions and 26 deletions
|
@ -3,7 +3,7 @@ ruby:
|
|||
|
||||
eslint:
|
||||
enabled: true
|
||||
config_file: .eslintrc.json
|
||||
config_file: app/assets/.eslintrc.json
|
||||
|
||||
scss:
|
||||
config_file: .scss-lint.yml
|
||||
|
|
|
@ -623,8 +623,6 @@ ul.double-line > li {
|
|||
color: $brand-primary;
|
||||
}
|
||||
|
||||
#projects-index,
|
||||
#project-archive,
|
||||
#project-show,
|
||||
#experiment-archive,
|
||||
#module-archive,
|
||||
|
@ -651,15 +649,26 @@ ul.double-line > li {
|
|||
}
|
||||
|
||||
.panel-project {
|
||||
box-shadow: 0 3px 6px $color-alto;
|
||||
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;
|
||||
}
|
||||
|
||||
&.selected {
|
||||
border-color: $brand-primary;
|
||||
box-shadow: 0px 3px 10px $brand-primary !important;
|
||||
box-shadow: 0 3px 10px $brand-primary;
|
||||
}
|
||||
|
||||
&.archived {
|
||||
|
@ -674,10 +683,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 +700,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
|
||||
|
|
|
@ -11,29 +11,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>
|
||||
|
@ -54,12 +53,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 %>">
|
||||
|
@ -68,7 +71,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>
|
||||
|
@ -76,7 +81,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 %>">
|
||||
|
|
|
@ -1,21 +1,23 @@
|
|||
<% cache project do %>
|
||||
<% active = !project.archived %>
|
||||
<% if (true || 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="fas fa-ellipsis-v"></span>
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<% project_form = nil %>
|
||||
<%= form_for project, namespace: view_mode, format: :json, method: :put, remote: true do |f| %>
|
||||
<%= form_for project, format: :json, method: :put, remote: true do |f| %>
|
||||
<% project_form = f %>
|
||||
<%= f.hidden_field :archived, value: active %>
|
||||
<% 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>
|
||||
<% end %>
|
||||
<% if active && can_archive_project?(project) %>
|
||||
<li>
|
||||
<a href="#"
|
||||
class="form-submit-link"
|
||||
|
@ -23,7 +25,7 @@
|
|||
data-submit-form="<%= project_form.options[:html][:id] %>"
|
||||
data-confirm-form="<%= t("projects.index.archive_confirm") %>"><%= t 'projects.index.archive_option' %></a>
|
||||
</li>
|
||||
<% else %>
|
||||
<% elsif !active %>
|
||||
<li>
|
||||
<a href="#"
|
||||
class="form-submit-link"
|
||||
|
|
Loading…
Add table
Reference in a new issue