Merge pull request #7994 from opf/fix/recreate_select_unselect_on_project_settings

readd select/unselect in project settings
pull/8001/head
Henriette Dinger 5 years ago committed by GitHub
commit 75f3a5b3f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      app/assets/javascripts/specific/toggable_fieldset.js
  2. 4
      app/assets/stylesheets/content/_forms.lsg
  3. 14
      app/assets/stylesheets/content/_forms.sass
  4. 15
      app/assets/stylesheets/layout/_toolbar.sass
  5. 4
      app/helpers/application_helper.rb
  6. 5
      app/helpers/toolbar_helper.rb
  7. 10
      app/views/project_settings/activities.html.erb
  8. 2
      app/views/project_settings/categories.html.erb
  9. 6
      app/views/project_settings/custom_fields.html.erb
  10. 7
      app/views/project_settings/modules.html.erb
  11. 4
      app/views/project_settings/types.html.erb
  12. 32
      app/views/projects/form/_toolbar.html.erb
  13. 4
      app/views/projects/form/_types.html.erb
  14. 4
      app/views/roles/_permissions.html.erb
  15. 4
      app/views/roles/report.html.erb
  16. 4
      app/views/settings/_notifications.html.erb
  17. 4
      app/views/types/form/_projects.html.erb
  18. 4
      app/views/work_packages/reports/_report_category.html.erb
  19. 2
      config/locales/en.yml
  20. 6
      modules/backlogs/app/views/project_settings/backlogs_settings.html.erb
  21. 4
      modules/webhooks/app/views/webhooks/outgoing/admin/_form.html.erb

