mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-29 03:35:25 +08:00
hide private projects
This commit is contained in:
parent
4c086a6fc1
commit
db806f3c10
3 changed files with 4 additions and 11 deletions
|
@ -15,7 +15,7 @@ class ProjectsController < ApplicationController
|
|||
before_action :check_experiment_archive_permissions,
|
||||
only: [:experiment_archive]
|
||||
|
||||
filter_by_archived = false
|
||||
@filter_by_archived = false
|
||||
|
||||
# except parameter could be used but it is not working.
|
||||
layout :choose_layout
|
||||
|
@ -31,7 +31,6 @@ class ProjectsController < ApplicationController
|
|||
|
||||
if current_user.organizations.any?
|
||||
@current_organization_id = current_organization.id
|
||||
@organization_projects = current_organization.active_project
|
||||
@current_sort = params[:sort].to_s
|
||||
@projects_by_orgs = current_user
|
||||
.projects_by_orgs(@current_organization_id,
|
||||
|
@ -41,7 +40,6 @@ class ProjectsController < ApplicationController
|
|||
|
||||
@organizations = current_user.organizations
|
||||
|
||||
|
||||
# New project for create new project modal
|
||||
@project = Project.new
|
||||
end
|
||||
|
|
|
@ -305,8 +305,4 @@ class Organization < ActiveRecord::Base
|
|||
def protocol_keywords_list
|
||||
ProtocolKeyword.where(organization: self).pluck(:name)
|
||||
end
|
||||
|
||||
def active_project
|
||||
projects.where(archived: false)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -111,11 +111,10 @@
|
|||
</div>
|
||||
<% else %>
|
||||
<h2 class="page-header"><%= current_organization.name %></h2>
|
||||
<% if @organization_projects.any? %>
|
||||
<% @projects_by_orgs.each do |org, projects| %>
|
||||
<%= render partial: "projects/index/org_projects",
|
||||
locals: { org: current_organization,
|
||||
projects: @organization_projects } %>
|
||||
|
||||
locals: {org: org, projects: projects} %>
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
<%= javascript_include_tag "projects/index", "data-turbolinks-track" => true %>
|
||||
|
|
Loading…
Reference in a new issue