Conference review UI
This commit is contained in:
parent
ddd18c256f
commit
eceed74020
|
@ -0,0 +1,3 @@
|
|||
.huge {
|
||||
font-size: 40px;
|
||||
}
|
|
@ -12,3 +12,4 @@
|
|||
@import "navigation";
|
||||
@import "forms";
|
||||
@import "record_tables";
|
||||
@import "dashboard";
|
|
@ -16,6 +16,8 @@ class Event < ActiveRecord::Base
|
|||
|
||||
enum state: [:undecided, :approved, :rejected, :backup]
|
||||
|
||||
scope :confirmed, -> { where.not confirmed_at: nil }
|
||||
|
||||
# XXX: this belongs in a decorator
|
||||
STATE_TO_GLYPH = {undecided: 'question-sign', rejected: 'remove', approved: 'ok', backup: 'retweet'}
|
||||
STATE_TO_CLASS = {undecided: 'warning', rejected: 'danger', approved: 'success', backup: 'info'}
|
||||
|
|
|
@ -0,0 +1,71 @@
|
|||
- content_for :title
|
||||
= @conference.title
|
||||
.row
|
||||
.col-lg-12
|
||||
h1.page-header
|
||||
= @conference.title
|
||||
.row
|
||||
.col-lg-3.col-md-6
|
||||
.panel.panel-primary
|
||||
.panel-heading
|
||||
.row
|
||||
.col-xs-3
|
||||
= fa_icon 'bullhorn 5x'
|
||||
.col-xs-9.text-right
|
||||
.huge
|
||||
= @conference.events.count
|
||||
div
|
||||
= t Event.model_name.human(count: @conference.events.count)
|
||||
= link_to management_conference_events_path(@conference)
|
||||
.panel-footer.text-primary
|
||||
span.pull-left = t 'views.conference.see_details'
|
||||
span.pull-right = fa_icon 'arrow-circle-right'
|
||||
span.clearfix
|
||||
.col-lg-3.col-md-6
|
||||
.panel.panel-danger
|
||||
.panel-heading
|
||||
.row
|
||||
.col-xs-3
|
||||
= fa_icon 'thumbs-down 5x'
|
||||
.col-xs-9.text-right
|
||||
.huge
|
||||
= @conference.events.rejected.count
|
||||
div
|
||||
= t 'event_states.rejected', count: @conference.events.rejected.count
|
||||
= link_to rejected_management_conference_events_path(@conference)
|
||||
.panel-footer.text-danger
|
||||
span.pull-left = t 'views.conference.see_details'
|
||||
span.pull-right = fa_icon 'arrow-circle-right'
|
||||
span.clearfix
|
||||
.col-lg-3.col-md-6
|
||||
.panel.panel-info
|
||||
.panel-heading
|
||||
.row
|
||||
.col-xs-3
|
||||
= fa_icon 'thumbs-up 5x'
|
||||
.col-xs-9.text-right
|
||||
.huge
|
||||
= @conference.events.approved.count
|
||||
div
|
||||
= t 'event_states.approved', count: @conference.events.approved.count
|
||||
= link_to approved_management_conference_events_path(@conference)
|
||||
.panel-footer.text-info
|
||||
span.pull-left = t 'views.conference.see_details'
|
||||
span.pull-right = fa_icon 'arrow-circle-right'
|
||||
span.clearfix
|
||||
.col-lg-3.col-md-6
|
||||
.panel.panel-success
|
||||
.panel-heading
|
||||
.row
|
||||
.col-xs-3
|
||||
= fa_icon 'check 5x'
|
||||
.col-xs-9.text-right
|
||||
.huge
|
||||
= @conference.events.approved.confirmed.count
|
||||
div
|
||||
= t 'event_states.confirmed', count: @conference.events.approved.confirmed.count
|
||||
= link_to confirmed_management_conference_events_path(@conference)
|
||||
.panel-footer.text-success
|
||||
span.pull-left = t 'views.conference.see_details'
|
||||
span.pull-right = fa_icon 'arrow-circle-right'
|
||||
span.clearfix
|
|
@ -39,6 +39,22 @@ bg:
|
|||
new:
|
||||
title_f: Нова %{model}
|
||||
title_m: Нов %{model}
|
||||
event_states:
|
||||
undecided:
|
||||
one: 'Нерешено'
|
||||
other: 'Нерешени'
|
||||
approved:
|
||||
one: 'Одобрено'
|
||||
other: 'Одобрени'
|
||||
rejected:
|
||||
one: 'Отхвърлено'
|
||||
other: 'Отхвърлени'
|
||||
backup:
|
||||
one: 'В резерв'
|
||||
other: 'В резерв'
|
||||
confirmed:
|
||||
one: 'Потвърдено'
|
||||
other: 'Потвърдени'
|
||||
event_mailer:
|
||||
acceptance_notification:
|
||||
subject: 'Предложението ви за %{conference} за %{submission_type} „%{title}“ е одобрено'
|
||||
|
|
|
@ -75,3 +75,4 @@ bg:
|
|||
views:
|
||||
conference:
|
||||
info: Информация за конференция
|
||||
see_details: Повече информация
|
|
@ -23,7 +23,18 @@ Rails.application.routes.draw do
|
|||
end
|
||||
|
||||
resources :events do
|
||||
patch 'state'
|
||||
member do
|
||||
patch 'state'
|
||||
end
|
||||
|
||||
collection do
|
||||
get 'approved'
|
||||
get 'rejected'
|
||||
get 'undecided'
|
||||
get 'backup'
|
||||
get 'confirmed'
|
||||
post 'send_acceptance_notifications'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -32,20 +43,6 @@ Rails.application.routes.draw do
|
|||
post 'toggle_admin'
|
||||
end
|
||||
end
|
||||
|
||||
resources :events do
|
||||
member do
|
||||
patch 'state'
|
||||
end
|
||||
|
||||
collection do
|
||||
get 'approved'
|
||||
get 'rejected'
|
||||
get 'undecided'
|
||||
get 'backup'
|
||||
post 'send_acceptance_notifications'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
root 'home#index'
|
||||
|
|
Loading…
Reference in New Issue