refinerycms-registrations 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/app/assets/images/refinery/race_registrations/admin/chosen-sprite.png +0 -0
- data/app/assets/images/refinery/race_registrations/down_arrow.png +0 -0
- data/app/assets/images/refinery/race_registrations/up_arrow.png +0 -0
- data/app/assets/javascripts/refinery/race_registrations/admin/jquery.chosen.min.js +10 -0
- data/app/assets/javascripts/refinery/race_registrations/admin/race_registrations.js +53 -0
- data/app/assets/javascripts/refinery/race_registrations/race_registrations.js +41 -0
- data/app/assets/stylesheets/refinery/race_registrations/admin/chosen.css.scss +396 -0
- data/app/assets/stylesheets/refinery/race_registrations/admin/race_registrations.css.scss +13 -0
- data/app/assets/stylesheets/refinery/race_registrations/admin/sortable_table.css.scss +40 -0
- data/app/assets/stylesheets/refinery/race_registrations/race_registrations.css.scss +74 -0
- data/app/controllers/refinery/race_registrations/admin/categories_controller.rb +33 -0
- data/app/controllers/refinery/race_registrations/admin/groups_controller.rb +13 -0
- data/app/controllers/refinery/race_registrations/admin/people_controller.rb +89 -0
- data/app/controllers/refinery/race_registrations/admin/registrations_controller.rb +13 -0
- data/app/controllers/refinery/race_registrations/categories_controller.rb +17 -0
- data/app/controllers/refinery/race_registrations/people_controller.rb +36 -0
- data/app/controllers/refinery/race_registrations/registrations_controller.rb +40 -0
- data/app/helpers/refinery/race_registrations/admin/people_helper.rb +23 -0
- data/app/helpers/refinery/race_registrations/registrations_helper.rb +23 -0
- data/app/models/refinery/race_registrations/category.rb +17 -0
- data/app/models/refinery/race_registrations/group.rb +20 -0
- data/app/models/refinery/race_registrations/group_category.rb +8 -0
- data/app/models/refinery/race_registrations/person.rb +53 -0
- data/app/models/refinery/race_registrations/registration.rb +37 -0
- data/app/views/layouts/print.html.erb +14 -0
- data/app/views/refinery/pages/registration_list.html.erb +15 -0
- data/app/views/refinery/race_registrations/admin/_submenu.html.erb +77 -0
- data/app/views/refinery/race_registrations/admin/categories/_categories.html.erb +2 -0
- data/app/views/refinery/race_registrations/admin/categories/_category.html.erb +20 -0
- data/app/views/refinery/race_registrations/admin/categories/_form.html.erb +17 -0
- data/app/views/refinery/race_registrations/admin/categories/_records.html.erb +18 -0
- data/app/views/refinery/race_registrations/admin/categories/_sortable_list.html.erb +5 -0
- data/app/views/refinery/race_registrations/admin/categories/edit.html.erb +1 -0
- data/app/views/refinery/race_registrations/admin/categories/index.html.erb +5 -0
- data/app/views/refinery/race_registrations/admin/categories/new.html.erb +1 -0
- data/app/views/refinery/race_registrations/admin/groups/_form.html.erb +23 -0
- data/app/views/refinery/race_registrations/admin/groups/_group.html.erb +20 -0
- data/app/views/refinery/race_registrations/admin/groups/_groups.html.erb +2 -0
- data/app/views/refinery/race_registrations/admin/groups/_records.html.erb +18 -0
- data/app/views/refinery/race_registrations/admin/groups/_sortable_list.html.erb +5 -0
- data/app/views/refinery/race_registrations/admin/groups/edit.html.erb +1 -0
- data/app/views/refinery/race_registrations/admin/groups/index.html.erb +5 -0
- data/app/views/refinery/race_registrations/admin/groups/new.html.erb +1 -0
- data/app/views/refinery/race_registrations/admin/people/_form.html.erb +82 -0
- data/app/views/refinery/race_registrations/admin/people/_people.html.erb +14 -0
- data/app/views/refinery/race_registrations/admin/people/_person.html.erb +21 -0
- data/app/views/refinery/race_registrations/admin/people/_records.html.erb +11 -0
- data/app/views/refinery/race_registrations/admin/people/edit.html.erb +1 -0
- data/app/views/refinery/race_registrations/admin/people/index.html.erb +27 -0
- data/app/views/refinery/race_registrations/admin/people/index.js.erb +3 -0
- data/app/views/refinery/race_registrations/admin/people/new.html.erb +1 -0
- data/app/views/refinery/race_registrations/admin/registrations/_form.html.erb +54 -0
- data/app/views/refinery/race_registrations/admin/registrations/_records.html.erb +18 -0
- data/app/views/refinery/race_registrations/admin/registrations/_registration.html.erb +20 -0
- data/app/views/refinery/race_registrations/admin/registrations/_registrations.html.erb +2 -0
- data/app/views/refinery/race_registrations/admin/registrations/_sortable_list.html.erb +5 -0
- data/app/views/refinery/race_registrations/admin/registrations/edit.html.erb +1 -0
- data/app/views/refinery/race_registrations/admin/registrations/index.html.erb +5 -0
- data/app/views/refinery/race_registrations/admin/registrations/new.html.erb +1 -0
- data/app/views/refinery/race_registrations/categories/index.html.erb +11 -0
- data/app/views/refinery/race_registrations/categories/show.html.erb +27 -0
- data/app/views/refinery/race_registrations/groups/index.html.erb +11 -0
- data/app/views/refinery/race_registrations/groups/show.html.erb +27 -0
- data/app/views/refinery/race_registrations/people/_form.html.erb +81 -0
- data/app/views/refinery/race_registrations/people/_form_header.html.erb +8 -0
- data/app/views/refinery/race_registrations/people/new.html.erb +28 -0
- data/app/views/refinery/race_registrations/registrations/_registration.html.erb +47 -0
- data/app/views/refinery/race_registrations/registrations/_registration_chooser.html.erb +7 -0
- data/app/views/refinery/race_registrations/registrations/show.html.erb +21 -0
- data/config/initializers/refinery/core.rb +8 -0
- data/config/locales/en.yml +136 -0
- data/config/locales/es.yml +141 -0
- data/config/locales/fr.yml +139 -0
- data/config/locales/humanizer.de.yml +43 -0
- data/config/locales/humanizer.en.yml +43 -0
- data/config/locales/humanizer.es.yml +43 -0
- data/config/locales/humanizer.fi.yml +43 -0
- data/config/locales/humanizer.fr.yml +43 -0
- data/config/locales/humanizer.it.yml +43 -0
- data/config/locales/humanizer.nl.yml +43 -0
- data/config/locales/humanizer.pl.yml +43 -0
- data/config/locales/humanizer.pt-BR.yml +43 -0
- data/config/locales/humanizer.pt-PT.yml +43 -0
- data/config/locales/humanizer.ru.yml +43 -0
- data/config/locales/humanizer.sk.yml +9 -0
- data/config/locales/humanizer.zh-CN.yml +43 -0
- data/config/locales/nb.yml +141 -0
- data/config/locales/nl.yml +141 -0
- data/config/locales/sk.yml +138 -0
- data/config/routes.rb +44 -0
- data/db/migrate/1_create_race_registrations_registrations.rb +31 -0
- data/db/migrate/2_create_race_registrations_people.rb +33 -0
- data/db/migrate/3_create_race_registrations_categories.rb +26 -0
- data/db/migrate/4_create_race_registrations_groups.rb +26 -0
- data/db/migrate/5_create_race_registrations_group_categories.rb +18 -0
- data/db/migrate/6_add_registration_id_to_people.rb +20 -0
- data/db/migrate/7_add_group_id_to_registrations.rb +13 -0
- data/db/seeds.rb +51 -0
- data/lib/generators/refinery/registrations_generator.rb +18 -0
- data/lib/refinery/registrations.rb +22 -0
- data/lib/refinery/registrations/configuration.rb +11 -0
- data/lib/refinery/registrations/engine.rb +31 -0
- data/lib/refinery/registrations/extensions/pages_controller_extension.rb +18 -0
- data/lib/refinerycms-registrations.rb +1 -0
- data/lib/tasks/refinery/registrations.rake +13 -0
- data/readme.md +95 -0
- metadata +182 -0
@@ -0,0 +1,20 @@
|
|
1
|
+
module Refinery
|
2
|
+
module RaceRegistrations
|
3
|
+
class Group < Refinery::Core::BaseModel
|
4
|
+
has_many :group_categories, :dependent => :destroy
|
5
|
+
has_many :categories, :through => :group_categories
|
6
|
+
has_many :registration
|
7
|
+
|
8
|
+
attr_accessible :title, :position, :category_ids
|
9
|
+
|
10
|
+
acts_as_indexed :fields => [:title]
|
11
|
+
|
12
|
+
validates :title, :presence => true, :uniqueness => true
|
13
|
+
|
14
|
+
|
15
|
+
def category_ids
|
16
|
+
Refinery::RaceRegistrations::GroupCategory.select('category_id').where("group_id = ?", self.id ).map{|gc| gc.category_id }
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
module Refinery
|
2
|
+
module RaceRegistrations
|
3
|
+
class Person < Refinery::Core::BaseModel
|
4
|
+
include Humanizer
|
5
|
+
require_human_on :create , :unless => :bypass_humanizer
|
6
|
+
|
7
|
+
belongs_to :registration
|
8
|
+
belongs_to :category
|
9
|
+
|
10
|
+
|
11
|
+
attr_accessible :name, :surname, :country, :birth_date, :email, :club, :city, :notice, :position, :registration_id, :category_id, :humanizer_answer, :humanizer_question_id
|
12
|
+
attr_accessor :registration_ids, :bypass_humanizer
|
13
|
+
|
14
|
+
validates :name, :presence => true , :length => { :minimum => 2 }
|
15
|
+
validates :surname, :presence => true, :length => { :minimum => 2 }
|
16
|
+
validates :city, :presence => true, :length => {:minimum => 2}
|
17
|
+
validates :country, :presence => true, :length => {:minimum => 2, :maximum=> 20}
|
18
|
+
validates :birth_date, :presence => true
|
19
|
+
validates :registration_id, :numericality => true
|
20
|
+
validates :category_id, :numericality => true
|
21
|
+
validates_format_of :email, :with => /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\Z/i , :allow_blank => false
|
22
|
+
|
23
|
+
|
24
|
+
scope :search_by_sort, lambda {|search, sort|
|
25
|
+
if ActiveRecord::Base.configurations[Rails.env]['adapter'] == "postgresql" && (sort == "id" or sort == "birth_date")
|
26
|
+
where("#{sort}::TEXT ILIKE ?", "#{search}%") # sort is whitelisted in people helper
|
27
|
+
else
|
28
|
+
where( arel_table[sort].matches("#{search}%") )
|
29
|
+
end
|
30
|
+
}
|
31
|
+
|
32
|
+
scope :search_by_registration_ids, lambda {|registration_ids| where( :registration_id => registration_ids ) if registration_ids.present? }
|
33
|
+
scope :search_by_sort_and_registration_ids, lambda {|search, sort, registration_ids| search_by_sort(search,sort).search_by_registration_ids(registration_ids) }
|
34
|
+
|
35
|
+
scope :in_category, lambda {|category_id, sort_column, sort_direction| where("category_id = ?", category_id).order(sort_column + " " + sort_direction) }
|
36
|
+
|
37
|
+
def self.search(search, sort, person)
|
38
|
+
registration_ids = person[:registration_ids].select{|reg_id| reg_id.to_i > 0 } if person.present?
|
39
|
+
|
40
|
+
if search
|
41
|
+
if sort != ""
|
42
|
+
search_by_sort_and_registration_ids(search,sort,registration_ids)
|
43
|
+
else
|
44
|
+
search_by_sort_and_registration_ids(search,"surname",registration_ids)
|
45
|
+
end
|
46
|
+
else
|
47
|
+
scoped
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
module Refinery
|
2
|
+
module RaceRegistrations
|
3
|
+
class Registration < Refinery::Core::BaseModel
|
4
|
+
has_many :people, :dependent => :destroy
|
5
|
+
belongs_to :group
|
6
|
+
has_many :categories , :through => :group , :order=> "position DESC"
|
7
|
+
|
8
|
+
|
9
|
+
default_scope order("position DESC")
|
10
|
+
|
11
|
+
attr_accessible :title, :locality, :race_date, :is_active, :start_date, :end_date, :position, :group_id
|
12
|
+
|
13
|
+
acts_as_indexed :fields => [:title, :locality]
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
validates :title, :presence => true, :uniqueness => true
|
18
|
+
validates :group_id, :presence => true
|
19
|
+
|
20
|
+
scope :not_expired, lambda {
|
21
|
+
registrations = Arel::Table.new(::Refinery::RaceRegistrations::Registration.table_name)
|
22
|
+
where(registrations[:end_date].eq(nil).or(registrations[:end_date].gt(Time.now)))
|
23
|
+
}
|
24
|
+
scope :active, where(:is_active => true)
|
25
|
+
scope :published, lambda {
|
26
|
+
not_expired.active.where("start_date <= ?", Time.now).order(:position)
|
27
|
+
}
|
28
|
+
|
29
|
+
|
30
|
+
def to_param
|
31
|
+
"#{id}-#{title.parameterize}"
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<%= render '/refinery/html_tag' %>
|
3
|
+
<%= render '/refinery/head' %>
|
4
|
+
<body>
|
5
|
+
<div id="page_container">
|
6
|
+
<div id="page_padding">
|
7
|
+
<section id="page">
|
8
|
+
<%= yield %>
|
9
|
+
</section>
|
10
|
+
</div>
|
11
|
+
</div>
|
12
|
+
<%= render '/refinery/javascripts' %>
|
13
|
+
</body>
|
14
|
+
</html>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<%= render :partial=> "left_body_content" %>
|
2
|
+
|
3
|
+
<section id='middle_body_content'>
|
4
|
+
<div class="body">
|
5
|
+
<%= render "middle_body_header" %>
|
6
|
+
|
7
|
+
<%= raw content_of(@page, :middle_body) %>
|
8
|
+
|
9
|
+
<%= render "refinery/race_registrations/registrations/index" %>
|
10
|
+
</div>
|
11
|
+
|
12
|
+
<%= render "author_info" %>
|
13
|
+
</section>
|
14
|
+
|
15
|
+
<%= render :partial=>"right_body_content" %>
|
@@ -0,0 +1,77 @@
|
|
1
|
+
<nav id='actions' class='multilist'>
|
2
|
+
<ul class='search_list'>
|
3
|
+
<li class='not_a_link'>
|
4
|
+
<% resource = params[:controller].split(/\//).last %>
|
5
|
+
<% if resource != "people" %>
|
6
|
+
<%= render :partial => "/refinery/admin/search",
|
7
|
+
:locals => {
|
8
|
+
:url => eval("refinery.race_registrations_admin_#{resource}_path")
|
9
|
+
} %>
|
10
|
+
<% end %>
|
11
|
+
</li>
|
12
|
+
</ul>
|
13
|
+
|
14
|
+
<ul class='collapsible_menu'>
|
15
|
+
<li class='not_a_link'>
|
16
|
+
<%= link_to t('refinery.plugins.registrations.title'), '#',
|
17
|
+
:class => 'folder_icon' %>
|
18
|
+
</li>
|
19
|
+
<li>
|
20
|
+
<%= link_to t('.manage'), refinery.race_registrations_admin_registrations_path,
|
21
|
+
:class => 'folder_icon' %>
|
22
|
+
</li>
|
23
|
+
<li>
|
24
|
+
<%= link_to t('refinery.race_registrations.admin.registrations.actions.create_new'), refinery.new_race_registrations_admin_registration_path,
|
25
|
+
:class => 'add_icon' %>
|
26
|
+
</li>
|
27
|
+
</ul>
|
28
|
+
|
29
|
+
<ul class='collapsible_menu'>
|
30
|
+
<li class='not_a_link'>
|
31
|
+
<%= link_to t('refinery.plugins.people.title'), '#',
|
32
|
+
:class => 'folder_icon' %>
|
33
|
+
</li>
|
34
|
+
<li>
|
35
|
+
<%= link_to t('.manage'), refinery.race_registrations_admin_people_path,
|
36
|
+
:class => 'folder_icon' %>
|
37
|
+
</li>
|
38
|
+
<li>
|
39
|
+
<%= link_to t('refinery.race_registrations.admin.people.actions.create_new'), refinery.new_race_registrations_admin_person_path,
|
40
|
+
:class => 'add_icon' %>
|
41
|
+
</li>
|
42
|
+
</ul>
|
43
|
+
|
44
|
+
<ul class='collapsible_menu'>
|
45
|
+
<li class='not_a_link'>
|
46
|
+
<%= link_to t('refinery.plugins.groups.title'), '#',
|
47
|
+
:class => 'folder_icon' %>
|
48
|
+
</li>
|
49
|
+
<li>
|
50
|
+
<%= link_to t('.manage'), refinery.race_registrations_admin_groups_path,
|
51
|
+
:class => 'folder_icon' %>
|
52
|
+
</li>
|
53
|
+
<li>
|
54
|
+
<%= link_to t('refinery.race_registrations.admin.groups.actions.create_new'), refinery.new_race_registrations_admin_group_path,
|
55
|
+
:class => 'add_icon' %>
|
56
|
+
</li>
|
57
|
+
</ul>
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
<ul class='collapsible_menu'>
|
62
|
+
<li class='not_a_link'>
|
63
|
+
<%= link_to t('refinery.plugins.categories.title'), '#',
|
64
|
+
:class => 'folder_icon' %>
|
65
|
+
</li>
|
66
|
+
<li>
|
67
|
+
<%= link_to t('.manage'), refinery.race_registrations_admin_categories_path,
|
68
|
+
:class => 'folder_icon' %>
|
69
|
+
</li>
|
70
|
+
<li>
|
71
|
+
<%= link_to t('refinery.race_registrations.admin.categories.actions.create_new'), refinery.new_race_registrations_admin_category_path,
|
72
|
+
:class => 'add_icon' %>
|
73
|
+
</li>
|
74
|
+
</ul>
|
75
|
+
|
76
|
+
</nav>
|
77
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<li class='clearfix record <%= cycle("on", "on-hover") %>' id="<%= dom_id(category) -%>">
|
2
|
+
<span class='title'>
|
3
|
+
<%= category.title %>
|
4
|
+
|
5
|
+
</span>
|
6
|
+
<span class='actions'>
|
7
|
+
|
8
|
+
<%= link_to refinery_icon_tag("application_go.png"), refinery.race_registrations_category_path(category),
|
9
|
+
:title => t('.view_live_html'),
|
10
|
+
:target => "_blank" %>
|
11
|
+
|
12
|
+
<%= link_to refinery_icon_tag("application_edit.png"), refinery.edit_race_registrations_admin_category_path(category),
|
13
|
+
:title => t('.edit') %>
|
14
|
+
<%= link_to refinery_icon_tag("delete.png"), refinery.race_registrations_admin_category_path(category),
|
15
|
+
:class => "cancel confirm-delete",
|
16
|
+
:title => t('.delete'),
|
17
|
+
:confirm => t('message', :scope => 'refinery.admin.delete', :title => category.title),
|
18
|
+
:method => :delete %>
|
19
|
+
</span>
|
20
|
+
</li>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<%= form_for [refinery, :race_registrations_admin, @category] do |f| -%>
|
2
|
+
<%= render '/refinery/admin/error_messages',
|
3
|
+
:object => @category,
|
4
|
+
:include_object_name => true %>
|
5
|
+
|
6
|
+
|
7
|
+
<div class='field'>
|
8
|
+
<%= f.label :title -%>
|
9
|
+
<%= f.text_field :title, :class => 'larger widest' -%>
|
10
|
+
|
11
|
+
</div>
|
12
|
+
|
13
|
+
<%= render '/refinery/admin/form_actions', :f => f,
|
14
|
+
:continue_editing => false,
|
15
|
+
:delete_title => t('delete', :scope => 'refinery.categories.admin.categories.category'),
|
16
|
+
:delete_confirmation => t('message', :scope => 'refinery.admin.delete', :title => @category.title) %>
|
17
|
+
<% end -%>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<% if searching? %>
|
2
|
+
<h2><%= t('results_for', :scope => 'refinery.admin.search', :query => params[:search]) %></h2>
|
3
|
+
<% end %>
|
4
|
+
<div class='pagination_container'>
|
5
|
+
<% if @categories.any? %>
|
6
|
+
<%= render 'categories' %>
|
7
|
+
<% else %>
|
8
|
+
<p>
|
9
|
+
<% unless searching? %>
|
10
|
+
<strong>
|
11
|
+
<%= t('.no_items_yet') %>
|
12
|
+
</strong>
|
13
|
+
<% else %>
|
14
|
+
<%= t('no_results', :scope => 'refinery.admin.search') %>
|
15
|
+
<% end %>
|
16
|
+
</p>
|
17
|
+
<% end %>
|
18
|
+
</div>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render 'form' %>
|
@@ -0,0 +1,5 @@
|
|
1
|
+
<section id='records'>
|
2
|
+
<%= render 'records' %>
|
3
|
+
</section>
|
4
|
+
<%= render "refinery/race_registrations/admin/submenu" %>
|
5
|
+
<%= render '/refinery/admin/make_sortable', :tree => false if !searching? and ::Refinery::RaceRegistrations::Admin::CategoriesController.sortable? and ::Refinery::RaceRegistrations::Category.count > 1 %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render 'form' %>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<%= form_for [refinery, :race_registrations_admin, @group] do |f| -%>
|
2
|
+
<%= render '/refinery/admin/error_messages',
|
3
|
+
:object => @group,
|
4
|
+
:include_object_name => true %>
|
5
|
+
|
6
|
+
|
7
|
+
<div class='field'>
|
8
|
+
<%= f.label :title -%>
|
9
|
+
<%= f.text_field :title, :class => 'larger widest' -%>
|
10
|
+
</div>
|
11
|
+
|
12
|
+
<div class='field'>
|
13
|
+
<%= f.label :category_ids, t('refinery.plugins.categories.title') %>
|
14
|
+
<%= f.collection_select(:category_ids, Refinery::RaceRegistrations::Category.all(:order=> "title ASC"), :id, :title,
|
15
|
+
{ },
|
16
|
+
{ :data => {:placeholder=> t('.choose_categories')}, :multiple=> true, :class=> "chzn-select"}) %>
|
17
|
+
</div>
|
18
|
+
|
19
|
+
<%= render '/refinery/admin/form_actions', :f => f,
|
20
|
+
:continue_editing => false,
|
21
|
+
:delete_title => t('delete', :scope => 'refinery.groups.admin.groups.group'),
|
22
|
+
:delete_confirmation => t('message', :scope => 'refinery.admin.delete', :title => @group.title) %>
|
23
|
+
<% end -%>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<li class='clearfix record <%= cycle("on", "on-hover") %>' id="<%= dom_id(group) -%>">
|
2
|
+
<span class='title'>
|
3
|
+
<%= group.title %>
|
4
|
+
|
5
|
+
</span>
|
6
|
+
<span class='actions'>
|
7
|
+
|
8
|
+
<%= link_to refinery_icon_tag("application_go.png"), refinery.race_registrations_group_path(group),
|
9
|
+
:title => t('.view_live_html'),
|
10
|
+
:target => "_blank" %>
|
11
|
+
|
12
|
+
<%= link_to refinery_icon_tag("application_edit.png"), refinery.edit_race_registrations_admin_group_path(group),
|
13
|
+
:title => t('.edit') %>
|
14
|
+
<%= link_to refinery_icon_tag("delete.png"), refinery.race_registrations_admin_group_path(group),
|
15
|
+
:class => "cancel confirm-delete",
|
16
|
+
:title => t('.delete'),
|
17
|
+
:confirm => t('message', :scope => 'refinery.admin.delete', :title => group.title),
|
18
|
+
:method => :delete %>
|
19
|
+
</span>
|
20
|
+
</li>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<% if searching? %>
|
2
|
+
<h2><%= t('results_for', :scope => 'refinery.admin.search', :query => params[:search]) %></h2>
|
3
|
+
<% end %>
|
4
|
+
<div class='pagination_container'>
|
5
|
+
<% if @groups.any? %>
|
6
|
+
<%= render 'groups' %>
|
7
|
+
<% else %>
|
8
|
+
<p>
|
9
|
+
<% unless searching? %>
|
10
|
+
<strong>
|
11
|
+
<%= t('.no_items_yet') %>
|
12
|
+
</strong>
|
13
|
+
<% else %>
|
14
|
+
<%= t('no_results', :scope => 'refinery.admin.search') %>
|
15
|
+
<% end %>
|
16
|
+
</p>
|
17
|
+
<% end %>
|
18
|
+
</div>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render 'form' %>
|
@@ -0,0 +1,5 @@
|
|
1
|
+
<section id='records'>
|
2
|
+
<%= render 'records' %>
|
3
|
+
</section>
|
4
|
+
<%= render "refinery/race_registrations/admin/submenu" %>
|
5
|
+
<%= render '/refinery/admin/make_sortable', :tree => false if !searching? and ::Refinery::RaceRegistrations::Admin::GroupsController.sortable? and ::Refinery::RaceRegistrations::Group.count > 1 %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render 'form' %>
|
@@ -0,0 +1,82 @@
|
|
1
|
+
<%= form_for [refinery, :race_registrations_admin, @person] do |f| -%>
|
2
|
+
<%= render '/refinery/admin/error_messages',
|
3
|
+
:object => @person,
|
4
|
+
:include_object_name => true %>
|
5
|
+
|
6
|
+
|
7
|
+
<div class='field'>
|
8
|
+
<%= f.label :name -%>
|
9
|
+
<%= f.text_field :name -%>
|
10
|
+
|
11
|
+
</div>
|
12
|
+
|
13
|
+
<div class='field'>
|
14
|
+
<%= f.label :surname -%>
|
15
|
+
<%= f.text_field :surname -%>
|
16
|
+
</div>
|
17
|
+
|
18
|
+
<div class='field'>
|
19
|
+
<%= f.label :registration_id %>
|
20
|
+
<%= f.collection_select(:registration_id, Refinery::RaceRegistrations::Registration.all, :id, :title,
|
21
|
+
{ :prompt=> :true},
|
22
|
+
{ :data => {:placeholder=> t('.choose_registration')}, :multiple=> false, :class=> "chzn-select"}) %>
|
23
|
+
</div>
|
24
|
+
|
25
|
+
|
26
|
+
<div class='field' >
|
27
|
+
<%= f.label :category_id %>
|
28
|
+
<%= f.collection_select(:category_id, @categories, :id, :title,
|
29
|
+
{ :prompt => :true },
|
30
|
+
{ :data => {:placeholder=> t('.choose_category')}, :multiple=> false, :class=> "chzn-select"}) %>
|
31
|
+
</div>
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
|
36
|
+
<div class='field'>
|
37
|
+
<%= f.label :country -%>
|
38
|
+
<%= f.text_field :country -%>
|
39
|
+
|
40
|
+
</div>
|
41
|
+
|
42
|
+
<div class='field'>
|
43
|
+
<%= f.label :birth_date -%>
|
44
|
+
<%= f.date_select :birth_date , :start_year => 1910, :include_blank=> true -%>
|
45
|
+
|
46
|
+
</div>
|
47
|
+
|
48
|
+
<div class='field'>
|
49
|
+
<%= f.label :email -%>
|
50
|
+
<%= f.text_field :email -%>
|
51
|
+
|
52
|
+
</div>
|
53
|
+
|
54
|
+
<div class='field'>
|
55
|
+
<%= f.label :club -%>
|
56
|
+
<%= f.text_field :club -%>
|
57
|
+
|
58
|
+
</div>
|
59
|
+
|
60
|
+
<div class='field'>
|
61
|
+
<%= f.label :city -%>
|
62
|
+
<%= f.text_field :city -%>
|
63
|
+
</div>
|
64
|
+
|
65
|
+
<% if f.object.created_at %>
|
66
|
+
<div class='field'>
|
67
|
+
<%= f.label :created_at %>
|
68
|
+
<%= f.object.created_at %>
|
69
|
+
</div>
|
70
|
+
<% end %>
|
71
|
+
|
72
|
+
<div class='field'>
|
73
|
+
<%= f.label :notice %>
|
74
|
+
<%= f.text_area :notice, :rows => 5 -%>
|
75
|
+
</div>
|
76
|
+
|
77
|
+
<%= render '/refinery/admin/form_actions', :f => f,
|
78
|
+
:continue_editing => false,
|
79
|
+
:delete_title => t('delete', :scope => 'refinery.people.admin.people.person'),
|
80
|
+
:delete_confirmation => t('message', :scope => 'refinery.admin.delete', :title => @person.name) %>
|
81
|
+
<% end -%>
|
82
|
+
|