Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
Admin
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
osuny
Admin
Commits
8addc541
Commit
8addc541
authored
11 months ago
by
Arnaud Levy
Browse files
Options
Downloads
Patches
Plain Diff
better
parent
2d2ebc2c
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
app/controllers/server/tags_controller.rb
+2
-1
2 additions, 1 deletion
app/controllers/server/tags_controller.rb
app/views/server/tags/_form.html.erb
+4
-0
4 additions, 0 deletions
app/views/server/tags/_form.html.erb
config/server_navigation.rb
+14
-11
14 additions, 11 deletions
config/server_navigation.rb
with
20 additions
and
12 deletions
app/controllers/server/tags_controller.rb
+
2
−
1
View file @
8addc541
...
...
@@ -54,6 +54,7 @@ class Server::TagsController < Server::ApplicationController
end
def
tag_params
params
.
require
(
:communication_website_showcase_tag
).
permit
(
:name
)
params
.
require
(
:communication_website_showcase_tag
)
.
permit
(
:name
,
website_ids:
[])
end
end
\ No newline at end of file
This diff is collapsed.
Click to expand it.
app/views/server/tags/_form.html.erb
+
4
−
0
View file @
8addc541
<%=
simple_form_for
tag
,
url:
tag
.
new_record?
?
server_tags_path
:
server_tag_path
(
tag
)
do
|
f
|
%>
<%=
f
.
input
:name
%>
<%=
f
.
association
:websites
,
as: :check_boxes
,
collection:
Communication
::
Website
.
ordered
,
label_method:
->
(
website
)
{
"
#{
website
}
—
#{
website
.
university
}
"
}
%>
<%
content_for
:action_bar_right
do
%>
<%=
submit
f
%>
<%
end
%>
...
...
This diff is collapsed.
Click to expand it.
config/server_navigation.rb
+
14
−
11
View file @
8addc541
...
...
@@ -4,31 +4,34 @@ SimpleNavigation::Configuration.run do |navigation|
navigation
.
highlight_on_subpath
=
true
navigation
.
selected_class
=
'active'
navigation
.
items
do
|
primary
|
primary
.
item
:dashboard
,
t
(
'admin.dashboard'
),
server_root_path
,
{
kind: :header
,
highlights_on:
%r{server$}
}
primary
.
item
:server
,
t
(
'menu.server_admin'
),
nil
,
{
kind: :header
}
{
kind: :header
,
image:
'admin/university-thumb.jpg'
}
primary
.
item
:universities
,
University
.
model_name
.
human
(
count:
2
),
server_universities_path
primary
.
item
:websites
,
Communication
::
Website
.
model_name
.
human
(
count:
2
),
server_websites_path
primary
.
item
:languages
,
Language
.
model_name
.
human
(
count:
2
),
server_languages_path
primary
.
item
:emergency_messages
,
EmergencyMessage
.
model_name
.
human
(
count:
2
),
server_emergency_messages_path
primary
.
item
:communication
,
Communication
.
model_name
.
human
,
nil
,
{
kind: :header
,
image:
'admin/communication-thumb.jpg'
}
primary
.
item
:websites
,
Communication
::
Website
.
model_name
.
human
(
count:
2
),
server_websites_path
primary
.
item
:blocks
,
Communication
::
Block
.
model_name
.
human
(
count:
2
),
server_blocks_path
primary
.
item
:layouts
,
Communication
::
Website
::
GitFile
::
Layout
.
model_name
.
human
(
count:
2
),
server_overrides_path
primary
.
item
:
emergency_mess
ag
e
s
,
EmergencyMess
ag
e
.
model_name
.
human
(
count:
2
),
server_
emergency_mess
ag
e
s_path
primary
.
item
:
t
ags
,
Communication
::
Website
::
Showcase
::
T
ag
.
model_name
.
human
(
count:
2
),
server_
t
ags_path
end
end
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment