mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Fix the callforpapers routing and some styling issues
This commit is contained in:
parent
740540de13
commit
e4c19ab1f6
6 changed files with 40 additions and 9 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
class Admin::CallforpapersController < ApplicationController
|
class Admin::CallforpapersController < ApplicationController
|
||||||
before_filter :verify_organizer
|
before_filter :verify_organizer
|
||||||
|
|
||||||
def index
|
def show
|
||||||
@cfp = @conference.call_for_papers
|
@cfp = @conference.call_for_papers
|
||||||
if @cfp.nil?
|
if @cfp.nil?
|
||||||
@cfp = CallForPapers.new
|
@cfp = CallForPapers.new
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,21 @@
|
||||||
module ApplicationHelper
|
module ApplicationHelper
|
||||||
|
|
||||||
|
def bootstrap_class_for(flash_type)
|
||||||
|
logger.debug "flash_type is #{flash_type}"
|
||||||
|
case flash_type
|
||||||
|
when 'success'
|
||||||
|
'alert-success'
|
||||||
|
when 'error'
|
||||||
|
'alert-error'
|
||||||
|
when 'alert'
|
||||||
|
'alert-block'
|
||||||
|
when 'notice'
|
||||||
|
'alert-info'
|
||||||
|
else
|
||||||
|
flash_type.to_s
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def active_nav_li(link)
|
def active_nav_li(link)
|
||||||
if current_page?(link)
|
if current_page?(link)
|
||||||
return 'active'
|
return 'active'
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
.col-md-3
|
.col-md-3
|
||||||
= render 'admin/conference/sidebar'
|
= render 'admin/conference/sidebar'
|
||||||
.col-md-9
|
.col-md-9
|
||||||
= semantic_form_for(@cfp, :url => admin_conference_callforpaper_path(@conference.short_title, @conference.call_for_papers),:html => {:multipart => true}) do |f|
|
= semantic_form_for(@cfp, :url => admin_conference_callforpapers_path(@conference.short_title),:html => {:multipart => true}) do |f|
|
||||||
= f.input :start_date, :as => :string, :input_html => { :id => "conference-start-datepicker", :readonly => "readonly" }
|
= f.input :start_date, :as => :string, :input_html => { :id => "conference-start-datepicker", :readonly => "readonly" }
|
||||||
= f.input :end_date, :as => :string, :input_html => { :id => "conference-end-datepicker", :readonly => "readonly" }
|
= f.input :end_date, :as => :string, :input_html => { :id => "conference-end-datepicker", :readonly => "readonly" }
|
||||||
= f.input :hard_deadline, :as => :string, :input_html => { :id => "cfp-hard-datepicker", :readonly => "readonly" }
|
= f.input :hard_deadline, :as => :string, :input_html => { :id => "cfp-hard-datepicker", :readonly => "readonly" }
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
- flash.each do |name, msg|
|
- flash.each do |type, message|
|
||||||
- if msg.is_a?(String)
|
%div{:class=>"alert alert-dismissable #{bootstrap_class_for(type)}", :id=>"flash"}
|
||||||
%div{:class => "alert alert-#{name == :notice ? "success" : "error"}"}
|
.button.close{"data-dismiss" => "alert", "aria-hidden"=>"true"}
|
||||||
%a.close{"data-dismiss" => "alert"} ×
|
×
|
||||||
= content_tag :div, msg, :id => "flash_#{name}"
|
%p
|
||||||
|
= message
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
%html{:xmlns => "http://www.w3.org/1999/html"}
|
%html{:xmlns => "http://www.w3.org/1999/html"}
|
||||||
%html
|
|
||||||
%head
|
%head
|
||||||
%meta{:charset => "utf-8"}
|
%meta{:charset => "utf-8"}
|
||||||
%meta{:name => "viewport", :content => "width=device-width, initial-scale=1, maximum-scale=1"}
|
%meta{:name => "viewport", :content => "width=device-width, initial-scale=1, maximum-scale=1"}
|
||||||
|
|
|
||||||
|
|
@ -25,19 +25,33 @@ Osem::Application.routes.draw do
|
||||||
patch "/volunteers" => "volunteers#update", :as => "volunteers_update"
|
patch "/volunteers" => "volunteers#update", :as => "volunteers_update"
|
||||||
|
|
||||||
resources :difficulty_levels, only: [:show, :update, :index]
|
resources :difficulty_levels, only: [:show, :update, :index]
|
||||||
|
|
||||||
resources :rooms, only: [:show, :update, :index]
|
resources :rooms, only: [:show, :update, :index]
|
||||||
|
|
||||||
resources :tracks, only: [:show, :update, :index]
|
resources :tracks, only: [:show, :update, :index]
|
||||||
|
|
||||||
resources :eventtypes, only: [:show, :index] do
|
resources :eventtypes, only: [:show, :index] do
|
||||||
collection do
|
collection do
|
||||||
patch :update
|
patch :update
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
resources :social_events, only: [:show, :update, :index]
|
resources :social_events, only: [:show, :update, :index]
|
||||||
|
|
||||||
resources :supporter_levels, only: [:show, :update, :index]
|
resources :supporter_levels, only: [:show, :update, :index]
|
||||||
|
|
||||||
resources :emails, only: [:show, :update, :index]
|
resources :emails, only: [:show, :update, :index]
|
||||||
resources :callforpapers, only: [:show, :update, :index]
|
|
||||||
|
resources :callforpapers, only: [:create] do
|
||||||
|
collection do
|
||||||
|
patch :update
|
||||||
|
get :show
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
patch "/questions/update_conference" => "questions#update_conference"
|
patch "/questions/update_conference" => "questions#update_conference"
|
||||||
resources :questions
|
resources :questions
|
||||||
|
|
||||||
resources :events do
|
resources :events do
|
||||||
member do
|
member do
|
||||||
post :comment
|
post :comment
|
||||||
|
|
@ -47,6 +61,7 @@ Osem::Application.routes.draw do
|
||||||
end
|
end
|
||||||
resource :speaker, :only => [:edit, :update]
|
resource :speaker, :only => [:edit, :update]
|
||||||
end
|
end
|
||||||
|
|
||||||
resources :supporters
|
resources :supporters
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue