Skip to content
Snippets Groups Projects
Commit 8addc541 authored by Arnaud Levy's avatar Arnaud Levy
Browse files

better

parent 2d2ebc2c
No related branches found
No related tags found
No related merge requests found
......@@ -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
<%= 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 %>
......
......@@ -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_messages,
EmergencyMessage.model_name.human(count: 2),
server_emergency_messages_path
primary.item :tags,
Communication::Website::Showcase::Tag.model_name.human(count: 2),
server_tags_path
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment