Conference index
This commit is contained in:
parent
c2548fcd48
commit
db1bb07565
1
Gemfile
1
Gemfile
|
@ -46,6 +46,7 @@ gem 'autoprefixer-rails'
|
||||||
gem 'font-awesome-rails'
|
gem 'font-awesome-rails'
|
||||||
|
|
||||||
gem 'nested_form'
|
gem 'nested_form'
|
||||||
|
gem 'jquery-datatables-rails'
|
||||||
|
|
||||||
group :development do
|
group :development do
|
||||||
gem 'spring'
|
gem 'spring'
|
||||||
|
|
|
@ -130,6 +130,9 @@ GEM
|
||||||
hike (1.2.3)
|
hike (1.2.3)
|
||||||
hitimes (1.2.2)
|
hitimes (1.2.2)
|
||||||
i18n (0.6.11)
|
i18n (0.6.11)
|
||||||
|
jquery-datatables-rails (2.2.3)
|
||||||
|
jquery-rails
|
||||||
|
sass-rails
|
||||||
jquery-rails (3.1.2)
|
jquery-rails (3.1.2)
|
||||||
railties (>= 3.0, < 5.0)
|
railties (>= 3.0, < 5.0)
|
||||||
thor (>= 0.14, < 2.0)
|
thor (>= 0.14, < 2.0)
|
||||||
|
@ -296,6 +299,7 @@ DEPENDENCIES
|
||||||
font-awesome-rails
|
font-awesome-rails
|
||||||
globalize (~> 4.0.2)
|
globalize (~> 4.0.2)
|
||||||
guard-rspec
|
guard-rspec
|
||||||
|
jquery-datatables-rails
|
||||||
jquery-rails
|
jquery-rails
|
||||||
nested_form
|
nested_form
|
||||||
pg
|
pg
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
//= require jquery
|
//= require jquery
|
||||||
//= require jquery_ujs
|
//= require jquery_ujs
|
||||||
//= require jquery_nested_form
|
//= require jquery_nested_form
|
||||||
|
//= require dataTables/jquery.dataTables
|
||||||
|
//= require dataTables/bootstrap/3/jquery.dataTables.bootstrap
|
||||||
//= require bootstrap-sprockets
|
//= require bootstrap-sprockets
|
||||||
//= require metisMenu/metisMenu
|
//= require metisMenu/metisMenu
|
||||||
//= require_directory .
|
//= require_directory .
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
$ ->
|
||||||
|
$('[data-table]').dataTable();
|
|
@ -0,0 +1,14 @@
|
||||||
|
th.actions, td.actions {
|
||||||
|
width: 150px;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
td.actions {
|
||||||
|
i.fa {
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.record-table td {
|
||||||
|
vertical-align: middle !important;
|
||||||
|
}
|
|
@ -5,7 +5,10 @@
|
||||||
@import "font-awesome";
|
@import "font-awesome";
|
||||||
|
|
||||||
@import "metisMenu/metisMenu";
|
@import "metisMenu/metisMenu";
|
||||||
|
@import "dataTables/jquery.dataTables";
|
||||||
|
@import "dataTables/bootstrap/3/jquery.dataTables.bootstrap";
|
||||||
|
|
||||||
@import "layout";
|
@import "layout";
|
||||||
@import "navigation";
|
@import "navigation";
|
||||||
@import "forms";
|
@import "forms";
|
||||||
|
@import "record_tables";
|
|
@ -16,6 +16,10 @@ module Management
|
||||||
def edit
|
def edit
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def index
|
||||||
|
@conferences = Conference.all.order(start_date: :desc)
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def assign_conference
|
def assign_conference
|
||||||
|
|
|
@ -7,7 +7,7 @@ html
|
||||||
meta name="viewport" content="width=device-width, initial-scale=1"
|
meta name="viewport" content="width=device-width, initial-scale=1"
|
||||||
title
|
title
|
||||||
- if content_for? :title
|
- if content_for? :title
|
||||||
= content_for :title
|
=> content_for :title
|
||||||
| | Clarion
|
| | Clarion
|
||||||
- else
|
- else
|
||||||
| Clarion
|
| Clarion
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
tr
|
||||||
|
td = conference.title
|
||||||
|
td = l conference.start_date.to_date, format: :long
|
||||||
|
td = l conference.end_date.to_date, format: :long
|
||||||
|
td = conference.events.count
|
||||||
|
td.actions
|
||||||
|
div.btn-group.btn-group-sm
|
||||||
|
= link_to management_conference_path(conference), title: t('actions.view.button', model: Conference.model_name.human), class: 'btn btn-info'
|
||||||
|
= fa_icon :eye
|
||||||
|
= link_to edit_management_conference_path(conference), title: t('actions.edit.button', model: Conference.model_name.human), class: 'btn btn-primary'
|
||||||
|
= fa_icon :edit
|
||||||
|
= link_to management_conference_path(conference), title: t('actions.destroy.button', model: Conference.model_name.human), class: 'btn btn-danger', method: :delete, data: {confirm: t('actions.are_you_sure')}
|
||||||
|
= fa_icon :trash
|
|
@ -7,8 +7,8 @@ div#tracks
|
||||||
= ff.input :color, as: :color
|
= ff.input :color, as: :color
|
||||||
= ff.input :description
|
= ff.input :description
|
||||||
.panel-footer.text-right
|
.panel-footer.text-right
|
||||||
= ff.link_to_remove t('helpers.destroy', model: Track.model_name.human), class: ['btn', 'btn-danger', ff.object.events.any? ? 'disabled' : nil]
|
= ff.link_to_remove t('actions.destroy.button', model: Track.model_name.human), class: ['btn', 'btn-danger', ff.object.events.any? ? 'disabled' : nil]
|
||||||
.col-lg-6
|
.col-lg-6
|
||||||
.panel.panel-default
|
.panel.panel-default
|
||||||
.panel-body.text-right
|
.panel-body.text-right
|
||||||
= form.link_to_add t('helpers.submit.create', model: Track.model_name.human), :tracks, data: {target: '#tracks'}, class: 'btn btn-success'
|
= form.link_to_add t('actions.create.button', model: Track.model_name.human), :tracks, data: {target: '#tracks'}, class: 'btn btn-success'
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
- content_for :title
|
||||||
|
=> t 'actions.edit.title', model: Conference.model_name.human
|
||||||
|
= @conference.title
|
||||||
.row
|
.row
|
||||||
.col-lg-12
|
.col-lg-12
|
||||||
= render partial: 'form'
|
= render partial: 'form'
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
- content_for :title
|
||||||
|
= Conference.model_name.human(count: 2).mb_chars.capitalize
|
||||||
|
|
||||||
|
.row
|
||||||
|
.col-lg-12
|
||||||
|
.panel.panel-primary
|
||||||
|
.panel-heading
|
||||||
|
h1.panel-title = Conference.model_name.human(count: 2).mb_chars.capitalize
|
||||||
|
.panel-body
|
||||||
|
table.table.table-striped.table-hover.record-table
|
||||||
|
thead
|
||||||
|
tr
|
||||||
|
th = Conference.human_attribute_name :title
|
||||||
|
th = Conference.human_attribute_name :start_date
|
||||||
|
th = Conference.human_attribute_name :end_date
|
||||||
|
th = Conference.human_attribute_name :submissions
|
||||||
|
th.actions
|
||||||
|
tbody
|
||||||
|
= render @conferences
|
||||||
|
.panel-footer
|
||||||
|
.text-right
|
||||||
|
= link_to new_management_conference_path, class: 'btn btn-primary'
|
||||||
|
=> fa_icon 'plus fw', text: t('actions.create.button', model: Conference.model_name.human)
|
|
@ -1,3 +1,5 @@
|
||||||
|
- content_for :title
|
||||||
|
= t 'actions.create.title', model: Conference.model_name.human
|
||||||
.row
|
.row
|
||||||
.col-lg-12
|
.col-lg-12
|
||||||
= render partial: 'form'
|
= render partial: 'form'
|
||||||
|
|
|
@ -20,8 +20,20 @@
|
||||||
# available at http://guides.rubyonrails.org/i18n.html.
|
# available at http://guides.rubyonrails.org/i18n.html.
|
||||||
|
|
||||||
bg:
|
bg:
|
||||||
helpers:
|
actions:
|
||||||
destroy: Премахни %{model}
|
create:
|
||||||
|
button: Създай %{model}
|
||||||
|
title: Създаване на %{model}
|
||||||
|
destroy:
|
||||||
|
button: Премахни %{model}
|
||||||
|
edit:
|
||||||
|
button: Редактирай %{model}
|
||||||
|
title: Редакция на %{model}
|
||||||
|
view:
|
||||||
|
button: Прегледай %{model}
|
||||||
|
title: Преглед на %{model}
|
||||||
|
are_you_sure: Сигурен ли си?
|
||||||
|
|
||||||
create_new: Създаване на %{model_name}
|
create_new: Създаване на %{model_name}
|
||||||
event_mailer:
|
event_mailer:
|
||||||
acceptance_notification:
|
acceptance_notification:
|
||||||
|
|
Loading…
Reference in New Issue