voluntary 0.2.2 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. data/CHANGELOG.md +88 -0
  2. data/README.rdoc +2 -2
  3. data/app/assets/javascripts/voluntary/application.js +3 -0
  4. data/app/assets/javascripts/voluntary/base.js.coffee +47 -28
  5. data/app/assets/javascripts/voluntary/lib/jquery.multisortable.js +254 -0
  6. data/app/assets/stylesheets/voluntary/application.css +2 -0
  7. data/app/assets/stylesheets/voluntary/base.css.sass +7 -1
  8. data/app/assets/stylesheets/voluntary/bootstrap_and_overrides.css.sass +5 -1
  9. data/app/controllers/concerns/voluntary/v1/base_controller.rb +6 -1
  10. data/app/controllers/voluntary/api/v1/base_controller.rb +11 -0
  11. data/app/helpers/voluntary/show_helper.rb +2 -2
  12. data/app/models/concerns/likeable.rb +11 -0
  13. data/app/models/user.rb +4 -0
  14. data/app/views/layouts/application.html.erb +7 -1
  15. data/app/views/shared/_modal_javascript_response.js.erb +31 -0
  16. data/app/views/shared/layouts/twitter_bootstrap/_control_group.html.erb +11 -0
  17. data/app/views/shared/layouts/twitter_bootstrap/_modal.html.erb +12 -0
  18. data/app/views/shared/layouts/twitter_bootstrap/control_group/_boolean.html.erb +17 -0
  19. data/app/views/shared/resource/_actions.html.erb +4 -2
  20. data/config/locales/general/en.yml +14 -2
  21. data/config/routes/api.rb +6 -0
  22. data/config/routes.rb +3 -1
  23. data/lib/generators/voluntary/install/templates/app/views/layouts/application.html.erb +7 -1
  24. data/lib/generators/voluntary/product_dummy/product_dummy_generator.rb +0 -1
  25. data/lib/generators/voluntary/product_dummy/templates/app/views/layouts/application.html.erb +7 -1
  26. data/lib/voluntary/version.rb +1 -1
  27. data/lib/voluntary.rb +3 -1
  28. metadata +90 -84
  29. data/app/controllers/voluntary/api/v1/api_controller.rb +0 -9
