voluntary 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (295) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/README.rdoc +48 -0
  3. data/Rakefile +27 -0
  4. data/app/assets/javascripts/voluntary/application.js +6 -0
  5. data/app/assets/javascripts/voluntary/base.js.coffee +34 -0
  6. data/app/assets/javascripts/voluntary/bootstrap.js.coffee +4 -0
  7. data/app/assets/javascripts/voluntary/functions.js +24 -0
  8. data/app/assets/javascripts/voluntary/users.js.coffee +12 -0
  9. data/app/assets/stylesheets/voluntary/application.css +15 -0
  10. data/app/assets/stylesheets/voluntary/base.css.scss +40 -0
  11. data/app/assets/stylesheets/voluntary/bootstrap_and_overrides.css.less +67 -0
  12. data/app/controllers/areas_controller.rb +66 -0
  13. data/app/controllers/candidatures_controller.rb +79 -0
  14. data/app/controllers/comments_controller.rb +70 -0
  15. data/app/controllers/devise_extensions/registrations_controller.rb +37 -0
  16. data/app/controllers/home_controller.rb +7 -0
  17. data/app/controllers/organizations_controller.rb +67 -0
  18. data/app/controllers/pages_controller.rb +54 -0
  19. data/app/controllers/products_controller.rb +62 -0
  20. data/app/controllers/professions_controller.rb +66 -0
  21. data/app/controllers/projects_controller.rb +56 -0
  22. data/app/controllers/results_controller.rb +93 -0
  23. data/app/controllers/stories_controller.rb +96 -0
  24. data/app/controllers/tasks_controller.rb +88 -0
  25. data/app/controllers/users_controller.rb +52 -0
  26. data/app/controllers/vacancies_controller.rb +79 -0
  27. data/app/controllers/voluntary/application_controller.rb +92 -0
  28. data/app/controllers/workflow/candidatures_controller.rb +20 -0
  29. data/app/controllers/workflow/products_controller.rb +6 -0
  30. data/app/controllers/workflow/project_owner_controller.rb +33 -0
  31. data/app/controllers/workflow/stories_controller.rb +6 -0
  32. data/app/controllers/workflow/tasks_controller.rb +147 -0
  33. data/app/controllers/workflow/user_controller.rb +6 -0
  34. data/app/controllers/workflow/vacancies_controller.rb +17 -0
  35. data/app/controllers/workflow_controller.rb +7 -0
  36. data/app/helpers/application_helper.rb +65 -0
  37. data/app/helpers/collection_helper.rb +31 -0
  38. data/app/helpers/comments_helper.rb +11 -0
  39. data/app/helpers/form_helper.rb +39 -0
  40. data/app/helpers/language_helper.rb +15 -0
  41. data/app/helpers/layout_helper.rb +24 -0
  42. data/app/helpers/product_helper.rb +32 -0
  43. data/app/helpers/show_helper.rb +65 -0
  44. data/app/helpers/wizard_helper.rb +27 -0
  45. data/app/models/area.rb +19 -0
  46. data/app/models/area_user.rb +19 -0
  47. data/app/models/candidature.rb +35 -0
  48. data/app/models/comment.rb +16 -0
  49. data/app/models/history_tracker.rb +3 -0
  50. data/app/models/mongo_db_document.rb +11 -0
  51. data/app/models/organization.rb +19 -0
  52. data/app/models/page.rb +30 -0
  53. data/app/models/product.rb +99 -0
  54. data/app/models/product/new_product.rb +3 -0
  55. data/app/models/product/project_management.rb +29 -0
  56. data/app/models/profession.rb +13 -0
  57. data/app/models/project.rb +66 -0
  58. data/app/models/project_user.rb +13 -0
  59. data/app/models/result.rb +55 -0
  60. data/app/models/role.rb +8 -0
  61. data/app/models/role/admin.rb +2 -0
  62. data/app/models/role/master.rb +2 -0
  63. data/app/models/role/project_owner.rb +2 -0
  64. data/app/models/role/user.rb +2 -0
  65. data/app/models/state_machines/candidature.rb +42 -0
  66. data/app/models/state_machines/page.rb +18 -0
  67. data/app/models/state_machines/story.rb +51 -0
  68. data/app/models/state_machines/task.rb +46 -0
  69. data/app/models/state_machines/vacancy.rb +41 -0
  70. data/app/models/story.rb +82 -0
  71. data/app/models/task.rb +85 -0
  72. data/app/models/user.rb +95 -0
  73. data/app/models/user_role.rb +6 -0
  74. data/app/models/vacancy.rb +41 -0
  75. data/app/observers/candidature_observer.rb +29 -0
  76. data/app/observers/story_observer.rb +6 -0
  77. data/app/observers/task_observer.rb +34 -0
  78. data/app/presenters/layout/application_presenter.rb +3 -0
  79. data/app/presenters/layout_presenter.rb +9 -0
  80. data/app/presenters/presenter.rb +46 -0
  81. data/app/presenters/resource_presenter.rb +30 -0
  82. data/app/presenters/resources/general/wizard_presenter.rb +17 -0
  83. data/app/presenters/resources/general/wizards/story/steps/activate_presenter.rb +3 -0
  84. data/app/presenters/resources/general/wizards/story/steps/setup_tasks_presenter.rb +5 -0
  85. data/app/presenters/resources/general/wizards/story_presenter.rb +3 -0
  86. data/app/presenters/resources/user/form_presenter.rb +16 -0
  87. data/app/presenters/shared/collection/table_presenter.rb +33 -0
  88. data/app/views/areas/_form.html.erb +11 -0
  89. data/app/views/areas/edit.html.erb +3 -0
  90. data/app/views/areas/index.html.erb +5 -0
  91. data/app/views/areas/new.html.erb +3 -0
  92. data/app/views/areas/show.html.erb +6 -0
  93. data/app/views/candidatures/_form.html.erb +13 -0
  94. data/app/views/candidatures/edit.html.erb +3 -0
  95. data/app/views/candidatures/index.html.erb +11 -0
  96. data/app/views/candidatures/new.html.erb +3 -0
  97. data/app/views/candidatures/show.html.erb +18 -0
  98. data/app/views/comments/_form.html.erb +16 -0
  99. data/app/views/comments/_resource.html.erb +16 -0
  100. data/app/views/comments/edit.html.erb +3 -0
  101. data/app/views/comments/new.html.erb +3 -0
  102. data/app/views/devise/mailer/confirmation_instructions.html.erb +10 -0
  103. data/app/views/devise/registrations/new.html.erb +5 -0
  104. data/app/views/general/wizard.html.erb +16 -0
  105. data/app/views/kaminari/_first_page.html.erb +13 -0
  106. data/app/views/kaminari/_gap.html.erb +8 -0
  107. data/app/views/kaminari/_last_page.html.erb +13 -0
  108. data/app/views/kaminari/_next_page.html.erb +13 -0
  109. data/app/views/kaminari/_page.html.erb +12 -0
  110. data/app/views/kaminari/_paginator.html.erb +25 -0
  111. data/app/views/kaminari/_prev_page.html.erb +13 -0
  112. data/app/views/layouts/application.html.erb +48 -0
  113. data/app/views/layouts/shared/_flash_messages.html.erb +7 -0
  114. data/app/views/layouts/shared/_navigation.html.erb +7 -0
  115. data/app/views/organizations/_form.html.erb +11 -0
  116. data/app/views/organizations/edit.html.erb +3 -0
  117. data/app/views/organizations/index.html.erb +5 -0
  118. data/app/views/organizations/new.html.erb +3 -0
  119. data/app/views/organizations/show.html.erb +6 -0
  120. data/app/views/pages/_form.html.erb +12 -0
  121. data/app/views/pages/edit.html.erb +3 -0
  122. data/app/views/pages/index.html.erb +5 -0
  123. data/app/views/pages/new.html.erb +3 -0
  124. data/app/views/pages/show.html.erb +10 -0
  125. data/app/views/products/_form.html.erb +28 -0
  126. data/app/views/products/edit.html.erb +3 -0
  127. data/app/views/products/index.html.erb +5 -0
  128. data/app/views/products/mixins/_keywords.html.erb +4 -0
  129. data/app/views/products/new.html.erb +3 -0
  130. data/app/views/products/show.html.erb +11 -0
  131. data/app/views/products/types/text_creation/stories/_form.html.erb +19 -0
  132. data/app/views/products/types/text_creation/stories/_task_fields.html.erb +7 -0
  133. data/app/views/projects/_form.html.erb +16 -0
  134. data/app/views/projects/edit.html.erb +3 -0
  135. data/app/views/projects/index.html.erb +5 -0
  136. data/app/views/projects/new.html.erb +3 -0
  137. data/app/views/projects/show.html.erb +13 -0
  138. data/app/views/shared/_comments.html.erb +7 -0
  139. data/app/views/shared/collection/_list.html.erb +37 -0
  140. data/app/views/shared/collection/_table.html.erb +36 -0
  141. data/app/views/shared/form/_error_messages.html.erb +10 -0
  142. data/app/views/shared/resource/_actions.html.erb +26 -0
  143. data/app/views/shared/resource/_event_elements.html.erb +7 -0
  144. data/app/views/stories/_collection.html.erb +8 -0
  145. data/app/views/stories/_form.html.erb +19 -0
  146. data/app/views/stories/_task_fields.html.erb +11 -0
  147. data/app/views/stories/index.html.erb +1 -0
  148. data/app/views/stories/show.html.erb +13 -0
  149. data/app/views/stories/steps/_activate.html.erb +17 -0
  150. data/app/views/stories/steps/_setup_tasks.html.erb +35 -0
  151. data/app/views/stories/tasks.html.erb +0 -0
  152. data/app/views/tasks/_collection.html.erb +12 -0
  153. data/app/views/users/_form.html.erb +43 -0
  154. data/app/views/users/edit.html.erb +3 -0
  155. data/app/views/users/index.html.erb +6 -0
  156. data/app/views/users/new.html.erb +3 -0
  157. data/app/views/users/preferences.html.erb +11 -0
  158. data/app/views/users/show.html.erb +6 -0
  159. data/app/views/vacancies/_form.html.erb +15 -0
  160. data/app/views/vacancies/edit.html.erb +3 -0
  161. data/app/views/vacancies/index.html.erb +7 -0
  162. data/app/views/vacancies/new.html.erb +3 -0
  163. data/app/views/vacancies/show.html.erb +17 -0
  164. data/app/views/workflow/index.html.erb +0 -0
  165. data/app/views/workflow/products/show.html.erb +34 -0
  166. data/app/views/workflow/project_owner/_candidatures.html.erb +31 -0
  167. data/app/views/workflow/project_owner/_stories.html.erb +29 -0
  168. data/app/views/workflow/project_owner/_tasks.html.erb +34 -0
  169. data/app/views/workflow/project_owner/_vacancies.html.erb +27 -0
  170. data/app/views/workflow/project_owner/index.html.erb +24 -0
  171. data/app/views/workflow/tasks/_work_form.html.erb +8 -0
  172. data/app/views/workflow/tasks/_work_head.html.erb +15 -0
  173. data/app/views/workflow/tasks/edit.html.erb +3 -0
  174. data/app/views/workflow/tasks/index.html.erb +31 -0
  175. data/app/views/workflow/tasks/next.html.erb +0 -0
  176. data/app/views/workflow/tasks/steps/_complete.html.erb +11 -0
  177. data/app/views/workflow/tasks/steps/_review.html.erb +13 -0
  178. data/app/views/workflow/tasks/steps/_work.html.erb +17 -0
  179. data/app/views/workflow/user/_tasks.html.erb +30 -0
  180. data/app/views/workflow/user/index.html.erb +14 -0
  181. data/config/initializers/1_initialize_app_config.rb +5 -0
  182. data/config/initializers/devise.rb +193 -0
  183. data/config/initializers/locale_settings.rb +42 -0
  184. data/config/initializers/mongoid-history.rb +2 -0
  185. data/config/initializers/recaptcha.rb +7 -0
  186. data/config/initializers/simple_form.rb +178 -0
  187. data/config/initializers/simple_navigation.rb +2 -0
  188. data/config/locales/devise.en.yml +59 -0
  189. data/config/locales/en.yml +26 -0
  190. data/config/locales/general/en.yml +71 -0
  191. data/config/locales/resources/area/en.yml +12 -0
  192. data/config/locales/resources/candidature/en.yml +19 -0
  193. data/config/locales/resources/comment/en.yml +11 -0
  194. data/config/locales/resources/organization/en.yml +11 -0
  195. data/config/locales/resources/page/en.yml +11 -0
  196. data/config/locales/resources/product/en.yml +23 -0
  197. data/config/locales/resources/project/en.yml +9 -0
  198. data/config/locales/resources/result/en.yml +9 -0
  199. data/config/locales/resources/story/en.yml +34 -0
  200. data/config/locales/resources/task/en.yml +36 -0
  201. data/config/locales/resources/user/en.yml +14 -0
  202. data/config/locales/resources/vacancy/en.yml +29 -0
  203. data/config/locales/simple_form.en.yml +26 -0
  204. data/config/locales/workflow/en.yml +37 -0
  205. data/config/routes.rb +188 -0
  206. data/db/migrate/20120907144853_create_schema.rb +217 -0
  207. data/db/migrate/20120911093743_remove_timestamps_from_habtm_tables.rb +21 -0
  208. data/db/migrate/20120919161831_add_unique_index_for_one_user_candidature_per_vacancy.rb +9 -0
  209. data/db/migrate/20120922201955_create_mongo_db_documents.rb +13 -0
  210. data/db/migrate/20120923140109_add_product_to_project.rb +6 -0
  211. data/db/migrate/20121004061413_add_extra_user_attributes.rb +9 -0
  212. data/db/migrate/20121004132105_create_professions.rb +13 -0
  213. data/db/migrate/20121006162913_add_public_attribute_to_roles.rb +6 -0
  214. data/db/migrate/20121006170407_add_type_attribute_to_roles.rb +5 -0
  215. data/db/migrate/20121007071543_add_foreign_languages_to_user.rb +6 -0
  216. data/db/migrate/20121028073712_create_organizations.rb +13 -0
  217. data/db/seeds.rb +14 -0
  218. data/lib/applicat/mvc/controller.rb +171 -0
  219. data/lib/applicat/mvc/controller/error_handling.rb +40 -0
  220. data/lib/applicat/mvc/controller/resource.rb +19 -0
  221. data/lib/applicat/mvc/controller/transition_actions.rb +43 -0
  222. data/lib/applicat/mvc/model/resource/base.rb +56 -0
  223. data/lib/applicat/mvc/model/tokenable.rb +24 -0
  224. data/lib/applicat/mvc/model/tree.rb +82 -0
  225. data/lib/db_seed.rb +150 -0
  226. data/lib/environment_configuration.rb +54 -0
  227. data/lib/generators/voluntary/install/install_generator.rb +118 -0
  228. data/lib/generators/voluntary/install/templates/app/controllers/application_controller.rb +3 -0
  229. data/lib/generators/voluntary/install/templates/app/models/ability.rb +49 -0
  230. data/lib/generators/voluntary/install/templates/app/models/app_config.rb +32 -0
  231. data/lib/generators/voluntary/install/templates/app/views/layouts/application.html.erb +50 -0
  232. data/lib/generators/voluntary/install/templates/config/application.yml +147 -0
  233. data/lib/generators/voluntary/install/templates/config/cucumber.yml +8 -0
  234. data/lib/generators/voluntary/install/templates/config/database.example.yml +28 -0
  235. data/lib/generators/voluntary/install/templates/config/deploy.rb +59 -0
  236. data/lib/generators/voluntary/install/templates/config/email.example.yml +9 -0
  237. data/lib/generators/voluntary/install/templates/config/initializers/recaptcha_example +4 -0
  238. data/lib/generators/voluntary/install/templates/config/locale_settings.yml +121 -0
  239. data/lib/generators/voluntary/install/templates/config/main_navigation.rb +262 -0
  240. data/lib/generators/voluntary/install/templates/config/mongoid.yml +78 -0
  241. data/lib/generators/voluntary/install/templates/config/nginx.conf +27 -0
  242. data/lib/generators/voluntary/install/templates/config/unicorn.rb +9 -0
  243. data/lib/generators/voluntary/install/templates/config/unicorn_init.sh +84 -0
  244. data/lib/generators/voluntary/install/templates/db/seeds.rb +14 -0
  245. data/lib/generators/voluntary/install/templates/features/step_definitions/email_steps.rb +89 -0
  246. data/lib/generators/voluntary/install/templates/features/step_definitions/factory_steps.rb +120 -0
  247. data/lib/generators/voluntary/install/templates/features/step_definitions/javascript_steps.rb +15 -0
  248. data/lib/generators/voluntary/install/templates/features/step_definitions/navigation_steps.rb +3 -0
  249. data/lib/generators/voluntary/install/templates/features/step_definitions/resources_steps.rb +8 -0
  250. data/lib/generators/voluntary/install/templates/features/step_definitions/session_steps.rb +35 -0
  251. data/lib/generators/voluntary/install/templates/features/step_definitions/web_steps.rb +271 -0
  252. data/lib/generators/voluntary/install/templates/features/support/database_cleaner_patches.rb +24 -0
  253. data/lib/generators/voluntary/install/templates/features/support/env.rb +83 -0
  254. data/lib/generators/voluntary/install/templates/features/support/integration_sessions_controller.rb +32 -0
  255. data/lib/generators/voluntary/install/templates/features/support/integration_sessions_form.html.erb +1 -0
  256. data/lib/generators/voluntary/install/templates/features/support/paths.rb +98 -0
  257. data/lib/generators/voluntary/install/templates/features/support/selectors.rb +44 -0
  258. data/lib/generators/voluntary/install/templates/features/support/spork_env +72 -0
  259. data/lib/generators/voluntary/install/templates/features/support/user_cuke_helpers.rb +78 -0
  260. data/lib/generators/voluntary/install/templates/lib/volontariat_seed.rb +36 -0
  261. data/lib/generators/voluntary/install/templates/spec/spec_helper.rb +72 -0
  262. data/lib/generators/voluntary/install/templates/spec/support/deferred_garbage_collector.rb +45 -0
  263. data/lib/generators/voluntary/install/templates/spec/support/devise.rb +3 -0
  264. data/lib/generators/voluntary/install/templates/spec/support/mongo_database_cleaner.rb +19 -0
  265. data/lib/generators/voluntary/install/templates/vendor/assets/javascripts/jquery.tokeninput.js +915 -0
  266. data/lib/generators/voluntary/install/templates/vendor/assets/stylesheets/token-input-facebook.css +122 -0
  267. data/lib/generators/voluntary/install/templates/vendor/assets/stylesheets/token-input-mac.css +204 -0
  268. data/lib/generators/voluntary/install/templates/vendor/assets/stylesheets/token-input.css +127 -0
  269. data/lib/i18n_interpolation_fallbacks.rb +21 -0
  270. data/lib/model/mongo_db/commentable.rb +17 -0
  271. data/lib/model/mongo_db/core_extensions.rb +10 -0
  272. data/lib/model/mongo_db/customizable.rb +23 -0
  273. data/lib/model/mongo_db/product/keywords.rb +31 -0
  274. data/lib/model/mongo_db/state_version_attributes.rb +15 -0
  275. data/lib/tasks/cucumber.rake +65 -0
  276. data/lib/tasks/voluntary_tasks.rake +4 -0
  277. data/lib/vendors/active_model/naming.rb +14 -0
  278. data/lib/vendors/simple_navigation/renderer/breadcrumbs_without_method_links.rb +30 -0
  279. data/lib/vendors/simple_navigation/renderer/twitter_sidenav.rb +34 -0
  280. data/lib/voluntary.rb +87 -0
  281. data/lib/voluntary/engine.rb +11 -0
  282. data/lib/voluntary/helpers/application.rb +69 -0
  283. data/lib/voluntary/helpers/collection.rb +35 -0
  284. data/lib/voluntary/helpers/comments.rb +15 -0
  285. data/lib/voluntary/helpers/form.rb +43 -0
  286. data/lib/voluntary/helpers/language.rb +19 -0
  287. data/lib/voluntary/helpers/layout.rb +28 -0
  288. data/lib/voluntary/helpers/product.rb +36 -0
  289. data/lib/voluntary/helpers/show.rb +69 -0
  290. data/lib/voluntary/helpers/wizard.rb +31 -0
  291. data/lib/voluntary/version.rb +3 -0
  292. data/lib/wizard.rb +58 -0
  293. data/lib/wizard/controller/concerns/paths.rb +31 -0
  294. data/lib/wizard/controller/concerns/steps.rb +142 -0
  295. metadata +1217 -0
