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,59 @@
|
|
1
|
+
require "bundler/capistrano"
|
2
|
+
|
3
|
+
server "83.133.105.18", :web, :app, :db, primary: true
|
4
|
+
|
5
|
+
set :application, "volontariat"
|
6
|
+
set :user, "deployer"
|
7
|
+
set :deploy_to, "/home/#{user}/apps/#{application}"
|
8
|
+
set :deploy_via, :remote_cache
|
9
|
+
set :use_sudo, false
|
10
|
+
|
11
|
+
set :scm, "git"
|
12
|
+
set :repository, "git@github.com:Applicat/#{application}.git"
|
13
|
+
set :branch, "master"
|
14
|
+
set :rake, "#{rake} --trace"
|
15
|
+
|
16
|
+
default_run_options[:pty] = true
|
17
|
+
ssh_options[:forward_agent] = true
|
18
|
+
|
19
|
+
after "deploy", "deploy:cleanup" # keep only the last 5 releases
|
20
|
+
|
21
|
+
namespace :deploy do
|
22
|
+
%w[start stop restart].each do |command|
|
23
|
+
desc "#{command} unicorn server"
|
24
|
+
task command, roles: :app, except: {no_release: true} do
|
25
|
+
run "/etc/init.d/unicorn_#{application} #{command}"
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
task :setup_config, roles: :app do
|
30
|
+
sudo "ln -nfs #{current_path}/config/nginx.conf /etc/nginx/sites-enabled/#{application}"
|
31
|
+
sudo "ln -nfs #{current_path}/config/unicorn_init.sh /etc/init.d/unicorn_#{application}"
|
32
|
+
run "mkdir -p #{shared_path}/config"
|
33
|
+
put File.read("config/database.example.yml"), "#{shared_path}/config/database.yml"
|
34
|
+
put File.read("config/email.example.yml"), "#{shared_path}/config/email.yml"
|
35
|
+
put File.read("config/initializers/recaptcha.example"), "#{shared_path}/config/initializers/recaptcha.rb"
|
36
|
+
puts "Now edit the config files in #{shared_path}."
|
37
|
+
end
|
38
|
+
after "deploy:setup", "deploy:setup_config"
|
39
|
+
|
40
|
+
task :symlink_config, roles: :app do
|
41
|
+
run "ln -nfs #{shared_path}/config/database.yml #{release_path}/config/database.yml"
|
42
|
+
run "ln -nfs #{shared_path}/config/email.yml #{release_path}/config/email.yml"
|
43
|
+
run "ln -nfs #{shared_path}/config/initializers/recaptcha.rb #{release_path}/config/initializers/recaptcha.rb"
|
44
|
+
end
|
45
|
+
after "deploy:finalize_update", "deploy:symlink_config"
|
46
|
+
|
47
|
+
desc "Make sure local git is in sync with remote."
|
48
|
+
task :check_revision, roles: :web do
|
49
|
+
unless `git rev-parse HEAD` == `git rev-parse origin/master`
|
50
|
+
puts "WARNING: HEAD is not the same as origin/master"
|
51
|
+
puts "Run `git push` to sync changes."
|
52
|
+
exit
|
53
|
+
end
|
54
|
+
end
|
55
|
+
before "deploy", "deploy:check_revision"
|
56
|
+
end
|
57
|
+
|
58
|
+
require './config/boot'
|
59
|
+
require 'airbrake/capistrano'
|
@@ -0,0 +1,121 @@
|
|
1
|
+
default: "en"
|
2
|
+
|
3
|
+
available:
|
4
|
+
en: "English"
|
5
|
+
|
6
|
+
other:
|
7
|
+
ar: "العربية"
|
8
|
+
art-nvi: "Na'vi"
|
9
|
+
bg: "български език"
|
10
|
+
br: "Brezhoneg"
|
11
|
+
ca: "Català"
|
12
|
+
cs: "Čeština"
|
13
|
+
cy: "Cymraeg"
|
14
|
+
da: "Dansk"
|
15
|
+
de: "Deutsch"
|
16
|
+
de_formal: "Deutsch (Sie)"
|
17
|
+
el: "Ελληνικά"
|
18
|
+
en_1337: "3n6l15h (English 1337)"
|
19
|
+
en_pirate: "English (Pirate)"
|
20
|
+
en_shaw: "𐑦𐑙𐑤𐑦𐑖"
|
21
|
+
eo: "Esperanto"
|
22
|
+
es: "Castellano"
|
23
|
+
es-AR: "Castellano - Argentina"
|
24
|
+
es-CL: "Castellano - Chile"
|
25
|
+
es-VE: "Castellano - Venezuela"
|
26
|
+
es-MX: "Español, México"
|
27
|
+
et: "Eesti"
|
28
|
+
eu: "Euskara"
|
29
|
+
fi: "Suomi"
|
30
|
+
fil: "Filipino"
|
31
|
+
fr: "Français"
|
32
|
+
ga: "Gaeilge"
|
33
|
+
gl: "Galego"
|
34
|
+
he: "עברית"
|
35
|
+
hu: "magyar nyelv"
|
36
|
+
ia: "Interlingua"
|
37
|
+
id: "Bahasa Indonesia"
|
38
|
+
is: "íslenska"
|
39
|
+
it: "Italiano"
|
40
|
+
ja: "日本語"
|
41
|
+
ka: "ქართული"
|
42
|
+
ko: "한국어"
|
43
|
+
lt: "Lietuviškai"
|
44
|
+
mk: "македонски"
|
45
|
+
ml: "മലയാളം"
|
46
|
+
ms: "بهاس ملايو"
|
47
|
+
nb: "Norske"
|
48
|
+
nl: "Nederlands"
|
49
|
+
nn: "Nynorsk"
|
50
|
+
pa: "ਪੰਜਾਬੀ"
|
51
|
+
pl: "polski"
|
52
|
+
pt-PT: "Português (Portugal)"
|
53
|
+
pt-BR: "Português (Brasil)"
|
54
|
+
ro: "Română"
|
55
|
+
ru: "Русский"
|
56
|
+
si: "සිංහල"
|
57
|
+
sk: "Slovenčina"
|
58
|
+
sl: "Slovenščina"
|
59
|
+
sq: "gjuha shqipe"
|
60
|
+
sr: "српски језик"
|
61
|
+
sv: "Svenska"
|
62
|
+
te: "తెలుగు"
|
63
|
+
tr: "Türk"
|
64
|
+
uk: "украї́нська мо́ва"
|
65
|
+
ur-PK: "اُردو (پاکستان)"
|
66
|
+
vi: "Tiếng Việt"
|
67
|
+
zh-CN: "中文"
|
68
|
+
zh-TW: "台灣中文"
|
69
|
+
|
70
|
+
|
71
|
+
fallbacks:
|
72
|
+
en-GB:
|
73
|
+
- "en"
|
74
|
+
en-US:
|
75
|
+
- "en"
|
76
|
+
en_shaw:
|
77
|
+
- "en"
|
78
|
+
- "en-GB"
|
79
|
+
- "en-US"
|
80
|
+
en_pirate:
|
81
|
+
- "en"
|
82
|
+
- "en-GB"
|
83
|
+
- "en-US"
|
84
|
+
en_1337:
|
85
|
+
- "en"
|
86
|
+
- "en-GB"
|
87
|
+
- "en-US"
|
88
|
+
sv:
|
89
|
+
- "sv-SE"
|
90
|
+
he:
|
91
|
+
- "he-IL"
|
92
|
+
es-AR:
|
93
|
+
- "es"
|
94
|
+
es-CL:
|
95
|
+
- "es"
|
96
|
+
es-MX:
|
97
|
+
- "es"
|
98
|
+
es-VE:
|
99
|
+
- "es"
|
100
|
+
gl:
|
101
|
+
- "gl-ES"
|
102
|
+
zh:
|
103
|
+
- "zh-CN"
|
104
|
+
- "zh-TW"
|
105
|
+
ur-PK:
|
106
|
+
- "ur"
|
107
|
+
de_formal:
|
108
|
+
- "de"
|
109
|
+
art_nvi:
|
110
|
+
- "art-nvi"
|
111
|
+
pt-BR:
|
112
|
+
- "pt"
|
113
|
+
pt-PT:
|
114
|
+
- "pt"
|
115
|
+
|
116
|
+
rtl:
|
117
|
+
- "ar"
|
118
|
+
- "he"
|
119
|
+
- "ur"
|
120
|
+
- "ur-PK"
|
121
|
+
- "ms"
|
@@ -0,0 +1,262 @@
|
|
1
|
+
SimpleNavigation::Configuration.run do |navigation|
|
2
|
+
navigation.items do |primary|
|
3
|
+
primary.dom_class = 'nav'
|
4
|
+
primary.item :root, t('general.index.title'), root_path
|
5
|
+
|
6
|
+
primary.item :areas, t('areas.index.title'), areas_path do |areas|
|
7
|
+
areas.item :new, t('general.new'), new_area_path
|
8
|
+
|
9
|
+
unless (@area.new_record? rescue true)
|
10
|
+
areas.item :show, @area.name, area_path(@area) do |area|
|
11
|
+
if can? :destroy, @area
|
12
|
+
area.item :destroy, t('general.destroy'), area_path(@area), method: :delete, confirm: t('general.questions.are_you_sure')
|
13
|
+
end
|
14
|
+
|
15
|
+
area.item :show, t('general.details'), "#{area_path(@area)}#top"
|
16
|
+
area.item :edit, t('general.edit'), edit_area_path(@area) if can? :edit, @area
|
17
|
+
area.item :users, t('users.index.title'), area_users_path(@area)
|
18
|
+
area.item :projects, t('projects.index.title'), area_projects_path(@area)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
primary.item :products, t('products.index.title'), products_path do |products|
|
24
|
+
products.item :new, t('general.new'), new_product_path
|
25
|
+
|
26
|
+
unless (@product.new_record? rescue true)
|
27
|
+
products.item :show, @product.name, product_path(@product) do |product|
|
28
|
+
if can? :edit, @product
|
29
|
+
product.item :destroy, t('general.destroy'), product_path(@product), method: :delete, confirm: t('general.questions.are_you_sure')
|
30
|
+
end
|
31
|
+
|
32
|
+
product.item :show, t('general.details'), "#{product_path(@product)}#top"
|
33
|
+
product.item :edit, t('general.edit'), edit_product_path(@product) if can? :edit, @product
|
34
|
+
|
35
|
+
product.item :projects, t('projects.index.title'), product_projects_path(@product)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
primary.item :projects, t('projects.index.title'), projects_path do |projects|
|
41
|
+
projects.item :new, t('general.new'), new_project_path
|
42
|
+
|
43
|
+
unless (@project.new_record? rescue true)
|
44
|
+
projects.item :show, @project.name, project_path(@project) do |project|
|
45
|
+
if can? :destroy, @project
|
46
|
+
project.item :destroy, t('general.destroy'), project_path(@project), method: :delete, confirm: t('general.questions.are_you_sure')
|
47
|
+
end
|
48
|
+
|
49
|
+
project.item :show, t('general.details'), "#{project_path(@project)}#top"
|
50
|
+
project.item :edit, t('general.edit'), edit_project_path(@project) if can? :edit, @project
|
51
|
+
|
52
|
+
project.item :users, t('users.index.title'), project_users_path(@project)
|
53
|
+
|
54
|
+
project.item :vacancies, t('vacancies.index.title'), project_vacancies_path(@project) do |vacancy|
|
55
|
+
vacancy.item :new, t('general.new'), new_project_vacancy_path(@project)
|
56
|
+
end
|
57
|
+
|
58
|
+
project.item :stories, t('stories.index.title'), project_stories_path(@project) do |stories|
|
59
|
+
stories.item :new, t('general.new'), new_project_story_path(@project)
|
60
|
+
|
61
|
+
unless (@story.new_record? rescue true)
|
62
|
+
stories.item(:show, @story.name, story_path(@story)) do |story|
|
63
|
+
if can? :destroy, @story
|
64
|
+
story.item :destroy, t('general.destroy'), story_path(@story), method: :delete, confirm: t('general.questions.are_you_sure')
|
65
|
+
end
|
66
|
+
|
67
|
+
story.item :show, t('general.details'), "#{story_path(@story)}#top"
|
68
|
+
story.item :edit, t('general.edit'), edit_story_path(@story) if can? :edit, @story
|
69
|
+
|
70
|
+
story.item :steps, t('general.steps'), setup_tasks_story_path(@story) do |steps|
|
71
|
+
steps.item :setup_tasks, t('stories.steps.setup_tasks.title'), setup_tasks_story_path(@story)
|
72
|
+
steps.item :activate, t('general.events.activate'), activate_story_path(@story)
|
73
|
+
end
|
74
|
+
|
75
|
+
story.item :tasks, t('tasks.index.title'), story_tasks_path(@story) do |tasks|
|
76
|
+
tasks.item :new, t('general.new'), new_story_task_path(@story)
|
77
|
+
|
78
|
+
unless (@task.new_record? rescue true)
|
79
|
+
tasks.item(:show, @task.name, task_path(@task)) do |task|
|
80
|
+
if can? :destroy, @task
|
81
|
+
task.item :destroy, t('general.destroy'), task_path(@task), method: :delete, confirm: t('general.questions.are_you_sure')
|
82
|
+
end
|
83
|
+
|
84
|
+
task.item :show, t('general.details'), "#{task_path(@task)}#top"
|
85
|
+
task.item :edit, t('general.edit'), edit_task_path(@task) if can? :edit, @task
|
86
|
+
|
87
|
+
task.item :results, t('results.index.title'), task_results_path(@task) do |results|
|
88
|
+
results.item :new, t('general.new'), new_task_result_path(@task)
|
89
|
+
|
90
|
+
unless (@result.new_record? rescue true)
|
91
|
+
results.item(:show, @result.name, result_path(@result)) do |result|
|
92
|
+
if can? :destroy, @result
|
93
|
+
result.item :destroy, t('general.destroy'), result_path(@result), method: :delete, confirm: t('general.questions.are_you_sure')
|
94
|
+
end
|
95
|
+
|
96
|
+
result.item :show, t('general.details'), "#{result_path(@result)}#top"
|
97
|
+
result.item :edit, t('general.edit'), edit_result_path(@result) if can? :edit, @result
|
98
|
+
|
99
|
+
result.item :comments, t('comments.index.title'), "#{story_path(@story)}#comments" do |comments|
|
100
|
+
comments.item(:new, t('general.new'), new_story_comment_path(@story)) if @comment
|
101
|
+
|
102
|
+
if can? :edit, @comment
|
103
|
+
comments.item(:edit, t('general.edit'), edit_comment_path(@comment)) if @comment.try(:id)
|
104
|
+
end
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
110
|
+
task.item :comments, t('comments.index.title'), "#{story_path(@story)}#comments" do |comments|
|
111
|
+
comments.item(:new, t('general.new'), new_story_comment_path(@story)) if @comment
|
112
|
+
|
113
|
+
if @comment.try(:id) && can?(:edit, @comment)
|
114
|
+
comments.item(:edit, t('general.edit'), edit_comment_path(@comment))
|
115
|
+
end
|
116
|
+
end
|
117
|
+
end
|
118
|
+
end
|
119
|
+
end
|
120
|
+
|
121
|
+
story.item :comments, t('comments.index.title'), "#{story_path(@story)}#comments" do |comments|
|
122
|
+
comments.item(:new, t('general.new'), new_story_comment_path(@story)) if @comment
|
123
|
+
|
124
|
+
if @comment.try(:id) && can?(:edit, @comment)
|
125
|
+
comments.item(:edit, t('general.edit'), edit_comment_path(@comment))
|
126
|
+
end
|
127
|
+
end
|
128
|
+
end
|
129
|
+
end
|
130
|
+
end
|
131
|
+
|
132
|
+
project.item :comments, t('comments.index.title'), "#{project_path(@project)}#comments" do |comments|
|
133
|
+
comments.item(:new, t('general.new'), new_project_comment_path(@project)) if @comment
|
134
|
+
|
135
|
+
if @comment.try(:id) && can?(:edit, @comment)
|
136
|
+
comments.item(:edit, t('general.edit'), edit_comment_path(@comment))
|
137
|
+
end
|
138
|
+
end
|
139
|
+
end
|
140
|
+
end
|
141
|
+
end
|
142
|
+
|
143
|
+
primary.item :vacancies, t('vacancies.index.title'), vacancies_path do |vacancies|
|
144
|
+
vacancies.item :new, t('general.new'), new_vacancy_path
|
145
|
+
|
146
|
+
unless (@vacancy.new_record? rescue true)
|
147
|
+
vacancies.item :show, "#{@vacancy.name} @ #{@vacancy.project.name}", vacancy_path(@vacancy) do |vacancy|
|
148
|
+
|
149
|
+
if can? :destroy, @vacancy
|
150
|
+
vacancy.item :destroy, t('general.destroy'), vacancy_path(@vacancy), method: :delete, confirm: t('general.questions.are_you_sure')
|
151
|
+
end
|
152
|
+
|
153
|
+
vacancy.item :show, t('general.details'), "#{vacancy_path(@vacancy)}#top"
|
154
|
+
vacancy.item :edit, t('general.edit'), edit_vacancy_path(@vacancy) if can? :edit, @vacancy
|
155
|
+
|
156
|
+
vacancy.item :candidatures, t('candidatures.index.title'), vacancy_candidatures_path(@vacancy) do |candidatures|
|
157
|
+
candidatures.item :new, t('general.new'), new_vacancy_candidature_path(@vacancy)
|
158
|
+
|
159
|
+
unless (@candidature.new_record? rescue true)
|
160
|
+
candidatures.item(
|
161
|
+
:show, t('activerecord.models.candidature') + " of #{@candidature.user.name} @ #{@candidature.vacancy.project.name}",
|
162
|
+
candidature_path(@candidature)
|
163
|
+
) do |candidature|
|
164
|
+
if can? :destroy, @candidature
|
165
|
+
candidature.item :destroy, t('general.destroy'), candidature_path(@candidature), method: :delete, confirm: t('general.questions.are_you_sure')
|
166
|
+
end
|
167
|
+
|
168
|
+
candidature.item :show, t('general.details'), "#{candidature_path(@candidature)}#top"
|
169
|
+
candidature.item :edit, t('general.edit'), edit_candidature_path(@candidature) if can? :edit, @candidature
|
170
|
+
|
171
|
+
candidature.item :comments, t('comments.index.title'), "#{candidature_path(@candidature)}#comments" do |comments|
|
172
|
+
comments.item(:new, t('general.new'), new_candidature_comment_path(@candidature)) if @comment
|
173
|
+
|
174
|
+
if @comment.try(:id) && can?(:edit, @comment)
|
175
|
+
comments.item(:edit, t('general.edit'), edit_comment_path(@comment))
|
176
|
+
end
|
177
|
+
end
|
178
|
+
end
|
179
|
+
end
|
180
|
+
end
|
181
|
+
|
182
|
+
vacancy.item :comments, t('comments.index.title'), "#{vacancy_path(@vacancy)}#comments" do |comments|
|
183
|
+
comments.item(:new, t('general.new'), new_vacancy_comment_path(@vacancy)) if @comment && !@candidature
|
184
|
+
|
185
|
+
if @comment.try(:id) && can?(:edit, @comment)
|
186
|
+
comments.item(:edit, t('general.edit'), edit_comment_path(@comment))
|
187
|
+
end
|
188
|
+
end
|
189
|
+
end
|
190
|
+
end
|
191
|
+
end
|
192
|
+
|
193
|
+
primary.item :users, t('users.index.title'), users_path do |users|
|
194
|
+
unless (@user.new_record? rescue true) || current_user.try(:id) == @user.id
|
195
|
+
users.item :show, t('general.details'), "#{user_path(@user)}#top"
|
196
|
+
|
197
|
+
users.item :projects, t('projects.index.title'), user_projects_path(@user)
|
198
|
+
users.item :candidatures, t('candidatures.index.title'), user_candidatures_path(@user)
|
199
|
+
end
|
200
|
+
end
|
201
|
+
|
202
|
+
if user_signed_in?
|
203
|
+
primary.item :workflow, t('workflow.index.title'), workflow_path do |workflow|
|
204
|
+
workflow.item :project_owner, t('workflow.project_owner.index.title'), workflow_project_owner_index_path do |project_owner|
|
205
|
+
project_owner.item :vacancies, t('vacancies.index.title'), open_workflow_vacancies_path do |vacancies|
|
206
|
+
Vacancy::STATES.each do |state|
|
207
|
+
vacancies.item state, t("vacancies.show.states.#{state}"), eval("#{state}_workflow_vacancies_path")
|
208
|
+
end
|
209
|
+
end
|
210
|
+
|
211
|
+
project_owner.item :candidatures, t('candidatures.index.title'), new_workflow_candidatures_path do |candidatures|
|
212
|
+
Candidature::STATES.each do |state|
|
213
|
+
candidatures.item state, t("candidatures.show.states.#{state}"), eval("#{state}_workflow_candidatures_path")
|
214
|
+
end
|
215
|
+
end
|
216
|
+
end
|
217
|
+
|
218
|
+
workflow.item :user, t('workflow.user.index.title'), workflow_user_index_path do |user|
|
219
|
+
{
|
220
|
+
'no-name' => t('workflow.user.products.no_name.title')
|
221
|
+
}.each do |slug, text|
|
222
|
+
user.item slug.gsub('-', '_').to_sym, text, product_workflow_user_index_path(slug) do |product|
|
223
|
+
product_slug = @story ? (@story.product.try(:to_param) || 'no-name') : 'no-name'
|
224
|
+
|
225
|
+
unless (@story.new_record? rescue true) || product_slug != slug
|
226
|
+
product.item(:show, @story.name, story_path(@story)) do |story|
|
227
|
+
story.item :show, t('general.details'), "#{story_path(@story)}#top"
|
228
|
+
|
229
|
+
story.item :tasks, t('tasks.index.title'), tasks_workflow_user_index_path(@story) do |tasks|
|
230
|
+
unless (@task.new_record? rescue true)
|
231
|
+
tasks.item(:edit, @task.name, edit_task_workflow_user_index_path(@task))
|
232
|
+
end
|
233
|
+
end
|
234
|
+
end
|
235
|
+
end
|
236
|
+
|
237
|
+
product.item :next_task, t('workflow.user.tasks.next.title'), next_task_workflow_user_index_path('text-creation')
|
238
|
+
end
|
239
|
+
end
|
240
|
+
end
|
241
|
+
end
|
242
|
+
|
243
|
+
primary.item :profile, t('users.show.title'), user_path(current_user) do |profile|
|
244
|
+
profile.item :show, t('users.show.title'), user_path(current_user) do |user|
|
245
|
+
user.item :show, t('users.show.title'), "#{user_path(current_user)}#top"
|
246
|
+
user.item :settings, t('users.edit.title'), edit_user_path(current_user)
|
247
|
+
user.item :preferences, t('users.preferences.title'), preferences_user_path(current_user)
|
248
|
+
user.item :projects, t('projects.index.title'), user_projects_path(current_user)
|
249
|
+
user.item :candidatures, t('candidatures.index.title'), user_candidatures_path(current_user)
|
250
|
+
end
|
251
|
+
end
|
252
|
+
|
253
|
+
primary.item :sign_out, t('authentication.sign_out'), destroy_user_session_path, method: :delete
|
254
|
+
else
|
255
|
+
primary.item :authentication, t('authentication.title'), new_user_session_path do |authentication|
|
256
|
+
authentication.item :sign_in, t('authentication.sign_in'), new_user_session_path
|
257
|
+
#authentication.item :rpx_sign_in, t('authentication.rpx_sign_in'), 'a' # link_to_rpx
|
258
|
+
authentication.item :sign_up, t('authentication.sign_up'), new_user_registration_path
|
259
|
+
end
|
260
|
+
end
|
261
|
+
end
|
262
|
+
end
|