mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
New admin menu
This commit is contained in:
parent
29cd9d0132
commit
89fb059aaa
35 changed files with 209 additions and 170 deletions
14
app/views/layouts/_admin.html.haml
Normal file
14
app/views/layouts/_admin.html.haml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
.container-fluid
|
||||
.row
|
||||
.col-md-2
|
||||
- if @conference and not @conference.short_title.nil?
|
||||
-# Individual admin sidebar
|
||||
= render 'layouts/admin_sidebar'
|
||||
-else
|
||||
-# Index admin sidebar
|
||||
= render 'layouts/admin_sidebar_index'
|
||||
.col-md-10
|
||||
#messages
|
||||
=render 'layouts/messages'
|
||||
#content
|
||||
= yield
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
%ul.nav.navbar-nav
|
||||
%li{:class=> active_nav_li(admin_conference_path(@conference.short_title))}
|
||||
= link_to(admin_conference_path(@conference.short_title)) do
|
||||
%span.glyphicon.glyphicon-wrench
|
||||
Settings
|
||||
%li{:class=> active_nav_li(admin_conference_registrations_path(@conference.short_title))}
|
||||
= link_to(admin_conference_registrations_path(@conference.short_title)) do
|
||||
%span.glyphicon.glyphicon-user
|
||||
Registrations
|
||||
- if @conference.use_supporter_levels? and @conference.supporter_levels.length > 0
|
||||
%li{:class=> active_nav_li(admin_conference_supporters_path(@conference.short_title))}
|
||||
= link_to(admin_conference_supporters_path(@conference.short_title)) do
|
||||
%span.glyphicon.glyphicon-star
|
||||
Supporters
|
||||
%li{:class=> active_nav_li(admin_conference_events_path(@conference.short_title))}
|
||||
= link_to(admin_conference_events_path(@conference.short_title)) do
|
||||
%span.glyphicon.glyphicon-comment
|
||||
Events
|
||||
%li{:class=> active_nav_li(admin_conference_stats_path(@conference.short_title))}
|
||||
= link_to(admin_conference_stats_path(@conference.short_title)) do
|
||||
%span.glyphicon.glyphicon-tasks
|
||||
Statistics
|
||||
%li{:class=> active_nav_li(admin_conference_volunteers_list_path(@conference.short_title))}
|
||||
= link_to(admin_conference_volunteers_list_path(@conference.short_title)) do
|
||||
%span.glyphicon.glyphicon-user
|
||||
Volunteers
|
||||
%li
|
||||
= link_to(admin_conference_schedule_path(@conference.short_title), :target => "_blank") do
|
||||
%span.glyphicon.glyphicon-calendar
|
||||
Schedule
|
||||
71
app/views/layouts/_admin_sidebar.html.haml
Normal file
71
app/views/layouts/_admin_sidebar.html.haml
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
%ul.nav.nav-stacked.mySidebar
|
||||
.btn-group
|
||||
%button{type:'button', class:'btn btn-default btn-link dropdown-toggle', 'data-toggle'=>'dropdown'}
|
||||
%span.glyphicon.glyphicon-home
|
||||
Conferences
|
||||
%span.caret
|
||||
%ul.dropdown-menu{role:'menu'}
|
||||
%li
|
||||
= link_to(admin_conference_index_path) do
|
||||
%span.glyphicon.glyphicon-dashboard
|
||||
All
|
||||
- @conferences.each do |conference|
|
||||
%li
|
||||
= link_to(admin_conference_path(conference.short_title)) do
|
||||
%span.glyphicon.glyphicon-cog
|
||||
Manage
|
||||
= conference.short_title
|
||||
%li
|
||||
= link_to(new_admin_conference_path) do
|
||||
%span.glyphicon.glyphicon-plus
|
||||
New Conference
|
||||
%hr
|
||||
%li{:class=> active_nav_li(admin_conference_registrations_path(@conference.short_title))}
|
||||
= link_to(admin_conference_registrations_path(@conference.short_title)) do
|
||||
%span.glyphicon.glyphicon-user
|
||||
Registrations
|
||||
%li{:class=> active_nav_li(admin_conference_events_path(@conference.short_title))}
|
||||
= link_to(admin_conference_events_path(@conference.short_title)) do
|
||||
%span.glyphicon.glyphicon-comment
|
||||
Events
|
||||
%li{class: active_nav_li(admin_conference_schedule_path(@conference.short_title))}
|
||||
= link_to(admin_conference_schedule_path(@conference.short_title), target: '_blank') do
|
||||
%span.glyphicon.glyphicon-calendar
|
||||
Shedule
|
||||
%hr
|
||||
%li.nav-header
|
||||
%a
|
||||
%span.glyphicon.glyphicon-wrench
|
||||
Settings
|
||||
%li{:class=> active_nav_li(admin_conference_path(@conference.short_title))}
|
||||
= link_to(admin_conference_path(@conference.short_title)) do
|
||||
%span.glyphicon.glyphicon-cog
|
||||
Conference
|
||||
%li{:class=> "#{active_nav_li(admin_conference_venue_info_path(@conference.short_title))} myAccordion"}
|
||||
= link_to(admin_conference_venue_info_path(@conference.short_title)) do
|
||||
%span.glyphicon.glyphicon-calendar
|
||||
Venue
|
||||
%span.small.glyphicon.glyphicon-chevron-right
|
||||
%ul.nav.nav-stacked.small.collapse.subNav
|
||||
%li{:class=> active_nav_li(admin_conference_rooms_path(@conference.short_title))}
|
||||
= link_to 'Rooms', admin_conference_rooms_path(@conference.short_title)
|
||||
%li{:class=> active_nav_li(admin_conference_emails_path(@conference.short_title))}
|
||||
= link_to(admin_conference_emails_path(@conference.short_title)) do
|
||||
%span.glyphicon.glyphicon-envelope
|
||||
E-Mails
|
||||
%li{:class=> "#{active_nav_li(admin_conference_callforpapers_path(@conference.short_title))} myAccordion"}
|
||||
= link_to(admin_conference_callforpapers_path(@conference.short_title)) do
|
||||
%span.glyphicon.glyphicon-comment
|
||||
Call for papers
|
||||
%span.small.glyphicon.glyphicon-chevron-right
|
||||
%ul.nav.nav-stacked.small.collapse.subNav
|
||||
%li{:class=> active_nav_li(admin_conference_tracks_path(@conference.short_title))}
|
||||
= link_to 'Tracks', admin_conference_tracks_path(@conference.short_title)
|
||||
%li{:class=> active_nav_li(admin_conference_eventtypes_path(@conference.short_title))}
|
||||
= link_to 'Event types', admin_conference_eventtypes_path(@conference.short_title)
|
||||
%li{:class=> active_nav_li(admin_conference_difficulty_levels_path(@conference.short_title))}
|
||||
= link_to 'Difficulty levels', admin_conference_difficulty_levels_path(@conference.short_title)
|
||||
%li{:class=> active_nav_li(admin_conference_questions_path(@conference.short_title))}
|
||||
= link_to(admin_conference_questions_path(@conference.short_title)) do
|
||||
%span.glyphicon.glyphicon-question-sign
|
||||
Questions
|
||||
30
app/views/layouts/_admin_sidebar_index.html.haml
Normal file
30
app/views/layouts/_admin_sidebar_index.html.haml
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
%ul.nav.nav-pills.nav-stacked.mySidebar
|
||||
.btn-group
|
||||
%button{type: 'button', class: 'btn btn-default btn-link dropdown-toggle', 'data-toggle'=>'dropdown'}
|
||||
%span.glyphicon.glyphicon-home
|
||||
Conferences
|
||||
%span.caret
|
||||
%ul.dropdown-menu{role: 'menu'}
|
||||
%li
|
||||
= link_to(admin_conference_index_path) do
|
||||
%span.glyphicon.glyphicon-dashboard
|
||||
All
|
||||
- @conferences.each do |conference|
|
||||
%li
|
||||
= link_to(admin_conference_path(conference.short_title)) do
|
||||
%span.glyphicon.glyphicon-cog
|
||||
Manage
|
||||
= conference.short_title
|
||||
%li
|
||||
= link_to(new_admin_conference_path) do
|
||||
%span.glyphicon.glyphicon-plus
|
||||
New Conference
|
||||
%hr
|
||||
%li
|
||||
= link_to(admin_users_path) do
|
||||
%span.glyphicon.glyphicon-user
|
||||
Users
|
||||
%li
|
||||
= link_to(admin_people_path) do
|
||||
%span.glyphicon.glyphicon-star-empty
|
||||
People
|
||||
|
|
@ -1,3 +1,12 @@
|
|||
%noscript
|
||||
:css
|
||||
#content {
|
||||
display: none;
|
||||
}
|
||||
%h2
|
||||
JavaScript is not enabled
|
||||
%p
|
||||
OSEM requires JavaScript to be enabled to function. Please turn on JavaScript in your browser's settings and reload the page to continue.
|
||||
- flash.each do |type, message|
|
||||
%div{:class=>"alert alert-dismissable #{bootstrap_class_for(type)}", :id=>"flash"}
|
||||
.button.close{"data-dismiss" => "alert", "aria-hidden"=>"true"}
|
||||
|
|
|
|||
|
|
@ -14,11 +14,7 @@
|
|||
- if @conference && !@conference.short_title.nil?
|
||||
%p.navbar-text
|
||||
= @conference.short_title
|
||||
- if user_signed_in?
|
||||
- if has_role?(current_user, "admin") || has_role?(current_user, "organizer")
|
||||
- if controller.class.name.split("::").first=="Admin"
|
||||
- if @conference and not @conference.short_title.nil?
|
||||
= render 'layouts/admin_menu'
|
||||
-if user_signed_in?
|
||||
%ul.nav.navbar-nav.navbar-right
|
||||
%li.dropdown
|
||||
%a.dropdown-toggle{"data-toggle" => "dropdown", :href => "#", id: "current-user-detail"}
|
||||
|
|
|
|||
|
|
@ -17,21 +17,16 @@
|
|||
= yield(:head)
|
||||
%body
|
||||
= render 'layouts/navigation'
|
||||
.container#messages
|
||||
.row
|
||||
.col-md-12
|
||||
= render 'layouts/messages'
|
||||
%noscript
|
||||
:css
|
||||
#content {
|
||||
display: none;
|
||||
}
|
||||
%h2
|
||||
JavaScript is not enabled
|
||||
%p
|
||||
OSEM requires JavaScript to be enabled to function. Please turn on JavaScript in your browser's settings and reload the page to continue.
|
||||
.container#content
|
||||
= yield
|
||||
-# Admin area
|
||||
- if controller.class.name.split("::").first=="Admin"
|
||||
= render 'layouts/admin'
|
||||
-else
|
||||
.container#messages
|
||||
.row
|
||||
.col-md-12
|
||||
= render 'layouts/messages'
|
||||
.container#content
|
||||
= yield
|
||||
|
||||
#footer
|
||||
.container
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue