mirror of
https://github.com/opf/openproject.git
synced 2026-06-14 03:30:14 +00:00
Merge pull request #7994 from opf/fix/recreate_select_unselect_on_project_settings
readd select/unselect in project settings
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user