@ -66,7 +66,7 @@ function getFieldset(el) {
function toggleFieldset(el) {
var fieldset = getFieldset(el);
var contentArea = fieldset.find('> div').not('.form--fieldset-control');
var contentArea = fieldset.find('> div').not('.form--toolbar');
fieldset.toggleClass('collapsed');
contentArea.slideToggle('fast', null);

@ -496,8 +496,8 @@
<legend class="form--fieldset-legend">
Various information
</legend>
<div class="form--fieldset-control">
<span class="form--fieldset-control-container">
<div class="form--toolbar">
<span class="form--toolbar-item">
(<a href="#">Check all</a> | <a href="#">Uncheck all</a>)
</span>
</div>

@ -264,22 +264,30 @@ fieldset.form--fieldset
#sidebar .form--fieldset-legend
@include varprop(color, main-menu-fieldset-header-color)
.form--fieldset-control
.form--toolbar
float: right
margin-top: -2.8rem
text-align: right
color: lighten($body-font-color, 10)
font-size: 1rem
font-style: italic
line-height: 1.8
margin-top: -1.8rem
fieldset > &
margin-top: -2.8rem
a:hover
text-decoration: none
.form--fieldset-control-container
.form--toolbar-item
padding: 0 0.25rem
background-color: inherit
&.-in-header
margin-left: 5px
font-style: italic
line-height: 44px
.form--section
@extend %form--fieldset-or-section

@ -61,6 +61,13 @@ $nm-color-success-background: #d8fdd1
&.-with-dropdown .toolbar-item.drop-down
position: relative
&.-minimum-title
.toolbar-items
flex-grow: 1
.title-container
flex-grow: 0
// Align title and toolbar with flex
.toolbar
display: flex
@ -79,6 +86,8 @@ $nm-color-success-background: #d8fdd1
flex-wrap: wrap
margin: 0 -10px 0 0
padding: 0
// have a fixed height for all toolbars
height: 44px
li
list-style-type: none
@ -92,6 +101,9 @@ $nm-color-success-background: #d8fdd1
&.-no-spacing
margin-right: 0
&.-no-grow
flex-grow: 0
.button
width: 100%
overflow: hidden
@ -195,6 +207,9 @@ $nm-color-success-background: #d8fdd1
white-space: nowrap
margin-bottom: 10px // margin-bottom of toolbar buttons
&.-no-grow
flex-grow: 0
h2
@include text-shortener
padding: 0

@ -373,9 +373,9 @@ module ApplicationHelper
end
def check_all_links(form_name)
link_to_function(l(:button_check_all), "checkAll('#{form_name}', true)") +
link_to_function(t(:button_check_all), "checkAll('#{form_name}', true)") +
' | ' +
link_to_function(l(:button_uncheck_all), "checkAll('#{form_name}', false)")
link_to_function(t(:button_uncheck_all), "checkAll('#{form_name}', false)")
end
def current_layout

@ -6,11 +6,12 @@ module ToolbarHelper
classes = ['toolbar-container', html[:class]].compact.join(' ')
content_tag :div, class: classes do
toolbar = content_tag :div, class: 'toolbar' do
dom_title(title, link_to, title_class: title_class, title_extra: title_extra) + dom_toolbar {
dom_title(title, link_to, title_class: title_class, title_extra: title_extra) + dom_toolbar do
yield if block_given?
}
end
end
next toolbar if subtitle.blank?
toolbar + content_tag(:p, subtitle, class: 'subtitle')
end
end

@ -26,12 +26,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See docs/COPYRIGHT.rdoc for more details.
++#%>
<%= toolbar title: l(:enumeration_activities) %>
<%= toolbar title: t(:enumeration_activities), html: { class: '-minimum-title' } do -%>
<%= render partial: 'projects/form/toolbar', locals: { form_name: "edit_project_#{@project.id}" } %>
<% end %>
<% if TimeEntryActivity.any? %>
<%= form_tag project_time_entry_activities_path(@project),
method: :put,
class: "tabular" do %>
<%= labelled_tabular_form_for @project,
url: project_time_entry_activities_path(@project),
method: :put do %>
<%= render partial: 'projects/form/activities', locals: { project: @project, withControlls: true } %>
<% end %>

@ -27,7 +27,7 @@ See docs/COPYRIGHT.rdoc for more details.
++#%>
<%= toolbar title: l(:label_work_package_category_plural) do %>
<%= toolbar title: t(:label_work_package_category_plural) do -%>
<% if current_user.allowed_to?(:manage_categories, @project) %>
<li class="toolbar-item">
<%= link_to_if_authorized({ controller: '/categories', action: 'new', project_id: @project },

@ -27,9 +27,11 @@ See docs/COPYRIGHT.rdoc for more details.
++#%>
<%= toolbar title: l(:label_custom_field_plural) do %>
<%= toolbar title: t(:label_custom_field_plural) , html: { class: '-minimum-title' } do -%>
<%= render partial: 'projects/form/toolbar', locals: { form_name: "modules-form" } %>
<% if current_user.admin? %>
<li class="toolbar-item">
<li class="toolbar-item -no-grow">
<%= link_to new_custom_field_path(type: 'WorkPackageCustomField'),
{ class: 'button -alt-highlight',
aria: {label: t(:label_custom_field_new)},

@ -26,10 +26,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See docs/COPYRIGHT.rdoc for more details.
++#%>
<%= toolbar title: l(:label_module_plural) %>
<%= toolbar title: t(:label_module_plural), html: { class: '-minimum-title' } do -%>
<%= render partial: 'projects/form/toolbar', locals: { form_name: "edit_project_#{@project.id}" } %>
<% end %>
<%= labelled_tabular_form_for @project,
url: { controller: '/projects', action: 'modules', id: @project },
url: modules_project_path(@project),
method: :put do |form| %>
<%= render partial: "/projects/form/modules",

@ -27,7 +27,9 @@ See docs/COPYRIGHT.rdoc for more details.
++#%>
<%= toolbar title: l(:label_work_package_types) %>
<%= toolbar title: t(:label_work_package_types), html: { class: '-minimum-title' } do -%>
<%= render partial: 'projects/form/toolbar', locals: { form_name: "types-form" } %>
<% end %>
<% if Type.all.any? %>
<%= form_for @project,

@ -0,0 +1,32 @@
<%#-- copyright
OpenProject is an open source project management software.
Copyright (C) 2012-2020 the OpenProject GmbH
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 3.
OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
Copyright (C) 2006-2017 Jean-Philippe Lang
Copyright (C) 2010-2013 the ChiliProject Team
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See docs/COPYRIGHT.rdoc for more details.
++#%>
<li class="form--toolbar-item -in-header">
(<%= check_all_links form_name %>)
</li>

@ -30,14 +30,14 @@ See docs/COPYRIGHT.rdoc for more details.
<%= javascript_include_tag 'types_checkboxes' %>
<%= render_flash_message :notice,
l(:notice_automatic_set_of_standard_type),
t(:notice_automatic_set_of_standard_type),
style: "display:none;",
id: "types_flash_notice",
class: "ignored-by-flash-activation" %>
<div class="generic-table--container">
<div class="generic-table--results-container">
<table class="generic-table types" id="types-form">
<table class="generic-table types">
<colgroup>
<col highlight-col>
<col highlight-col>

@ -34,8 +34,8 @@ See docs/COPYRIGHT.rdoc for more details.
<legend class="form--fieldset-legend">
<%= mod.blank? ? Project.model_name.human : l_or_humanize(mod, prefix: 'project_module_') %>
</legend>
<div class="form--fieldset-control">
<span class="form--fieldset-control-container">
<div class="form--toolbar">
<span class="form--toolbar-item">
(<%= check_all_links module_name %>)
</span>
</div>

@ -44,8 +44,8 @@ See docs/COPYRIGHT.rdoc for more details.
<legend class="form--fieldset-legend" >
<%= mod.blank? ? I18n.t('attributes.project') : l_or_humanize(mod, prefix: 'project_module_') %>
</legend>
<div class="form--fieldset-control">
<span class="form--fieldset-control-container">
<div class="form--toolbar">
<span class="form--toolbar-item">
(<%= check_all_links module_name %>)
</span>
</div>

@ -38,8 +38,8 @@ See docs/COPYRIGHT.rdoc for more details.
<legend class="form--fieldset-legend">
<%= t(:text_select_mail_notifications) %>
</legend>
<div class="form--fieldset-control">
<span class="form--fieldset-control-container">
<div class="form--toolbar">
<span class="form--toolbar-item">
(<%= check_all_links 'notified_events' %>)
</span>
</div>

@ -36,8 +36,8 @@ See docs/COPYRIGHT.rdoc for more details.
<%= t('types.edit.enabled_projects') %>
</legend>
<div>
<div class="form--fieldset-control">
<span class="form--fieldset-control-container">
<div class="form--toolbar">
<span class="form--toolbar-item">
(<%= check_all_links 'type_project_ids' %>)
</span>
</div>

@ -29,8 +29,8 @@ See docs/COPYRIGHT.rdoc for more details.
<div class="form--fieldset">
<div class="form--fieldset-legend"><%= WorkPackage.human_attribute_name(report.report_type) %></div>
<div class="form--fieldset-control">
<span class="form--fieldset-control-container">
<div class="form--toolbar">
<span class="form--toolbar-item">
<%= link_to(icon_wrapper('icon icon-zoom-in',l(:text_analyze, subject: WorkPackage.human_attribute_name(report.report_type))),
{action: 'report_details', detail: report.report_type},
title: l(:text_analyze, subject: WorkPackage.human_attribute_name(report.report_type)),

@ -1065,7 +1065,7 @@ en:
project_filters:
description_html: "Filtering and sorting on custom fields is an enterprise edition feature."
enumeration_activities: "Activities (time tracking)"
enumeration_activities: "Time tracking activities"
enumeration_work_package_priorities: "Work package priorities"
enumeration_reported_project_statuses: "Reported project status"

@ -27,9 +27,11 @@ See docs/COPYRIGHT.rdoc for more details.
++#%>
<%= toolbar title: l('backlogs.definition_of_done') %>
<%= toolbar title: t('backlogs.definition_of_done'), html: { class: '-minimum-title' } do -%>
<%= render partial: 'projects/form/toolbar', locals: { form_name: "edit_project_#{@project.id}" } %>
<% end %>
<%= styled_form_tag(controller: '/projects', action: "project_done_statuses", id: @project) do %>
<%= styled_form_tag({controller: '/projects', action: "project_done_statuses", id: @project}, id: "edit_project_#{@project.id}") do %>
<div class="generic-table--container">
<div class="generic-table--results-container">

@ -36,8 +36,8 @@
<legend class="form--fieldset-legend" title="<%= t 'webhooks.outgoing.form.events.title' %>">
<%= t 'webhooks.outgoing.form.events.title' %>
</legend>
<div class="form--fieldset-control">
<span class="form--fieldset-control-container">
<div class="form--toolbar">
<span class="form--toolbar-item">
(<%= check_all_links 'webhooks-selected-events' %>)
</span>
</div>

Loading…
Cancel
Save