@@ -0,0 +1,12 @@
1
+ <% body ||= nil %>
2
+ <% footer ||= nil %>
3
+ <div class="modal-header">
4
+ <button type="button" id="close_bootstrap_modal_button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
5
+ <h3><%= title %></h3>
6
+ </div>
7
+ <div class="modal-body" style="overflow-y:none;">
8
+ <%= body || yield(:modal_body) %>
9
+ </div>
10
+ <div class="modal-footer">
11
+ <%= footer || yield(:modal_footer) %>
12
+ </div>
@@ -0,0 +1,17 @@
1
+ <% name ||= id %>
2
+ <% required ||= false %>
3
+ <% required_class = required ? ' required' : ' optional' %>
4
+ <% value ||= true %>
5
+ <div class="control-group radio_buttons <%= required_class %> <%= id %>">
6
+ <label class="radio_buttons <%= required_class %> control-label"><%= label %></label>
7
+ <div class="controls">
8
+ <label class="radio">
9
+ <input type="radio" value="true" name="<%= name %>" id="<%= id %>_true"<%= value ? ' checked="checked"' : '' %> class="radio_buttons <%= required_class %>"/>
10
+ Yes
11
+ </label>
12
+ <label class="radio">
13
+ <input type="radio" value="false" name="<%= name %>" id="<%= id %>_false"<%= value ? '' : ' checked="checked"' %> class="radio_buttons <%= required_class %>"/>
14
+ No
15
+ </label>
16
+ </div>
17
+ </div>
@@ -1,3 +1,4 @@
1
+ <% namespace ||= nil %>
1
2
  <% if !resource.is_a?(Column) && (
2
3
  can?(:destroy, resource) || can?(:edit, resource) || (
3
4
  resource.respond_to?(:state_events) && resource.state_events.select{|event| can? event, resource }.any?
@@ -8,8 +9,9 @@
8
9
  <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
9
10
  <% if can? :destroy, resource %>
10
11
  <li>
12
+ <% working_resource = namespace.present? ? [namespace, resource] : resource %>
11
13
  <%= link_to(
12
- t('general.destroy'), polymorphic_or_resource_path(resource), id: "#{resource.class.name.tableize.singularize}_#{resource.id}", method: :delete,
14
+ t('general.destroy'), polymorphic_or_resource_path(working_resource), id: "#{resource.class.name.tableize.singularize}_#{resource.id}", method: :delete,
13
15
  data: { confirm: t('general.questions.are_you_sure') },
14
16
  onclick: "delete_link('#{resource.class.name.tableize.singularize}_#{resource.id}'); return false;"
15
17
  )
@@ -17,7 +19,7 @@
17
19
  </li>
18
20
  <% end %>
19
21
  <% if can? :edit, resource %>
20
- <li><%= link_to t('general.edit'), eval("edit_#{type.gsub('/', '_').singularize}_path(resource)") %></li>
22
+ <li><%= link_to t('general.edit'), eval("edit_#{(namespace.present? ? namespace.to_s + '_' : '')}#{type.gsub('/', '_').singularize}_path(resource)") %></li>
21
23
  <% end %>
22
24
  <% if resource.respond_to? :state_events %>
23
25
  <li class="divider"></li>
@@ -3,6 +3,7 @@ en:
3
3
  index:
4
4
  title: Home
5
5
  search: Search
6
+ submit: Submit
6
7
  new: New
7
8
  denied: Denied
8
9
  accepted: Accepted
@@ -16,6 +17,11 @@ en:
16
17
  list_action: Back to the overview
17
18
  details: Details
18
19
  export: Export
20
+ join: Join
21
+ leave: Leave
22
+ join_or_leave: Join or Leave
23
+ publish: publish
24
+ group: Group
19
25
  form:
20
26
  errors_count: '%{count} prohibited this object from being saved:'
21
27
  successfully_created: Creation successful
@@ -31,8 +37,12 @@ en:
31
37
  access_denied: Access denied
32
38
  not_found: Resource not found.
33
39
  notifications:
34
- event_successful: "%{event} successful."
35
-
40
+ event_successful: "%{event} successful."
41
+ plugins:
42
+ competitive_list:
43
+ sort: Sort through round robin tournament
44
+ save_match_results: Save match results
45
+
36
46
  attributes:
37
47
  name: Name
38
48
  text: Text
@@ -43,6 +53,8 @@ en:
43
53
  vacancy_id: Vacancy
44
54
  roles: Roles
45
55
  position: Position
56
+ date: Date
57
+ trend: Trend
46
58
 
47
59
  activerecord:
48
60
  models:
@@ -0,0 +1,6 @@
1
+ scope :voluntary do
2
+ namespace :api, defaults: {format: 'json'} do
3
+ namespace :v1 do
4
+ end
5
+ end
6
+ end
data/config/routes.rb CHANGED
@@ -14,7 +14,7 @@ Rails.application.routes.draw do
14
14
 
15
15
  resources :areas do
16
16
  resources :users, only: :index
17
- resources :projects, only: :index
17
+ resources :projects, only: [:index, :new]
18
18
 
19
19
  collection do
20
20
  put :update_multiple
@@ -159,4 +159,6 @@ Rails.application.routes.draw do
159
159
  post 'like/:target_type/:target_id' => 'likes#create'
160
160
  post 'dislike/:target_type/:target_id' => 'likes#create'
161
161
  post 'unlike/:target_type/:target_id' => 'likes#destroy'
162
+
163
+ draw :api
162
164
  end
@@ -13,6 +13,10 @@
13
13
 
14
14
  <%= render 'layouts/shared/navigation' %>
15
15
 
16
+ <% if voluntary_application_repository_path.present? %>
17
+ <a href="https://github.com/<%= voluntary_application_repository_path %>"><img style="position: absolute; top: 41px; right: 0; border: 0; z-index: 100;" src="https://camo.githubusercontent.com/365986a132ccd6a44c23a9169022c0b5c890c387/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f7265645f6161303030302e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png"></a>
18
+ <% end %>
19
+
16
20
  <section id="dialog">
17
21
  <img alt="Ajax-loader-small" class="hide " id="dialog_body_spinner" src="<%=image_path('voluntary/spinner.gif')%>"/>
18
22
  <div id="dialog_body"/>
@@ -27,7 +31,7 @@
27
31
  </div>
28
32
  <% end %>
29
33
  <div class="row-fluid">
30
- <% if sidenav(@sidenav_links_count).present? || content_for?(:search) %>
34
+ <% if sidenav(@sidenav_links_count).present? || content_for?(:search) || content_for?(:sidebar) %>
31
35
  <div class="span9">
32
36
  <% if content_for?(:breadcrumbs) %>
33
37
  <div class="nav">
@@ -43,6 +47,8 @@
43
47
  <%= yield :search %>
44
48
 
45
49
  <%= sidenav(@sidenav_links_count) %>
50
+
51
+ <%= yield :sidebar %>
46
52
  </div>
47
53
  <% else %>
48
54
  <div class="span12">
@@ -33,7 +33,6 @@ gemspec path: File.expand_path(File.dirname(__FILE__) + "/../")
33
33
 
34
34
  # view
35
35
  gem 'acts_as_markup', git: 'git://github.com/vigetlabs/acts_as_markup.git'
36
- gem 'auto_html', git: 'git://github.com/Applicat/auto_html'
37
36
  gem 'recaptcha', require: 'recaptcha/rails'
38
37
  gem "will_paginate", github: "mislav/will_paginate"
39
38
 
@@ -13,6 +13,10 @@
13
13
 
14
14
  <%= render 'layouts/shared/navigation' %>
15
15
 
16
+ <% if voluntary_application_repository_path.present? %>
17
+ <a href="https://github.com/<%= voluntary_application_repository_path %>"><img style="position: absolute; top: 41px; right: 0; border: 0; z-index: 100;" src="https://camo.githubusercontent.com/365986a132ccd6a44c23a9169022c0b5c890c387/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f7265645f6161303030302e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png"></a>
18
+ <% end %>
19
+
16
20
  <section id="dialog">
17
21
  <img alt="Ajax-loader-small" class="hide " id="dialog_body_spinner" src="<%=image_path('voluntary/spinner.gif')%>"/>
18
22
  <div id="dialog_body"/>
@@ -27,7 +31,7 @@
27
31
  </div>
28
32
  <% end %>
29
33
  <div class="row-fluid">
30
- <% if sidenav(@sidenav_links_count).present? || content_for?(:search) %>
34
+ <% if sidenav(@sidenav_links_count).present? || content_for?(:search) || content_for?(:sidebar) %>
31
35
  <div class="span9">
32
36
  <% if content_for?(:breadcrumbs) %>
33
37
  <div class="nav">
@@ -43,6 +47,8 @@
43
47
  <%= yield :search %>
44
48
 
45
49
  <%= sidenav(@sidenav_links_count) %>
50
+
51
+ <%= yield :sidebar %>
46
52
  </div>
47
53
  <% else %>
48
54
  <div class="span12">
@@ -1,3 +1,3 @@
1
1
  module Voluntary
2
- VERSION = '0.2.2'
2
+ VERSION = '0.2.3'
3
3
  end
data/lib/voluntary.rb CHANGED
@@ -23,7 +23,7 @@ require 'koala'
23
23
  require 'ransack'
24
24
  require 'faker'
25
25
  require 'paper_trail'
26
- require 'mongoid-history'
26
+ require 'mongoid/history'
27
27
  require 'mongoid_slug'
28
28
  require 'has_scope'
29
29
  require 'friendly_id'
@@ -50,6 +50,7 @@ require 'typhoeus'
50
50
  require 'capistrano'
51
51
  require 'jquery-rails'
52
52
  require 'bootstrap-sass-rails'
53
+ require 'bootstrap-datetimepicker-rails'
53
54
  require 'jquery-ui-bootstrap-rails-asset'
54
55
  require 'auto_html'
55
56
  #require 'twitter-bootstrap-rails'
@@ -64,6 +65,7 @@ require 'uglifier'
64
65
  require 'coffee-script'
65
66
  require 'font-awesome-rails'
66
67
  require 'thor'
68
+ require 'selectize-rails'
67
69
 
68
70
  require 'voluntary/navigation'
69
71