Permalink
Browse files

Merge tag 'v6.0.4' into stable/6

  • Loading branch information...
2 parents 00c360e + 7c56487 commit dacb194af5fc139351c563962b0ea7210020899e @oliverguenther oliverguenther committed Aug 31, 2016
Showing with 674 additions and 662 deletions.
  1. +21 −21 Gemfile.lock
  2. +1 −1 app/assets/javascripts/action_menu.js
  3. +1 −1 app/assets/javascripts/application.js.erb
  4. +3 −0 app/assets/javascripts/repository_navigation.js
  5. +4 −0 app/assets/javascripts/tab_handling.js
  6. +9 −1 app/assets/stylesheets/content/_wiki.sass
  7. +1 −1 app/assets/stylesheets/content/work_packages/inplace_editing/_edit_fields.sass
  8. +0 −5 app/assets/stylesheets/content/work_packages/inplace_editing/_legacy_inplace_styles.sass
  9. +3 −0 app/assets/stylesheets/layout/_toolbar.sass
  10. +3 −1 app/assets/stylesheets/layout/_work_package.sass
  11. +4 −4 app/assets/stylesheets/scm.css.sass
  12. +7 −0 app/assets/stylesheets/specific/accessibility.sass
  13. +2 −0 app/controllers/application_controller.rb
  14. +3 −6 app/controllers/wiki_controller.rb
  15. +2 −2 app/controllers/wiki_menu_items_controller.rb
  16. +4 −4 app/controllers/work_packages_controller.rb
  17. +2 −1 app/models/query.rb
  18. +1 −0 app/models/wiki_page.rb
  19. +1 −1 app/seeders/admin_user_seeder.rb
  20. +1 −1 app/seeders/basic_data/role_seeder.rb
  21. +4 −2 app/views/repositories/_dir_list_content.html.erb
  22. +0 −1 app/views/timelines/show.html.erb
  23. +0 −1 app/views/wiki/_content.html.erb
  24. +3 −0 app/views/wiki/edit.html.erb
  25. +61 −32 app/views/wiki/show.html.erb
  26. +4 −4 app/views/wiki_menu_items/edit.html.erb
  27. +1 −1 config/initializers/menus.rb
  28. +1 −0 config/locales/en.yml
  29. +2 −0 config/locales/js-en.yml
  30. +6 −1 db/migrate/20160803094931_wiki_menu_titles_to_slug.rb
  31. +2 −1 doc/apiv3-documentation.apib
  32. +3 −3 features/menu_items/wiki_menu_items.feature
  33. +11 −1 frontend/app/components/api/api-v3/hal-resources/work-package-resource.service.ts
  34. +10 −0 frontend/app/components/context-menus/column-context-menu/column-context-menu.controller.js
  35. +1 −0 frontend/app/components/filters/filter-container/filter-container.directive.ts
  36. +3 −1 frontend/app/components/routing/ui-router.config.ts
  37. +1 −1 frontend/app/components/routing/wp-details/wp.list.details.html
  38. +0 −3 frontend/app/components/routing/wp-list/wp.list.html
  39. +2 −1 frontend/app/components/work-packages/work-package-comment/work-package-comment.directive.html
  40. +5 −1 frontend/app/components/work-packages/work-package-comment/work-package-comment.directive.ts
  41. +9 −3 frontend/app/components/work-packages/work-package.service.js
  42. +2 −1 frontend/app/components/work-packages/wp-attachments/wp-attachments.directive.html
  43. +7 −0 frontend/app/components/wp-activity/user/user-activity-directive.ts
  44. +1 −6 frontend/app/components/wp-buttons/wp-button.template.html
  45. +3 −3 frontend/app/components/wp-buttons/wp-buttons.module.test.ts
  46. +3 −7 frontend/app/components/wp-buttons/wp-filter-button/wp-filter-button.directive.html
  47. +1 −0 frontend/app/components/wp-edit/field-types/wp-edit-date-field.directive.html
  48. +15 −2 frontend/app/components/wp-edit/field-types/wp-edit-select-field.module.ts
  49. +7 −0 frontend/app/components/wp-edit/wp-edit-form.directive.ts
  50. +3 −3 frontend/app/components/wp-table/sort-header/sort-header.directive.js
  51. +10 −0 frontend/app/components/wp-table/wp-table-helper/wp-table-helper.service.js
  52. +0 −1 frontend/app/components/wp-table/wp-table.directive.html
  53. +5 −0 frontend/app/layout/query-menu-item-factory.js
  54. +2 −1 frontend/app/templates/work_packages/activities/_user.html
  55. +2 −1 frontend/app/templates/work_packages/attachments-edit.html
  56. +2 −1 frontend/app/templates/work_packages/attachments.html
  57. +2 −2 lib/api/v3/repositories/revisions_by_work_package_api.rb
  58. +1 −1 lib/api/v3/work_packages/work_package_representer.rb
  59. +1 −1 lib/open_project/version.rb
  60. +6 −5 lib/redmine/menu_manager/menu_helper.rb
  61. +1 −3 lib/redmine/menu_manager/top_menu/help_menu.rb
  62. +5 −5 spec/controllers/projects_controller_spec.rb
  63. +10 −11 spec/controllers/wiki_controller_spec.rb
  64. +39 −42 spec/controllers/work_packages_controller_spec.rb
  65. +93 −38 spec/features/menu_items/top_menu_item_spec.rb
  66. +2 −2 spec/features/wiki/wiki_menu_item_migration_spec.rb
  67. +2 −2 spec/features/wiki/wiki_unicode_spec.rb
  68. +4 −0 spec/features/work_packages/export_spec.rb
  69. +17 −0 spec/features/work_packages/new_work_package_spec.rb
  70. +0 −7 spec/lib/api/v3/work_packages/work_package_representer_spec.rb
  71. +28 −4 spec/requests/api/v3/repositories/revisions_by_work_package_resource_spec.rb
  72. +0 −76 spec/support/matchers/have_exactly_one_selected_menu_item_in.rb
  73. +0 −74 spec/support/matchers/have_no_selected_menu_item_in.rb
  74. +2 −0 spec/views/layouts/admin.html.erb_spec.rb
  75. +2 −1 spec/views/layouts/base.html.erb_spec.rb
  76. +1 −1 vendored-plugins/openproject-auth_plugins/lib/open_project/auth_plugins/version.rb
  77. +31 −0 vendored-plugins/openproject-backlogs/app/seeders/role_seeder.rb
  78. +87 −0 vendored-plugins/openproject-backlogs/app/seeders/setting_seeder.rb
  79. +0 −50 vendored-plugins/openproject-backlogs/db/seeds.rb
  80. +0 −40 vendored-plugins/openproject-backlogs/db/seeds/development.rb
  81. +0 −40 vendored-plugins/openproject-backlogs/db/seeds/production.rb
  82. +0 −52 vendored-plugins/openproject-backlogs/db/seeds/settings.rb
  83. +2 −47 vendored-plugins/openproject-backlogs/lib/open_project/backlogs/patches/setting_seeder_patch.rb
  84. +1 −1 vendored-plugins/openproject-backlogs/lib/open_project/backlogs/version.rb
  85. +5 −0 vendored-plugins/openproject-costs/app/controllers/hourly_rates_controller.rb
  86. +6 −2 vendored-plugins/openproject-costs/app/views/cost_objects/_show_variable_cost_object.html.erb
  87. +1 −1 vendored-plugins/openproject-costs/lib/open_project/costs/version.rb
  88. +24 −0 vendored-plugins/openproject-documents/app/seeders/role_seeder.rb
  89. +1 −1 vendored-plugins/openproject-documents/lib/open_project/documents/version.rb
  90. +1 −1 vendored-plugins/openproject-github_integration/lib/open_project/github_integration/version.rb
  91. +1 −1 vendored-plugins/openproject-global_roles/lib/open_project/global_roles/version.rb
  92. +1 −1 vendored-plugins/openproject-local_avatars/lib/open_project/local_avatars/version.rb
  93. +3 −2 vendored-plugins/openproject-meeting/app/controllers/meeting_contents_controller.rb
  94. +4 −0 vendored-plugins/openproject-meeting/app/controllers/meetings_controller.rb
  95. +1 −1 vendored-plugins/openproject-meeting/app/views/meeting_mailer/content_for_review.html.erb
  96. +1 −1 vendored-plugins/openproject-meeting/app/views/meeting_mailer/content_for_review.text.erb
  97. +1 −1 vendored-plugins/openproject-meeting/app/views/meetings/index.html.erb
  98. +1 −1 vendored-plugins/openproject-meeting/lib/open_project/meeting/version.rb
  99. +1 −1 vendored-plugins/openproject-my_project_page/lib/open_project/my_project_page/version.rb
  100. +1 −1 vendored-plugins/openproject-openid_connect/lib/open_project/openid_connect/version.rb
  101. +1 −1 vendored-plugins/openproject-pdf_export/lib/open_project/pdf_export/version.rb
  102. +6 −2 vendored-plugins/openproject-reporting/app/controllers/cost_reports_controller.rb
  103. +1 −1 vendored-plugins/openproject-reporting/lib/open_project/reporting/version.rb
  104. +1 −1 vendored-plugins/openproject-themes-dark/lib/open_project/themes/dark/version.rb
  105. +1 −1 vendored-plugins/openproject-webhooks/lib/open_project/webhooks/version.rb
  106. +1 −1 vendored-plugins/openproject-xls_export/lib/open_project/xls_export/version.rb
  107. +6 −1 vendored-plugins/reporting_engine/lib/assets/javascripts/reporting_engine/reporting/filters.js
  108. +1 −0 vendored-plugins/reporting_engine/lib/report/query_utils.rb
  109. +1 −1 vendored-plugins/reporting_engine/lib/reporting_engine/version.rb
