<% # BigBlueButton open source conferencing system - http://www.bigbluebutton.org/. # Copyright (c) 2018 BigBlueButton Inc. and by respective authors (see below). # This program is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free Software # Foundation; either version 3.0 of the License, or (at your option) any later # version. # # BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. # You should have received a copy of the GNU Lesser General Public License along # with BigBlueButton; if not, see . %>
<% @roles.each do |role| %> <%= link_to admin_roles_path(selected_role: role.id), class: "#{"sort-disabled" if role.name == "user" || role.name == "admin" || role.priority <= current_user.highest_priority_role.priority } dropdown-item list-group-item list-group-item-action #{"active" if @selected_role.id == role.id}", id: dom_id(role) do %> <%= translated_role_name(role) %> <% end %> <% end %>
<%= link_to "#", id: "newRoleButton", class: "list-group-item list-group-item-action", "data-toggle" => "modal", "data-target" => '#createRoleModal' do %> <%= t("administrator.roles.new_role") %> <% end %>
"> <%= form_for(@selected_role, url: admin_update_role_path(@selected_role.id), method: :post) do |f| %> <%= f.label t('administrator.roles.name'), class: "form-label" %> <%= f.text_field :name, class: 'form-control mb-3', value: translated_role_name(@selected_role), readonly: edit_disabled || @selected_role.name == "user" || @selected_role.name == "admin", required: true %> <%= f.hidden_field :colour, id: "role-colour", value: role_colour(@selected_role) %>
<%= t("administrator.site_settings.color.regular") %>
<%= f.submit t("update"), class: "btn btn-primary float-right ml-2 mb-2", disabled: edit_disabled %> <% if @selected_role.name != "user" && @selected_role.name != "admin" && !edit_disabled %> <%= link_to admin_delete_role_path(@selected_role.id), method: :delete, class: "float-right btn btn-danger" do %> <%= t("administrator.roles.delete") %> <% end %> <% end %>
<% end %>
<%= render "shared/modals/create_role_modal" %>