voluntary 0.1.0.rc4 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/MIT-LICENSE +0 -0
- data/README.rdoc +0 -0
- data/Rakefile +0 -0
- data/app/assets/images/voluntary/spinner.gif +0 -0
- data/app/assets/javascripts/voluntary/application.js +0 -0
- data/app/assets/javascripts/voluntary/base.js.coffee +0 -0
- data/app/assets/javascripts/voluntary/functions.js +0 -0
- data/app/assets/javascripts/voluntary/users.js.coffee +0 -0
- data/app/assets/stylesheets/voluntary/application.css +0 -0
- data/app/assets/stylesheets/voluntary/base.css.sass +0 -0
- data/app/assets/stylesheets/voluntary/bootstrap_and_overrides.css.sass +0 -0
- data/app/controllers/areas_controller.rb +0 -0
- data/app/controllers/candidatures_controller.rb +0 -0
- data/app/controllers/comments_controller.rb +0 -0
- data/app/controllers/devise_extensions/registrations_controller.rb +0 -0
- data/app/controllers/home_controller.rb +0 -0
- data/app/controllers/pages_controller.rb +0 -0
- data/app/controllers/products_controller.rb +0 -0
- data/app/controllers/professions_controller.rb +0 -0
- data/app/controllers/results_controller.rb +0 -0
- data/app/controllers/stories_controller.rb +0 -1
- data/app/controllers/tasks_controller.rb +0 -0
- data/app/controllers/users_controller.rb +0 -0
- data/app/controllers/vacancies_controller.rb +0 -0
- data/app/controllers/workflow/candidatures_controller.rb +0 -0
- data/app/controllers/workflow/products_controller.rb +1 -1
- data/app/controllers/workflow/user/product/areas_controller.rb +0 -0
- data/app/controllers/workflow/user/projects_controller.rb +3 -1
- data/app/controllers/workflow/vacancies_controller.rb +0 -0
- data/app/controllers/workflow_controller.rb +0 -0
- data/app/helpers/application_helper.rb +0 -0
- data/app/helpers/collection_helper.rb +0 -0
- data/app/helpers/comments_helper.rb +0 -0
- data/app/helpers/form_helper.rb +0 -0
- data/app/helpers/language_helper.rb +0 -0
- data/app/helpers/layout_helper.rb +0 -0
- data/app/helpers/product_helper.rb +0 -0
- data/app/helpers/show_helper.rb +0 -0
- data/app/helpers/wizard_helper.rb +0 -0
- data/app/models/ability.rb +0 -0
- data/app/models/area.rb +2 -2
- data/app/models/area_user.rb +0 -0
- data/app/models/candidature.rb +0 -0
- data/app/models/column.rb +23 -0
- data/app/models/comment.rb +0 -0
- data/app/models/mongo_db_document.rb +0 -0
- data/app/models/page.rb +0 -0
- data/app/models/product.rb +6 -2
- data/app/models/product/new_product.rb +0 -0
- data/app/models/product/project_management.rb +2 -2
- data/app/models/profession.rb +0 -0
- data/app/models/project_user.rb +0 -0
- data/app/models/role.rb +0 -0
- data/app/models/role/admin.rb +0 -0
- data/app/models/role/master.rb +0 -0
- data/app/models/role/project_owner.rb +0 -0
- data/app/models/role/user.rb +0 -0
- data/app/models/state_machines/candidature.rb +0 -0
- data/app/models/state_machines/page.rb +0 -0
- data/app/models/state_machines/vacancy.rb +0 -0
- data/app/models/story.rb +2 -1
- data/app/models/task.rb +14 -1
- data/app/models/user_role.rb +0 -0
- data/app/models/vacancy.rb +0 -0
- data/app/observers/candidature_observer.rb +0 -0
- data/app/observers/story_observer.rb +0 -0
- data/app/presenters/resource_presenter.rb +0 -0
- data/app/presenters/resources/general/wizards/story/steps/activate_presenter.rb +0 -0
- data/app/presenters/resources/general/wizards/story/steps/setup_tasks_presenter.rb +0 -0
- data/app/presenters/resources/general/wizards/story_presenter.rb +0 -0
- data/app/presenters/resources/user/form_presenter.rb +0 -0
- data/app/views/areas/_form.html.erb +0 -0
- data/app/views/areas/edit.html.erb +0 -0
- data/app/views/areas/new.html.erb +0 -0
- data/app/views/areas/show.html.erb +0 -0
- data/app/views/candidatures/_form.html.erb +0 -0
- data/app/views/candidatures/edit.html.erb +0 -0
- data/app/views/candidatures/index.html.erb +0 -0
- data/app/views/candidatures/new.html.erb +0 -0
- data/app/views/candidatures/show.html.erb +0 -0
- data/app/views/columns/_collection.html.erb +12 -0
- data/app/views/comments/_form.html.erb +0 -0
- data/app/views/comments/_resource.html.erb +0 -0
- data/app/views/comments/edit.html.erb +0 -0
- data/app/views/comments/new.html.erb +0 -0
- data/app/views/devise/mailer/confirmation_instructions.html.erb +0 -0
- data/app/views/devise/registrations/new.html.erb +0 -0
- data/app/views/general/wizard.html.erb +0 -0
- data/app/views/kaminari/_first_page.html.erb +0 -0
- data/app/views/kaminari/_gap.html.erb +0 -0
- data/app/views/kaminari/_last_page.html.erb +0 -0
- data/app/views/kaminari/_next_page.html.erb +0 -0
- data/app/views/kaminari/_page.html.erb +0 -0
- data/app/views/kaminari/_paginator.html.erb +0 -0
- data/app/views/kaminari/_prev_page.html.erb +0 -0
- data/app/views/layouts/application.html.erb +0 -0
- data/app/views/layouts/shared/_flash_messages.html.erb +0 -0
- data/app/views/layouts/shared/_navigation.html.erb +0 -0
- data/app/views/pages/_form.html.erb +0 -0
- data/app/views/pages/edit.html.erb +0 -0
- data/app/views/pages/new.html.erb +0 -0
- data/app/views/pages/show.html.erb +0 -0
- data/app/views/products/_form.html.erb +0 -0
- data/app/views/products/edit.html.erb +0 -0
- data/app/views/products/index.html.erb +0 -0
- data/app/views/products/mixins/_keywords.html.erb +0 -0
- data/app/views/products/new.html.erb +0 -0
- data/app/views/products/show.html.erb +0 -0
- data/app/views/projects/_form.html.erb +0 -0
- data/app/views/projects/edit.html.erb +0 -0
- data/app/views/projects/index.html.erb +0 -0
- data/app/views/projects/new.html.erb +0 -0
- data/app/views/projects/show.html.erb +0 -0
- data/app/views/shared/_comments.html.erb +0 -0
- data/app/views/shared/collection/_list.html.erb +0 -0
- data/app/views/shared/collection/_table.html.erb +3 -1
- data/app/views/shared/form/_error_messages.html.erb +0 -0
- data/app/views/shared/resource/_actions.html.erb +7 -5
- data/app/views/shared/resource/_event_elements.html.erb +0 -0
- data/app/views/stories/_collection.html.erb +0 -0
- data/app/views/stories/_column_fields.html.erb +11 -0
- data/app/views/stories/_form.html.erb +0 -0
- data/app/views/stories/_task_fields.html.erb +0 -0
- data/app/views/stories/index.html.erb +0 -0
- data/app/views/stories/show.html.erb +0 -0
- data/app/views/stories/steps/_activate.html.erb +0 -0
- data/app/views/stories/steps/_setup_tasks.html.erb +0 -0
- data/app/views/stories/tasks.html.erb +0 -0
- data/app/views/tasks/_collection.html.erb +0 -0
- data/app/views/users/_form.html.erb +0 -0
- data/app/views/users/edit.html.erb +0 -0
- data/app/views/users/index.html.erb +0 -0
- data/app/views/users/new.html.erb +0 -0
- data/app/views/users/preferences.html.erb +0 -0
- data/app/views/users/show.html.erb +0 -0
- data/app/views/vacancies/_form.html.erb +0 -0
- data/app/views/vacancies/edit.html.erb +0 -0
- data/app/views/vacancies/index.html.erb +0 -0
- data/app/views/vacancies/new.html.erb +0 -0
- data/app/views/vacancies/show.html.erb +0 -0
- data/app/views/workflow/index.html.erb +0 -0
- data/app/views/workflow/project_owner/_candidatures.html.erb +0 -0
- data/app/views/workflow/project_owner/_vacancies.html.erb +0 -0
- data/app/views/workflow/tasks/steps/_work.html.erb +3 -1
- data/app/views/workflow/user/index.html.erb +0 -0
- data/app/views/workflow/user/product/areas/show.html.erb +0 -0
- data/app/views/workflow/user/projects/show.html.erb +0 -0
- data/config/initializers/1_initialize_app_config.rb +0 -0
- data/config/initializers/devise.rb +0 -0
- data/config/initializers/locale_settings.rb +0 -0
- data/config/initializers/simple_form.rb +0 -0
- data/config/initializers/simple_navigation.rb +0 -0
- data/config/initializers/vendor_extensions.rb +0 -0
- data/config/locales/resources/area/en.yml +0 -0
- data/config/locales/resources/candidature/en.yml +0 -0
- data/config/locales/resources/comment/en.yml +0 -0
- data/config/locales/resources/organization/en.yml +0 -0
- data/config/locales/resources/page/en.yml +0 -0
- data/config/locales/resources/product/en.yml +0 -0
- data/config/locales/resources/project/en.yml +0 -0
- data/config/locales/resources/result/en.yml +0 -0
- data/config/locales/resources/story/en.yml +0 -0
- data/config/locales/resources/task/en.yml +0 -0
- data/config/locales/resources/user/en.yml +0 -0
- data/config/locales/resources/vacancy/en.yml +0 -0
- data/config/routes.rb +0 -0
- data/config/routes/workflow.rb +0 -0
- data/db/migrate/20120907144853_create_schema.rb +1 -1
- data/db/migrate/20120911093743_remove_timestamps_from_habtm_tables.rb +0 -0
- data/db/migrate/20120919161831_add_unique_index_for_one_user_candidature_per_vacancy.rb +0 -0
- data/db/migrate/20120922201955_create_mongo_db_documents.rb +0 -0
- data/db/migrate/20120923140109_add_product_to_project.rb +0 -0
- data/db/migrate/20121004061413_add_extra_user_attributes.rb +0 -0
- data/db/migrate/20121004132105_create_professions.rb +0 -0
- data/db/migrate/20121006162913_add_public_attribute_to_roles.rb +0 -0
- data/db/migrate/20121006170407_add_type_attribute_to_roles.rb +0 -0
- data/db/migrate/20121007071543_add_foreign_languages_to_user.rb +0 -0
- data/db/migrate/20121028073712_create_organizations.rb +0 -0
- data/db/migrate/20121122185954_add_klass_name_to_products.rb +0 -0
- data/db/seeds.rb +0 -0
- data/lib/applicat/mvc/controller/error_handling.rb +0 -0
- data/lib/applicat/mvc/controller/resource.rb +0 -0
- data/lib/applicat/mvc/controller/transition_actions.rb +0 -0
- data/lib/applicat/mvc/model/resource/base.rb +0 -0
- data/lib/applicat/mvc/model/tree.rb +0 -0
- data/lib/db_seed.rb +0 -0
- data/lib/environment_configuration.rb +0 -0
- data/lib/generators/voluntary/install/install_generator.rb +0 -0
- data/lib/generators/voluntary/install/templates/app/controllers/application_controller.rb +0 -0
- data/lib/generators/voluntary/install/templates/app/models/app_config.rb +0 -0
- data/lib/generators/voluntary/install/templates/app/models/application/ability.rb +0 -0
- data/lib/generators/voluntary/install/templates/app/views/layouts/application.html.erb +0 -0
- data/lib/generators/voluntary/install/templates/config/application.yml +0 -0
- data/lib/generators/voluntary/install/templates/config/cucumber.yml +0 -0
- data/lib/generators/voluntary/install/templates/config/database.example.yml +0 -0
- data/lib/generators/voluntary/install/templates/config/deploy.rb +0 -0
- data/lib/generators/voluntary/install/templates/config/email.example.yml +0 -0
- data/lib/generators/voluntary/install/templates/config/initializers/recaptcha_example +0 -0
- data/lib/generators/voluntary/install/templates/config/locale_settings.yml +0 -0
- data/lib/generators/voluntary/install/templates/config/main_navigation.rb +0 -0
- data/lib/generators/voluntary/install/templates/config/mongoid.yml +0 -0
- data/lib/generators/voluntary/install/templates/config/nginx.conf +0 -0
- data/lib/generators/voluntary/install/templates/config/unicorn.rb +0 -0
- data/lib/generators/voluntary/install/templates/db/seeds.rb +0 -0
- data/lib/generators/voluntary/install/templates/features/step_definitions/email_steps.rb +0 -0
- data/lib/generators/voluntary/install/templates/features/step_definitions/factory_steps.rb +0 -0
- data/lib/generators/voluntary/install/templates/features/step_definitions/javascript_steps.rb +0 -0
- data/lib/generators/voluntary/install/templates/features/step_definitions/navigation_steps.rb +0 -0
- data/lib/generators/voluntary/install/templates/features/step_definitions/resources_steps.rb +0 -0
- data/lib/generators/voluntary/install/templates/features/step_definitions/session_steps.rb +0 -0
- data/lib/generators/voluntary/install/templates/features/step_definitions/user_steps.rb +0 -0
- data/lib/generators/voluntary/install/templates/features/step_definitions/web_steps.rb +0 -0
- data/lib/generators/voluntary/install/templates/features/support/database_cleaner_patches.rb +0 -0
- data/lib/generators/voluntary/install/templates/features/support/env.rb +0 -0
- data/lib/generators/voluntary/install/templates/features/support/integration_sessions_controller.rb +0 -0
- data/lib/generators/voluntary/install/templates/features/support/integration_sessions_form.html.erb +0 -0
- data/lib/generators/voluntary/install/templates/features/support/selectors.rb +0 -0
- data/lib/generators/voluntary/install/templates/features/support/spork_env +0 -0
- data/lib/generators/voluntary/install/templates/features/support/user_cuke_helpers.rb +0 -0
- data/lib/generators/voluntary/install/templates/lib/volontariat_seed.rb +0 -0
- data/lib/generators/voluntary/install/templates/spec/spec_helper.rb +0 -0
- data/lib/generators/voluntary/install/templates/spec/support/deferred_garbage_collector.rb +0 -0
- data/lib/generators/voluntary/install/templates/spec/support/devise.rb +0 -0
- data/lib/generators/voluntary/install/templates/spec/support/mongo_database_cleaner.rb +0 -0
- data/lib/generators/voluntary/install/templates/vendor/assets/javascripts/jquery.tokeninput.js +0 -0
- data/lib/generators/voluntary/product_dummy/product_dummy_generator.rb +0 -0
- data/lib/generators/voluntary/product_dummy/templates/app/controllers/application_controller.rb +0 -0
- data/lib/generators/voluntary/product_dummy/templates/app/controllers/home_controller.rb +0 -0
- data/lib/generators/voluntary/product_dummy/templates/app/models/app_config.rb +0 -0
- data/lib/generators/voluntary/product_dummy/templates/app/views/home/index.html.erb +0 -0
- data/lib/generators/voluntary/product_dummy/templates/app/views/layouts/application.html.erb +0 -0
- data/lib/generators/voluntary/product_dummy/templates/config/application.yml +0 -0
- data/lib/generators/voluntary/product_dummy/templates/config/cucumber.yml +0 -0
- data/lib/generators/voluntary/product_dummy/templates/config/database.example.yml +0 -0
- data/lib/generators/voluntary/product_dummy/templates/config/email.example.yml +0 -0
- data/lib/generators/voluntary/product_dummy/templates/config/locale_settings.yml +0 -0
- data/lib/generators/voluntary/product_dummy/templates/config/main_navigation.rb +0 -0
- data/lib/generators/voluntary/product_dummy/templates/config/mongoid.yml +0 -0
- data/lib/generators/voluntary/product_dummy/templates/config/routes.rb +0 -0
- data/lib/generators/voluntary/product_dummy/templates/features/step_definitions/area_behaviour_steps.rb +0 -0
- data/lib/generators/voluntary/product_dummy/templates/features/step_definitions/area_steps.rb +0 -0
- data/lib/generators/voluntary/product_dummy/templates/features/step_definitions/candidature_steps.rb +0 -0
- data/lib/generators/voluntary/product_dummy/templates/features/step_definitions/comment_behaviour_steps.rb +0 -0
- data/lib/generators/voluntary/product_dummy/templates/features/step_definitions/comment_steps.rb +0 -0
- data/lib/generators/voluntary/product_dummy/templates/features/step_definitions/email_steps.rb +0 -0
- data/lib/generators/voluntary/product_dummy/templates/features/step_definitions/factory_steps.rb +0 -0
- data/lib/generators/voluntary/product_dummy/templates/features/step_definitions/javascript_steps.rb +0 -0
- data/lib/generators/voluntary/product_dummy/templates/features/step_definitions/navigation_steps.rb +0 -0
- data/lib/generators/voluntary/product_dummy/templates/features/step_definitions/product_steps.rb +0 -0
- data/lib/generators/voluntary/product_dummy/templates/features/step_definitions/project_steps.rb +0 -0
- data/lib/generators/voluntary/product_dummy/templates/features/step_definitions/resources_steps.rb +0 -0
- data/lib/generators/voluntary/product_dummy/templates/features/step_definitions/session_steps.rb +0 -0
- data/lib/generators/voluntary/product_dummy/templates/features/step_definitions/state_machines/vacancy_steps.rb +0 -0
- data/lib/generators/voluntary/product_dummy/templates/features/step_definitions/user_steps.rb +0 -0
- data/lib/generators/voluntary/product_dummy/templates/features/step_definitions/vacancy_steps.rb +0 -0
- data/lib/generators/voluntary/product_dummy/templates/features/step_definitions/web_steps.rb +0 -0
- data/lib/generators/voluntary/product_dummy/templates/features/step_definitions/wizards/story_steps.rb +0 -0
- data/lib/generators/voluntary/product_dummy/templates/features/support/database_cleaner_patches.rb +0 -0
- data/lib/generators/voluntary/product_dummy/templates/features/support/env.rb +0 -0
- data/lib/generators/voluntary/product_dummy/templates/features/support/integration_sessions_controller.rb +0 -0
- data/lib/generators/voluntary/product_dummy/templates/features/support/integration_sessions_form.html.erb +0 -0
- data/lib/generators/voluntary/product_dummy/templates/features/support/selectors.rb +0 -0
- data/lib/generators/voluntary/product_dummy/templates/features/support/spork_env +0 -0
- data/lib/generators/voluntary/product_dummy/templates/features/support/user_cuke_helpers.rb +0 -0
- data/lib/generators/voluntary/product_dummy/templates/spec/support/deferred_garbage_collector.rb +0 -0
- data/lib/generators/voluntary/product_dummy/templates/spec/support/devise.rb +0 -0
- data/lib/generators/voluntary/product_dummy/templates/spec/support/mongo_database_cleaner.rb +0 -0
- data/lib/generators/voluntary/product_dummy/templates/vendor/assets/javascripts/jquery.tokeninput.js +0 -0
- data/lib/generators/voluntary/product_dummy/templates/vendor/assets/stylesheets/token-input-facebook.css +0 -0
- data/lib/generators/voluntary/product_dummy/templates/vendor/assets/stylesheets/token-input-mac.css +0 -0
- data/lib/generators/voluntary/product_dummy/templates/vendor/assets/stylesheets/token-input.css +0 -0
- data/lib/i18n_interpolation_fallbacks.rb +0 -0
- data/lib/model/mongo_db/commentable.rb +0 -0
- data/lib/model/mongo_db/core_extensions.rb +0 -0
- data/lib/model/mongo_db/customizable.rb +0 -0
- data/lib/model/mongo_db/product/keywords.rb +0 -0
- data/lib/model/mongo_db/state_version_attributes.rb +0 -0
- data/lib/tasks/cucumber.rake +0 -0
- data/lib/tasks/voluntary_tasks.rake +0 -0
- data/lib/vendors/simple_navigation/renderer/breadcrumbs_without_method_links.rb +0 -0
- data/lib/vendors/simple_navigation/renderer/twitter_sidenav.rb +0 -0
- data/lib/volontariat_seed.rb +0 -0
- data/lib/voluntary.rb +0 -0
- data/lib/voluntary/engine.rb +0 -0
- data/lib/voluntary/helpers/application.rb +0 -0
- data/lib/voluntary/helpers/comments.rb +0 -0
- data/lib/voluntary/helpers/form.rb +0 -0
- data/lib/voluntary/helpers/language.rb +0 -0
- data/lib/voluntary/helpers/layout.rb +0 -0
- data/lib/voluntary/helpers/show.rb +0 -0
- data/lib/voluntary/version.rb +1 -1
- data/vendor_extensions/active_model/naming.rb +0 -0
- metadata +211 -28
- checksums.yaml +0 -15
data/MIT-LICENSE
CHANGED
|
File without changes
|
data/README.rdoc
CHANGED
|
File without changes
|
data/Rakefile
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
class Workflow::ProductsController < ApplicationController
|
|
2
2
|
def show
|
|
3
|
-
@stories = Product.stories(params[:id], current_user
|
|
3
|
+
@stories = Product.stories(params[:id], current_user)
|
|
4
4
|
@areas = Area.find_by_product_id(params[:id])
|
|
5
5
|
@product = Product.find(params[:id]) unless params[:id] == 'no-name'
|
|
6
6
|
end
|
|
File without changes
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
class Workflow::User::ProjectsController < ApplicationController
|
|
2
2
|
def show
|
|
3
3
|
@project = Project.find(params[:id])
|
|
4
|
-
|
|
4
|
+
|
|
5
|
+
@stories = @project.product.stories_for_user(current_user).
|
|
6
|
+
where(project_id: @project.try(:id)).paginate(page: params[:page])
|
|
5
7
|
end
|
|
6
8
|
end
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/app/helpers/form_helper.rb
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/app/helpers/show_helper.rb
CHANGED
|
File without changes
|
|
File without changes
|
data/app/models/ability.rb
CHANGED
|
File without changes
|
data/app/models/area.rb
CHANGED
|
@@ -15,11 +15,11 @@ class Area < ActiveRecord::Base
|
|
|
15
15
|
friendly_id :name, :use => :slugged
|
|
16
16
|
|
|
17
17
|
def self.find_by_product_id(product_id)
|
|
18
|
-
roots.joins(:projects).merge(Project.for_product_id(product_id))
|
|
18
|
+
roots.joins(:projects).merge(Project.for_product_id(product_id))
|
|
19
19
|
end
|
|
20
20
|
|
|
21
21
|
def children_for_product_id(product_id)
|
|
22
|
-
children.joins(:projects).merge(Project.for_product_id(product_id))
|
|
22
|
+
children.joins(:projects).merge(Project.for_product_id(product_id))
|
|
23
23
|
end
|
|
24
24
|
|
|
25
25
|
def products
|
data/app/models/area_user.rb
CHANGED
|
File without changes
|
data/app/models/candidature.rb
CHANGED
|
File without changes
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
class Column
|
|
2
|
+
include Mongoid::Document
|
|
3
|
+
include Mongoid::Timestamps
|
|
4
|
+
include Mongoid::Slug
|
|
5
|
+
|
|
6
|
+
include Model::MongoDb::Customizable
|
|
7
|
+
|
|
8
|
+
belongs_to :story
|
|
9
|
+
|
|
10
|
+
has_many :tasks, dependent: :destroy
|
|
11
|
+
|
|
12
|
+
field :key, type: String
|
|
13
|
+
field :text, type: String
|
|
14
|
+
field :state, type: String
|
|
15
|
+
|
|
16
|
+
attr_accessible :story_id, :key, :text
|
|
17
|
+
|
|
18
|
+
private
|
|
19
|
+
|
|
20
|
+
def cache_product_association
|
|
21
|
+
self.product_id = story.project.product_id if story_id.present? && (story.project rescue nil)
|
|
22
|
+
end
|
|
23
|
+
end
|
data/app/models/comment.rb
CHANGED
|
File without changes
|
|
File without changes
|
data/app/models/page.rb
CHANGED
|
File without changes
|
data/app/models/product.rb
CHANGED
|
@@ -40,7 +40,7 @@ class Product
|
|
|
40
40
|
struct
|
|
41
41
|
end
|
|
42
42
|
|
|
43
|
-
def self.stories(id, user
|
|
43
|
+
def self.stories(id, user)
|
|
44
44
|
collection = if id == 'no-name'
|
|
45
45
|
Story.exists(_type: false)
|
|
46
46
|
else
|
|
@@ -53,7 +53,11 @@ class Product
|
|
|
53
53
|
end
|
|
54
54
|
end
|
|
55
55
|
|
|
56
|
-
collection.where(:users_without_tasks_ids.ne => user.id)
|
|
56
|
+
collection.where(:users_without_tasks_ids.ne => user.id)
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
def stories_for_user(user)
|
|
60
|
+
self.class.stories(id, user)
|
|
57
61
|
end
|
|
58
62
|
|
|
59
63
|
# belongs_to (SQL)
|
|
File without changes
|
|
@@ -6,7 +6,7 @@ module Product::ProjectManagement
|
|
|
6
6
|
end
|
|
7
7
|
|
|
8
8
|
module ClassMethods
|
|
9
|
-
def stories(id, user
|
|
9
|
+
def stories(id, user)
|
|
10
10
|
collection = if id == 'no-name'
|
|
11
11
|
Story.exists(_type: false)
|
|
12
12
|
else
|
|
@@ -19,7 +19,7 @@ module Product::ProjectManagement
|
|
|
19
19
|
end
|
|
20
20
|
end
|
|
21
21
|
|
|
22
|
-
collection.where(:users_without_tasks_ids.ne => user.id)
|
|
22
|
+
collection.where(:users_without_tasks_ids.ne => user.id)
|
|
23
23
|
end
|
|
24
24
|
end
|
|
25
25
|
|
data/app/models/profession.rb
CHANGED
|
File without changes
|
data/app/models/project_user.rb
CHANGED
|
File without changes
|
data/app/models/role.rb
CHANGED
|
File without changes
|
data/app/models/role/admin.rb
CHANGED
|
File without changes
|
data/app/models/role/master.rb
CHANGED
|
File without changes
|
|
File without changes
|
data/app/models/role/user.rb
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/app/models/story.rb
CHANGED
|
@@ -51,7 +51,8 @@ class Story
|
|
|
51
51
|
def next_task_for_user(user)
|
|
52
52
|
return nil if (users_without_tasks_ids || []).include?(user.id)
|
|
53
53
|
|
|
54
|
-
task = tasks.assigned.
|
|
54
|
+
task = tasks.assigned.not.in(state: ['under_supervision', 'completed']).
|
|
55
|
+
where(user_id: user.id).first
|
|
55
56
|
|
|
56
57
|
return task if task
|
|
57
58
|
|
data/app/models/task.rb
CHANGED
|
@@ -33,8 +33,8 @@ class Task
|
|
|
33
33
|
|
|
34
34
|
validates :story_id, presence: true
|
|
35
35
|
validates :offeror_id, presence: true
|
|
36
|
-
validates :name, presence: true, uniqueness: { scope: :story_id }
|
|
37
36
|
validates :text, presence: true, if: ->(t) { t.class.name == 'Task' }
|
|
37
|
+
validate :name_valid?
|
|
38
38
|
|
|
39
39
|
after_initialize :cache_associations
|
|
40
40
|
before_validation :cache_associations
|
|
@@ -61,6 +61,19 @@ class Task
|
|
|
61
61
|
end
|
|
62
62
|
end
|
|
63
63
|
|
|
64
|
+
protected
|
|
65
|
+
|
|
66
|
+
# validates :name, presence: true, uniqueness: { scope: :story_id }
|
|
67
|
+
def name_valid?
|
|
68
|
+
if name.present?
|
|
69
|
+
if Task.where(name: name, story_id: story_id).any?
|
|
70
|
+
errors.add(:name, I18n.t('errors.messages.taken'))
|
|
71
|
+
end
|
|
72
|
+
else
|
|
73
|
+
errors.add(:name, I18n.t('errors.messages.blank'))
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
|
|
64
77
|
private
|
|
65
78
|
|
|
66
79
|
def cache_associations
|
data/app/models/user_role.rb
CHANGED
|
File without changes
|
data/app/models/vacancy.rb
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<% options ||= {} %>
|
|
2
|
+
<% options = {
|
|
3
|
+
current_parent: parent, show_title: true, append_new_link: true,
|
|
4
|
+
columns: ['key', 'text']
|
|
5
|
+
}.merge(options) %>
|
|
6
|
+
<%= render partial: 'shared/collection/table', locals: {
|
|
7
|
+
type: 'columns', 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
|
+
} %>
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
<% if
|
|
2
|
-
|
|
1
|
+
<% if !resource.is_a?(Column) && (
|
|
2
|
+
can?(:destroy, resource) || can?(:edit, resource) || (
|
|
3
|
+
resource.respond_to?(:state_events) && resource.state_events.select{|event| can? event, resource }.any?
|
|
4
|
+
)
|
|
3
5
|
) %>
|
|
4
6
|
<div class="dropdown">
|
|
5
7
|
<a class="dropdown-toggle" data-toggle="dropdown" href="#"><%= t('general.actions') %></a>
|
|
@@ -7,10 +9,10 @@
|
|
|
7
9
|
<% if can? :destroy, resource %>
|
|
8
10
|
<li>
|
|
9
11
|
<%= link_to(
|
|
10
|
-
t('general.destroy'), resource, id: "
|
|
12
|
+
t('general.destroy'), resource, id: "#{resource.class.name.tableize.singularize}_#{resource.id}", method: :delete,
|
|
11
13
|
confirm: t('general.questions.are_you_sure'),
|
|
12
|
-
onclick: "delete_link('#
|
|
13
|
-
)
|
|
14
|
+
onclick: "delete_link('#{resource.class.name.tableize.singularize}_#{resource.id}'); return false;"
|
|
15
|
+
)
|
|
14
16
|
%>
|
|
15
17
|
</li>
|
|
16
18
|
<% end %>
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<fieldset>
|
|
2
|
+
<%= f.input :key %>
|
|
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/>
|
|
File without changes
|
|
File without changes
|
|
File without changes
|