Skip to content

Commit

Permalink
Release OpenProject 10.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverguenther committed Jun 8, 2020
2 parents 2a6fd1b + f0ae01f commit 9058b21
Show file tree
Hide file tree
Showing 194 changed files with 1,281 additions and 862 deletions.
Binary file removed .DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -961,7 +961,7 @@ GEM
hashdiff (>= 0.4.0, < 2.0.0)
websocket-driver (0.7.1)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.4)
websocket-extensions (0.1.5)
will_paginate (3.3.0)
with_advisory_lock (4.6.0)
activerecord (>= 4.2)
Expand Down
6 changes: 0 additions & 6 deletions app/assets/stylesheets/content/_forms.sass
Original file line number Diff line number Diff line change
Expand Up @@ -181,12 +181,6 @@ hr
.form--space
padding-top: 1rem

&.-left-spacing
padding-left: 1rem

&.-big
padding-top: 20px

.form--row
@include grid-block
@include grid-visible-overflow
Expand Down
23 changes: 22 additions & 1 deletion app/assets/stylesheets/content/_modal.lsg
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
</ul>
```

## Modals: With footer
## Modals: Highlighted and with footer

```
<div class="op-modal--modal-container -highlight">
Expand Down Expand Up @@ -87,3 +87,24 @@
</div>
</div>
```

## Modals: Danger zone highlighting

```
<div class="op-modal--modal-container -highlight -danger-zone">
<div class="op-modal--modal-header">
<h3 class="icon-context icon-warning">Confirm deletion of Work Package</h3>
<a class="op-modal--modal-close-button" title="Close popup">
<i class="icon-close"></i>
</a>
</div>
<div class="op-modal--modal-body">
<p>Are you sure you want to delete the following work package?<p>
<p> ... </p>
</div>
<div class="op-modal--modal-footer">
<button name="button" type="submit" class="button -danger">Continue</button>
<button name="button" type="submit" class="button">Cancel</button>
</div>
</div>
```
17 changes: 14 additions & 3 deletions app/assets/stylesheets/content/_modal.sass
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ $modal-footer-height: $modal-header-height
margin-bottom: 0px

.op-modal--modal-footer
margin: 1em 0
padding: 0 1.5rem

button:last-of-type
Expand Down Expand Up @@ -127,17 +126,29 @@ $modal-footer-height: $modal-header-height
h2, h3
@include text-shortener
margin: 0
border: none

.op-modal--modal-footer
margin: 1em 0

.op-modal--modal-close-button
right: 10px
top: 0
@include varprop(line-height, modal-header-height)
@include varprop(color, header-item-font-color)

.avatar,
.icon-context
.avatar
margin-right: 0.5rem

&.-danger-zone
.op-modal--modal-header
@include varprop(background-color, content-form-danger-zone-bg-color)
@include varprop(border-bottom-color, content-form-danger-zone-bg-color)

.op-modal--modal-close-button
@include varprop(color, content-form-danger-zone-font-color)


// Specific styles for columns-modal
.columns-modal--content
margin-bottom: 15px
Expand Down
9 changes: 9 additions & 0 deletions app/assets/stylesheets/content/editor/_ckeditor.sass
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ ckeditor-augmented-textarea .op-ckeditor--wrapper
figure.image
margin: 1em 0

figure.table
// Ensure we break apart words in table cells that
// are restricted in width (OP#33524)
td[style*=";width:"],
td[style^="width:"],
th[style*=";width:"],
th[style^="width:"]
word-break: break-all

.ck .ck-widget.op-ckeditor--code-block
// Display content as pre
white-space: pre-wrap
Expand Down
8 changes: 8 additions & 0 deletions app/assets/stylesheets/content/editor/_markdown.sass
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,11 @@ div.ck-editor__preview
> table
height: 100%
width: 100%

// Ensure we break apart words in table cells that
// are restricted in width (OP#33524)
td[style*=";width:"],
td[style^="width:"],
th[style*=";width:"],
th[style^="width:"]
word-break: break-all
67 changes: 29 additions & 38 deletions app/assets/stylesheets/layout/work_packages/_print.sass
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,26 @@
border: none
overflow: visible !important
position: relative
grid-template-columns: auto

#content-wrapper,
#content
margin: 0
width: 100%
height: 100%
overflow: visible !important
position: relative

.work-packages-partitioned-page--content-right
.work-packages--details-toolbar-container
display: none

.work-packages-partitioned-query-space--container
padding-left: 0

.work-packages-split-view--tabletimeline-side
.work-packages-split-view--tabletimeline-content
height: 100%
.wp-table--hierarchy-aditional-row,
tr.-checked,
.row-hovered
Expand Down Expand Up @@ -60,47 +67,31 @@
overflow: hidden

// -------------------- Sepcial Rules for FF --------------------
html.-browser-firefox
body.-browser-firefox
#wrapper,
#main,
.work-packages-partitioned-query-space--container,
.work-packages-partitioned-page--content-container,
.work-packages-split-view--tabletimeline-side,
.work-packages-split-view--tabletimeline-content
display: block !important

.router--work-packages-partitioned-split-view,
.router--work-packages-full-view,
.router--work-packages-full-create
#main
display: block

#content-wrapper,
#content
.work-packages-partitioned-query-space--container
display: block
.toolbar-container
display: none
.work-packages-split-view
display: block

.work-packages-split-view--tabletimeline-side
display: block
.work-packages-split-view--tabletimeline-content
display: block
.work-packages-split-view--tabletimeline-side
display: none
.work-packages-tabletimeline--table-side
&.-timeline-visible
display: initial

&.-timeline-visible
thead
// Undo that hack from above for FF
display: table-header-group
.work-packages-tabletimeline--timeline-side
// As this print is worthless, we remove it for FF
display: none !important


html.-browser-firefox,
html.-browser-edge
.router--work-packages-full-view,
.work-packages--show-view,
.work-packages-full-view--split-container
display: block
.work-packages-partitioned-query-space--container
.toolbar-container
display: none

.work-packages-partitioned-page--content-right
.work-packages--details-content
position: relative

body.-browser-firefox,
body.-browser-edge
.work-packages--show-view,
.work-packages-full-view--split-container
display: block

// ------------------Only WP full screen view ------------------
.router--work-packages-full-view
Expand Down
1 change: 1 addition & 0 deletions app/assets/stylesheets/openproject/_settings.scss
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ $breakpoint-classes: (tiny small medium large xlarge xxlarge xxxlarge);
// $code-border-style: solid;
// $code-border-color: scale-color($code-background-color, $lightness: -10%);
// $code-padding: rem-calc(2) rem-calc(5) rem-calc(1);
// $code-line-height: 1.75em;

// We use these to style anchors
// $anchor-text-decoration: none;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@
// $code-border-style: solid;
// $code-border-color: scale-color($code-background-color, $lightness: -10%);
// $code-padding: rem-calc(2) rem-calc(5) rem-calc(1);
// $code-line-height: 1.75em;

// We use these to style anchors
// $anchor-text-decoration: none;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ $code-border-size: 1px !default;
$code-border-style: solid !default;
$code-border-color: scale-color($code-background-color, $lightness: -10%) !default;
$code-padding: rem-calc(2) rem-calc(5) rem-calc(1) !default;
$code-line-height: 1.75em !default;

// We use these to style anchors
$anchor-text-decoration: none !default;
Expand Down Expand Up @@ -252,6 +253,7 @@ $acronym-underline: 1px dotted #ddd !default;
border-style: $code-border-style;
border-color: $code-border-color;
padding: $code-padding;
line-height: $code-line-height;
}

/* Lists */
Expand Down
8 changes: 7 additions & 1 deletion app/controllers/concerns/accounts/omniauth_login.rb
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,14 @@ def omniauth_hash_to_user_attributes(auth)
end
end

##
# Allow strategies to map a value for uid instead
# of always taking the global UID.
# For SAML, the global UID may change with every session
# (in case of transient nameIds)
def identity_url_from_omniauth(auth)
"#{auth[:provider]}:#{auth[:uid]}"
identifier = auth[:info][:uid] || auth[:uid]
"#{auth[:provider]}:#{identifier}"
end

# if the omni auth registration happened too long ago,
Expand Down
2 changes: 1 addition & 1 deletion app/models/journal.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def project
end

def editable_by?(user)
(journable.journal_editable_by?(user) && self.user == user) || user.admin?
journable.journal_editable_by?(self, user)
end

def details
Expand Down
14 changes: 1 addition & 13 deletions app/models/journal/aggregated_journal.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,6 @@ def containing_journal(pure_journal)
raw ? Journal::AggregatedJournal.new(raw) : nil
end

# Returns the aggregated journal that contains the vanilla/pure journal with the specified id.
def with_notes_id(notes_id)
# We need to limit the journal aggregation as soon as possible for performance reasons.
# Therefore we have to provide the notes_id to the aggregation on top of it being used
# in the where clause to pick the desired AggregatedJournal.
raw_journal = Journal::Scopes::AggregatedJournal.fetch
.where(id: notes_id)
.first

raw_journal ? Journal::AggregatedJournal.new(raw_journal) : nil
end

##
# The +journable+ parameter allows to filter for aggregated journals of a given journable.
#
Expand Down Expand Up @@ -222,7 +210,7 @@ def initialize(journal, predecessor: false)

# returns an instance of this class that is reloaded from the database
def reloaded
self.class.with_notes_id(notes_id)
self.class.containing_journal(journal)
end

def user
Expand Down
5 changes: 2 additions & 3 deletions app/models/work_package.rb
Original file line number Diff line number Diff line change
Expand Up @@ -380,10 +380,9 @@ def behind_schedule?

# check if user is allowed to edit WorkPackage Journals.
# see Redmine::Acts::Journalized::Permissions#journal_editable_by
def editable_by?(user)
project = self.project
def journal_editable_by?(journal, user)
user.allowed_to?(:edit_work_package_notes, project, global: project.present?) ||
user.allowed_to?(:edit_own_work_package_notes, project, global: project.present?)
user.allowed_to?(:edit_own_work_package_notes, project, global: project.present?) && journal.user_id == user.id
end

# Adds the 'virtual' attribute 'hours' to the result set. Using the
Expand Down
9 changes: 8 additions & 1 deletion config/locales/crowdin/ar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,7 @@ ar:
types: "الأنواع"
versions: "الإصدارات"
work_packages: "مجموعات العمل"
templated: 'Template project'
projects/status:
code: 'الحالة'
explanation: 'Status description'
Expand Down Expand Up @@ -1994,7 +1995,7 @@ ar:
permission_manage_project_activities: "إدارة أنشطة المشروع"
permission_manage_public_queries: "Manage public views"
permission_manage_repository: "إدارة المستودع"
permission_manage_subtasks: "إدارة المهام الفرعية"
permission_manage_subtasks: "Manage work package hierarchies"
permission_manage_versions: "إدارة الإصدارات"
permission_manage_wiki: "إدارة wiki"
permission_manage_wiki_menu: "إدارة قائمة wiki"
Expand Down Expand Up @@ -2029,6 +2030,12 @@ ar:
warning_one: وسيكون أعضاء المشروع إلى نقل مستودعات للمشروع.
warning_two: لن تعد تعمل الارتباطات الموجودة في المشروع.
title: تغيير معرف المشروع
template:
copying: >
Your project is being created from the selected template project. You will be notified by mail as soon as the project is available.
use_template: 'Use template'
make_template: 'Set as template'
remove_from_templates: 'Remove from templates'
archive:
are_you_sure: "هل أنت متأكد من أنك تريد أرشفة المشروع '%{name}'؟"
archived: "Archived"
Expand Down
9 changes: 8 additions & 1 deletion config/locales/crowdin/bg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,7 @@ bg:
types: "Видове"
versions: "Версии"
work_packages: "Работен пакет"
templated: 'Template project'
projects/status:
code: 'Състояние'
explanation: 'Status description'
Expand Down Expand Up @@ -1910,7 +1911,7 @@ bg:
permission_manage_project_activities: "Manage project activities"
permission_manage_public_queries: "Manage public views"
permission_manage_repository: "Manage repository"
permission_manage_subtasks: "Manage subtasks"
permission_manage_subtasks: "Manage work package hierarchies"
permission_manage_versions: "Manage versions"
permission_manage_wiki: "Manage wiki"
permission_manage_wiki_menu: "Manage wiki menu"
Expand Down Expand Up @@ -1945,6 +1946,12 @@ bg:
warning_one: Members of the project will have to relocate the project's repositories.
warning_two: Existing links to the project will no longer work.
title: Change the project's identifier
template:
copying: >
Your project is being created from the selected template project. You will be notified by mail as soon as the project is available.
use_template: 'Use template'
make_template: 'Set as template'
remove_from_templates: 'Remove from templates'
archive:
are_you_sure: "Наистина ли искате да архивирате на проекта \"%{name}\"?"
archived: "Archived"
Expand Down
Loading

0 comments on commit 9058b21

Please sign in to comment.