Completely rework the navigation
Get rid of the admin layout Get rid of the navbar custom style, use bootstrap-sass variables instead Get rid of all the scaffold files
This commit is contained in:
parent
2af8792495
commit
252e1fe544
47 changed files with 179 additions and 252 deletions
|
|
@ -1,3 +0,0 @@
|
||||||
# Place all the behaviors and hooks related to the matching controller here.
|
|
||||||
# All this logic will automatically be available in application.js.
|
|
||||||
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
# Place all the behaviors and hooks related to the matching controller here.
|
|
||||||
# All this logic will automatically be available in application.js.
|
|
||||||
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
# Place all the behaviors and hooks related to the matching controller here.
|
|
||||||
# All this logic will automatically be available in application.js.
|
|
||||||
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
# Place all the behaviors and hooks related to the matching controller here.
|
|
||||||
# All this logic will automatically be available in application.js.
|
|
||||||
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
# Place all the behaviors and hooks related to the matching controller here.
|
|
||||||
# All this logic will automatically be available in application.js.
|
|
||||||
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
# Place all the behaviors and hooks related to the matching controller here.
|
|
||||||
# All this logic will automatically be available in application.js.
|
|
||||||
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
# Place all the behaviors and hooks related to the matching controller here.
|
|
||||||
# All this logic will automatically be available in application.js.
|
|
||||||
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
// Place all the styles related to the admin/admin controller here.
|
|
||||||
// They will automatically be included in application.css.
|
|
||||||
// You can use Sass (SCSS) here: http://sass-lang.com/
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
// Place all the styles related to the admin/call_for_papers controller here.
|
|
||||||
// They will automatically be included in application.css.
|
|
||||||
// You can use Sass (SCSS) here: http://sass-lang.com/
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
// Place all the styles related to the admin/conference controller here.
|
|
||||||
// They will automatically be included in application.css.
|
|
||||||
// You can use Sass (SCSS) here: http://sass-lang.com/
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
// Place all the styles related to the admin/people controller here.
|
|
||||||
// They will automatically be included in application.css.
|
|
||||||
// You can use Sass (SCSS) here: http://sass-lang.com/
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
// Place all the styles related to the admin/supporters controller here.
|
|
||||||
// They will automatically be included in application.css.
|
|
||||||
// You can use Sass (SCSS) here: http://sass-lang.com/
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
// Place all the styles related to the admin/users controller here.
|
|
||||||
// They will automatically be included in application.css.
|
|
||||||
// You can use Sass (SCSS) here: http://sass-lang.com/
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
// Place all the styles related to the admin/venue controller here.
|
|
||||||
// They will automatically be included in application.css.
|
|
||||||
// You can use Sass (SCSS) here: http://sass-lang.com/
|
|
||||||
|
|
@ -24,6 +24,15 @@
|
||||||
background-color: #f5f5f5;
|
background-color: #f5f5f5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.container .credit {
|
||||||
|
margin: 20px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-collapse .dropdown-menu {
|
||||||
|
background-color: #e6e6e6;
|
||||||
|
color: #555555;
|
||||||
|
}
|
||||||
|
|
||||||
/* Lastly, apply responsive CSS fixes as necessary */
|
/* Lastly, apply responsive CSS fixes as necessary */
|
||||||
@media (max-width: 767px) {
|
@media (max-width: 767px) {
|
||||||
#footer {
|
#footer {
|
||||||
|
|
@ -34,41 +43,8 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.container#messages {
|
@media screen and (min-width: 980px) {
|
||||||
padding-top: 60px;
|
body { padding-top: 60px; }
|
||||||
}
|
|
||||||
|
|
||||||
.navbar-inner {
|
|
||||||
background: #299a0b; /* Old browsers */
|
|
||||||
background: -moz-linear-gradient(top, #299a0b 0%, #299a0b 100%); /* FF3.6+ */
|
|
||||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#299a0b), color-stop(100%,#299a0b)); /* Chrome,Safari4+ */
|
|
||||||
background: -webkit-linear-gradient(top, #299a0b 0%,#299a0b 100%); /* Chrome10+,Safari5.1+ */
|
|
||||||
background: -o-linear-gradient(top, #299a0b 0%,#299a0b 100%); /* Opera 11.10+ */
|
|
||||||
background: -ms-linear-gradient(top, #299a0b 0%,#299a0b 100%); /* IE10+ */
|
|
||||||
background: linear-gradient(to bottom, #299a0b 0%,#299a0b 100%); /* W3C */
|
|
||||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#299a0b', endColorstr='#299a0b',GradientType=0 ); /* IE6-9 */
|
|
||||||
}
|
|
||||||
|
|
||||||
.navbar .nav .active > a, .navbar .nav .active > a:hover {
|
|
||||||
background-color: #DFE0DF;
|
|
||||||
}
|
|
||||||
|
|
||||||
.navbar .divider-vertical {
|
|
||||||
background-color: #b4e391;
|
|
||||||
border-right: 1px solid #eab92d;
|
|
||||||
}
|
|
||||||
|
|
||||||
.navbar-fixed-top .brand {
|
|
||||||
color: #ffffff;
|
|
||||||
text-shadow:none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.navbar .nav > li > a {
|
|
||||||
float: none;
|
|
||||||
padding: 10px 15px 10px;
|
|
||||||
color: white;
|
|
||||||
text-decoration: none;
|
|
||||||
text-shadow: none;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.center {
|
.center {
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,15 @@
|
||||||
|
$navbarBackground: #299a0b;
|
||||||
|
$navbarBackgroundHighlight: #299a0b;
|
||||||
|
$navbarBorder: 1px solid #d4d4d4;
|
||||||
|
$navbarText: #ffffff;
|
||||||
|
$navbarLinkColor: white;
|
||||||
|
$navbarLinkColorHover: black;
|
||||||
|
$navbarLinkBackgroundActive: #DFE0DF;
|
||||||
|
|
||||||
@import "bootstrap";
|
@import "bootstrap";
|
||||||
@import "bootstrap-responsive";
|
@import "bootstrap-responsive";
|
||||||
|
|
||||||
|
/* Set to navbarBackgroundHighlight otherwise */
|
||||||
|
.navbar .nav > li > a {
|
||||||
|
text-shadow: none;
|
||||||
|
}
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
class Admin::CallforpapersController < ApplicationController
|
class Admin::CallforpapersController < ApplicationController
|
||||||
before_filter :verify_organizer
|
before_filter :verify_organizer
|
||||||
layout "admin"
|
|
||||||
|
|
||||||
def show
|
def show
|
||||||
@cfp = @conference.call_for_papers
|
@cfp = @conference.call_for_papers
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
class Admin::ConferenceController < ApplicationController
|
class Admin::ConferenceController < ApplicationController
|
||||||
before_filter :verify_organizer
|
before_filter :verify_organizer
|
||||||
layout "admin"
|
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@conferences = Conference.all
|
@conferences = Conference.all
|
||||||
|
|
@ -31,6 +30,7 @@ class Admin::ConferenceController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def show
|
def show
|
||||||
|
@conferences = Conference.all
|
||||||
@conference = Conference.find_all_by_short_title(params[:id]).first
|
@conference = Conference.find_all_by_short_title(params[:id]).first
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html
|
format.html
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
class Admin::DietchoicesController < ApplicationController
|
class Admin::DietchoicesController < ApplicationController
|
||||||
before_filter :verify_organizer
|
before_filter :verify_organizer
|
||||||
layout "admin"
|
|
||||||
|
|
||||||
def show
|
def show
|
||||||
render :diets_list
|
render :diets_list
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
class Admin::EmailsController < ApplicationController
|
class Admin::EmailsController < ApplicationController
|
||||||
before_filter :verify_organizer
|
before_filter :verify_organizer
|
||||||
layout "admin"
|
|
||||||
|
|
||||||
def update
|
def update
|
||||||
@conference.email_settings.update_attributes(params[:email_settings])
|
@conference.email_settings.update_attributes(params[:email_settings])
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
class Admin::EventsController < ApplicationController
|
class Admin::EventsController < ApplicationController
|
||||||
before_filter :verify_organizer
|
before_filter :verify_organizer
|
||||||
layout "admin"
|
|
||||||
# FIXME: The timezome should only be applied on output, otherwise
|
# FIXME: The timezome should only be applied on output, otherwise
|
||||||
# you get lost in timezone conversions...
|
# you get lost in timezone conversions...
|
||||||
# around_filter :set_timezone_for_this_request
|
# around_filter :set_timezone_for_this_request
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
class Admin::EventtypeController < ApplicationController
|
class Admin::EventtypeController < ApplicationController
|
||||||
before_filter :verify_organizer
|
before_filter :verify_organizer
|
||||||
layout "admin"
|
|
||||||
|
|
||||||
def show
|
def show
|
||||||
render :event_type_list
|
render :event_type_list
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
class Admin::PeopleController < ApplicationController
|
class Admin::PeopleController < ApplicationController
|
||||||
before_filter :verify_organizer
|
before_filter :verify_organizer
|
||||||
layout "admin"
|
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@people = Person.all
|
@people = Person.all
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
class Admin::RegistrationsController < ApplicationController
|
class Admin::RegistrationsController < ApplicationController
|
||||||
before_filter :verify_organizer
|
before_filter :verify_organizer
|
||||||
layout "admin"
|
|
||||||
|
|
||||||
def show
|
def show
|
||||||
session[:return_to] ||= request.referer
|
session[:return_to] ||= request.referer
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
class Admin::RoomsController < ApplicationController
|
class Admin::RoomsController < ApplicationController
|
||||||
before_filter :verify_organizer
|
before_filter :verify_organizer
|
||||||
layout "admin"
|
|
||||||
|
|
||||||
def show
|
def show
|
||||||
render :rooms_list
|
render :rooms_list
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
class Admin::SocialEventsController < ApplicationController
|
class Admin::SocialEventsController < ApplicationController
|
||||||
before_filter :verify_organizer
|
before_filter :verify_organizer
|
||||||
layout "admin"
|
|
||||||
|
|
||||||
def show
|
def show
|
||||||
render :social_events_list
|
render :social_events_list
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
class Admin::SupporterLevelsController < ApplicationController
|
class Admin::SupporterLevelsController < ApplicationController
|
||||||
before_filter :verify_organizer
|
before_filter :verify_organizer
|
||||||
layout "admin"
|
|
||||||
|
|
||||||
def show
|
def show
|
||||||
render :supporter_levels
|
render :supporter_levels
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
class Admin::SupportersController < ApplicationController
|
class Admin::SupportersController < ApplicationController
|
||||||
before_filter :verify_organizer
|
before_filter :verify_organizer
|
||||||
layout "admin"
|
|
||||||
|
|
||||||
def index
|
def index
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
class Admin::TracksController < ApplicationController
|
class Admin::TracksController < ApplicationController
|
||||||
before_filter :verify_organizer
|
before_filter :verify_organizer
|
||||||
layout "admin"
|
|
||||||
|
|
||||||
def show
|
def show
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
class Admin::UsersController < ApplicationController
|
class Admin::UsersController < ApplicationController
|
||||||
before_filter :verify_admin
|
before_filter :verify_admin
|
||||||
layout "admin"
|
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@users = User.all(:joins => :person,
|
@users = User.all(:joins => :person,
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
class Admin::VenueController < ApplicationController
|
class Admin::VenueController < ApplicationController
|
||||||
before_filter :verify_organizer
|
before_filter :verify_organizer
|
||||||
layout "admin"
|
|
||||||
|
|
||||||
def index
|
def index
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,11 @@
|
||||||
class ApplicationController < ActionController::Base
|
class ApplicationController < ActionController::Base
|
||||||
include ApplicationHelper
|
include ApplicationHelper
|
||||||
protect_from_forgery
|
protect_from_forgery
|
||||||
|
before_filter :get_conferences
|
||||||
|
|
||||||
|
def get_conferences
|
||||||
|
@conferences =Conference.all
|
||||||
|
end
|
||||||
|
|
||||||
def verify_user
|
def verify_user
|
||||||
:authenticate_user!
|
:authenticate_user!
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
class HomeController < ApplicationController
|
class HomeController < ApplicationController
|
||||||
def index
|
def index
|
||||||
@today = Date.current
|
@today = Date.current
|
||||||
@conferences = Conference.where("start_date >= ?", @today)
|
@current = Conference.where("start_date >= ?", @today)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
module Admin::CallForPapersHelper
|
|
||||||
end
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
module Admin::ConferenceHelper
|
|
||||||
end
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
module Admin::PeopleHelper
|
|
||||||
end
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
module Admin::SupportersHelper
|
|
||||||
end
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
module Admin::UsersHelper
|
|
||||||
end
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
module Admin::VenueHelper
|
|
||||||
end
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
module HomeHelper
|
|
||||||
end
|
|
||||||
|
|
@ -1,5 +1,8 @@
|
||||||
.well.sidebar-nav
|
.well.sidebar-nav
|
||||||
%ul.nav.nav-list
|
%ul.nav.nav-list
|
||||||
|
%li.nav-header
|
||||||
|
=@conference.short_title
|
||||||
|
Settings
|
||||||
- if activated == "Conference"
|
- if activated == "Conference"
|
||||||
%li.active= link_to "Conference", "#"
|
%li.active= link_to "Conference", "#"
|
||||||
- else
|
- else
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% @conferences.each do |conference| %>
|
<% @current.each do |conference| %>
|
||||||
<div class="row-fluid" style="margin-top: 30px;">
|
<div class="row-fluid" style="margin-top: 30px;">
|
||||||
<div clas="span12">
|
<div clas="span12">
|
||||||
<div class="well">
|
<div class="well">
|
||||||
|
|
|
||||||
|
|
@ -1,59 +0,0 @@
|
||||||
- if @conference.nil? || @conference.short_title.nil?
|
|
||||||
= link_to "OSEM", admin_conference_index_path, :class => 'brand'
|
|
||||||
- else
|
|
||||||
= link_to @conference.title, admin_conference_path(@conference.short_title), :class => 'brand'
|
|
||||||
- if @conference && !@conference.short_title.nil?
|
|
||||||
%ul.nav
|
|
||||||
- if current_page?(admin_conference_registrations_path(@conference.short_title))
|
|
||||||
%li.active
|
|
||||||
= link_to "Registrations", "#"
|
|
||||||
- else
|
|
||||||
%li
|
|
||||||
= link_to "Registrations", admin_conference_registrations_path(@conference.short_title)
|
|
||||||
- if current_page?(admin_conference_supporters_path(@conference.short_title))
|
|
||||||
%li.active
|
|
||||||
= link_to "Supporters", "#"
|
|
||||||
- else
|
|
||||||
%li
|
|
||||||
= link_to "Supporters", admin_conference_supporters_path(@conference.short_title)
|
|
||||||
|
|
||||||
- if current_page?(admin_conference_events_path(@conference.short_title))
|
|
||||||
%li.active
|
|
||||||
= link_to "Events", "#"
|
|
||||||
- else
|
|
||||||
%li
|
|
||||||
= link_to "Events", admin_conference_events_path(@conference.short_title)
|
|
||||||
- if current_page?(admin_conference_schedule_path(@conference.short_title))
|
|
||||||
%li.active
|
|
||||||
= link_to "Schedule", "#"
|
|
||||||
-else
|
|
||||||
%li
|
|
||||||
= link_to "Schedule ", admin_conference_schedule_path(@conference.short_title)
|
|
||||||
%ul.nav.secondary-nav.pull-right
|
|
||||||
%li
|
|
||||||
= link_to "User Area", root_url
|
|
||||||
- if !@conference.nil?
|
|
||||||
%li.dropdown
|
|
||||||
= link_to "#", :class => "dropdown-toggle", :id =>'drop1', "data-toggle" => 'dropdown' do
|
|
||||||
Export
|
|
||||||
<b class="caret"></b>
|
|
||||||
%ul.dropdown-menu{:role => 'menu', "aria-labelledby" => "drop1"}
|
|
||||||
%li= link_to "JSON", "#"
|
|
||||||
%li= link_to "HTML", "#"
|
|
||||||
%li.dropdown
|
|
||||||
- unless Conference.count == 1 && !has_role?(current_user, "admin")
|
|
||||||
= link_to "#", :class => "dropdown-toggle", :id => 'drop2', "data-toggle" => 'dropdown' do
|
|
||||||
Conferences
|
|
||||||
<b class="caret"></b>
|
|
||||||
%ul.dropdown-menu{:role => 'menu', "aria-labelledby" => "drop2"}
|
|
||||||
- conferences = Conference.order("created_at DESC")
|
|
||||||
- unless conferences.nil?
|
|
||||||
- conferences.each do |c|
|
|
||||||
- unless @conference == c
|
|
||||||
%li= link_to c.short_title, admin_conference_path(c.short_title)
|
|
||||||
- if has_role?(current_user, "admin")
|
|
||||||
%li= link_to "New Conference", new_admin_conference_path
|
|
||||||
- if has_role?(current_user, "admin")
|
|
||||||
%li= link_to "Users", admin_users_path
|
|
||||||
%li= link_to "People", admin_people_path
|
|
||||||
%li= link_to "Log out", destroy_user_session_path, :method => :delete
|
|
||||||
|
|
@ -1,45 +1,122 @@
|
||||||
- if @conference.nil? || @conference.short_title.nil?
|
%a.btn.btn-navbar{"data-target" => ".nav-collapse", "data-toggle" => "collapse"}
|
||||||
= link_to "OSEM", root_path, :class => 'brand'
|
%span.icon-th
|
||||||
- else
|
= link_to "OSEM", root_path, :class => 'brand', :title => "Open Source Event Manager"
|
||||||
= link_to @conference.title, root_path, :class => 'brand'
|
- if @conference && !@conference.short_title.nil?
|
||||||
%ul.nav
|
%span.brand
|
||||||
- if !@conference.nil? && @conference.registration_open?
|
= @conference.short_title
|
||||||
- if current_page?(register_conference_path(@conference.short_title))
|
.nav-collapse.collapse
|
||||||
%li.active
|
- if user_signed_in?
|
||||||
= link_to "Registration", "#"
|
- if has_role?(current_user, "admin") || has_role?(current_user, "organizer")
|
||||||
|
- if controller.class.name.split("::").first=="Admin"
|
||||||
|
- if @conference && !@conference.short_title.nil?
|
||||||
|
%ul.nav
|
||||||
|
- if current_page?(admin_conference_path(@conference.short_title))
|
||||||
|
%li.active
|
||||||
|
= link_to('#') do
|
||||||
|
Settings
|
||||||
|
- else
|
||||||
|
%li
|
||||||
|
= link_to(admin_conference_path(@conference.short_title)) do
|
||||||
|
Settings
|
||||||
|
- if current_page?(admin_conference_registrations_path(@conference.short_title))
|
||||||
|
%li.active
|
||||||
|
= link_to('#') do
|
||||||
|
Registrations
|
||||||
|
- else
|
||||||
|
%li
|
||||||
|
= link_to(admin_conference_registrations_path(@conference.short_title)) do
|
||||||
|
Registrations
|
||||||
|
- if current_page?(admin_conference_supporters_path(@conference.short_title))
|
||||||
|
%li.active
|
||||||
|
= link_to('#') do
|
||||||
|
Supporters
|
||||||
|
- else
|
||||||
|
%li
|
||||||
|
= link_to(admin_conference_supporters_path(@conference.short_title)) do
|
||||||
|
Supporters
|
||||||
|
- if current_page?(admin_conference_events_path(@conference.short_title))
|
||||||
|
%li.active
|
||||||
|
= link_to('#') do
|
||||||
|
Events
|
||||||
|
- else
|
||||||
|
%li
|
||||||
|
= link_to(admin_conference_events_path(@conference.short_title)) do
|
||||||
|
Events
|
||||||
|
- if current_page?(admin_conference_schedule_path(@conference.short_title))
|
||||||
|
%li.active
|
||||||
|
= link_to('#') do
|
||||||
|
Schedule
|
||||||
|
-else
|
||||||
|
%li
|
||||||
|
= link_to(admin_conference_schedule_path(@conference.short_title), :target => "_blank") do
|
||||||
|
Schedule
|
||||||
|
|
||||||
|
%ul.nav.pull-right
|
||||||
|
%li.dropdown
|
||||||
|
%a.dropdown-toggle{"data-toggle" => "dropdown", :href => "#"}
|
||||||
|
= image_tag(current_user.person.gravatar_url(:size => "20"), :title => "Yo #{current_user.person.public_name}!", :class=>"visible-desktop")
|
||||||
|
|
||||||
|
%ul.dropdown-menu{:style => "padding: 15px;"}
|
||||||
|
%li
|
||||||
|
= link_to("#") do
|
||||||
|
%i.icon-home
|
||||||
|
= current_user.person.public_name if current_user.person
|
||||||
|
%li
|
||||||
|
= link_to(edit_user_registration_path) do
|
||||||
|
%i.icon-wrench
|
||||||
|
Edit Account
|
||||||
|
-if @conference and @conference.id
|
||||||
|
%li
|
||||||
|
= link_to(conference_proposal_index_path(@conference.short_title)) do
|
||||||
|
%i.icon-comment
|
||||||
|
My Submissions
|
||||||
|
%li
|
||||||
|
= link_to(destroy_user_session_path, :method=>'delete') do
|
||||||
|
%i.icon-minus
|
||||||
|
Sign out
|
||||||
|
-if has_role?(current_user, "admin") || has_role?(current_user, "organizer")
|
||||||
|
%li.divider
|
||||||
|
%h6
|
||||||
|
Manage Conferences
|
||||||
|
- @conferences.each do |conference|
|
||||||
|
%li
|
||||||
|
= link_to(admin_conference_path(conference.short_title)) do
|
||||||
|
%i.icon-cog
|
||||||
|
Manage
|
||||||
|
= conference.short_title
|
||||||
|
%li
|
||||||
|
= link_to(new_admin_conference_path) do
|
||||||
|
%i.icon-plus
|
||||||
|
New Conference
|
||||||
|
%li.divider
|
||||||
|
%h6
|
||||||
|
Manage OSEM
|
||||||
|
%li
|
||||||
|
= link_to(admin_users_path) do
|
||||||
|
%i.icon-user
|
||||||
|
Users
|
||||||
|
%li
|
||||||
|
= link_to(admin_people_path) do
|
||||||
|
%i.icon-star-empty
|
||||||
|
People
|
||||||
- else
|
- else
|
||||||
%li
|
%ul.nav.pull-right
|
||||||
= link_to "Registration", register_conference_path(@conference.short_title)
|
%li.dropdown.visible-desktop
|
||||||
- if !@conference.nil?
|
%a.dropdown-toggle{"data-toggle" => "dropdown", :href => "#"}
|
||||||
- if current_page?(conference_proposal_index_path(@conference.short_title))
|
%i.icon-user.icon-2x
|
||||||
%li.active
|
Sign In
|
||||||
= link_to "My Proposals", "#"
|
%i.icon-angle-down
|
||||||
- else
|
.dropdown-menu{:style => "padding: 15px; padding-bottom: 0px;"}
|
||||||
%li
|
= form_tag user_session_path do
|
||||||
= link_to "My Proposals", conference_proposal_index_path(@conference.short_title)
|
= text_field_tag 'user[email]'
|
||||||
%ul.nav.pull-right
|
= password_field_tag 'user[password]'
|
||||||
- if user_signed_in?
|
%label.checkbox
|
||||||
- if has_role?(current_user, "admin") || has_role?(current_user, "organizer")
|
= check_box_tag 'user[remember_me]'
|
||||||
%li
|
Remember me
|
||||||
= link_to "Admin Area", admin_conference_index_path
|
%button.btn.btn-block Sign in
|
||||||
%li
|
%br
|
||||||
= link_to('Sign Out', destroy_user_session_path, :method=>'delete')
|
= link_to "Forgot your password?", new_password_path('user')
|
||||||
- else
|
%li.hidden-desktop
|
||||||
%li
|
= link_to('Sign In', new_user_session_path)
|
||||||
= link_to('Sign In', new_user_session_path)
|
|
||||||
- if user_signed_in?
|
|
||||||
%li
|
|
||||||
= link_to('Edit account', edit_user_registration_path)
|
|
||||||
%li.dropdown
|
|
||||||
- unless Conference.count == 1 && !has_role?(current_user, "admin")
|
|
||||||
= link_to "#", :class => "dropdown-toggle" do
|
|
||||||
Conferences
|
|
||||||
<b class="caret"></b>
|
|
||||||
%ul.dropdown-menu
|
|
||||||
- conferences = Conference.order("created_at DESC")
|
|
||||||
- unless conferences.nil?
|
|
||||||
- conferences.each do |c|
|
|
||||||
- unless @conference == c
|
|
||||||
%li= link_to c.short_title, admin_conference_path(c.short_title)
|
|
||||||
- if has_role?(current_user, "admin")
|
|
||||||
%li= link_to "New Conference", new_admin_conference_path
|
|
||||||
|
|
|
||||||
|
|
@ -1,41 +0,0 @@
|
||||||
!!!
|
|
||||||
%html
|
|
||||||
%head
|
|
||||||
%meta{:charset => "utf-8"}
|
|
||||||
%meta{:name => "viewport", :content => "width=device-width, initial-scale=1, maximum-scale=1"}
|
|
||||||
%title= content_for?(:title) ? yield(:title) : "Admin"
|
|
||||||
%meta{:content => "", :name => "description"}
|
|
||||||
%meta{:content => "", :name => "author"}
|
|
||||||
= stylesheet_link_tag "application"
|
|
||||||
= javascript_include_tag "application"
|
|
||||||
= csrf_meta_tags
|
|
||||||
= yield(:head)
|
|
||||||
%body
|
|
||||||
#wrap
|
|
||||||
.navbar.navbar-fixed-top
|
|
||||||
.navbar-inner
|
|
||||||
.container-fluid
|
|
||||||
= render 'layouts/admin_navigation'
|
|
||||||
.container#messages
|
|
||||||
.row
|
|
||||||
.span12
|
|
||||||
= 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
|
|
||||||
#push
|
|
||||||
#footer
|
|
||||||
.container
|
|
||||||
%p.muted.credit.text-center
|
|
||||||
OSEM is (C) 2013
|
|
||||||
= link_to "Matt Barringer", "http://incoherent.de"
|
|
||||||
and released under the GPL. You can get the source code from
|
|
||||||
= link_to "Github.", "https://github.com/mbarringer/osem"
|
|
||||||
|
|
@ -32,6 +32,7 @@
|
||||||
.container#content
|
.container#content
|
||||||
= yield
|
= yield
|
||||||
#push
|
#push
|
||||||
|
|
||||||
#footer
|
#footer
|
||||||
.container
|
.container
|
||||||
%p.muted.credit.text-center
|
%p.muted.credit.text-center
|
||||||
|
|
|
||||||
|
|
@ -90,4 +90,26 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$(function() {
|
||||||
|
// add a hash to the URL when the user clicks on a tab
|
||||||
|
$('a[data-toggle="tab"]').on('click', function(e) {
|
||||||
|
history.pushState(null, null, $(this).attr('href'));
|
||||||
|
});
|
||||||
|
// navigate to a tab when the history changes
|
||||||
|
window.addEventListener("popstate", function(e) {
|
||||||
|
var activeTab = $('[href=' + location.hash + ']');
|
||||||
|
if (activeTab.length) {
|
||||||
|
activeTab.tab('show');
|
||||||
|
} else {
|
||||||
|
$('.nav-tabs a:first').tab('show');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$(function() {
|
||||||
|
var hash = window.location.hash;
|
||||||
|
hash && $('ul.nav a[href="' + hash + '"]').tab('show');
|
||||||
|
});
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue