Commit 6ae4658a authored by Taico Aerts's avatar Taico Aerts
Browse files

Merge branch 'development' into 'master'

Project Forum Release 2.8.4c - 12-08-2022

See merge request !820
parents 4b31b9e5 54daf37c
......@@ -58,6 +58,22 @@ class GenericProjectsController < ProjectsController
.generic_projects
.includes(:course_edition)
.group_by(&:course_edition)
@active_coached_projects = \
current_user.supervised_projects
.active
.where(course_edition_id: CourseEdition.active)
.generic_projects
.includes(:course_edition)
.group_by(&:course_edition)
@inactive_coached_projects = \
current_user.supervised_projects
.active
.where(course_edition_id: CourseEdition.inactive)
.generic_projects
.includes(:course_edition)
.group_by(&:course_edition)
end
def edit
......
......@@ -2,7 +2,7 @@ class GroupsController < ApplicationController
skip_authorization_check
before_action do
add_breadcrumb "My #{groups_name.capitalize}"
add_breadcrumb "My #{helpers.groups_name.capitalize}"
end
def index
......@@ -16,6 +16,6 @@ class GroupsController < ApplicationController
protected
def page_title
"#{groups_name.capitalize} - #{super}"
"#{helpers.groups_name.capitalize} - #{super}"
end
end
......@@ -16,4 +16,7 @@
<% if current_user.offerer_projects('User').present? %>
<%= render 'generic_projects/index/all_user_company_projects_panel', active_projects: @active_personal_projects, inactive_projects: @inactive_personal_projects, offerer_name: 'personal', offerer_type: 'user' %>
<% end %>
<% if current_user.supervised_projects.present? %>
<%= render 'generic_projects/index/all_user_coached_projects_panel', active_projects: @active_coached_projects, inactive_projects: @inactive_coached_projects %>
<% end %>
<%= render 'generic_projects/index/company_projects_script' %>
<%#
Panel for displaying coached projects
Required parameters:
* active_projects: the list of active projects
* inactive_projects: the list of inactive projects
Requires the 'company_projects_script' partial to be loaded separately after this partial is loaded.
%>
<div class="panel panel-info">
<div class="panel-heading">
<%= t('activerecord.attributes.role.names.coach') %> <%= projects_name.capitalize %>
<%= popover t('projects.index.supervisor.project_explanation') %>
</div>
<%# List all projects offered by offerers the user belongs to that are in active courses. %>
<div class="panel-body">
<%= render 'generic_projects/index/company_projects', active_projects: active_projects, inactive_projects: inactive_projects,
no_project_notice: t('projects.index.supervisor.no_project_notice') %>
</div>
</div>
......@@ -46,6 +46,9 @@ Please have a look before submitting a proposal:
all: All %{projects_name}
active: Current %{projects_name}
inactive: Archived %{projects_name}
supervisor:
no_project_notice: There are no %{projects_name} where you are linked as a supervisor.
project_explanation: These are all the %{projects_name} where you are linked as a supervisor.
courses:
index:
......
......@@ -47,6 +47,9 @@ Zou u deze willen lezen voor u een voorstel indient:
all: Alle %{projects_name}
active: Huidige %{projects_name}
inactive: Geärchiveerde %{projects_name}
supervisor:
no_project_notice: Er zijn geen %{projects_name} waar u als begeleider bent gekoppeld.
project_explanation: Dit zijn de %{projects_name} waar u als begeleider bent gekoppeld.
courses:
index:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment