Skip to content
Snippets Groups Projects
Select Git revision
  • 42e178d600e6a5ae27f62383791e67657537001d
  • master default
2 results

README

Blame
  • _header.html.erb 5.68 KiB
    <%
    # 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 <http://www.gnu.org/licenses/>.
    %>
    
    <div class="header py-4">
      <div class="container">
        <div class="d-flex">
          <%= link_to (current_user ? home_page : root_path), class: "header-brand" do %>
            <% begin %>
              <%= image_tag(logo_image, class: "header-brand-img", alt:"") %>
            <% rescue %>
              <%= t("administrator.site_settings.branding.invalid") %>
            <% end %>
          <% end %>
    
          <div class="d-flex ml-auto">
            <% if current_user %>
    
              <%= link_to home_page, class: "px-3 mx-1 mt-1 header-nav #{active_home}" do %>
                <i class="fas fa-home pr-1 "></i><span class="d-none d-sm-inline-block"><%= t("header.dropdown.home") %></span>
              <% end %>
    
              <% if current_user.role.get_permission("can_create_rooms") && !current_user.has_role?(:super_admin) && !hide_recording_tables %>
                <% all_rec_page = controller_name == "users" && action_name == "recordings" ? "active" : "" %>
                <%= link_to get_user_recordings_path(current_user), class: "px-3 mx-1 mt-1 header-nav #{all_rec_page}" do %>
                  <i class="fas fa-video pr-1"></i><span class="d-none d-sm-inline-block"><%= t("header.all_recordings") %></span>
                <% end %>
              <% end %>
    
              <div class="dropdown">
                <a href="#" class="nav-link pr-0" data-toggle="dropdown">
                  <span class="avatar"><%= current_user.name.first %></span>
                  <span class="ml-2 d-none d-lg-block">
                    <span class="text-default username"><%= current_user.name %></span>
                  </span>
                </a>
                <div class="dropdown-menu dropdown-menu-right dropdown-menu-arrow" x-placement="bottom-end">
                  <%= link_to edit_user_path(current_user), class: "dropdown-item"  do %>
                    <i class="dropdown-icon fas fa-id-card mr-3"></i><%= t("header.dropdown.settings") %>
                  <% end %>
                  <% highest_role = current_user.role %>
                  <% if highest_role.get_permission("can_manage_users") || highest_role.name == "super_admin" %>
                    <%= link_to admins_path, class: "dropdown-item" do %>
                      <i class="dropdown-icon fas fa-user-tie mr-3"></i><%= t("header.dropdown.account_settings") %>
                    <% end %>
                  <% elsif highest_role.get_permission("can_manage_rooms_recordings")%>
                    <%= link_to admin_rooms_path, class: "dropdown-item" do %>
                      <i class="dropdown-icon fas fa-user-tie mr-3"></i><%= t("header.dropdown.account_settings") %>
                    <% end %>
                  <% elsif highest_role.get_permission("can_edit_site_settings") %>
                    <%= link_to admin_site_settings_path, class: "dropdown-item" do %>
                      <i class="dropdown-icon fas fa-user-tie mr-3"></i><%= t("header.dropdown.account_settings") %>
                    <% end %>
                  <% elsif highest_role.get_permission("can_edit_roles")%>
                    <%= link_to admin_roles_path, class: "dropdown-item" do %>
                      <i class="dropdown-icon fas fa-user-tie mr-3"></i><%= t("header.dropdown.account_settings") %>
                    <% end %>
                  <% end %>
                  <div class="dropdown-divider"></div>