voluntary 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT-LICENSE +20 -0
- data/README.rdoc +48 -0
- data/Rakefile +27 -0
- data/app/assets/javascripts/voluntary/application.js +6 -0
- data/app/assets/javascripts/voluntary/base.js.coffee +34 -0
- data/app/assets/javascripts/voluntary/bootstrap.js.coffee +4 -0
- data/app/assets/javascripts/voluntary/functions.js +24 -0
- data/app/assets/javascripts/voluntary/users.js.coffee +12 -0
- data/app/assets/stylesheets/voluntary/application.css +15 -0
- data/app/assets/stylesheets/voluntary/base.css.scss +40 -0
- data/app/assets/stylesheets/voluntary/bootstrap_and_overrides.css.less +67 -0
- data/app/controllers/areas_controller.rb +66 -0
- data/app/controllers/candidatures_controller.rb +79 -0
- data/app/controllers/comments_controller.rb +70 -0
- data/app/controllers/devise_extensions/registrations_controller.rb +37 -0
- data/app/controllers/home_controller.rb +7 -0
- data/app/controllers/organizations_controller.rb +67 -0
- data/app/controllers/pages_controller.rb +54 -0
- data/app/controllers/products_controller.rb +62 -0
- data/app/controllers/professions_controller.rb +66 -0
- data/app/controllers/projects_controller.rb +56 -0
- data/app/controllers/results_controller.rb +93 -0
- data/app/controllers/stories_controller.rb +96 -0
- data/app/controllers/tasks_controller.rb +88 -0
- data/app/controllers/users_controller.rb +52 -0
- data/app/controllers/vacancies_controller.rb +79 -0
- data/app/controllers/voluntary/application_controller.rb +92 -0
- data/app/controllers/workflow/candidatures_controller.rb +20 -0
- data/app/controllers/workflow/products_controller.rb +6 -0
- data/app/controllers/workflow/project_owner_controller.rb +33 -0
- data/app/controllers/workflow/stories_controller.rb +6 -0
- data/app/controllers/workflow/tasks_controller.rb +147 -0
- data/app/controllers/workflow/user_controller.rb +6 -0
- data/app/controllers/workflow/vacancies_controller.rb +17 -0
- data/app/controllers/workflow_controller.rb +7 -0
- data/app/helpers/application_helper.rb +65 -0
- data/app/helpers/collection_helper.rb +31 -0
- data/app/helpers/comments_helper.rb +11 -0
- data/app/helpers/form_helper.rb +39 -0
- data/app/helpers/language_helper.rb +15 -0
- data/app/helpers/layout_helper.rb +24 -0
- data/app/helpers/product_helper.rb +32 -0
- data/app/helpers/show_helper.rb +65 -0
- data/app/helpers/wizard_helper.rb +27 -0
- data/app/models/area.rb +19 -0
- data/app/models/area_user.rb +19 -0
- data/app/models/candidature.rb +35 -0
- data/app/models/comment.rb +16 -0
- data/app/models/history_tracker.rb +3 -0
- data/app/models/mongo_db_document.rb +11 -0
- data/app/models/organization.rb +19 -0
- data/app/models/page.rb +30 -0
- data/app/models/product.rb +99 -0
- data/app/models/product/new_product.rb +3 -0
- data/app/models/product/project_management.rb +29 -0
- data/app/models/profession.rb +13 -0
- data/app/models/project.rb +66 -0
- data/app/models/project_user.rb +13 -0
- data/app/models/result.rb +55 -0
- data/app/models/role.rb +8 -0
- data/app/models/role/admin.rb +2 -0
- data/app/models/role/master.rb +2 -0
- data/app/models/role/project_owner.rb +2 -0
- data/app/models/role/user.rb +2 -0
- data/app/models/state_machines/candidature.rb +42 -0
- data/app/models/state_machines/page.rb +18 -0
- data/app/models/state_machines/story.rb +51 -0
- data/app/models/state_machines/task.rb +46 -0
- data/app/models/state_machines/vacancy.rb +41 -0
- data/app/models/story.rb +82 -0
- data/app/models/task.rb +85 -0
- data/app/models/user.rb +95 -0
- data/app/models/user_role.rb +6 -0
- data/app/models/vacancy.rb +41 -0
- data/app/observers/candidature_observer.rb +29 -0
- data/app/observers/story_observer.rb +6 -0
- data/app/observers/task_observer.rb +34 -0
- data/app/presenters/layout/application_presenter.rb +3 -0
- data/app/presenters/layout_presenter.rb +9 -0
- data/app/presenters/presenter.rb +46 -0
- data/app/presenters/resource_presenter.rb +30 -0
- data/app/presenters/resources/general/wizard_presenter.rb +17 -0
- data/app/presenters/resources/general/wizards/story/steps/activate_presenter.rb +3 -0
- data/app/presenters/resources/general/wizards/story/steps/setup_tasks_presenter.rb +5 -0
- data/app/presenters/resources/general/wizards/story_presenter.rb +3 -0
- data/app/presenters/resources/user/form_presenter.rb +16 -0
- data/app/presenters/shared/collection/table_presenter.rb +33 -0
- data/app/views/areas/_form.html.erb +11 -0
- data/app/views/areas/edit.html.erb +3 -0
- data/app/views/areas/index.html.erb +5 -0
- data/app/views/areas/new.html.erb +3 -0
- data/app/views/areas/show.html.erb +6 -0
- data/app/views/candidatures/_form.html.erb +13 -0
- data/app/views/candidatures/edit.html.erb +3 -0
- data/app/views/candidatures/index.html.erb +11 -0
- data/app/views/candidatures/new.html.erb +3 -0
- data/app/views/candidatures/show.html.erb +18 -0
- data/app/views/comments/_form.html.erb +16 -0
- data/app/views/comments/_resource.html.erb +16 -0
- data/app/views/comments/edit.html.erb +3 -0
- data/app/views/comments/new.html.erb +3 -0
- data/app/views/devise/mailer/confirmation_instructions.html.erb +10 -0
- data/app/views/devise/registrations/new.html.erb +5 -0
- data/app/views/general/wizard.html.erb +16 -0
- data/app/views/kaminari/_first_page.html.erb +13 -0
- data/app/views/kaminari/_gap.html.erb +8 -0
- data/app/views/kaminari/_last_page.html.erb +13 -0
- data/app/views/kaminari/_next_page.html.erb +13 -0
- data/app/views/kaminari/_page.html.erb +12 -0
- data/app/views/kaminari/_paginator.html.erb +25 -0
- data/app/views/kaminari/_prev_page.html.erb +13 -0
- data/app/views/layouts/application.html.erb +48 -0
- data/app/views/layouts/shared/_flash_messages.html.erb +7 -0
- data/app/views/layouts/shared/_navigation.html.erb +7 -0
- data/app/views/organizations/_form.html.erb +11 -0
- data/app/views/organizations/edit.html.erb +3 -0
- data/app/views/organizations/index.html.erb +5 -0
- data/app/views/organizations/new.html.erb +3 -0
- data/app/views/organizations/show.html.erb +6 -0
- data/app/views/pages/_form.html.erb +12 -0
- data/app/views/pages/edit.html.erb +3 -0
- data/app/views/pages/index.html.erb +5 -0
- data/app/views/pages/new.html.erb +3 -0
- data/app/views/pages/show.html.erb +10 -0
- data/app/views/products/_form.html.erb +28 -0
- data/app/views/products/edit.html.erb +3 -0
- data/app/views/products/index.html.erb +5 -0
- data/app/views/products/mixins/_keywords.html.erb +4 -0
- data/app/views/products/new.html.erb +3 -0
- data/app/views/products/show.html.erb +11 -0
- data/app/views/products/types/text_creation/stories/_form.html.erb +19 -0
- data/app/views/products/types/text_creation/stories/_task_fields.html.erb +7 -0
- data/app/views/projects/_form.html.erb +16 -0
- data/app/views/projects/edit.html.erb +3 -0
- data/app/views/projects/index.html.erb +5 -0
- data/app/views/projects/new.html.erb +3 -0
- data/app/views/projects/show.html.erb +13 -0
- data/app/views/shared/_comments.html.erb +7 -0
- data/app/views/shared/collection/_list.html.erb +37 -0
- data/app/views/shared/collection/_table.html.erb +36 -0
- data/app/views/shared/form/_error_messages.html.erb +10 -0
- data/app/views/shared/resource/_actions.html.erb +26 -0
- data/app/views/shared/resource/_event_elements.html.erb +7 -0
- data/app/views/stories/_collection.html.erb +8 -0
- data/app/views/stories/_form.html.erb +19 -0
- data/app/views/stories/_task_fields.html.erb +11 -0
- data/app/views/stories/index.html.erb +1 -0
- data/app/views/stories/show.html.erb +13 -0
- data/app/views/stories/steps/_activate.html.erb +17 -0
- data/app/views/stories/steps/_setup_tasks.html.erb +35 -0
- data/app/views/stories/tasks.html.erb +0 -0
- data/app/views/tasks/_collection.html.erb +12 -0
- data/app/views/users/_form.html.erb +43 -0
- data/app/views/users/edit.html.erb +3 -0
- data/app/views/users/index.html.erb +6 -0
- data/app/views/users/new.html.erb +3 -0
- data/app/views/users/preferences.html.erb +11 -0
- data/app/views/users/show.html.erb +6 -0
- data/app/views/vacancies/_form.html.erb +15 -0
- data/app/views/vacancies/edit.html.erb +3 -0
- data/app/views/vacancies/index.html.erb +7 -0
- data/app/views/vacancies/new.html.erb +3 -0
- data/app/views/vacancies/show.html.erb +17 -0
- data/app/views/workflow/index.html.erb +0 -0
- data/app/views/workflow/products/show.html.erb +34 -0
- data/app/views/workflow/project_owner/_candidatures.html.erb +31 -0
- data/app/views/workflow/project_owner/_stories.html.erb +29 -0
- data/app/views/workflow/project_owner/_tasks.html.erb +34 -0
- data/app/views/workflow/project_owner/_vacancies.html.erb +27 -0
- data/app/views/workflow/project_owner/index.html.erb +24 -0
- data/app/views/workflow/tasks/_work_form.html.erb +8 -0
- data/app/views/workflow/tasks/_work_head.html.erb +15 -0
- data/app/views/workflow/tasks/edit.html.erb +3 -0
- data/app/views/workflow/tasks/index.html.erb +31 -0
- data/app/views/workflow/tasks/next.html.erb +0 -0
- data/app/views/workflow/tasks/steps/_complete.html.erb +11 -0
- data/app/views/workflow/tasks/steps/_review.html.erb +13 -0
- data/app/views/workflow/tasks/steps/_work.html.erb +17 -0
- data/app/views/workflow/user/_tasks.html.erb +30 -0
- data/app/views/workflow/user/index.html.erb +14 -0
- data/config/initializers/1_initialize_app_config.rb +5 -0
- data/config/initializers/devise.rb +193 -0
- data/config/initializers/locale_settings.rb +42 -0
- data/config/initializers/mongoid-history.rb +2 -0
- data/config/initializers/recaptcha.rb +7 -0
- data/config/initializers/simple_form.rb +178 -0
- data/config/initializers/simple_navigation.rb +2 -0
- data/config/locales/devise.en.yml +59 -0
- data/config/locales/en.yml +26 -0
- data/config/locales/general/en.yml +71 -0
- data/config/locales/resources/area/en.yml +12 -0
- data/config/locales/resources/candidature/en.yml +19 -0
- data/config/locales/resources/comment/en.yml +11 -0
- data/config/locales/resources/organization/en.yml +11 -0
- data/config/locales/resources/page/en.yml +11 -0
- data/config/locales/resources/product/en.yml +23 -0
- data/config/locales/resources/project/en.yml +9 -0
- data/config/locales/resources/result/en.yml +9 -0
- data/config/locales/resources/story/en.yml +34 -0
- data/config/locales/resources/task/en.yml +36 -0
- data/config/locales/resources/user/en.yml +14 -0
- data/config/locales/resources/vacancy/en.yml +29 -0
- data/config/locales/simple_form.en.yml +26 -0
- data/config/locales/workflow/en.yml +37 -0
- data/config/routes.rb +188 -0
- data/db/migrate/20120907144853_create_schema.rb +217 -0
- data/db/migrate/20120911093743_remove_timestamps_from_habtm_tables.rb +21 -0
- data/db/migrate/20120919161831_add_unique_index_for_one_user_candidature_per_vacancy.rb +9 -0
- data/db/migrate/20120922201955_create_mongo_db_documents.rb +13 -0
- data/db/migrate/20120923140109_add_product_to_project.rb +6 -0
- data/db/migrate/20121004061413_add_extra_user_attributes.rb +9 -0
- data/db/migrate/20121004132105_create_professions.rb +13 -0
- data/db/migrate/20121006162913_add_public_attribute_to_roles.rb +6 -0
- data/db/migrate/20121006170407_add_type_attribute_to_roles.rb +5 -0
- data/db/migrate/20121007071543_add_foreign_languages_to_user.rb +6 -0
- data/db/migrate/20121028073712_create_organizations.rb +13 -0
- data/db/seeds.rb +14 -0
- data/lib/applicat/mvc/controller.rb +171 -0
- data/lib/applicat/mvc/controller/error_handling.rb +40 -0
- data/lib/applicat/mvc/controller/resource.rb +19 -0
- data/lib/applicat/mvc/controller/transition_actions.rb +43 -0
- data/lib/applicat/mvc/model/resource/base.rb +56 -0
- data/lib/applicat/mvc/model/tokenable.rb +24 -0
- data/lib/applicat/mvc/model/tree.rb +82 -0
- data/lib/db_seed.rb +150 -0
- data/lib/environment_configuration.rb +54 -0
- data/lib/generators/voluntary/install/install_generator.rb +118 -0
- data/lib/generators/voluntary/install/templates/app/controllers/application_controller.rb +3 -0
- data/lib/generators/voluntary/install/templates/app/models/ability.rb +49 -0
- data/lib/generators/voluntary/install/templates/app/models/app_config.rb +32 -0
- data/lib/generators/voluntary/install/templates/app/views/layouts/application.html.erb +50 -0
- data/lib/generators/voluntary/install/templates/config/application.yml +147 -0
- data/lib/generators/voluntary/install/templates/config/cucumber.yml +8 -0
- data/lib/generators/voluntary/install/templates/config/database.example.yml +28 -0
- data/lib/generators/voluntary/install/templates/config/deploy.rb +59 -0
- data/lib/generators/voluntary/install/templates/config/email.example.yml +9 -0
- data/lib/generators/voluntary/install/templates/config/initializers/recaptcha_example +4 -0
- data/lib/generators/voluntary/install/templates/config/locale_settings.yml +121 -0
- data/lib/generators/voluntary/install/templates/config/main_navigation.rb +262 -0
- data/lib/generators/voluntary/install/templates/config/mongoid.yml +78 -0
- data/lib/generators/voluntary/install/templates/config/nginx.conf +27 -0
- data/lib/generators/voluntary/install/templates/config/unicorn.rb +9 -0
- data/lib/generators/voluntary/install/templates/config/unicorn_init.sh +84 -0
- data/lib/generators/voluntary/install/templates/db/seeds.rb +14 -0
- data/lib/generators/voluntary/install/templates/features/step_definitions/email_steps.rb +89 -0
- data/lib/generators/voluntary/install/templates/features/step_definitions/factory_steps.rb +120 -0
- data/lib/generators/voluntary/install/templates/features/step_definitions/javascript_steps.rb +15 -0
- data/lib/generators/voluntary/install/templates/features/step_definitions/navigation_steps.rb +3 -0
- data/lib/generators/voluntary/install/templates/features/step_definitions/resources_steps.rb +8 -0
- data/lib/generators/voluntary/install/templates/features/step_definitions/session_steps.rb +35 -0
- data/lib/generators/voluntary/install/templates/features/step_definitions/web_steps.rb +271 -0
- data/lib/generators/voluntary/install/templates/features/support/database_cleaner_patches.rb +24 -0
- data/lib/generators/voluntary/install/templates/features/support/env.rb +83 -0
- data/lib/generators/voluntary/install/templates/features/support/integration_sessions_controller.rb +32 -0
- data/lib/generators/voluntary/install/templates/features/support/integration_sessions_form.html.erb +1 -0
- data/lib/generators/voluntary/install/templates/features/support/paths.rb +98 -0
- data/lib/generators/voluntary/install/templates/features/support/selectors.rb +44 -0
- data/lib/generators/voluntary/install/templates/features/support/spork_env +72 -0
- data/lib/generators/voluntary/install/templates/features/support/user_cuke_helpers.rb +78 -0
- data/lib/generators/voluntary/install/templates/lib/volontariat_seed.rb +36 -0
- data/lib/generators/voluntary/install/templates/spec/spec_helper.rb +72 -0
- data/lib/generators/voluntary/install/templates/spec/support/deferred_garbage_collector.rb +45 -0
- data/lib/generators/voluntary/install/templates/spec/support/devise.rb +3 -0
- data/lib/generators/voluntary/install/templates/spec/support/mongo_database_cleaner.rb +19 -0
- data/lib/generators/voluntary/install/templates/vendor/assets/javascripts/jquery.tokeninput.js +915 -0
- data/lib/generators/voluntary/install/templates/vendor/assets/stylesheets/token-input-facebook.css +122 -0
- data/lib/generators/voluntary/install/templates/vendor/assets/stylesheets/token-input-mac.css +204 -0
- data/lib/generators/voluntary/install/templates/vendor/assets/stylesheets/token-input.css +127 -0
- data/lib/i18n_interpolation_fallbacks.rb +21 -0
- data/lib/model/mongo_db/commentable.rb +17 -0
- data/lib/model/mongo_db/core_extensions.rb +10 -0
- data/lib/model/mongo_db/customizable.rb +23 -0
- data/lib/model/mongo_db/product/keywords.rb +31 -0
- data/lib/model/mongo_db/state_version_attributes.rb +15 -0
- data/lib/tasks/cucumber.rake +65 -0
- data/lib/tasks/voluntary_tasks.rake +4 -0
- data/lib/vendors/active_model/naming.rb +14 -0
- data/lib/vendors/simple_navigation/renderer/breadcrumbs_without_method_links.rb +30 -0
- data/lib/vendors/simple_navigation/renderer/twitter_sidenav.rb +34 -0
- data/lib/voluntary.rb +87 -0
- data/lib/voluntary/engine.rb +11 -0
- data/lib/voluntary/helpers/application.rb +69 -0
- data/lib/voluntary/helpers/collection.rb +35 -0
- data/lib/voluntary/helpers/comments.rb +15 -0
- data/lib/voluntary/helpers/form.rb +43 -0
- data/lib/voluntary/helpers/language.rb +19 -0
- data/lib/voluntary/helpers/layout.rb +28 -0
- data/lib/voluntary/helpers/product.rb +36 -0
- data/lib/voluntary/helpers/show.rb +69 -0
- data/lib/voluntary/helpers/wizard.rb +31 -0
- data/lib/voluntary/version.rb +3 -0
- data/lib/wizard.rb +58 -0
- data/lib/wizard/controller/concerns/paths.rb +31 -0
- data/lib/wizard/controller/concerns/steps.rb +142 -0
- metadata +1217 -0
@@ -0,0 +1,13 @@
|
|
1
|
+
<h3>
|
2
|
+
<a name="top"> </a>
|
3
|
+
<%= @project.name %>
|
4
|
+
</h3>
|
5
|
+
|
6
|
+
<dl class="dl-horizontal">
|
7
|
+
<%= show_associations :product, :user, :areas %>
|
8
|
+
<%= show_actions %>
|
9
|
+
</dl>
|
10
|
+
|
11
|
+
<%= markdown @project.text %>
|
12
|
+
|
13
|
+
<%= render 'shared/comments', comment: @project.comments.new %>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<h4><a name="comments" href="#top"><%= t('comments.index.title') %></a></h4>
|
2
|
+
|
3
|
+
<% (@comments.respond_to?(:where) ? @comments.where(ancestry: nil) : @comments).select{|c| c.id.present? }.each do |current_comment| %>
|
4
|
+
<%= nested_comments current_comment.subtree.arrange(order: :created_at) %>
|
5
|
+
<% end %>
|
6
|
+
|
7
|
+
<%= render partial: 'comments/form', locals: { resource: comment } %>
|
@@ -0,0 +1,37 @@
|
|
1
|
+
<h3><%= t("#{type}.index.title") %></h3>
|
2
|
+
|
3
|
+
<% if collection.none? %>
|
4
|
+
<p><%= I18n.t("#{type}.index.empty_collection")%></p>
|
5
|
+
<% else %>
|
6
|
+
<% collection.each do |resource| %>
|
7
|
+
<table class="table table-striped">
|
8
|
+
<thead>
|
9
|
+
<tr class="<%= cycle('odd', 'even') %>">
|
10
|
+
<th>
|
11
|
+
<% (columns.is_a?(Hash) ? columns.keys : columns).each do |column| %>
|
12
|
+
<strong><%= t(
|
13
|
+
"activerecord.attributes.general.#{column}",
|
14
|
+
default: t("activerecord.attributes.#{type.singularize}.#{column}")
|
15
|
+
) %>:</strong>
|
16
|
+
|
17
|
+
<%= table_cell column, resource, columns.is_a?(Hash) ? columns[column] : nil %>
|
18
|
+
<% end %>
|
19
|
+
<% if resource.respond_to? :state_events %>
|
20
|
+
<%= render partial: 'shared/resource/actions', locals: { type: type, resource: resource } %>
|
21
|
+
<% end %>
|
22
|
+
</th>
|
23
|
+
</tr>
|
24
|
+
</thead>
|
25
|
+
</table>
|
26
|
+
|
27
|
+
<table class="table table-striped">
|
28
|
+
<tbody>
|
29
|
+
<tr class="<%= cycle('odd', 'even') %>">
|
30
|
+
<td>
|
31
|
+
<%= resource.send(content_column) %>
|
32
|
+
</td>
|
33
|
+
</tr>
|
34
|
+
</tbody>
|
35
|
+
</table>
|
36
|
+
<% end %>
|
37
|
+
<% end %>
|
@@ -0,0 +1,36 @@
|
|
1
|
+
<% options ||= {} %>
|
2
|
+
<% table_presenter = layout_presenter.table_presenter(self) %>
|
3
|
+
<% table_presenter.set_options(options.merge(type: type)) %>
|
4
|
+
|
5
|
+
<% if table_presenter.show_title %>
|
6
|
+
<h3><%= t("#{type}.index.title") %></h3>
|
7
|
+
<% end %>
|
8
|
+
<% if collection.none? || collection.select{|e| e.id.present? }.none? %>
|
9
|
+
<p><%= I18n.t("#{type}.index.empty_collection")%></p>
|
10
|
+
<% else %>
|
11
|
+
<table class="table table-striped">
|
12
|
+
<thead>
|
13
|
+
<tr class="<%= cycle('odd', 'even') %>">
|
14
|
+
<% (columns.is_a?(Hash) ? columns.keys : columns).map{|c| c.gsub('_id', '')}.each do |column| %>
|
15
|
+
<th><%= t("activerecord.attributes.#{type.singularize}.#{column}") %></th>
|
16
|
+
<% end %>
|
17
|
+
<th></th>
|
18
|
+
</tr>
|
19
|
+
</thead>
|
20
|
+
<tbody>
|
21
|
+
<% collection.select{|e| e.id.present? }.each do |resource| %>
|
22
|
+
<% table_presenter.set_option(:resource, resource) %>
|
23
|
+
<tr class="<%= cycle('odd', 'even') %>">
|
24
|
+
<% (columns.is_a?(Hash) ? columns.keys : columns).each do |column| %>
|
25
|
+
<td>
|
26
|
+
<%= table_cell column, resource, columns.is_a?(Hash) ? columns[column] : nil %>
|
27
|
+
</td>
|
28
|
+
<% end %>
|
29
|
+
<%= table_presenter.actions %>
|
30
|
+
</tr>
|
31
|
+
<% end %>
|
32
|
+
</tbody>
|
33
|
+
</table>
|
34
|
+
<% end %>
|
35
|
+
|
36
|
+
<%= table_presenter.new_link %>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<% if resource && resource.errors.any? %>
|
2
|
+
<div class="alert alert-error">
|
3
|
+
<h2><%= t('general.form.errors_count', count: pluralize(resource.errors.count, t('general.error'))) %></h2>
|
4
|
+
<ul>
|
5
|
+
<% resource.errors.full_messages.each do |msg| %>
|
6
|
+
<li><%= msg %></li>
|
7
|
+
<% end %>
|
8
|
+
</ul>
|
9
|
+
</div>
|
10
|
+
<% end %>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<% if can?(:destroy, resource) || can?(:edit, resource) || (
|
2
|
+
resource.respond_to?(:state_events) && resource.state_events.select{|event| can? event, resource }.any?
|
3
|
+
) %>
|
4
|
+
<div class="dropdown">
|
5
|
+
<a class="dropdown-toggle" data-toggle="dropdown" href="#"><%= t('general.actions') %></a>
|
6
|
+
<ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
|
7
|
+
<% if can? :destroy, resource %>
|
8
|
+
<li>
|
9
|
+
<%= link_to(
|
10
|
+
t('general.destroy'), resource, id: "area_#{resource.id}", method: :delete,
|
11
|
+
confirm: t('general.questions.are_you_sure'),
|
12
|
+
onclick: "delete_link('#area_#{resource.id}'); return false;"
|
13
|
+
)
|
14
|
+
%>
|
15
|
+
</li>
|
16
|
+
<% end %>
|
17
|
+
<% if can? :edit, resource %>
|
18
|
+
<li><%= link_to t('general.edit'), eval("edit_#{type.singularize}_path(resource)") %></li>
|
19
|
+
<% end %>
|
20
|
+
<% if resource.respond_to? :state_events %>
|
21
|
+
<li class="divider"></li>
|
22
|
+
<% end %>
|
23
|
+
<%= render 'shared/resource/event_elements', resource: resource, type: type %>
|
24
|
+
</ul>
|
25
|
+
</div>
|
26
|
+
<% end %>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<% if resource.respond_to? :state_events %>
|
2
|
+
<% resource.state_events.select{|event| can? event, resource }.each do |event| %>
|
3
|
+
<li>
|
4
|
+
<%= link_to t("#{type}.show.events.#{event}"), eval("#{event}_#{type.singularize}_path(resource)"), method: :put %>
|
5
|
+
</li>
|
6
|
+
<% end %>
|
7
|
+
<% end %>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<% options ||= {} %>
|
2
|
+
<% options = {show_title: true, append_new_link: true}.merge(options) %>
|
3
|
+
<%= form_tag update_multiple_stories_path, method: :post do %>
|
4
|
+
<%= render partial: 'shared/collection/table', locals: {
|
5
|
+
type: 'stories', collection: collection, columns: ['name', 'project_id'], append_new_link: options[:append_new_link],
|
6
|
+
show_title: options[:show_title]
|
7
|
+
} %>
|
8
|
+
<% end %>
|
@@ -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
|
+
<% unless @story.new_record? %>
|
5
|
+
<div class="form-actions">
|
6
|
+
<%= f.button :submit %>
|
7
|
+
</div>
|
8
|
+
<% end %>
|
9
|
+
|
10
|
+
<div class="form-inputs">
|
11
|
+
<%= @story.project ? f.hidden_field(:project_id) : f.input(:project_id, collection: Project.all) %>
|
12
|
+
<%= f.input :name %>
|
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,11 @@
|
|
1
|
+
<fieldset>
|
2
|
+
<%= f.input :name %>
|
3
|
+
<%= f.input :text, as: :text, input_html: {style: 'width: 500px; height:50px;'} %>
|
4
|
+
|
5
|
+
<%= f.check_box :_destroy %>
|
6
|
+
<%= f.label :_destroy, t('general.destroy') %>
|
7
|
+
|
8
|
+
<%= link_to t('general.remove'), '#', class: 'remove_fields' %>
|
9
|
+
</fieldset>
|
10
|
+
|
11
|
+
<hr/>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render partial: 'collection', locals: { collection: @stories } %>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<h3>
|
2
|
+
<a name="top"> </a>
|
3
|
+
<%= @story.name %>
|
4
|
+
</h3>
|
5
|
+
|
6
|
+
<dl class="dl-horizontal">
|
7
|
+
<%= show_associations :project %>
|
8
|
+
<%= show_actions %>
|
9
|
+
</dl>
|
10
|
+
|
11
|
+
<%= markdown @story.text %>
|
12
|
+
|
13
|
+
<%= render 'shared/comments', comment: Comment.new(commentable_type: 'Story', commentable_id: @story.id) %>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<%= simple_form_for(@story, html: {class: 'floating_form form-vertical'}) do |f| %>
|
2
|
+
<%= render partial: 'shared/form/error_messages', locals: { resource: @story } %>
|
3
|
+
<% if step == :activate %>
|
4
|
+
<input type="hidden" name="next_step" value="1"/>
|
5
|
+
<% end %>
|
6
|
+
<div class="form-inputs">
|
7
|
+
<%= render partial: 'tasks/collection', locals: {
|
8
|
+
collection: @story.tasks.select{|t| !t.new_record? },
|
9
|
+
options: { current_parent: @story, columns: @step_presenter.task_columns }
|
10
|
+
}
|
11
|
+
%>
|
12
|
+
</div>
|
13
|
+
|
14
|
+
<div class="form-actions">
|
15
|
+
<%= f.button :submit, t('general.events.activate') %>
|
16
|
+
</div>
|
17
|
+
<% end %>
|
@@ -0,0 +1,35 @@
|
|
1
|
+
<%= simple_form_for(@story, @step_presenter.form_options) do |f| %>
|
2
|
+
<%= render partial: 'shared/form/error_messages', locals: { resource: @story } %>
|
3
|
+
<% if step == :setup_tasks %>
|
4
|
+
<input type="hidden" name="next_step" value="1"/>
|
5
|
+
<% end %>
|
6
|
+
|
7
|
+
<div class="form-actions">
|
8
|
+
<div class="control-group string required" style="display: block">
|
9
|
+
<div class="controls">
|
10
|
+
<%= f.button :submit, t('stories.steps.setup_tasks.update') %>
|
11
|
+
|
12
|
+
|
13
|
+
<%= link_to_add_fields(
|
14
|
+
t('stories.steps.setup_tasks.add_task'), f, :tasks, target: 'setup_tasks_input'
|
15
|
+
) %>
|
16
|
+
</div>
|
17
|
+
</div>
|
18
|
+
</div>
|
19
|
+
|
20
|
+
<div id="setup_tasks_input" class="form-inputs">
|
21
|
+
<%= f.simple_fields_for :tasks do |task_form| %>
|
22
|
+
<%= render_product_specific_partial_if_available(
|
23
|
+
task_form.object, 'stories/task_fields', f: task_form
|
24
|
+
) %>
|
25
|
+
<% end %>
|
26
|
+
</div>
|
27
|
+
|
28
|
+
<div class="form-actions">
|
29
|
+
<div class="control-group string required" style="display: block">
|
30
|
+
<div class="controls">
|
31
|
+
<%= f.button :submit, t('stories.steps.setup_tasks.update') %>
|
32
|
+
</div>
|
33
|
+
</div>
|
34
|
+
</div>
|
35
|
+
<% end %>
|
File without changes
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<% options ||= {} %>
|
2
|
+
<% options = {
|
3
|
+
current_parent: parent, show_title: true, append_new_link: true,
|
4
|
+
columns: ['name', 'story_id']
|
5
|
+
}.merge(options) %>
|
6
|
+
<%= render partial: 'shared/collection/table', locals: {
|
7
|
+
type: 'tasks', collection: collection, columns: options[:columns],
|
8
|
+
options: {
|
9
|
+
append_new_link: options[:append_new_link], show_title: options[:show_title],
|
10
|
+
current_parent: options[:current_parent]
|
11
|
+
}
|
12
|
+
} %>
|
@@ -0,0 +1,43 @@
|
|
1
|
+
<%= simple_form_for(
|
2
|
+
resource, url: resource.new_record? ? registration_path(resource_name) : user_path(resource),
|
3
|
+
method: resource.new_record? ? :post : :put,
|
4
|
+
html: {
|
5
|
+
class: 'form-horizontal block-form', autocomplete: 'off'
|
6
|
+
}
|
7
|
+
) do |f| %>
|
8
|
+
<%= devise_error_messages! %>
|
9
|
+
|
10
|
+
<div class="form-inputs">
|
11
|
+
<% @presenter.attributes.each do |attribute| %>
|
12
|
+
<%= case attribute
|
13
|
+
when :name
|
14
|
+
f.input attribute if resource.new_record?
|
15
|
+
when :language
|
16
|
+
f.input attribute, collection: all_language_options
|
17
|
+
when :interface_language
|
18
|
+
f.input attribute, collection: available_language_options
|
19
|
+
when :foreign_language_tokens
|
20
|
+
f.input attribute, as: :string, input_html: { data: { load: resource.foreign_language_tokens } } unless Rails.env == 'test'
|
21
|
+
when :profession
|
22
|
+
autocomplete_input(f, attribute)
|
23
|
+
when :employment_relationship
|
24
|
+
f.input attribute, collection: ['selbständig', 'angestellt', 'arbeitslos', 'Schüler', 'Student', 'Rentner']
|
25
|
+
when :area_tokens
|
26
|
+
# TODO: get token input working in test environment
|
27
|
+
f.input attribute, input_html: { data: { load: resource.areas } } unless Rails.env == 'test'
|
28
|
+
else
|
29
|
+
f.input attribute
|
30
|
+
end %>
|
31
|
+
<% end %>
|
32
|
+
|
33
|
+
<%
|
34
|
+
#TODO: language selection
|
35
|
+
%>
|
36
|
+
|
37
|
+
<%= recaptcha_tags if resource.new_record? && Rails.env == 'production' %>
|
38
|
+
</div>
|
39
|
+
|
40
|
+
<div class="form-actions">
|
41
|
+
<%= f.button :submit %>
|
42
|
+
</div>
|
43
|
+
<% end %>
|
@@ -0,0 +1,6 @@
|
|
1
|
+
<%= form_tag update_multiple_users_path, method: :post do %>
|
2
|
+
<%= render partial: 'shared/collection/table', locals: {
|
3
|
+
type: 'users', collection: @users, columns: ['name', 'first_name', 'last_name', 'language'],
|
4
|
+
options: { append_new_link: false }
|
5
|
+
} %>
|
6
|
+
<% end %>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<h3><%= t('users.preferences.title') %></h3>
|
2
|
+
|
3
|
+
<%= simple_form_for(current_user, url: preferences_user_path(current_user), html: { class: 'form-horizontal block-form' }) do |f| %>
|
4
|
+
<div class="form-inputs">
|
5
|
+
<%= f.input :main_role_id, collection: Role.public %>
|
6
|
+
</div>
|
7
|
+
|
8
|
+
<div class="form-actions">
|
9
|
+
<%= f.button :submit %>
|
10
|
+
</div>
|
11
|
+
<% end %>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<%= simple_form_for(@vacancy, html: {class: 'form-horizontal'}) do |f| %>
|
2
|
+
<%= render partial: 'shared/form/error_messages', locals: { resource: @vacancy } %>
|
3
|
+
|
4
|
+
<div class="form-inputs">
|
5
|
+
<%= @vacancy.project ? f.hidden_field(:project_id) : f.association(:project) %>
|
6
|
+
|
7
|
+
<%= f.input :name %>
|
8
|
+
<%= f.input :text, input_html: {style: 'width: 500px; height:300px;'} %>
|
9
|
+
<%= f.input :limit %>
|
10
|
+
</div>
|
11
|
+
|
12
|
+
<div class="form-actions">
|
13
|
+
<%= f.button :submit %>
|
14
|
+
</div>
|
15
|
+
<% end %>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<%= form_tag update_multiple_candidatures_path, method: :post do %>
|
2
|
+
<%= render partial: "shared/collection/#{@project ? 'list' : 'table'}", locals: {
|
3
|
+
type: 'vacancies', collection: @vacancies, columns: ['name', 'project_id'], content_column: 'text'
|
4
|
+
} %>
|
5
|
+
<% end %>
|
6
|
+
|
7
|
+
<%= link_to t('vacancies.new.title'), new_project_vacancy_path(@project) if @project %>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<h3>
|
2
|
+
<a id="top" name="top"></a>
|
3
|
+
<%= @vacancy.name %>
|
4
|
+
</h3>
|
5
|
+
|
6
|
+
<dl class="dl-horizontal">
|
7
|
+
<%= show_associations :project %>
|
8
|
+
<%= show_attribute :limit, value: "#{@vacancy.candidatures_left} / #{@vacancy.limit}" %>
|
9
|
+
<%= show_attribute :state %>
|
10
|
+
<%= show_actions %>
|
11
|
+
</dl>
|
12
|
+
|
13
|
+
<%= render partial: 'shared/resource/actions', locals: { type: 'vacancies', resource: @vacancy } %>
|
14
|
+
|
15
|
+
<%= markdown @vacancy.text %>
|
16
|
+
|
17
|
+
<%= render 'shared/comments', comment: @vacancy.comments.new %>
|
File without changes
|
@@ -0,0 +1,34 @@
|
|
1
|
+
<h3><%= params[:id] == 'no-name' ? 'No Name' : @product.name %></h3>
|
2
|
+
|
3
|
+
<% columns = ['name'] %>
|
4
|
+
|
5
|
+
<% if @stories.none? || @stories.select{|e| e.id.present? }.none? %>
|
6
|
+
<p><%= I18n.t("stories.index.empty_collection")%></p>
|
7
|
+
<% else %>
|
8
|
+
<table class="table table-striped">
|
9
|
+
<thead>
|
10
|
+
<tr class="<%= cycle('odd', 'even') %>">
|
11
|
+
<% columns.map{|c| c.gsub('_id', '')}.each do |column| %>
|
12
|
+
<th><%= t("activerecord.attributes.story.#{column}") %></th>
|
13
|
+
<% end %>
|
14
|
+
<th></th>
|
15
|
+
</tr>
|
16
|
+
</thead>
|
17
|
+
<tbody>
|
18
|
+
<% @stories.select{|e| e.id.present? }.each do |resource| %>
|
19
|
+
<tr class="<%= cycle('odd', 'even') %>">
|
20
|
+
<% columns.each do |column| %>
|
21
|
+
<td>
|
22
|
+
<%= table_cell column, resource, columns.is_a?(Hash) ? columns[column] : nil %>
|
23
|
+
</td>
|
24
|
+
<% end %>
|
25
|
+
<td>
|
26
|
+
<%= link_to t('workflow.user.next_task'), next_task_workflow_user_index_path(resource) %>
|
27
|
+
</td>
|
28
|
+
</tr>
|
29
|
+
<% end %>
|
30
|
+
</tbody>
|
31
|
+
</table>
|
32
|
+
<% end %>
|
33
|
+
|
34
|
+
<%= paginate @stories if self.respond_to? :paginate %>
|