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,31 @@
|
|
1
|
+
<div class="tabs">
|
2
|
+
<ul>
|
3
|
+
<% Candidature::STATES.each do |state| %>
|
4
|
+
<li>
|
5
|
+
<a href="#<%= state %>_candidatures">
|
6
|
+
<%= I18n.t("candidatures.show.states.#{state}") %>
|
7
|
+
<% if @candidatures[state].length == 5 %>
|
8
|
+
(<%= @candidatures[state].length %>+)
|
9
|
+
<% elsif @candidatures[state].length > 0 %>
|
10
|
+
(<%= @candidatures[state].length %>)
|
11
|
+
<% end %>
|
12
|
+
</a>
|
13
|
+
</li>
|
14
|
+
<% end %>
|
15
|
+
</ul>
|
16
|
+
<% Candidature::STATES.each do |state| %>
|
17
|
+
<div id="<%= state %>_candidatures">
|
18
|
+
<%= render partial: 'shared/collection/table', locals: {
|
19
|
+
type: 'candidatures', collection: @candidatures[state],
|
20
|
+
columns: {
|
21
|
+
'project_id' => 'vacancy.project', 'vacancy_id' => '', 'name' => 'user.name', 'user_id' => ''
|
22
|
+
},
|
23
|
+
options: {show_title: false, append_new_link: false }
|
24
|
+
} %>
|
25
|
+
|
26
|
+
<% if @candidatures[state].length == 5 %>
|
27
|
+
<p><%= link_to t('general.more'), eval("#{state}_workflow_candidatures_path") %></p>
|
28
|
+
<% end %>
|
29
|
+
</div>
|
30
|
+
<% end %>
|
31
|
+
</div>
|
@@ -0,0 +1,29 @@
|
|
1
|
+
<div class="tabs">
|
2
|
+
<ul>
|
3
|
+
<% @stories.keys.each do |state| %>
|
4
|
+
<li>
|
5
|
+
<a href="#<%= state %>_stories">
|
6
|
+
<%= I18n.t("stories.show.states.#{state}") %>
|
7
|
+
<% if @stories[state].length == 5 %>
|
8
|
+
(<%= @stories[state].length %>+)
|
9
|
+
<% elsif @stories[state].length > 0 %>
|
10
|
+
(<%= @stories[state].length %>)
|
11
|
+
<% end %>
|
12
|
+
</a>
|
13
|
+
</li>
|
14
|
+
<% end %>
|
15
|
+
</ul>
|
16
|
+
<% @stories.keys.each do |state| %>
|
17
|
+
<div id="<%= state %>_stories">
|
18
|
+
<%= render partial: 'shared/collection/table', locals: {
|
19
|
+
type: 'stories', collection: @stories[state],
|
20
|
+
columns: ['project_id', 'name'],
|
21
|
+
options: {show_title: false, append_new_link: false }
|
22
|
+
} %>
|
23
|
+
|
24
|
+
<% if @stories[state].length == 5 %>
|
25
|
+
<p><%= link_to t('general.more'), eval("#{state}_workflow_stories_path") %></p>
|
26
|
+
<% end %>
|
27
|
+
</div>
|
28
|
+
<% end %>
|
29
|
+
</div>
|
@@ -0,0 +1,34 @@
|
|
1
|
+
<div class="tabs">
|
2
|
+
<ul>
|
3
|
+
<% @tasks.keys.each do |state| %>
|
4
|
+
<li>
|
5
|
+
<a href="#<%= state %>_tasks">
|
6
|
+
<%= I18n.t("tasks.show.states.#{state}") %>
|
7
|
+
<% if @tasks[state].length == 5 %>
|
8
|
+
(<%= @tasks[state].length %>+)
|
9
|
+
<% elsif @tasks[state].length > 0 %>
|
10
|
+
(<%= @tasks[state].length %>)
|
11
|
+
<% end %>
|
12
|
+
</a>
|
13
|
+
</li>
|
14
|
+
<% end %>
|
15
|
+
</ul>
|
16
|
+
<% @tasks.keys.each do |state| %>
|
17
|
+
<div id="<%= state %>_tasks">
|
18
|
+
<%= render 'shared/collection/table', {
|
19
|
+
type: 'tasks', collection: @tasks[state],
|
20
|
+
columns: {
|
21
|
+
'name' => Proc.new{|resource| link_to(resource.name, edit_task_workflow_project_owner_index_path(resource)) },
|
22
|
+
'story_id' => nil, 'user_id' => nil
|
23
|
+
},
|
24
|
+
options: {
|
25
|
+
show_title: false, append_new_link: false, show_actions: false
|
26
|
+
}
|
27
|
+
} %>
|
28
|
+
|
29
|
+
<% if @tasks[state].length == 5 %>
|
30
|
+
<p><%= link_to t('general.more'), eval("#{state}_workflow_tasks_path") %></p>
|
31
|
+
<% end %>
|
32
|
+
</div>
|
33
|
+
<% end %>
|
34
|
+
</div>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<div class="tabs">
|
2
|
+
<ul>
|
3
|
+
<% Vacancy::STATES.each do |state| %>
|
4
|
+
<li>
|
5
|
+
<a href="#<%= state %>_vacancies">
|
6
|
+
<%= I18n.t("vacancies.show.states.#{state}") %>
|
7
|
+
<% if @vacancies[state].length == 5 %>
|
8
|
+
(<%= @vacancies[state].length %>+)
|
9
|
+
<% elsif @vacancies[state].length > 0 %>
|
10
|
+
(<%= @vacancies[state].length %>)
|
11
|
+
<% end %>
|
12
|
+
</a>
|
13
|
+
</li>
|
14
|
+
<% end %>
|
15
|
+
</ul>
|
16
|
+
<% Vacancy::STATES.each do |state| %>
|
17
|
+
<div id="<%= state %>_vacancies">
|
18
|
+
<%= render partial: 'shared/collection/table', locals: {
|
19
|
+
type: 'vacancies', collection: @vacancies[state], columns: ['name', 'project_id'],
|
20
|
+
options: {show_title: false, append_new_link: false }
|
21
|
+
} %>
|
22
|
+
<% if @vacancies[state].length == 5 %>
|
23
|
+
<p><%= link_to t('general.more'), eval("#{state}_workflow_vacancies_path") if @vacancies[state].length > 0 %></p>
|
24
|
+
<% end %>
|
25
|
+
</div>
|
26
|
+
<% end %>
|
27
|
+
</div>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<div class="container-fluid">
|
2
|
+
<div class="row-fluid">
|
3
|
+
<div class="tabs">
|
4
|
+
<ul>
|
5
|
+
<li><a href="#stories"><%= I18n.t('stories.index.title') %></a></li>
|
6
|
+
<li><a href="#tasks"><%= I18n.t('workflow.project_owner.index.tasks') %></a></li>
|
7
|
+
<li><a href="#candidatures"><%= I18n.t('candidatures.index.title') %></a></li>
|
8
|
+
<li><a href="#vacancies"><%= I18n.t('vacancies.index.title') %></a></li>
|
9
|
+
</ul>
|
10
|
+
<div id="stories">
|
11
|
+
<%= render 'stories' %>
|
12
|
+
</div>
|
13
|
+
<div id="tasks">
|
14
|
+
<%= render 'tasks' %>
|
15
|
+
</div>
|
16
|
+
<div id="candidatures">
|
17
|
+
<%= render 'candidatures' %>
|
18
|
+
</div>
|
19
|
+
<div id="vacancies">
|
20
|
+
<%= render 'vacancies' %>
|
21
|
+
</div>
|
22
|
+
</div>
|
23
|
+
</div>
|
24
|
+
</div>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<%= render 'shared/form/error_messages', resource: resource %>
|
2
|
+
<div class="form-inputs">
|
3
|
+
<%= render 'shared/form/error_messages', resource: @result %>
|
4
|
+
<fieldset>
|
5
|
+
<input type="hidden" name="task[result_attributes][task_id]" id="task_result_attributes_task_id" value="<%= resource.id %>"/>
|
6
|
+
<%= text_area_tag 'task[result_attributes][text]', @result.text, style: 'width: 98%; height:200px;' %>
|
7
|
+
</fieldset>
|
8
|
+
</div>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<h3><%= resource.name %></h3>
|
2
|
+
|
3
|
+
<strong><%= t('activerecord.attributes.general.state') %>:</strong> <%= resource.state %>
|
4
|
+
|
5
|
+
<h4><%= t('tasks.show.story_text') %></h4>
|
6
|
+
|
7
|
+
<%= resource.story.text %>
|
8
|
+
|
9
|
+
<% if resource.text.present? %>
|
10
|
+
<h4><%= t('tasks.show.text') %></h4>
|
11
|
+
|
12
|
+
<%= resource.text %>
|
13
|
+
<% end %>
|
14
|
+
|
15
|
+
<h4><%= t('activerecord.models.result') %></h4>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<h3><%= I18n.t('tasks.index.title') %></h3>
|
2
|
+
|
3
|
+
<% columns = {
|
4
|
+
'name' => Proc.new{|resource| link_to(resource.name, edit_task_workflow_user_index_path(resource)) },
|
5
|
+
'state' => nil
|
6
|
+
} %>
|
7
|
+
|
8
|
+
<% if @tasks.none? || @tasks.select{|e| e.id.present? }.none? %>
|
9
|
+
<p><%= I18n.t("tasks.index.empty_collection")%></p>
|
10
|
+
<% else %>
|
11
|
+
<table class="table table-striped">
|
12
|
+
<thead>
|
13
|
+
<tr class="<%= cycle('odd', 'even') %>">
|
14
|
+
<% columns.keys.map{|c| c.gsub('_id', '')}.each do |column| %>
|
15
|
+
<th><%= t("activerecord.attributes.task.#{column}") %></th>
|
16
|
+
<% end %>
|
17
|
+
</tr>
|
18
|
+
</thead>
|
19
|
+
<tbody>
|
20
|
+
<% @tasks.select{|e| e.id.present? }.each do |resource| %>
|
21
|
+
<tr class="<%= cycle('odd', 'even') %>">
|
22
|
+
<% columns.keys.each do |column| %>
|
23
|
+
<td>
|
24
|
+
<%= table_cell column, resource, columns[column] %>
|
25
|
+
</td>
|
26
|
+
<% end %>
|
27
|
+
</tr>
|
28
|
+
<% end %>
|
29
|
+
</tbody>
|
30
|
+
</table>
|
31
|
+
<% end %>
|
File without changes
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<%= render 'workflow/tasks/work_head', resource: resource %>
|
2
|
+
|
3
|
+
<%= simple_form_for(resource, url: update_task_workflow_user_index_path(resource), html: {class: 'form-horizontal'}) do |f| %>
|
4
|
+
<%= render 'workflow/tasks/work_form', f: f, resource: resource %>
|
5
|
+
|
6
|
+
<div class="form-actions">
|
7
|
+
<%= f.button :submit %>
|
8
|
+
|
9
|
+
<%= f.button :submit, t('tasks.general.events.follow_up'), name: 'event[follow_up]' %>
|
10
|
+
</div>
|
11
|
+
<% end %>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<%= render 'workflow/tasks/work_head', resource: resource %>
|
2
|
+
|
3
|
+
<%= simple_form_for(resource, url: update_task_workflow_user_index_path(resource), html: {class: 'form-horizontal'}) do |f| %>
|
4
|
+
<%= render 'workflow/tasks/work_form', f: f, resource: resource %>
|
5
|
+
|
6
|
+
<div class="form-actions">
|
7
|
+
<%= f.button :submit %>
|
8
|
+
|
9
|
+
<%= f.button :submit, t('tasks.general.events.follow_up'), name: 'event[follow_up]' %>
|
10
|
+
|
11
|
+
<%= f.button :submit, t('tasks.general.events.complete'), name: 'event[complete]' %>
|
12
|
+
</div>
|
13
|
+
<% end %>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<%= render 'workflow/tasks/work_head', resource: resource %>
|
2
|
+
|
3
|
+
<%= simple_form_for(resource, url: update_task_workflow_user_index_path(resource), html: {class: 'form-horizontal'}) do |f| %>
|
4
|
+
<%= render 'workflow/tasks/work_form', f: f, resource: resource %>
|
5
|
+
|
6
|
+
<div class="form-actions">
|
7
|
+
<%= f.button :submit %>
|
8
|
+
|
9
|
+
<%= f.button :submit, t('workflow.user.general.steps.general.cancel'), name: 'event[cancel]' %>
|
10
|
+
|
11
|
+
<%= f.button :submit, t('workflow.user.general.steps.general.skip'), name: 'event[skip]' %>
|
12
|
+
|
13
|
+
<%= f.button :submit, t('users.general.events.review'), name: 'event[review]' %>
|
14
|
+
|
15
|
+
<%= f.button :submit, t('workflow.user.general.steps.general.next'), name: 'event[next]' %>
|
16
|
+
</div>
|
17
|
+
<% end %>
|
@@ -0,0 +1,30 @@
|
|
1
|
+
<% if collection.none? || collection.select{|e| e.id.present? }.none? %>
|
2
|
+
<p><%= I18n.t("tasks.index.empty_collection")%></p>
|
3
|
+
<% else %>
|
4
|
+
<table class="table table-striped">
|
5
|
+
<thead>
|
6
|
+
<tr class="<%= cycle('odd', 'even') %>">
|
7
|
+
<% columns.map{|c| c.gsub('_id', '')}.each do |column| %>
|
8
|
+
<th><%= t("activerecord.attributes.task.#{column}") %></th>
|
9
|
+
<% end %>
|
10
|
+
</tr>
|
11
|
+
</thead>
|
12
|
+
<tbody>
|
13
|
+
<% collection.select{|e| e.id.present? }.each do |resource| %>
|
14
|
+
<tr class="<%= cycle('odd', 'even') %>">
|
15
|
+
<% columns.each do |column| %>
|
16
|
+
<% if column == 'name'%>
|
17
|
+
<td>
|
18
|
+
<%= link_to resource.send(column), edit_task_workflow_user_index_path(resource) %>
|
19
|
+
</td>
|
20
|
+
<% else %>
|
21
|
+
<td>
|
22
|
+
<%= table_cell column, resource, columns.is_a?(Hash) ? columns[column] : nil %>
|
23
|
+
</td>
|
24
|
+
<% end %>
|
25
|
+
<% end %>
|
26
|
+
</tr>
|
27
|
+
<% end %>
|
28
|
+
</tbody>
|
29
|
+
</table>
|
30
|
+
<% end %>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<div class="container-fluid">
|
2
|
+
<div class="row-fluid">
|
3
|
+
<div class="span6">
|
4
|
+
<h3><%= I18n.t('workflow.index.assigned_tasks') %></h3>
|
5
|
+
|
6
|
+
<%= render 'tasks', collection: @assigned_tasks, columns: ['name', 'story_id'] %>
|
7
|
+
</div>
|
8
|
+
<div class="span6">
|
9
|
+
<h3><%= I18n.t('workflow.index.completed_tasks') %></h3>
|
10
|
+
|
11
|
+
<%= render 'tasks', collection: @completed_tasks, columns: ['name', 'story_id'] %>
|
12
|
+
</div>
|
13
|
+
</div>
|
14
|
+
</div>
|
@@ -0,0 +1,5 @@
|
|
1
|
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
2
|
+
# licensed under the Affero General Public License version 3 or later. See
|
3
|
+
# the COPYRIGHT file.
|
4
|
+
|
5
|
+
require Rails.root.join('app', 'models', 'app_config') if File.exists? Rails.root.join('app', 'models', 'app_config')
|
@@ -0,0 +1,193 @@
|
|
1
|
+
# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
2
|
+
# licensed under the Affero General Public License version 3 or later. See
|
3
|
+
# the COPYRIGHT file.
|
4
|
+
|
5
|
+
# Use this hook to configure devise mailer, warden hooks and so forth. The first
|
6
|
+
# four configuration values can also be set straight in your models.
|
7
|
+
|
8
|
+
class ActionController::Responder
|
9
|
+
def to_mobile
|
10
|
+
default_render
|
11
|
+
rescue ActionView::MissingTemplate => e
|
12
|
+
navigation_behavior(e)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
Devise.setup do |config|
|
17
|
+
# Configure the e-mail address which will be shown in DeviseMailer.
|
18
|
+
# ==> ORM configuration
|
19
|
+
# Load and configure the ORM. Supports :active_record (default), :mongoid
|
20
|
+
# (bson_ext recommended) and :data_mapper (experimental).
|
21
|
+
require 'devise/orm/active_record'
|
22
|
+
|
23
|
+
#mail setup
|
24
|
+
if defined?(AppConfig) && AppConfig[:smtp_sender_address]
|
25
|
+
config.mailer_sender = AppConfig[:smtp_sender_address]
|
26
|
+
else
|
27
|
+
config.mailer_sender = "please-change-me-at-config-initializers-devise@example.com"
|
28
|
+
end
|
29
|
+
|
30
|
+
# ==> Configuration for any authentication mechanism
|
31
|
+
# Configure which keys are used when authenticating an user. By default is
|
32
|
+
# just :email. You can configure it to use [:username, :subdomain], so for
|
33
|
+
# authenticating an user, both parameters are required. Remember that those
|
34
|
+
# parameters are used only when authenticating and not when retrieving from
|
35
|
+
# session. If you need permissions, you should implement that in a before filter.
|
36
|
+
config.authentication_keys = [:email]
|
37
|
+
|
38
|
+
# Configure which authentication keys should have whitespace stripped.
|
39
|
+
# These keys will have whitespace before and after removed upon creating or
|
40
|
+
# modifying a user and when used to authenticate or find a user. Default is :email.
|
41
|
+
config.strip_whitespace_keys = [ :email ]
|
42
|
+
|
43
|
+
# By default Devise will store the user in session. You can skip storage for
|
44
|
+
# :http_auth and :token_auth by adding those symbols to the array below.
|
45
|
+
# Notice that if you are skipping storage for all authentication paths, you
|
46
|
+
# may want to disable generating routes to Devise's sessions controller by
|
47
|
+
# passing :skip => :sessions to `devise_for` in your config/routes.rb
|
48
|
+
config.skip_session_storage = [:http_auth]
|
49
|
+
|
50
|
+
# Tell if authentication through request.params is enabled. True by default.
|
51
|
+
# config.params_authenticatable = true
|
52
|
+
|
53
|
+
# Tell if authentication through HTTP Basic Auth is enabled. True by default.
|
54
|
+
# config.http_authenticatable = true
|
55
|
+
|
56
|
+
# The realm used in Http Basic Authentication
|
57
|
+
# config.http_authentication_realm = "Application"
|
58
|
+
|
59
|
+
# ==> Configuration for :database_authenticatable
|
60
|
+
# For bcrypt, this is the cost for hashing the password and defaults to 10. If
|
61
|
+
# using other encryptors, it sets how many times you want the password re-encrypted.
|
62
|
+
config.stretches = Rails.env.test? ? 1 : 10
|
63
|
+
|
64
|
+
# If true, requires any email changes to be confirmed (exctly the same way as
|
65
|
+
# initial account confirmation) to be applied. Requires additional unconfirmed_email
|
66
|
+
# db field (see migrations). Until confirmed new email is stored in
|
67
|
+
# unconfirmed email column, and copied to email column on successful confirmation.
|
68
|
+
config.reconfirmable = true
|
69
|
+
|
70
|
+
# Define which will be the encryption algorithm. Devise also supports encryptors
|
71
|
+
# from others authentication tools as :clearance_sha1, :authlogic_sha512 (then
|
72
|
+
# you should set stretches above to 20 for default behavior) and :restful_authentication_sha1
|
73
|
+
# (then you should set stretches to 10, and copy REST_AUTH_SITE_KEY to pepper)
|
74
|
+
config.encryptor = :bcrypt
|
75
|
+
|
76
|
+
# Setup a pepper to generate the encrypted password.
|
77
|
+
config.pepper = "065eb8798b181ff0ea2c5c16aee0ff8b70e04e2ee6bd6e08b49da46924223e39127d5335e466207d42bf2a045c12be5f90e92012a4f05f7fc6d9f3c875f4c95b"
|
78
|
+
|
79
|
+
# ==> Configuration for :invitable
|
80
|
+
# Time interval where the invitation token is valid (default: 0).
|
81
|
+
# If invite_for is 0 or nil, the invitation will never expire.
|
82
|
+
# config.invite_for = 2.weeks
|
83
|
+
|
84
|
+
# ==> Configuration for :confirmable
|
85
|
+
# The time you want to give your user to confirm his account. During this time
|
86
|
+
# he will be able to access your application without confirming. Default is nil.
|
87
|
+
# When confirm_within is zero, the user won't be able to sign in without confirming.
|
88
|
+
# You can use this to let your user access some features of your application
|
89
|
+
# without confirming the account, but blocking it after a certain period
|
90
|
+
# (ie 2 days).
|
91
|
+
# config.confirm_within = 2.days
|
92
|
+
|
93
|
+
# ==> Configuration for :rememberable
|
94
|
+
# The time the user will be remembered without asking for credentials again.
|
95
|
+
# config.remember_for = 2.weeks
|
96
|
+
|
97
|
+
# ==> Configuration for :validatable
|
98
|
+
# Range for password length
|
99
|
+
# config.password_length = 6..20
|
100
|
+
|
101
|
+
# Regex to use to validate the email address
|
102
|
+
# config.email_regexp = /^([\w\.%\+\-]+)@([\w\-]+\.)+([\w]{2,})$/i
|
103
|
+
|
104
|
+
# ==> Configuration for :timeoutable
|
105
|
+
# The time you want to timeout the user session without activity. After this
|
106
|
+
# time the user will be asked for credentials again.
|
107
|
+
config.timeout_in = 1.day
|
108
|
+
|
109
|
+
# ==> Configuration for :lockable
|
110
|
+
# Defines which strategy will be used to lock an account.
|
111
|
+
# :failed_attempts = Locks an account after a number of failed attempts to sign in.
|
112
|
+
# :none = No lock strategy. You should handle locking by yourself.
|
113
|
+
# config.lock_strategy = :failed_attempts
|
114
|
+
|
115
|
+
# Defines which strategy will be used to unlock an account.
|
116
|
+
# :email = Sends an unlock link to the user email
|
117
|
+
# :time = Re-enables login after a certain amount of time (see :unlock_in below)
|
118
|
+
# :both = Enables both strategies
|
119
|
+
# :none = No unlock strategy. You should handle unlocking by yourself.
|
120
|
+
# config.unlock_strategy = :both
|
121
|
+
|
122
|
+
# Number of authentication tries before locking an account if lock_strategy
|
123
|
+
# is failed attempts.
|
124
|
+
# config.maximum_attempts = 20
|
125
|
+
|
126
|
+
# Time interval to unlock the account if :time is enabled as unlock_strategy.
|
127
|
+
# config.unlock_in = 1.hour
|
128
|
+
|
129
|
+
# ==> Configuration for :recoverable
|
130
|
+
#
|
131
|
+
# Defines which key will be used when recovering the password for an account
|
132
|
+
# config.reset_password_keys = [ :email ]
|
133
|
+
|
134
|
+
# Time interval you can reset your password with a reset password key.
|
135
|
+
# Don't put a too small interval or your users won't have the time to
|
136
|
+
# change their passwords.
|
137
|
+
config.reset_password_within = 6.hours
|
138
|
+
|
139
|
+
# ==> Configuration for :token_authenticatable
|
140
|
+
# Defines name of the authentication token params key
|
141
|
+
config.token_authentication_key = :auth_token
|
142
|
+
|
143
|
+
# TODO: works at least for diaspora repository
|
144
|
+
#config.stateless_token = true
|
145
|
+
|
146
|
+
# ==> Scopes configuration
|
147
|
+
# Turn scoped views on. Before rendering "sessions/new", it will first check for
|
148
|
+
# "sessions/users/new". It's turned off by default because it's slower if you
|
149
|
+
# are using only default views.
|
150
|
+
# config.scoped_views = true
|
151
|
+
|
152
|
+
# By default, devise detects the role accessed based on the url. So whenever
|
153
|
+
# accessing "/users/sign_in", it knows you are accessing an User. This makes
|
154
|
+
# routes as "/sign_in" not possible, unless you tell Devise to use the default
|
155
|
+
# scope, setting true below.
|
156
|
+
# Note that devise does not generate default routes. You also have to
|
157
|
+
# specify them in config/routes.rb
|
158
|
+
|
159
|
+
# Configure the default scope used by Devise. By default it's the first devise
|
160
|
+
# role declared in your routes.
|
161
|
+
config.default_scope = :user
|
162
|
+
|
163
|
+
# The default HTTP method used to sign out a resource. Default is :delete.
|
164
|
+
config.sign_out_via = :delete
|
165
|
+
|
166
|
+
# ==> Navigation configuration
|
167
|
+
# Lists the formats that should be treated as navigational. Formats like
|
168
|
+
# :html, should redirect to the sign in page when the user does not have
|
169
|
+
# access, but formats like :xml or :json, should return 401.
|
170
|
+
# If you have any extra navigational formats, like :iphone or :mobile, you
|
171
|
+
# should add them to the navigational formats lists. Default is [:html]
|
172
|
+
# config.navigational_formats = [:html, :iphone]
|
173
|
+
config.navigational_formats = [:"*/*", "*/*", :html, :mobile]
|
174
|
+
|
175
|
+
# Looks up user emails ignoring case
|
176
|
+
# for forgot password, sign up, sign in, etc
|
177
|
+
config.case_insensitive_keys = [:email]
|
178
|
+
|
179
|
+
# ==> Warden configuration
|
180
|
+
# If you want to use other strategies, that are not (yet) supported by Devise,
|
181
|
+
# you can configure them inside the config.warden block. The example below
|
182
|
+
# allows you to setup OAuth, using http://github.com/roman/warden_oauth
|
183
|
+
#
|
184
|
+
# config.warden do |manager|
|
185
|
+
# manager.oauth(:twitter) do |twitter|
|
186
|
+
# twitter.consumer_secret = <YOUR CONSUMER SECRET>
|
187
|
+
# twitter.consumer_key = <YOUR CONSUMER KEY>
|
188
|
+
# twitter.options :site => 'http://twitter.com'
|
189
|
+
# end
|
190
|
+
# manager.default_strategies(:scope => :user).unshift :twitter_oauth
|
191
|
+
# end
|
192
|
+
end
|
193
|
+
|