View
@@ -104,10 +104,10 @@ GIT
GIT
remote: https://github.com/opf/openproject-translations.git
- revision: 2db23a9bd59de58e6d10e31d80596d798a6783b1
+ revision: e19713a37e64af3d99d84ae901936958ec87de43
branch: stable/6
specs:
- openproject-translations (6.0.3)
+ openproject-translations (6.0.4)
crowdin-api (~> 0.4.0)
mixlib-shellout (~> 2.1.0)
rails (~> 4.2.3)
@@ -140,66 +140,66 @@ GIT
PATH
remote: vendored-plugins/openproject-auth_plugins
specs:
- openproject-auth_plugins (6.0.3)
+ openproject-auth_plugins (6.0.4)
omniauth (~> 1.0)
rails (~> 4.2.4)
PATH
remote: vendored-plugins/openproject-backlogs
specs:
- openproject-backlogs (6.0.3)
+ openproject-backlogs (6.0.4)
acts_as_silent_list (~> 2.0.0)
- openproject-pdf_export (= 6.0.3)
+ openproject-pdf_export (= 6.0.4)
rails (~> 4.2.4)
PATH
remote: vendored-plugins/openproject-costs
specs:
- openproject-costs (6.0.3)
+ openproject-costs (6.0.4)
rails (~> 4.2.4)
PATH
remote: vendored-plugins/openproject-documents
specs:
- openproject-documents (6.0.3)
+ openproject-documents (6.0.4)
rails (~> 4.2.4)
PATH
remote: vendored-plugins/openproject-github_integration
specs:
- openproject-github_integration (6.0.3)
- openproject-webhooks (~> 6.0.3)
+ openproject-github_integration (6.0.4)
+ openproject-webhooks (~> 6.0.4)
rails (~> 4.2.4)
PATH
remote: vendored-plugins/openproject-global_roles
specs:
- openproject-global_roles (6.0.3)
+ openproject-global_roles (6.0.4)
rails (~> 4.2.4)
PATH
remote: vendored-plugins/openproject-local_avatars
specs:
- openproject-local_avatars (6.0.3)
+ openproject-local_avatars (6.0.4)
rails (~> 4.2.4)
rmagick (~> 2.15.4)
PATH
remote: vendored-plugins/openproject-meeting
specs:
- openproject-meeting (6.0.3)
+ openproject-meeting (6.0.4)
rails (~> 4.2.4)
PATH
remote: vendored-plugins/openproject-my_project_page
specs:
- openproject-my_project_page (6.0.3)
+ openproject-my_project_page (6.0.4)
rails (~> 4.2.4)
PATH
remote: vendored-plugins/openproject-openid_connect
specs:
- openproject-openid_connect (6.0.3)
+ openproject-openid_connect (6.0.4)
lobby_boy (~> 0.1)
omniauth-openid_connect-providers (~> 0.1)
openproject-auth_plugins (~> 6.0)
@@ -208,41 +208,41 @@ PATH
PATH
remote: vendored-plugins/openproject-pdf_export
specs:
- openproject-pdf_export (6.0.3)
+ openproject-pdf_export (6.0.4)
prawn (~> 2.1.0)
rails (~> 4.2.4)
PATH
remote: vendored-plugins/openproject-reporting
specs:
- openproject-reporting (6.0.3)
- openproject-costs (= 6.0.3)
+ openproject-reporting (6.0.4)
+ openproject-costs (= 6.0.4)
rails (~> 4.2.4)
reporting_engine (>= 1.1.0)
PATH
remote: vendored-plugins/openproject-themes-dark
specs:
- openproject-themes-dark (6.0.3)
+ openproject-themes-dark (6.0.4)
rails (~> 4.2.4)
PATH
remote: vendored-plugins/openproject-webhooks
specs:
- openproject-webhooks (6.0.3)
+ openproject-webhooks (6.0.4)
rails (~> 4.2.4)
PATH
remote: vendored-plugins/openproject-xls_export
specs:
- openproject-xls_export (6.0.3)
+ openproject-xls_export (6.0.4)
rails (~> 4.2.4)
spreadsheet (~> 0.8.9)
PATH
remote: vendored-plugins/reporting_engine
specs:
- reporting_engine (6.0.3)
+ reporting_engine (6.0.4)
json
rails (~> 4.2.4)
@@ -88,7 +88,7 @@ jQuery(function ($) {
});
}
- $('.legacy-actions-main, .legacy-actions-specific').each(function(idx, menu){
+ $('.legacy-actions-main, .legacy-actions-specific, .toolbar-items').each(function(idx, menu){
install_menu_logic($(menu));
});
});
@@ -159,7 +159,7 @@ function addFileField() {
var clone = $('attachment_template').cloneNode(true);
clone.writeAttribute('id', '');
clone.innerHTML = clone.innerHTML.replace(/\[1\]/g, '['+ fileFieldCount + ']');
- jQuery('attachments_fields').appendChild(clone);
+ jQuery('#attachments_fields')[0].appendChild(clone);
}
function randomKey(size) {
@@ -96,6 +96,7 @@
content.after(response);
content.removeClass('loading');
content.addClass('loaded open');
+ content.find('a.dir-expander')[0].title = I18n.t('js.label_collapse');
}
});
}
@@ -116,6 +117,7 @@
});
content.toggleClass('open collapsed')
+ content.find('a.dir-expander')[0].title = I18n.t('js.label_expand');
}
/**
@@ -133,6 +135,7 @@
});
content.toggleClass('open collapsed')
+ content.find('a.dir-expander')[0].title = I18n.t('js.label_collapse');
}
/**
@@ -47,6 +47,10 @@ function showTab(name, url) {
if ("replaceState" in window.history) {
window.history.replaceState(null, document.title, url);
}
+
+ window.setTimeout(function() {
+ jQuery('#tab-' + name).focus();
+ }, 100);
return false;
}
@@ -196,7 +196,15 @@ blockquote
padding: 0 0 0 0
.toolbar-container ~ .wiki-content
- margin-top: -64px
+ margin-top: 0
+
+.wiki-version--details
+ .navigate-left
+ margin: 0 1.5rem 0 0
+ .navigate-right
+ margin: 0 0 0 1.5rem
+ span
+ vertical-align: middle
@include breakpoint(680px down)
.toolbar-container ~ .wiki-content
@@ -86,7 +86,7 @@
display: inline-block
// Style no-label fields (long text, description, ..) with padding
-.-editable.-no-label:not(.-active)
+.wp-edit-field.-no-label:not(.-active)
margin-left: -0.375rem
.wp-table--cell-span
@@ -69,11 +69,6 @@ a.inplace-editing--trigger-link,
img.avatar-mini
float: inherit
-// Do not hover trigger-link when element is read-only
-.-read-only
- .inplace-editing--trigger-link:hover .inplace-editing--container
- border-color: transparent
-
.inplace-edit--icon-wrapper
display: inline-block
text-align: center
@@ -51,6 +51,9 @@
margin-top: rem-calc(5px)
margin-bottom: 10px
+ &.-with-dropdown .toolbar-item.drop-down
+ position: relative
+
.toolbar
ul
margin: 0
@@ -88,11 +88,13 @@
> .work-packages--filters-optional-container
// not flex-item
height: auto
- flex-shrink: 0
> .work-packages--split-view
min-height: 100px
+ .work-packages--filters-optional-container
+ flex-shrink: 0
+
.work-packages--split-view
+display(flex)
width: 100%
@@ -207,7 +207,7 @@ div
background: #bfb
tr.dir
- span
+ a
&.dir-expander
@include icon-common
cursor: pointer
@@ -216,13 +216,13 @@ tr.dir
margin-left: 5px
padding: 0
&.loading
- span.dir-expander:before
+ .dir-expander:before
@extend .icon-loading1:before
&.collapsed
- span.dir-expander:before
+ .dir-expander:before
@extend .icon-plus:before
&.open
- span.dir-expander:before
+ .dir-expander:before
@extend .icon-minus1:before
tr
@@ -85,3 +85,10 @@ body.accessibility-mode
.skip-navigation-link:focus
top: auto
left: auto
+
+ // Show inplace-editing icons so that they can be accessed directly
+ .inplace-editing--trigger-link
+ .inplace-editing--container
+ border-color: $inplace-edit--border-color
+ .inplace-edit--icon-wrapper
+ visibility: visible
@@ -35,6 +35,8 @@ class ApplicationController < ActionController::Base
class_attribute :_model_scope
class_attribute :accept_key_auth_actions
+ helper_method :render_to_string
+
protected
include I18n
@@ -70,11 +70,7 @@ class WikiController < ApplicationController
attr_reader :page, :related_page
current_menu_item :index do |controller|
- controller.current_menu_item_sym :related_page, '_toc'
- end
-
- current_menu_item :new_child do |controller|
- controller.current_menu_item_sym :page, '_new_page'
+ controller.current_menu_item_sym :related_page
end
current_menu_item do |controller|
@@ -83,7 +79,8 @@ class WikiController < ApplicationController
# List of pages, sorted alphabetically and by parent (hierarchy)
def index
- @related_page = WikiPage.find_by(wiki_id: @wiki.id, title: wiki_page_title)
+ slug = wiki_page_title.nil? ? 'wiki' : wiki_page_title.to_url
+ @related_page = WikiPage.find_by(wiki_id: @wiki.id, slug: slug)
load_pages_for_index
@pages_by_parent_id = @pages.group_by(&:parent_id)
@@ -62,8 +62,8 @@ def update
end
else
@wiki_menu_item.navigatable_id = @page.wiki.id
- @wiki_menu_item.name = wiki_menu_item_params[:name]
- @wiki_menu_item.title = @page_title
+ @wiki_menu_item.name = @page.slug
+ @wiki_menu_item.title = wiki_menu_item_params[:title] || @page_title
if wiki_menu_setting == 'sub_item'
@wiki_menu_item.parent_id = parent_wiki_menu_item
@@ -51,8 +51,10 @@ class WorkPackagesController < ApplicationController
# before_filter :disable_api # TODO re-enable once API is used for any JSON request
before_filter :authorize_on_work_package, only: :show
before_filter :find_optional_project,
- :protect_from_unauthorized_export,
- :load_query, only: :index
+ :protect_from_unauthorized_export, only: :index
+
+ before_filter :load_query,
+ :load_work_packages, only: :index, unless: ->() { request.format.html? }
def show
respond_to do |format|
@@ -82,8 +84,6 @@ def show
end
def index
- load_work_packages unless request.format.html?
-
respond_to do |format|
format.html do
gon.settings = client_preferences
View
@@ -385,9 +385,10 @@ def project_statement
elsif project
project_clauses << "#{Project.table_name}.id = %d" % project.id
end
+ with_subprojects = Setting.display_subprojects_work_packages? || !subproject_filter.nil?
project_clauses << WorkPackage.visible_condition(User.current,
project: project,
- with_subprojects: !subproject_filter.nil?)
+ with_subprojects: with_subprojects)
project_clauses.join(' AND ')
end
@@ -142,6 +142,7 @@ def content_for_version(version = nil)
unless journal.nil? || content.version == journal.version
content_version = WikiContent.new journal.data.attributes.except('id', 'journal_id')
+ content_version.updated_on = journal.created_at
content_version.journals = content.journals.select { |j| j.version <= version.to_i }
content_version
@@ -53,7 +53,7 @@ def new_admin
user.firstname = 'OpenProject'
user.lastname = 'Admin'
user.mail = ENV.fetch('ADMIN_EMAIL') { 'admin@example.net' }
- user.mail_notification = User::USER_MAIL_OPTION_NON.first
+ user.mail_notification = User::USER_MAIL_OPTION_ONLY_MY_EVENTS.first
user.language = I18n.locale.to_s
user.status = User::STATUSES[:active]
user.force_password_change = Rails.env != 'development'
@@ -74,10 +74,10 @@ def member
:delete_work_package_watchers,
:view_calendar,
:comment_news,
+ :manage_news,
:log_time,
:view_time_entries,
:view_own_time_entries,
- :manage_project_activities,
:edit_own_time_entries,
:view_project_associations,
:view_timelines,
Oops, something went wrong.

0 comments on commit dacb194

Please sign in to comment.