@@ -0,0 +1,3 @@
1
+ <h3><%= t('comments.edit.title') %></h3>
2
+
3
+ <%= render partial: 'form', locals: { resource: @comment } %>
@@ -0,0 +1,3 @@
1
+ <h3><%= t('comments.new.title') %></h3>
2
+
3
+ <%= render partial: 'form', locals: { resource: @comment } %>
@@ -0,0 +1,10 @@
1
+ <p>Welcome <%= @resource.email %>!</p>
2
+
3
+ <p>You can confirm your account email through the link below:</p>
4
+
5
+ <%
6
+ # TODO: get link working in test environment
7
+ %>
8
+ <% unless Rails.env == 'test' %>
9
+ <p><%= link_to 'Confirm my account', confirmation_url(@resource, :confirmation_token => @resource.confirmation_token) %></p>
10
+ <% end %>
@@ -0,0 +1,5 @@
1
+ <h2><%= t('devise.registrations.title') %></h2>
2
+
3
+ <%= render 'users/form' %>
4
+
5
+ <%= render 'devise/shared/links' %>
@@ -0,0 +1,16 @@
1
+ <div class="accordions">
2
+ <% wizard_steps.each do |wizard_step| %>
3
+ <h3>
4
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
5
+ <%= section_header(wizard_step) %>
6
+ </h3>
7
+ <div style="max-height:350px; overflow: auto">
8
+ <%= step_pane(wizard_step) %>
9
+ </div>
10
+ <% end %>
11
+ </div>
12
+ <% content_for :document_ready do %>
13
+ $( '.accordions' ).each(function(k, v) {
14
+ $(v).accordion({ active: <%= wizard_steps.index(step) %> })
15
+ })
16
+ <% end %>
@@ -0,0 +1,13 @@
1
+ <%# Link to the "First" page
2
+ - available local variables
3
+ url: url to the first page
4
+ current_page: a page object for the currently displayed page
5
+ num_pages: total number of pages
6
+ per_page: number of items to fetch per page
7
+ remote: data-remote
8
+ -%>
9
+ <% unless current_page.first? %>
10
+ <li class="first">
11
+ <%= link_to_unless current_page.first?, raw(t 'views.pagination.first'), url, :remote => remote %>
12
+ </li>
13
+ <% end %>
@@ -0,0 +1,8 @@
1
+ <%# Non-link tag that stands for skipped pages...
2
+ - available local variables
3
+ current_page: a page object for the currently displayed page
4
+ num_pages: total number of pages
5
+ per_page: number of items to fetch per page
6
+ remote: data-remote
7
+ -%>
8
+ <li class="page gap disabled"><a href="#" onclick="return false;"><%= raw(t 'views.pagination.truncate') %></a></li>
@@ -0,0 +1,13 @@
1
+ <%# Link to the "Last" page
2
+ - available local variables
3
+ url: url to the last page
4
+ current_page: a page object for the currently displayed page
5
+ num_pages: total number of pages
6
+ per_page: number of items to fetch per page
7
+ remote: data-remote
8
+ -%>
9
+ <% unless current_page.last? %>
10
+ <li class="last next"><%# "next" class present for border styling in twitter bootstrap %>
11
+ <%= link_to_unless current_page.last?, raw(t 'views.pagination.last'), url, {:remote => remote} %>
12
+ </li>
13
+ <% end %>
@@ -0,0 +1,13 @@
1
+ <%# Link to the "Next" page
2
+ - available local variables
3
+ url: url to the next page
4
+ current_page: a page object for the currently displayed page
5
+ num_pages: total number of pages
6
+ per_page: number of items to fetch per page
7
+ remote: data-remote
8
+ -%>
9
+ <% unless current_page.last? %>
10
+ <li class="next_page">
11
+ <%= link_to_unless current_page.last?, raw(t 'views.pagination.next'), url, :rel => 'next', :remote => remote %>
12
+ </li>
13
+ <% end %>
@@ -0,0 +1,12 @@
1
+ <%# Link showing page number
2
+ - available local variables
3
+ page: a page object for "this" page
4
+ url: url to this page
5
+ current_page: a page object for the currently displayed page
6
+ num_pages: total number of pages
7
+ per_page: number of items to fetch per page
8
+ remote: data-remote
9
+ -%>
10
+ <li class="page<%= ' active' if page.current? %>">
11
+ <%= link_to page, url, opts = {:remote => remote, :rel => page.next? ? 'next' : page.prev? ? 'prev' : nil} %>
12
+ </li>
@@ -0,0 +1,25 @@
1
+ <%# The container tag
2
+ - available local variables
3
+ current_page: a page object for the currently displayed page
4
+ num_pages: total number of pages
5
+ per_page: number of items to fetch per page
6
+ remote: data-remote
7
+ paginator: the paginator that renders the pagination tags inside
8
+ -%>
9
+ <%= paginator.render do -%>
10
+ <div class="pagination">
11
+ <ul>
12
+ <%= first_page_tag unless current_page.first? %>
13
+ <%= prev_page_tag unless current_page.first? %>
14
+ <% each_page do |page| -%>
15
+ <% if page.left_outer? || page.right_outer? || page.inside_window? -%>
16
+ <%= page_tag page %>
17
+ <% elsif !page.was_truncated? -%>
18
+ <%= gap_tag %>
19
+ <% end -%>
20
+ <% end -%>
21
+ <%= next_page_tag unless current_page.last? %>
22
+ <%= last_page_tag unless current_page.last? %>
23
+ </ul>
24
+ </div>
25
+ <% end -%>
@@ -0,0 +1,13 @@
1
+ <%# Link to the "Previous" page
2
+ - available local variables
3
+ url: url to the previous page
4
+ current_page: a page object for the currently displayed page
5
+ num_pages: total number of pages
6
+ per_page: number of items to fetch per page
7
+ remote: data-remote
8
+ -%>
9
+ <% unless current_page.first? %>
10
+ <li class="prev">
11
+ <%= link_to_unless current_page.first?, raw(t 'views.pagination.previous'), url, :rel => 'prev', :remote => remote %>
12
+ </li>
13
+ <% end %>
@@ -0,0 +1,48 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title><%= t('layout.title') %></title>
5
+ <meta charset='utf-8'>
6
+ <meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
7
+ <%= stylesheet_link_tag 'voluntary/application', media: 'all' %>
8
+ </head>
9
+ <body>
10
+ <%= render 'layouts/shared/navigation' %>
11
+
12
+ <div class="container-fluid">
13
+ <% unless flash.empty? %>
14
+ <div class="row-fluid">
15
+ <div class="span12">
16
+ <%= render 'layouts/shared/flash_messages' %>
17
+ </div>
18
+ </div>
19
+ <% end %>
20
+ <div class="row-fluid">
21
+ <div class="span9">
22
+ <%= breadcrumbs %>
23
+
24
+ <%= yield %>
25
+ </div>
26
+ <div class="span3">
27
+ <%= sidenav %>
28
+ </div>
29
+ </div>
30
+ </div>
31
+ <div class="container-fluid">
32
+ <div class="row-fluid footer">
33
+ <div class="span12">
34
+ <%= footer_navigation %>
35
+ </div>
36
+ </div>
37
+ </div>
38
+ <%= javascript_include_tag 'voluntary/application' %>
39
+ <%= csrf_meta_tags %>
40
+ <%= javascript_tag do %>
41
+ <%= yield :top_javascript %>
42
+
43
+ $(function() {
44
+ <%= yield(:document_ready) %>
45
+ });
46
+ <% end %>
47
+ </body>
48
+ </html>
@@ -0,0 +1,7 @@
1
+ <div class="flash">
2
+ <% flash.each do |type, message| -%>
3
+ <div class="message <%= type == :notice ? 'alert-info' : type %>">
4
+ <p><%= message %></p>
5
+ </div>
6
+ <% end -%>
7
+ </div>
@@ -0,0 +1,7 @@
1
+ <div class="navbar">
2
+ <div class="navbar-inner">
3
+ <div class="container">
4
+ <%= render_navigation context: :main, expand_all: false, renderer: :bootstrap %>
5
+ </div>
6
+ </div>
7
+ </div>
@@ -0,0 +1,11 @@
1
+ <%= simple_form_for(@organization, html: {class: 'form-horizontal'}) do |f| %>
2
+ <%= render partial: 'shared/form/error_messages', locals: { resource: @organization } %>
3
+
4
+ <div class="form-inputs">
5
+ <%= f.input :name %>
6
+ </div>
7
+
8
+ <div class="actions">
9
+ <%= f.button :submit %>
10
+ </div>
11
+ <% end %>
@@ -0,0 +1,3 @@
1
+ <h3><%= t('organizations.edit.title') %></h3>
2
+
3
+ <%= render 'form' %>
@@ -0,0 +1,5 @@
1
+ <%= form_tag update_multiple_organizations_path, method: :post do %>
2
+ <%= render 'shared/collection/table',
3
+ type: 'organizations', collection: @organizations, columns: ['name']
4
+ %>
5
+ <% end %>
@@ -0,0 +1,3 @@
1
+ <h3><%= t('organizations.new.title') %></h3>
2
+
3
+ <%= render 'form' %>
@@ -0,0 +1,6 @@
1
+ <h3><%= @organization.name %></h3>
2
+
3
+ <dl class="dl-horizontal">
4
+ <%= show_associations :parent %>
5
+ <%= show_actions %>
6
+ </dl>
@@ -0,0 +1,12 @@
1
+ <%= simple_form_for(@page, html: {class: 'form-horizontal'}) do |f| %>
2
+ <%= render partial: 'shared/form/error_messages', locals: { resource: @page } %>
3
+
4
+ <div class="form-inputs">
5
+ <%= f.input :name %>
6
+ <%= f.input :text, as: :text, input_html: {style: 'width: 100%; height:300px;'} %>
7
+ </div>
8
+
9
+ <div class="actions">
10
+ <%= f.button :submit %>
11
+ </div>
12
+ <% end %>
@@ -0,0 +1,3 @@
1
+ <h3><%= t('pages.edit.title') %></h3>
2
+
3
+ <%= render 'form' %>
@@ -0,0 +1,5 @@
1
+ <%= form_tag update_multiple_pages_path, method: :post do %>
2
+ <%= render 'shared/collection/table',
3
+ type: 'pages', collection: @pages, columns: ['name']
4
+ %>
5
+ <% end %>
@@ -0,0 +1,3 @@
1
+ <h3><%= t('pages.new.title') %></h3>
2
+
3
+ <%= render 'form' %>
@@ -0,0 +1,10 @@
1
+ <h3>
2
+ <a name="top">&nbsp;</a>
3
+ <%= @page.name %>
4
+ </h3>
5
+
6
+ <dl class="dl-horizontal">
7
+ <%= show_actions %>
8
+ </dl>
9
+
10
+ <%= markdown @page.text %>
@@ -0,0 +1,28 @@
1
+ <%= simple_form_for(@product, html: {class: 'form-horizontal'}) do |f| %>
2
+ <%= render partial: 'shared/form/error_messages', locals: { resource: @product } %>
3
+
4
+ <div class="form-inputs">
5
+ <%= f.input :name %>
6
+ <%= f.input :text, as: :text, input_html: {style: 'width: 500px; height:300px;'} %>
7
+
8
+ <div class="control-group check_boxes required">
9
+ <label class="check_boxes required control-label">
10
+ <abbr title="required">*</abbr>
11
+ <%= t('areas.index.title') %>
12
+ </label>
13
+ <div class="controls">
14
+ <% Area.all.each do |area| %>
15
+ <label class="checkbox">
16
+ <input class="check_boxes required" id="product_area_ids_<%=area.id%>" name="product[area_ids][]"
17
+ type="checkbox" value="<%=area.id%>"<%= @product.area_ids.include?(area.id) ? ' checked="checked"' : '' %>/>
18
+ <%= link_to area.name, area %>
19
+ </label>
20
+ <% end %>
21
+ </div>
22
+ </div>
23
+ </div>
24
+
25
+ <div class="form-actions">
26
+ <%= f.button :submit %>
27
+ </div>
28
+ <% end %>
@@ -0,0 +1,3 @@
1
+ <h3><%= t('products.edit.title') %></h3>
2
+
3
+ <%= render 'form' %>
@@ -0,0 +1,5 @@
1
+ <%= form_tag update_multiple_products_path, method: :post do %>
2
+ <%= render partial: 'shared/collection/table', locals: {
3
+ type: 'products', collection: @products, columns: ['name']
4
+ } %>
5
+ <% end %>
@@ -0,0 +1,4 @@
1
+ <%= f.check_box :with_keywords %>
2
+ <%= f.label :with_keywords, t('activerecord.attributes.story.with_keywords') %>
3
+ <%= f.input :min_number_of_keywords %>
4
+ <%= f.input :max_number_of_keywords %>
@@ -0,0 +1,3 @@
1
+ <h3><%= t('products.new.title') %></h3>
2
+
3
+ <%= render 'form' %>
@@ -0,0 +1,11 @@
1
+ <h3>
2
+ <a name="top">&nbsp;</a>
3
+ <%= @product.name %>
4
+ </h3>
5
+
6
+ <dl class="dl-horizontal">
7
+ <%= show_associations :areas %>
8
+ <%= show_actions %>
9
+ </dl>
10
+
11
+ <%= markdown @product.text %>
@@ -0,0 +1,19 @@
1
+ <%= simple_form_for(@story, html: {class: 'form-vertical'}) do |f| %>
2
+ <%= render partial: 'shared/form/error_messages', locals: { resource: @story } %>
3
+
4
+ <div class="form-inputs">
5
+ <%= @story.project ? f.hidden_field(:project_id) : f.input(:project_id, collection: Project.all) %>
6
+ <%= f.input :name %>
7
+ <%= f.input :language, collection: all_language_options %>
8
+ <%= f.input :min_length %>
9
+ <%= f.input :max_length %>
10
+ <%#= render 'products/mixins/keywords', f: f %>
11
+ <%#= f.check_box :with_quality_assurance %>
12
+ <%#= f.label :with_quality_assurance, t('activerecord.attributes.story.with_quality_assurance') %>
13
+ <%= f.input :text, as: :text, input_html: {style: 'width:500px; height:100px;'} %>
14
+ </div>
15
+
16
+ <div class="form-actions">
17
+ <%= f.button :submit %>
18
+ </div>
19
+ <% end %>
@@ -0,0 +1,7 @@
1
+ <fieldset>
2
+ <%= f.input :name %>
3
+ <%= f.input :keywords if f.object.story.with_keywords %>
4
+ <%= remove_fields(f) %>
5
+ </fieldset>
6
+
7
+ <hr/>
@@ -0,0 +1,16 @@
1
+ <%= simple_form_for(@project, html: {class: 'form-horizontal'}) do |f| %>
2
+ <%= render partial: 'shared/form/error_messages', locals: { resource: @project } %>
3
+
4
+ <div class="form-inputs">
5
+ <%= f.input :product_id, collection: Product.all %>
6
+ <%= f.input :name %>
7
+ <%= f.input :text, input_html: {style: 'width: 500px; height:300px;'} %>
8
+ <%= f.input :url %>
9
+
10
+ <%= f.association :areas, as: :check_boxes %>
11
+ </div>
12
+
13
+ <div class="form-actions">
14
+ <%= f.button :submit %>
15
+ </div>
16
+ <% end %>
@@ -0,0 +1,3 @@
1
+ <h3><%= t('projects.edit.title') %></h3>
2
+
3
+ <%= render 'form' %>
@@ -0,0 +1,5 @@
1
+ <%= form_tag update_multiple_projects_path, method: :post do %>
2
+ <%= render partial: 'shared/collection/table', locals: {
3
+ type: 'projects', collection: @projects, columns: ['name', 'product_id']
4
+ } %>
5
+ <% end %>
@@ -0,0 +1,3 @@
1
+ <h3><%= t('projects.new.title') %></h3>
2
+
3
+ <%= render 'form' %>