Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
EIP
Project Forum
Project Forum
Commits
6ae4658a
Commit
6ae4658a
authored
Aug 12, 2022
by
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
Changes
6
Hide whitespace changes
Inline
Side-by-side
app/controllers/generic_projects_controller.rb
View file @
6ae4658a
...
...
@@ -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
...
...
app/controllers/groups_controller.rb
View file @
6ae4658a
...
...
@@ -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
app/views/generic_projects/index.html.erb
View file @
6ae4658a
...
...
@@ -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'
%>
app/views/generic_projects/index/_all_user_coached_projects_panel.html.erb
0 → 100644
View file @
6ae4658a
<%#
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>
config/locales/views/en.yml
View file @
6ae4658a
...
...
@@ -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
:
...
...
config/locales/views/nl.yml
View file @
6ae4658a
...
...
@@ -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
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment