Merge branch 'dev' into feature/rails4.1

pull/3458/head
Jens Ulferts 9 years ago
commit 3d71285da0
  1. 2
      .travis.yml
  2. 20
      Gemfile
  3. 10
      Gemfile.lock
  4. 24
      app/assets/images/webalys/LICENSE.md
  5. BIN
      app/assets/images/webalys/activity_news.png
  6. BIN
      app/assets/images/webalys/arrow-down_2.png
  7. BIN
      app/assets/images/webalys/arrow_circle.png
  8. BIN
      app/assets/images/webalys/arrow_left_right.png
  9. BIN
      app/assets/images/webalys/budget.png
  10. BIN
      app/assets/images/webalys/calendar.png
  11. BIN
      app/assets/images/webalys/cancel.png
  12. BIN
      app/assets/images/webalys/changeset.png
  13. BIN
      app/assets/images/webalys/check.png
  14. BIN
      app/assets/images/webalys/configure.png
  15. BIN
      app/assets/images/webalys/copy.png
  16. BIN
      app/assets/images/webalys/delete.png
  17. BIN
      app/assets/images/webalys/deleted.png
  18. BIN
      app/assets/images/webalys/double_arrow_left.png
  19. BIN
      app/assets/images/webalys/double_arrow_right.png
  20. BIN
      app/assets/images/webalys/duplicate.png
  21. BIN
      app/assets/images/webalys/edit.png
  22. BIN
      app/assets/images/webalys/envelope.png
  23. BIN
      app/assets/images/webalys/error.png
  24. BIN
      app/assets/images/webalys/fav.png
  25. BIN
      app/assets/images/webalys/feed.png
  26. BIN
      app/assets/images/webalys/group.png
  27. BIN
      app/assets/images/webalys/help.png
  28. BIN
      app/assets/images/webalys/history.png
  29. BIN
      app/assets/images/webalys/latest_news.png
  30. BIN
      app/assets/images/webalys/latest_projects.png
  31. BIN
      app/assets/images/webalys/locked.png
  32. BIN
      app/assets/images/webalys/locked_un.png
  33. BIN
      app/assets/images/webalys/move.png
  34. BIN
      app/assets/images/webalys/new_planning_element.png
  35. BIN
      app/assets/images/webalys/news.png
  36. BIN
      app/assets/images/webalys/outline.png
  37. BIN
      app/assets/images/webalys/package.png
  38. BIN
      app/assets/images/webalys/plus.png
  39. BIN
      app/assets/images/webalys/quote.png
  40. BIN
      app/assets/images/webalys/red_x.png
  41. BIN
      app/assets/images/webalys/rename.png
  42. BIN
      app/assets/images/webalys/save.png
  43. BIN
      app/assets/images/webalys/search.png
  44. BIN
      app/assets/images/webalys/stats.png
  45. BIN
      app/assets/images/webalys/summary.png
  46. BIN
      app/assets/images/webalys/ticket.png
  47. BIN
      app/assets/images/webalys/ticket_checked.png
  48. BIN
      app/assets/images/webalys/ticket_edit.png
  49. BIN
      app/assets/images/webalys/ticket_note.png
  50. BIN
      app/assets/images/webalys/time.png
  51. BIN
      app/assets/images/webalys/tip.png
  52. BIN
      app/assets/images/webalys/units.png
  53. BIN
      app/assets/images/webalys/user.png
  54. BIN
      app/assets/images/webalys/warning.png
  55. BIN
      app/assets/images/webalys/watch.png
  56. BIN
      app/assets/images/webalys/watch_b.png
  57. BIN
      app/assets/images/webalys/wiki_edit.png
  58. BIN
      app/assets/images/webalys/zoom_in.png
  59. BIN
      app/assets/images/webalys/zoom_out.png
  60. 11
      app/assets/javascripts/application.js.erb
  61. 3
      app/assets/javascripts/modal.js
  62. 83
      app/assets/stylesheets/_misc_legacy.sass
  63. 35
      app/assets/stylesheets/content/_calendar.sass
  64. 1
      app/assets/stylesheets/content/_flash_messages.sass
  65. 46
      app/assets/stylesheets/content/_in_place_editing.sass
  66. 16
      app/assets/stylesheets/content/_simple_filters.lsg
  67. 41
      app/assets/stylesheets/content/_simple_filters.sass
  68. 206
      app/assets/stylesheets/content/_tables.sass
  69. 8
      app/assets/stylesheets/content/_tabs.sass
  70. 80
      app/assets/stylesheets/content/_timelines.scss
  71. 71
      app/assets/stylesheets/content/_wiki.sass
  72. 41
      app/assets/stylesheets/content/work_package_details/_watchers_tab.lsg
  73. 1
      app/assets/stylesheets/default.css.sass
  74. 6
      app/assets/stylesheets/fonts/_openproject_icon_font.sass
  75. 9
      app/assets/stylesheets/layout/_top_menu.sass
  76. 77
      app/assets/stylesheets/layout/_work_package.sass
  77. 36
      app/assets/stylesheets/scm.css.sass
  78. 51
      app/assets/stylesheets/timelines.css.sass
  79. 2
      app/controllers/api/experimental/work_packages_controller.rb
  80. 15
      app/controllers/projects_controller.rb
  81. 28
      app/helpers/application_helper.rb
  82. 90
      app/helpers/projects_helper.rb
  83. 11
      app/helpers/repositories_helper.rb
  84. 18
      app/helpers/work_packages_helper.rb
  85. 2
      app/models/user_preference.rb
  86. 2
      app/services/delete_user_service.rb
  87. 2
      app/views/admin/plugins.html.erb
  88. 30
      app/views/admin/projects.html.erb
  89. 12
      app/views/common/_calendar.html.erb
  90. 4
      app/views/common/_tabs.html.erb
  91. 10
      app/views/projects/_edit.html.erb
  92. 48
      app/views/projects/_form.html.erb
  93. 110
      app/views/projects/form/_activities.html.erb
  94. 31
      app/views/projects/form/_custom_fields.html.erb
  95. 2
      app/views/projects/form/_modules.html.erb
  96. 6
      app/views/projects/form/_types.html.erb
  97. 2
      app/views/projects/new.html.erb
  98. 95
      app/views/projects/settings/_activities.html.erb
  99. 162
      app/views/projects/settings/_boards.html.erb
  100. 140
      app/views/projects/settings/_categories.html.erb
  101. Some files were not shown because too many files have changed in this diff Show More

@ -58,6 +58,8 @@ env:
- "TEST_SUITE=spec:legacy DB=postgres"
before_install:
# TODO: Remove when bundler 1.10 is available on travis per default
- "gem install bundler"
- "echo `firefox -v`"
- "export DISPLAY=:99.0"
- "/sbin/start-stop-daemon --start -v --pidfile ./tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1920x1080x16"

@ -91,8 +91,6 @@ gem 'rack-protection', git: 'https://github.com/finnlabs/rack-protection.git', r
# https://github.com/kickstarter/rack-attack
gem 'rack-attack'
gem 'syck', platforms: [:mri, :mingw, :x64_mingw], require: false
gem 'gon', '~> 4.0'
# catch exceptions and send them to any airbrake compatible backend
@ -157,7 +155,7 @@ group :test do
gem 'capybara-screenshot', '~> 1.0.4'
gem 'capybara-select2', github: 'goodwill/capybara-select2'
gem 'capybara-ng', '~> 0.2.1'
gem 'selenium-webdriver', '~> 2.46.2'
gem 'selenium-webdriver', '~> 2.47.1'
gem 'timecop', '~> 0.7.1'
gem 'rb-readline', '~> 0.5.1' # ruby on CI needs this
@ -175,6 +173,20 @@ group :ldap do
gem 'net-ldap', '~> 0.8.0'
end
# Optional groups are only available with Bundler 1.10+
# We still want older bundlers to parse this gemfile correctly,
# thus this rather ugly workaround is needed for now.
# TODO: Remove this when 1.10+ is widespread.
if Gem::Version.new(Bundler::VERSION) >= Gem::Version.new('1.10.0')
group :syck, optional: true do
gem "syck", require: false
end
else
gem "syck", require: false
end
group :development do
gem 'letter_opener', '~> 1.3.0'
gem 'thin'
@ -225,7 +237,7 @@ platforms :jruby do
end
group :opf_plugins do
gem 'openproject-translations', git:'https://github.com/myabc/openproject-translations.git', branch: 'feature/rails4.1'
gem 'openproject-translations', git: 'https://github.com/opf/openproject-translations.git', branch: 'dev'
end
# Load Gemfile.local, Gemfile.plugins and plugins' Gemfiles

@ -29,9 +29,9 @@ GIT
rspec-example_disabler (0.0.1)
GIT
remote: https://github.com/myabc/openproject-translations.git
revision: a8d7b650987608b4100adaf6229ce2dd0ea3d5b0
branch: feature/rails4.1
remote: https://github.com/opf/openproject-translations.git
revision: b270647adbd4e82817fae953d184532e64843b17
branch: dev
specs:
openproject-translations (5.0.0.pre.alpha)
crowdin-api (~> 0.2.4)
@ -406,7 +406,7 @@ GEM
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (~> 1.1)
selenium-webdriver (2.46.2)
selenium-webdriver (2.47.1)
childprocess (~> 0.5)
multi_json (~> 1.0)
rubyzip (~> 1.0)
@ -553,7 +553,7 @@ DEPENDENCIES
rubytree (~> 0.8.3)
sass (~> 3.4.12)
sass-rails (~> 5.0.3)
selenium-webdriver (~> 2.46.2)
selenium-webdriver (~> 2.47.1)
shoulda-context (~> 1.2)
shoulda-matchers (~> 2.8)
simplecov (= 0.8.0.pre)

@ -1,24 +0,0 @@
# All images in this directory are lincensed under the Creative Commons License
Some images are from the "Minicons Free Vector Icons Pack by Webalys",
some from the "Minimal Vector Icons by Webalys". Detailed license for both icon sets follow.
## Minicons
<pre>
Minicons Free Vector Icons Pack by Webalys is licensed under a Creative Commons Attribution 3.0 Unported License and Free for both personal and commercial use. You can copy, adapt, remix, distribute or transmit it.
Under this condition: provide a mention of this "Minicons Free Vector Icons Pack" and a link back to this page: http://www.webalys.com/minicons
</pre>
License: http://www.webalys.com/minicons/license.php
## Minimal Vector Icons
<pre>
This Pack is published under a Creative Commons Attribution license and Free for both personal and commercial use. You can copy, adapt, remix, distribute or transmit it.
Under this condition: provide a mention of this "User Interface Design framework" and a link back to this page: http://www.webalys.com/design-interface-application-framework.php
</pre>
License: https://creativecommons.org/licenses/by/3.0/

Binary file not shown.

Before

Width:  |  Height:  |  Size: 304 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 214 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 272 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 404 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 160 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 307 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 279 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 219 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 267 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 292 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 274 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 209 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 247 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 280 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 265 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 241 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 225 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 304 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 246 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 305 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 308 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 257 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 263 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 300 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 517 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 229 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 240 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 240 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 195 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 243 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 308 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 281 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 194 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 289 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 220 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 214 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 203 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 251 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 253 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 209 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 265 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 279 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 278 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 298 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 808 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 185 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 285 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 301 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 275 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 313 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 318 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 302 B

@ -95,13 +95,10 @@ jQuery(document).ready(function ($) {
});
});
function checkAll (id, checked) {
var els = Element.descendants(id);
for (var i = 0; i < els.length; i++) {
if (els[i].disabled === false) {
els[i].checked = checked;
}
}
function checkAll(selector, checked) {
jQuery('#' + selector + ' input:checkbox').not(':disabled').each(function() {
this.checked = checked;
});
}
function toggleCheckboxesBySelector(selector) {

@ -242,7 +242,8 @@ var ModalHelper = (function() {
if (this._firstLoad) {
//add closer
modalDiv.parent().prepend('<div id="ui-dialog-closer" />').click(jQuery.proxy(this.close, this));
modalDiv.parent().prepend('<div id="ui-dialog-closer" class="icon icon-close" />')
.click(jQuery.proxy(this.close, this));
jQuery('.ui-dialog-titlebar').hide();
jQuery('.ui-dialog-buttonpane').hide();

@ -334,59 +334,9 @@ div.issue hr
margin-top: -6px
margin-bottom: 0
#content div.issue table
td
background: none
border: 0 none
padding: 0 3px
padding-left: 0
th
background: none
border: 0 none
padding: 0 3px
padding-left: 0
font-weight: bold
.attachments h4
margin-bottom: 6px
background: image-url("files-showhide.png") no-repeat right bottom
cursor: pointer
&.closed
background-position: right 5px
table.files
display: table
#content table.files
td
border: 0
background: none
th
border: 0
background: none
font-weight: bold
padding: 1px
border: 0
background: none
td
color: #555
padding: 1px
.opt-desc
width: 60%
td a
position: relative
#content blockquote
padding-left: 22px
.wiki
ol, ul
padding-left: 22px
blockquote
font-style: italic
background: image-url("blockquote-bg.png") no-repeat 5px 3px
#project-links
right: 30px
color: #ccc
@ -425,22 +375,6 @@ ul.projects
top: 7px
right: 14px
/* file table hovers */
a.has-thumb
img
position: absolute
display: none
border: 1px solid #a6c6cf
padding: 4px
background: #fff
border-radius: 3px
&.active
left: -10px
background: image-url("thumb-arrow-right.png") no-repeat left center
padding-left: 10px
margin-right: -10px
td.issue div.issue-wrap-outer
position: relative
@ -515,8 +449,6 @@ tr.time-entry
#content table .changeset td.id a:hover
text-decoration: underline
#content table.files .opt-desc
width: 45%
/* member settings [pc] */
@ -656,8 +588,6 @@ div.indent
padding-top: 0
#content
#history
background: image-url("dotted-separator.gif") repeat-x scroll 0 bottom transparent
.wiki-content
p, li
width: 700px
@ -668,15 +598,18 @@ input::-webkit-input-placeholder, :-moz-placeholder
color: #000000
#ui-dialog-closer
background-image: image-url("modal_close.png")
cursor: pointer
height: 33px
position: absolute
right: -15px
top: -15px
width: 33px
right: 0px
top: 5px
z-index: 5000
&.icon:before
color: $body-font-color
#modalDiv
padding: 2em 0 0 1.5em
h4.comment
margin-bottom: 8px
margin-top: 18px

@ -26,6 +26,19 @@
// See doc/COPYRIGHT.rdoc for more details.
//++
@mixin setCalendarIconValues()
display: inline-flex
&:before
padding: 0 10px 0 10px
&.ending:before
transform: rotate(180deg)
color: #F5827E
&.diamond:before
color: #F5827E
&.starting:before
color: #A2C57A
table.cal
border-collapse: collapse
width: 100%
@ -45,6 +58,7 @@ table.cal
border: $content-calendar-cell-border-width solid $content-calendar-cell-border-color
vertical-align: top
font-size: 0.9em
&.week-number
background-color: $content-calendar-head-cell-bg-color
padding: 4px
@ -61,15 +75,14 @@ table.cal
background-color: $content-calendar-inactive-day-bg-color
&.today
background: $content-calendar-cell-today-bg-color
.starting a, p.cal.legend .starting
background: image-url('bullet_go.png') no-repeat -1px -2px
padding-left: 16px
.ending a, p.cal.legend .ending
background: image-url('bullet_end.png') no-repeat -1px -2px
padding-left: 16px
.starting.ending a, p.cal.legend .starting.ending
background: image-url('bullet_diamond.png') no-repeat -1px -2px
padding-left: 16px
p.cal.legend span
display: block
.icon,
.icon-context
@include setCalendarIconValues()
p.legend.cal
margin-bottom: 0
.icon
@include setCalendarIconValues()
vertical-align: middle

@ -42,6 +42,7 @@
.flash
display: none
padding: 15px 5px
&.ng-leave
@include animation(0.5s fade-out)

@ -52,7 +52,6 @@ $inplace-edit--selected-date-border-color: $primary-color-dark
opacity: 0.5
*
cursor: wait!important
inplace-edit--write
.inplace-edit--date
margin: 0
@ -106,6 +105,8 @@ $inplace-edit--selected-date-border-color: $primary-color-dark
.inplace-edit--select
.select2-display-none
display: none
&.-full-width
max-width: 100%
.inplace-edit--textarea
min-height: 200px
@ -143,8 +144,6 @@ $inplace-edit--selected-date-border-color: $primary-color-dark
.inplace-edit--controls
display: inline-block
width: 115px
height: 35px
background: $inplace-edit--dark-background
border: 1px solid $inplace-edit--color--very-dark
box-shadow: 1px 1px 2px $inplace-edit--border-color
@ -160,7 +159,8 @@ $inplace-edit--selected-date-border-color: $primary-color-dark
right: 0
.inplace-edit--read
@extend .form--field-container
@include grid-block
overflow: visible
.inplace-edit--read-value
@include grid-block
@ -190,19 +190,21 @@ $inplace-edit--selected-date-border-color: $primary-color-dark
visibility: hidden
font-size: rem-calc(14px)
.icon-edit::before
.icon-edit::before,
.icon-delete::before
// HACK: overriding default padding here
padding-right: 0
a
color: $body-font-color
a.inplace-edit--icon-wrapper
color: $body-font-color
a:hover
&:hover
color: $body-font-color
text-decoration: none
.inplace-editing--trigger-container
@include grid-block
overflow: visible
// need to specify the a explicitly as otherwise
// the default class will win
@ -211,9 +213,11 @@ a.inplace-editing--trigger-link,
@include grid-block
color: $body-font-color
font-weight: inherit
overflow: visible
&:hover,
&:focus,
&.-focus,
text-decoration: none
color: $body-font-color
@ -229,9 +233,7 @@ a.inplace-editing--trigger-link,
border-style: solid
border-radius: 2px
border-width: 1px
.inplace-edit--read
@include grid-block
overflow: visible
.inplace-edit--control
background: $inplace-edit--color--very-dark
@ -249,7 +251,6 @@ a.inplace-editing--trigger-link,
a
color: $body-font-color
text-decoration: none
&:hover
.icon-context::before
padding: 0
@ -270,3 +271,24 @@ a.inplace-editing--trigger-link,
.inplace-edit--highlight
border-color: $inplace-edit--color-highlight !important
.work-package--details--long-field
margin-top: 10px
.inplace-editing--trigger-container
line-height: 1.6
.inplace-edit--read
margin-left: 0px
max-width: 100%
padding-bottom: 5px
.inplace-edit--read-value
span.deleting
opacity: 0.5
img.avatar-mini
float: inherit
i
vertical-align: text-top

@ -26,11 +26,11 @@ By default, simple filters have a two columned layout.
</select>
</div>
</li>
<li class="simple-filters--controls">
<a class="button -highlight -small" href="#">Apply</a>
<a class="button -small -with-icon icon-undo" href="#">Clear</a>
</li>
</ul>
<div class="simple-filters--controls">
<a class="button -highlight -small" href="#">Apply</a>
<a class="button -small -with-icon icon-undo" href="#">Clear</a>
</div>
</fieldset>
```
@ -68,10 +68,10 @@ If desired, the simple filter can have three columns.
</select>
</div>
</li>
<li class="simple-filters--controls">
<a class="button -highlight -small" href="#">Apply</a>
<a class="button -small -with-icon icon-undo" href="#">Clear</a>
</li>
</ul>
<div class="simple-filters--controls">
<a class="button -highlight -small" href="#">Apply</a>
<a class="button -small -with-icon icon-undo" href="#">Clear</a>
</div>
</fieldset>
```

@ -32,24 +32,35 @@ $filters--border-color: $gray !default
%filters--container
background-color: $filters--background-color
border: 1px solid $filters--border-color
border-top-width: 3px
legend
@extend .hidden-for-sighted
.simple-filters--container
@extend %filters--container
padding: 1rem
padding: 1rem 1rem 0
margin: 0.6em 0
.simple-filter--trailing-labels
list-style-type: none
display: flex
margin-left: 0
.simple-filters--filter
flex-basis: 33.33%
&.-label-columns-3
.simple-filters--filter
flex-basis: 25%
.simple-filters--filters
@extend .advanced-filters--filters
@include grid-block
@include grid-layout(1)
justify-content: space-between
justify-content: flex-start
@include breakpoint(large)
@include grid-layout(2)
@include grid-layout(3)
// Cancel out foundations padding which breaks in IE. IE seems to calculate
// the padding on top of the flex-basis size. That means when the flex-basis
@ -58,13 +69,28 @@ $filters--border-color: $gray !default
// element will move to the next row.
.simple-filters--filter,
padding: 0
display: flex
@include breakpoint(large)
.simple-filters--filter-name
flex-basis: 15%
margin-top: 5px
.simple-filters--filter-value
flex-basis: 75%
.form--radio-button-container
margin-right: 20px
.simple-filters--controls
padding: 0
align-self: flex-start
@include breakpoint(large)
flex-basis: 49%
flex: 1
.simple-filters--filters.-columns-3
justify-content: space-between
justify-content: flex-start
@include breakpoint(large)
@include grid-layout(3)
@include grid-layout(4)
// Cancel out foundations padding which breaks in IE. IE seems to calculate
// the padding on top of the flex-basis size. That means when the flex-basis
@ -74,4 +100,3 @@ $filters--border-color: $gray !default
.simple-filters--filter,
padding: 0
@include breakpoint(large)
flex-basis: 32%

@ -26,14 +26,46 @@
// See doc/COPYRIGHT.rdoc for more details.
//++
table
td
padding: 3px 6px
p
margin: 0
&.plugins
td
vertical-align: middle
&.configure
text-align: right
padding-right: 1em
span
&.name
font-weight: bold
&.description, &.url
display: block
font-size: 0.9em
&#time-report
tbody tr
font-style: italic
color: $body-font-color
&.last-level
font-style: normal
&.total
font-style: normal
font-weight: bold
background-color: #EEEEEE
.hours-dec
font-size: 0.9em
tr
&.project
td.name a
white-space: nowrap
&.idnt td.project--hierarchy span
background: image-url("bullet_arrow_right.png") no-repeat 0 50%
padding-left: 16px
&.icon-context:before
padding: 9px 5px 0 10px
&.idnt-1 td.project--hierarchy
padding-left: 0.5em
&.idnt-2 td.project--hierarchy
@ -52,6 +84,7 @@ tr
padding-left: 11em
&.idnt-9 td.project--hierarchy
padding-left: 12.5em
&.issue
white-space: nowrap
&.sum
@ -60,52 +93,76 @@ tr
td
&.category
white-space: normal
&.subject
text-align: left
&.idnt td.subject .icon-context:before
padding: 9px 0 0 10px
tr.issue
td
&.subject
text-align: left
&.idnt td.subject a
background: image-url("bullet_arrow_right.png") no-repeat 0 50%
padding-left: 16px
&.entry
border: 1px solid #f8f8f8
td
white-space: nowrap
&.filename
width: 30%
&.size
text-align: right
font-size: 90%
&.revision, &.author
text-align: center
&.age
text-align: right
#content tr.issue
&.idnt-1 td.subject
padding-left: 0.5em
&.idnt-2 td.subject
padding-left: 2em
&.idnt-3 td.subject
padding-left: 3.5em
&.idnt-4 td.subject
padding-left: 5em
&.idnt-5 td.subject
padding-left: 6.5em
&.idnt-6 td.subject
padding-left: 8em
&.idnt-7 td.subject
padding-left: 9.5em
&.idnt-8 td.subject
padding-left: 11em
&.idnt-9 td.subject
padding-left: 12.5em
div.expander
cursor: pointer
float: left
/* Work Package hierarchy layout */
&.open span .expand, &.closed span .collapse
display: none
tr
&.work-package
white-space: nowrap
&.sum
font-weight: bold
td.subject
white-space: normal
&.idnt td.subject a
background: image-url("bullet_arrow_right.png") no-repeat 0 50%
padding-left: 16px
&.changeset td
&.author, &.committed_on
text-align: center
width: 15%
[class*=reorder]
.icon-context:before
padding: 0 0 0 0
&.issue td.category
white-space: normal
&.message
height: 2.6em
td
&.created_on, &.last_message
white-space: nowrap
#content tr.work-package
&.version
td
&.closed
text-decoration: line-through
a
text-decoration: line-through
&.name
padding-left: 20px
&.icon-link:before
padding: 10px 10px 0 0
td
&.date, &.status, &.sharing
white-space: nowrap
&.user
td
white-space: nowrap
&.locked, &.registered, &.locked a, &.registered a
color: #aaa
td.hours
font-weight: bold
.hours-dec
font-size: 0.9em
th.hidden
display: none
#content tr.issue
&.idnt-1 td.subject
padding-left: 0.5em
&.idnt-2 td.subject
@ -125,70 +182,15 @@ tr
&.idnt-9 td.subject
padding-left: 12.5em
tr.group
a.toggle-all
color: #aaa
font-size: 80%
font-weight: normal
display: inline
visibility: hidden
&:hover a.toggle-all
visibility: visible
a.toggle-all:hover
text-decoration: none
table
td
padding: 3px 6px
p
margin: 0
#issue_tree
table.issues
border: 0
td.checkbox
display: none
th.hidden
display: none
table#time-report
tbody tr
font-style: italic
color: #333
&.last-level
font-style: normal
color: #555
&.total
font-style: normal
font-weight: bold
color: #555
background-color: #EEEEEE
.hours-dec
font-size: 0.9em
#content table
&.issues td
border: 0 none
vertical-align: top
th
a:hover
&.current-sort
background: white image-url("gradient-up.png") repeat-x
a
background: image-url("sort_desc.png") no-repeat right center
padding-right: 16px
display: block
tr
&.context-menu-selection
background-color: #FFFFB2
&:hover
background-color: #FFFFB2
td
&.issue
background: image-url("arrow-bottom-right.png") no-repeat right bottom
width: 42px
cursor: context-menu
&.updated
width: 80px
#issue_tree
table.issues
border: 0
td.checkbox
display: none

@ -73,11 +73,7 @@
div.tabs-buttons
position: absolute
right: 0
width: 48px
height: 24px
background: white
bottom: 0
border-bottom: 1px solid #bbbbbb
bottom: 4px
button
&.tab-left, &.tab-right
@ -92,7 +88,5 @@ button
bottom: -1px
&.tab-left
right: 20px
background: #eeeeee image-url("bullet_arrow_left.png") no-repeat 50% 50%
&.tab-right
right: 0
background: #eeeeee image-url("bullet_arrow_right.png") no-repeat 50% 50%

@ -26,18 +26,6 @@
// See doc/COPYRIGHT.rdoc for more details.
//++
#content table {
&.issues td.center, th.center {
text-align: center;
}
}
.contextual .new-element {
background: url("../images/add.png") no-repeat scroll 6px center transparent;
padding-left: 16px;
font-size: 11px;
}
.timelines-contextual-fieldset {
float: right;
white-space: nowrap;
@ -50,7 +38,6 @@
display: inline-block;
height: 12px;
width: 12px;
margin-bottom: -3px;
margin-right: 5px;
}
@ -62,46 +49,12 @@
border-radius: 4px;
}
.timelines-attributes {
th {
width: 17%;
}
td {
width: 33%;
}
}
//HACK: Use a min-height to ensure that the timeline_select select2 is not cropped at the bottom
.controller-timelines #content {
min-height: 700px;
}
#content {
.meta table.timelines-attributes {
th, td {
padding-top: 0.5em;
padding-bottom: 0.5em;
}
}
table.timelines-rep {
width: 100%;
}
}
table.timelines-dates {
width: 100%;
}
#content table.timelines-dates th {
text-align: left;
padding-left: 1em;
padding-right: 1em;
}
table.timelines-dates {
td {
padding: 1em;
}
tbody.timelines-current-dates td {
font-weight: bold;
height: 3em;
@ -110,39 +63,6 @@ table.timelines-dates {
}
}
#content table {
&.timelines-pt {
td, th {
border: 1px solid #E6E6E6;
padding: 6px;
position: relative;
text-align: left;
vertical-align: top;
}
}
&.timelines-pet {
td, th {
border: 1px solid #E6E6E6;
padding: 6px;
position: relative;
text-align: left;
vertical-align: top;
}
}
&.timelines-pt td {
&.timelines-pt-reorder, &.timelines-pt-allows_association, &.timelines-pt-actions {
width: 12%;
text-align: center;
}
}
&.timelines-pet td {
&.timelines-pet-color, &.timelines-pet-reorder, &.timelines-pet-is_default, &.timelines-pet-in_aggregation, &.timelines-pet-is_milestone, &.timelines-pet-actions {
width: 12%;
text-align: center;
}
}
}
.timelines-pet-properties {
margin-bottom: 1em;
p {

@ -68,11 +68,8 @@ div.wiki
border: 1px solid #bbb
padding: 4px
.external
background-position: 0% 60%
background-repeat: no-repeat
padding-left: 12px
background-image: image-url('external.png')
.external.icon-context:before
padding: 4px 4px 0 0
pre
margin: 1em 1em 1em 1.6em
@ -101,10 +98,10 @@ div.wiki
width: auto
a
font-weight: normal
background-image: image-url('arrow-down.png')
background-repeat: no-repeat
background-position: 0% 60%
padding-left: 16px
&.icon-context:before
padding: 3px 3px 0 0
li
list-style-type: none
@ -156,57 +153,6 @@ h1:hover, h2:hover, h3:hover
padding: 4px 4px 4px 48px
min-height: 33px
&.smallsee-also, &.smallcaution, &.smallimportant, &.smallinfo, &.smalltip, &.smallnote
display: block
margin-top: .5em
margin-bottom: .5em
padding: 4px 4px 4px 34px
min-height: 24px
&.see-also
background: image-url('wiki_styles/see-also.png') 4px 4px no-repeat #f5fffa
border: 1px solid #AAB1AD
&.smallsee-also
background: image-url('wiki_styles/see-also_small.png') 4px 4px no-repeat #f5fffa
border: 1px solid #AAB1AD
&.caution
background: image-url('wiki_styles/caution.png') 4px 6px no-repeat #f5fffa
border: 1px solid #AAB1AD
&.smallcaution
background: image-url('wiki_styles/caution_small.png') 4px 4px no-repeat #f5fffa
border: 1px solid #AAB1AD
&.important
background: image-url('wiki_styles/important.png') 4px 7px no-repeat #F0F8FF
border: 1px solid #C1C8CF
&.smallimportant
background: image-url('wiki_styles/important_small.png') 4px 6px no-repeat #F0F8FF
border: 1px solid #C1C8CF
&.info
background: image-url('wiki_styles/info.png') 4px 4px no-repeat #FFFFE0
border: 1px solid #FFFF00
&.smallinfo
background: image-url('wiki_styles/info_small.png') 4px 4px no-repeat #FFFFE0
border: 1px solid #FFFF00
&.smalltip
background: image-url('wiki_styles/tip_small.png') 4px 5px no-repeat #F5FFFA
border: 1px solid #C7CFCA
&.note
background: image-url('wiki_styles/note.png') 6px 4px no-repeat #F5FFFA
border: 1px solid #C7CFCA
&.smallnote
background: image-url('wiki_styles/note_small.png') 5px 4px no-repeat #F5FFFA
border: 1px solid #C7CFCA
.quick_info .label
background: none
color: #000
@ -215,3 +161,12 @@ h1:hover, h2:hover, h3:hover
.wiki-content
width: 700px
blockquote
font-style: italic
&.icon:before
color: #e0e0e0
position: relative
bottom: 10px
right: 15px
padding: 0 0 0 0

@ -1,41 +0,0 @@
# Work Packages - [Details Pane] - Watchers
```
<div id="detail-panel-watchers">
<ul>
<li>
<span class="user-avatar--container">
<img alt="Avatar" class="user-avatar--avatar" src="http://gravatar.com/avatar/ae4878114ca94594589106efaad8890e?default=wavatar&amp;secure=false" title="Deron Feil">
<span class="user-avatar--user-with-role">
<span class="user-avatar--user">
<a class="user-field-user-link" href="/users/25">Deron Feil</a>
</span>
</span>
</span>
<a class="detail-panel-watchers-delete-watcher-link" href=""><span><span class="detail-panel-watchers-delete-watcher-icon icon-context icon-button icon-close icon-context icon-button icon-close" title="Delete watcher"><span class="hidden-for-sighted">Delete watcher</span></span></span></a>
</li>
<li>
<span class="user-avatar--container">
<img alt="Avatar" class="user-avatar--avatar" src="http://gravatar.com/avatar/4a261f6edb9ed1de10076982663bffec?default=wavatar&amp;secure=false" title="Loraine Runolfsdottir">
<span class="user-avatar--user-with-role">
<span class="user-avatar--user">
<a class="user-field-user-link" href="/users/20">Loraine Runolfsdottir</a>
</span>
</span>
</span>
<a class="detail-panel-watchers-delete-watcher-link" href=""><span><span class="detail-panel-watchers-delete-watcher-icon icon-context icon-button icon-close icon-context icon-button icon-close" title="Delete watcher"><span class="hidden-for-sighted">Delete watcher</span></span></span></a>
</li>
<li>
<span class="user-avatar--container">
<img alt="Avatar" class="user-avatar--avatar" src="http://gravatar.com/avatar/1ac321aa9afb93ad78b52697c93d34f2?default=wavatar&amp;secure=false" title="Zena Labadie">
<span class="user-avatar--user-with-role">
<span class="user-avatar--user">
<a class="user-field-user-link" href="/users/15">Zena Labadie</a>
</span>
</span>
</span>
<a class="detail-panel-watchers-delete-watcher-link" href=""><span><span class="detail-panel-watchers-delete-watcher-icon icon-context icon-button icon-close icon-context icon-button icon-close" title="Delete watcher"><span class="hidden-for-sighted">Delete watcher</span></span></span></a>
</li>
</ul>
</div>
```

@ -73,7 +73,6 @@
@import content/work_package_details/activities_tab
@import content/work_package_details/attachments_tab
@import content/work_package_details/relations_tab
@import content/work_package_details/watchers_tab
@import content/expandable_group_content
@import content/control_colors

@ -43,7 +43,7 @@ $icon-font-file-formats: eot woff ttf
-moz-osx-font-smoothing: grayscale
@mixin icon-rules
padding: 0 5px 0 10px
padding: 10px 5px 0 10px
color: $content-icon-color
@mixin icon2-rules
@ -92,7 +92,7 @@ $icon-font-file-formats: eot woff ttf
font-size: 50px
@mixin icon-context-padding
padding: 0 10px 0 0
padding: 10px 10px 0 0
[data-icon]:before
@include icon-common
@ -192,7 +192,7 @@ $icon-font-file-formats: eot woff ttf
// used for icons in the content area, which appear in context (menus)
.action-menu .icon:before,
.icon-context:before
padding: 0 10px 0 0
padding: 10px 10px 0 0
.icon-add:before
content: "\e000"

@ -225,8 +225,15 @@ input.top-menu-search--input
background: $header-drop-down-projects-search-bg-color
margin: 0 0 10px 0
.select2-search:before
content: "\e0a1"
font-family: "openproject-icon-font"
color: #E0E0E0
position: absolute
top: 24px
right: 26px
.select2-search input
background: $header-drop-down-projects-search-input-bg-color image-url('magnifier.png') no-repeat 94% center
margin: 10px 10px
padding: 9px 7px 9px 10px
border: none

@ -47,6 +47,37 @@
.flash ~ div[ui-view]
height: calc(100% - #{($content-flash-height + $flash-margins-padding)})
// If there are two flash messages shown:
// Subtract the height of the two flash messages
.flash:not(.ng-hide) ~ .flash:not(.ng-hide) ~ div[ui-view]
height: calc(100% - #{2 * ($content-flash-height + $flash-margins-padding)})
//This can be deleted once the legcy WP view is gone
#history
border-bottom-color: rgb(221, 221, 221)
border-bottom-style: solid
border-bottom-width: 1px
tr.work-package
&.idnt-1 td.subject
padding-left: 0.5em
&.idnt-2 td.subject
padding-left: 2em
&.idnt-3 td.subject
padding-left: 3.5em
&.idnt-4 td.subject
padding-left: 5em
&.idnt-5 td.subject
padding-left: 6.5em
&.idnt-6 td.subject
padding-left: 8em
&.idnt-7 td.subject
padding-left: 9.5em
&.idnt-8 td.subject
padding-left: 11em
&.idnt-9 td.subject
padding-left: 12.5em
// HACK: workaround to ensure correct height applied to child elements
#work-packages-index
height: 100%
@ -82,6 +113,23 @@
width: 100%
overflow: hidden
table
tr
&.work-package
white-space: nowrap
&.sum
font-weight: bold
td.subject
white-space: normal
text-align: left
td.done_ratio table.progress
margin-left: auto
margin-right: auto
&.idnt td.subject.icon-context
display: inherit
&.issue td.category
white-space: normal
.work-packages--list-pagination-area
position: absolute
bottom: 0
@ -137,6 +185,9 @@
> h4
margin-top: 5px
.work-package--attachments--filename
padding: 0 0.5rem
.work-package--attachments--drop-box
border: 2px dashed $light-gray
background-color: lighten($gray, 5)
@ -188,33 +239,9 @@
flex-grow: 0
flex-shrink: 0
.work-package--attachments--files
ul
list-style: none
margin: 0
li
margin: rem-calc(5 0)
display: flex
flex-direction: row
align-items: center
.filename
margin: rem-calc(0 5)
flex-grow: 1
flex-basis: auto
overflow: hidden
white-space: nowrap
text-overflow: ellipsis
.filesize
@extend %flex-grow-shrink-zero
margin: rem-calc(0 10)
.button
@extend %flex-grow-shrink-zero
margin: 0
flex-basis: rem-calc(65)
//an workaround for ie10
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)
//IE10+ specific styles go here
.work-package--attachments--files ul li .filename
.work-package--attachments--filename
width: rem-calc(354)
display: block

@ -41,30 +41,22 @@ div.changeset-changes ul
li.change
list-style-type: none
background-image: image-url('bullet_black.png')
background-position: left center
background-repeat: no-repeat
padding-top: 1px
padding-bottom: 1px
padding-left: 20px
padding: 1px 0 1px 20px
margin: 0
&.folder
background-image: image-url('folder_open.png')
&.change-A
background-image: image-url('folder_open_add.png')
&.change-M
background-image: image-url('folder_open_orange.png')
&.change-A
background-image: image-url('bullet_add.png')
&.change-M
background-image: image-url('bullet_orange.png')
&.change-C
background-image: image-url('bullet_blue.png')
&.change-R
background-image: image-url('bullet_purple.png')
&.change-D
background-image: image-url('bullet_delete.png')
&.icon:before
position: relative
top: 2px
&.change-A.icon:before
color: green
&.change-M.icon:before
color: #FAC100
&.change-C.icon:before
color: #65B2F8
&.change-R.icon:before
color: #A54EFD
&.change-D.icon:before
color: red
.copied-from
font-style: italic

@ -119,37 +119,11 @@ select
.tl-toolbar-container *
vertical-align: bottom
.tl-icon-postponed,
.tl-icon-preponed,
.tl-icon-added,
.tl-icon-deleted,
.tl-icon-changed,
.tl-icon-calendar,
.tl-icon-zoomin,
.tl-icon-zoomout,
.tl-icon-outline
cursor: default
background-position: left center
background-repeat: no-repeat
padding-left: 19px
.tl-icon-postponed
background-image: image-url("bullet_red.png")
.tl-icon-preponed
background-image: image-url("bullet_green.png")
.tl-icon-added
background-image: image-url("added.png")
.tl-icon-deleted
background-image: image-url("webalys/deleted.png")
.tl-icon-changed
background-image: image-url("webalys/arrow_left_right.png")
.tl-icon-calendar
background-image: image-url("webalys/calendar.png")
.tl-icon-postponed.icon-time:before
color: red
.tl-icon-preponed.icon-time:before
color: green
/* *
* Timeline tree *
@ -212,9 +186,11 @@ a.tl-discreet-link:hover, input.icon:hover
.tl-historical
line-height: 8px
text-decoration: line-through
white-space: nowrap
.historical-data
text-decoration: line-through
.tl-current
line-height: 18px
padding-bottom: 8px
@ -225,14 +201,9 @@ a.tl-discreet-link:hover, input.icon:hover
.tl-preponed
color: green
.tl-expanded > a
background: image-url("arrow_expanded.png") no-repeat center
.tl-collapsed > a
background: image-url("arrow_collapsed.png") no-repeat center
.tl-expanded > a, .tl-collapsed > a
text-indent: -999em
display: block
height: 16px
width: 16px
@ -241,7 +212,6 @@ a.tl-discreet-link:hover, input.icon:hover
float: left
.tl-expanded > span, .tl-collapsed > span
padding-right: 0
position: relative
left: -16px
@ -434,8 +404,3 @@ a
#content
.timeline, .tl-left-main
border: 0
/* Icons for activity view
dt.timelines\2F planning-element
background-image: image-url("webalys/new_planning_element.png")

@ -48,7 +48,7 @@ module Api
def index
@work_packages = current_work_packages
columns = @query.involved_columns
columns = @query.involved_columns + [:id]
@column_names, @custom_field_column_ids = separate_columns_by_custom_fields(columns)

@ -36,7 +36,9 @@ class ProjectsController < ApplicationController
before_filter :disable_api
before_filter :find_project, except: [:index, :level_list, :new, :create]
before_filter :authorize, only: [:show, :settings, :edit, :update, :modules, :types]
before_filter :authorize, only: [
:show, :settings, :edit, :update, :modules, :types, :custom_fields
]
before_filter :authorize_global, only: [:new, :create]
before_filter :require_admin, only: [:archive, :unarchive, :destroy, :destroy_info]
before_filter :jump_to_project_menu_item, only: :show
@ -188,6 +190,17 @@ class ProjectsController < ApplicationController
redirect_to action: 'settings', id: @project, tab: 'modules'
end
def custom_fields
@project.work_package_custom_field_ids = params[:project][:work_package_custom_field_ids]
if @project.save
flash[:notice] = l(:notice_successful_update)
else
flash[:error] = l(:notice_project_cannot_update_custom_fields)
end
redirect_to action: 'settings', id: @project, tab: 'custom_fields'
end
def archive
flash[:error] = l(:error_can_not_archive_project) unless @project.archive
redirect_to(url_for(controller: '/admin', action: 'projects', status: params[:status]))

@ -345,10 +345,30 @@ module ApplicationHelper
method = options[:method] || :post
content_tag(:span,
link_to(image_tag('2uparrow.png', alt: l(:label_sort_highest)), url.merge("#{name}[move_to]" => 'highest'), method: method, title: l(:label_sort_highest)) +
link_to(image_tag('1uparrow.png', alt: l(:label_sort_higher)), url.merge("#{name}[move_to]" => 'higher'), method: method, title: l(:label_sort_higher)) +
link_to(image_tag('1downarrow.png', alt: l(:label_sort_lower)), url.merge("#{name}[move_to]" => 'lower'), method: method, title: l(:label_sort_lower)) +
link_to(image_tag('2downarrow.png', alt: l(:label_sort_lowest)), url.merge("#{name}[move_to]" => 'lowest'), method: method, title: l(:label_sort_lowest)),
link_to(content_tag(:span, '',
class: 'icon-context icon-sort-up',
title: l(:label_sort_highest)),
url.merge("#{name}[move_to]" => 'highest'),
method: method,
title: l(:label_sort_highest)) +
link_to(content_tag(:span, '',
class: 'icon-context icon-arrow-right6-1',
title: l(:label_sort_higher)),
url.merge("#{name}[move_to]" => 'higher'),
method: method,
title: l(:label_sort_higher)) +
link_to(content_tag(:span, '',
class: 'icon-context icon-arrow-right6-3',
title: l(:label_sort_lower)),
url.merge("#{name}[move_to]" => 'lower'),
method: method,
title: l(:label_sort_lower)) +
link_to(content_tag(:span, '',
class: 'icon-context icon-sort-down',
title: l(:label_sort_lowest)),
url.merge("#{name}[move_to]" => 'lowest'),
method: method,
title: l(:label_sort_lowest)),
class: 'reorder-icons'
)
end

@ -32,20 +32,76 @@ module ProjectsHelper
def link_to_version(version, html_options = {}, options = {})
return '' unless version && version.is_a?(Version)
link_to_if version.visible?, options[:before_text].to_s.html_safe + format_version_name(version), { controller: '/versions', action: 'show', id: version }, html_options
link_name = options[:before_text].to_s.html_safe + format_version_name(version)
link_to_if version.visible?,
link_name,
{ controller: '/versions', action: 'show', id: version },
html_options
end
def project_settings_tabs
tabs = [{ name: 'info', action: :edit_project, partial: 'projects/edit', label: :label_information_plural },
{ name: 'modules', action: :select_project_modules, partial: 'projects/settings/modules', label: :label_module_plural },
{ name: 'members', action: :manage_members, partial: 'projects/settings/members', label: :label_member_plural },
{ name: 'versions', action: :manage_versions, partial: 'projects/settings/versions', label: :label_version_plural },
{ name: 'categories', action: :manage_categories, partial: 'projects/settings/categories', label: :label_work_package_category_plural },
{ name: 'repository', action: :manage_repository, partial: 'repositories/settings', label: :label_repository },
{ name: 'boards', action: :manage_boards, partial: 'projects/settings/boards', label: :label_board_plural },
{ name: 'activities', action: :manage_project_activities, partial: 'projects/settings/activities', label: :enumeration_activities },
{ name: 'types', action: :manage_types, partial: 'projects/settings/types', label: :label_type_plural }
]
tabs = [
{
name: 'info',
action: :edit_project,
partial: 'projects/edit',
label: :label_information_plural
},
{
name: 'modules',
action: :select_project_modules,
partial: 'projects/settings/modules',
label: :label_module_plural },
{
name: 'members',
action: :manage_members,
partial: 'projects/settings/members',
label: :label_member_plural
},
{
name: 'custom_fields',
action: :edit_project,
partial: 'projects/settings/custom_fields',
label: :label_custom_field_plural
},
{
name: 'versions',
action: :manage_versions,
partial: 'projects/settings/versions',
label: :label_version_plural
},
{
name: 'categories',
action: :manage_categories,
partial: 'projects/settings/categories',
label: :label_work_package_category_plural
},
{
name: 'repository',
action: :manage_repository,
partial: 'repositories/settings',
label: :label_repository
},
{
name: 'boards',
action: :manage_boards,
partial: 'projects/settings/boards',
label: :label_board_plural
},
{
name: 'activities',
action: :manage_project_activities,
partial: 'projects/settings/activities',
label: :enumeration_activities
},
{
name: 'types',
action: :manage_types,
partial: 'projects/settings/types',
label: :label_type_plural
}
]
tabs.select { |tab| User.current.allowed_to?(tab[:action], @project) }
end
@ -60,6 +116,7 @@ module ProjectsHelper
Project.project_tree(projects) do |project, _level|
# set the project environment to please macros.
@project = project
if ancestors.empty? || project.is_descendant_of?(ancestors.last)
s << "<ul class='projects #{ancestors.empty? ? 'root' : nil}'>\n"
else
@ -70,14 +127,22 @@ module ProjectsHelper
s << "</ul></li>\n"
end
end
classes = (ancestors.empty? ? 'root' : 'child')
s << "<li class='#{classes}'><div class='#{classes}'>" +
link_to_project(project, {}, { class: 'project' }, true)
s << "<div class='wiki description'>#{format_text(project.short_description, project: project)}</div>" unless project.description.blank?
unless project.description.blank?
formatted_text = format_text(project.short_description, project: project)
s << "<div class='wiki description'>#{formatted_text}</div>"
end
s << "</div>\n"
ancestors << project
end
s << ("</li></ul>\n" * ancestors.size)
@project = original_project
end
s.html_safe
@ -89,6 +154,7 @@ module ProjectsHelper
versions.each do |version|
grouped[version.project.name] << [version.name, version.id]
end
# Add in the selected
if selected && !versions.include?(selected)
grouped[selected.project.name] << [selected.name, selected.id]

@ -104,7 +104,7 @@ module RepositoriesHelper
project_id: @project,
path: path_param,
rev: @changeset.identifier)
output << "<li class='#{style}'>#{text}</li>"
output << "<li class='#{style} icon icon-open-folder'>#{text}</li>"
output << render_changes_tree(s)
elsif c = tree[file][:c]
style << " change-#{c.action}"
@ -123,7 +123,14 @@ module RepositoriesHelper
path: path_param,
rev: @changeset.identifier) + ') ') if c.action == 'M'
text << raw(' ' + content_tag('span', h(c.from_path), class: 'copied-from')) unless c.from_path.blank?
output << "<li class='#{style}'>#{text}</li>"
case c.action
when 'A'
output << "<li class='#{style} icon icon-added'>#{text}</li>"
when 'D'
output << "<li class='#{style} icon icon-delete2'>#{text}</li>"
else
output << "<li class='#{style} icon icon-pulldown-arrow4'>#{text}</li>"
end
end
end
output << '</ul>'

@ -229,10 +229,6 @@ module WorkPackagesHelper
end
def render_work_package_tree_row(work_package, level, relation)
css_classes = ['work-package']
css_classes << "work-package-#{work_package.id}"
css_classes << 'idnt' << "idnt-#{level}" if level > 0
if relation == 'root'
issue_text = link_to("#{work_package}",
'javascript:void(0)',
@ -249,9 +245,19 @@ module WorkPackagesHelper
issue_text = link_to(work_package.to_s, work_package_path(work_package))
end
content_tag :tr, class: css_classes.join(' ') do
tr_css_classes = ['work-package', "work-package-#{work_package.id}"]
subject_css_classes = ['subject']
if level > 0
tr_css_classes << 'idnt' << "idnt-#{level}"
subject_css_classes += ['icon-context', 'icon-pulldown-arrow4']
end
content_tag :tr, class: tr_css_classes.join(' ') do
concat content_tag :td, check_box_tag('ids[]', work_package.id, false, id: nil), class: 'checkbox'
concat content_tag :td, issue_text, class: 'subject'
concat content_tag :td,
issue_text,
class: subject_css_classes.join(' ')
concat content_tag :td, h(work_package.status)
concat content_tag :td, link_to_user(work_package.assigned_to)
concat content_tag :td, link_to_version(work_package.fixed_version)

@ -78,6 +78,6 @@ class UserPreference < ActiveRecord::Base
private
def init_other_preferences
self.others ||= {}
self.others ||= { no_self_notified: true }
end
end

@ -39,7 +39,7 @@ class DeleteUserService < Struct.new :user, :actor
# as destroying users is a lengthy process we handle it in the background
# and lock the account now so that no action can be performed with it
user.lock!
Delayed::Job.enqueue DeleteUserJob.new(user)
Delayed::Job.enqueue DeleteUserJob.new(user.id)
logout! if self_delete?

@ -31,7 +31,7 @@ See doc/COPYRIGHT.rdoc for more details.
<% if @plugins.any? %>
<div class="generic-table--container">
<div class="generic-table--results-container">
<table interactive-table role="grid" class="generic-table">
<table interactive-table role="grid" class="generic-table plugins">
<colgroup>
<col>
<col>

@ -41,18 +41,18 @@ See doc/COPYRIGHT.rdoc for more details.
<legend><%= l(:label_filter_plural) %></legend>
<ul class="simple-filters--filters">
<li class="simple-filters--filter">
<label for='status'><%= Project.human_attribute_name(:status) %>:</label>
<%= select_tag 'status', project_status_options_for_select(@status), :onchange => "this.form.submit(); return false;" %>
<label class='simple-filters--filter-name' for='status'><%= Project.human_attribute_name(:status) %></label>
<%= select_tag 'status', project_status_options_for_select(@status), :onchange => "this.form.submit(); return false;", :class => 'simple-filters--filter-value' %>
</li>
<li class="simple-filters--filter">
<label for='name'><%= Project.model_name.human %>:</label>
<%= text_field_tag 'name', params[:name] %>
<label class='simple-filters--filter-name' for='name'><%= Project.model_name.human %></label>
<%= text_field_tag 'name', params[:name], :class => 'simple-filters--filter-value' %>
</li>
<li class="simple-filters--controls">
<%= submit_tag l(:button_apply), :class => 'button -highlight', :name => nil %>
</li>
</ul>
<div class="simple-filters--controls">
<%= submit_tag l(:button_apply), :class => 'button -highlight -small', :name => nil %>
<%= link_to l(:button_clear), {:controller => '/admin', :action => 'projects'}, :class => 'button -small -with-icon icon-undo' %>
</div>
</fieldset>
<% end %>
<p class="information-section">
@ -111,26 +111,30 @@ See doc/COPYRIGHT.rdoc for more details.
<tbody>
<% project_tree_when_sorted(@projects) do |project, level| %>
<tr class="<%= project.css_classes %> <%= level > 0 ? "idnt idnt-#{level}" : nil %>">
<td class="name project--hierarchy"><span><%= link_to project, settings_project_path(project), :title => project.short_description %></span></td>
<td class="name project--hierarchy"><span class="<%= level > 0 ? 'icon-context icon-pulldown-arrow4' : nil %>"><%= link_to project, settings_project_path(project), :title => project.short_description %></span></td>
<td><%= checked_image project.is_public? %></td>
<td><%= number_to_human_size(project.required_disk_space, precision: 2) if project.required_disk_space.to_i > 0 %></td>
<td><%= format_date(project.created_on) %></td>
<td><%= format_date(project.updated_on) %></td>
<td class="buttons">
<%= link_to(l(:button_archive),
<%= link_to('',
archive_project_path(project, :status => params[:status]),
data: { confirm: l(:text_are_you_sure) },
:method => :put,
:title => l(:button_archive),
:class => 'icon icon-locked') if project.active? %>
<%= link_to(l(:button_unarchive),
<%= link_to('',
unarchive_project_path(project, :status => params[:status]),
:method => :put,
:title => l(:button_unarchive),
:class => 'icon icon-unlocked') if !project.active? && (project.parent.nil? || project.parent.active?) %>
<%= link_to(l(:button_copy),
<%= link_to('',
copy_from_project_path(project, :admin),
:title => l(:button_copy),
:class => 'icon icon-copy') %>
<%= link_to(l(:button_delete),
<%= link_to('',
confirm_destroy_project_path(project),
:title => l(:button_delete),
:class => 'icon icon-delete') %>
</td>
</tr>

@ -47,16 +47,14 @@ while day <= calendar.enddt %>
<%= h("#{i.project} -") unless @project && @project == i.project %>
<%# date_img = '' %>
<% if day == i.start_date and day == i.due_date %>
<% date_img = image_tag("bullet_diamond.png", :title => l(:text_tip_work_package_begin_end_day), :alt => l(:text_tip_work_package_begin_end_day),
:class => "imgtag-icon") %>
<% date_img = content_tag(:span, '', class: "icon icon-milestone diamond") %>
<% elsif day == i.start_date %>
<% date_img = image_tag("bullet_go.png", :title => l(:text_tip_work_package_begin_day), :alt => l(:text_tip_work_package_begin_day),
:class => "imgtag-icon") %>
<% date_img = content_tag(:span, '', class: "icon icon-arrow-right7 starting") %>
<% elsif day == i.due_date %>
<% date_img = image_tag("bullet_end.png", :title => l(:text_tip_work_package_end_day), :alt => l(:text_tip_work_package_end_day),
:class => "imgtag-icon") %>
<% date_img = content_tag(:span, '', class: "icon icon-arrow-right7 ending") %>
<% end %>
<%= link_to_work_package i, :truncate => 30, :before_text => date_img %>
<%= date_img %>
<%= link_to_work_package i, :truncate => 30%>
<span class="tip"><%= render_issue_tooltip i %></span>
</div>
<% else %>

@ -45,8 +45,8 @@ See doc/COPYRIGHT.rdoc for more details.
<% end %>
</ul>
<div class="tabs-buttons" style="display:none;">
<button class="tab-left" onclick="moveTabLeft(this);"></button>
<button class="tab-right" onclick="moveTabRight(this);"></button>
<button class="tab-left icon-context icon-pulldown-arrow2" onclick="moveTabLeft(this);"></button>
<button class="tab-right icon-context icon-pulldown-arrow4" onclick="moveTabRight(this);"></button>
</div>
</div>

@ -27,9 +27,11 @@ See doc/COPYRIGHT.rdoc for more details.
++#%>
<%= labelled_tabular_form_for @altered_project, url: project_path(@project) do |f| %>
<%= render partial: 'form', locals: { f: f,
project: @altered_project,
renderTypes: false } %>
<%= render partial: 'form', locals: {
f: f,
project: @altered_project,
renderTypes: false
} %>
<%= f.button l(:button_save), class: 'button -highlight -with-icon icon-yes' %>
<%= f.button l(:button_update), class: 'button -highlight -with-icon icon-yes' %>
<% end %>

@ -33,40 +33,42 @@ See doc/COPYRIGHT.rdoc for more details.
<section class="form--section">
<%= render partial: "projects/form/project_attributes",
locals: { project: project,
form: f } %>
locals: { project: project, form: f } %>
<%= call_hook(:view_projects_form,
project: project,
form: f) %>
<%= call_hook(:view_projects_form, project: project, form: f) %>
</section>
<% unless project.new_record? %>
<section class="form--section">
<%= render partial: "projects/form/required_storage",
locals: { project: project, storage: project.count_required_storage } %>
</section>
<% end %>
<% if project.new_record? %>
<div>
<%= render partial: "projects/form/modules",
locals: { form: f } %>
</div>
<section class="form--section">
<%= render partial: "projects/form/modules", locals: { form: f } %>
</section>
<%= javascript_tag 'observeProjectModules();' %>
<% else %>
<%= render partial: "projects/form/required_storage",
locals: { project: project, storage: project.count_required_storage } %>
<% end %>
<% if (project.new_record? || project.module_enabled?('work_package_tracking')) && renderTypes %>
<div>
<section class="form--section">
<%= render partial: 'projects/form/types',
locals: { f: f,
project: project } %>
</div>
locals: { f: f, project: project } %>
</section>
<% end %>
<% unless @issue_custom_fields.empty? %>
<%= render partial: "projects/form/custom_fields",
locals: { project: project,
form: f,
work_package_custom_fields: @issue_custom_fields } %>
<% if project.new_record? %>
<section class="form--section">
<%= render partial: 'projects/form/custom_fields',
locals: {
form: f,
project: project,
work_package_custom_fields: @issue_custom_fields
} %>
</section>
<% end %>
<!--[eoform:project]-->

@ -0,0 +1,110 @@
<%#-- copyright
OpenProject is a project management system.
Copyright (C) 2012-2015 the OpenProject Foundation (OPF)
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-2013 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 doc/COPYRIGHT.rdoc for more details.
++#%>
<fieldset class="form--fieldset -with-control" id="project_types">
<legend class="form--fieldset-legend"><%=l(:label_enabled_project_activities)%></legend>
<div class="generic-table--container">
<div class="generic-table--results-container">
<table interactive-table role="grid" class="generic-table">
<colgroup>
<col highlight-col>
<col highlight-col>
<col highlight-col>
<% TimeEntryActivity.new.available_custom_fields.each do |value| %>
<col highlight-col>
<% end %>
</colgroup>
<thead>
<tr>
<th>
<div class="generic-table--sort-header-outer">
<div class="generic-table--sort-header">
<span>
<%= Enumeration.human_attribute_name(:active) %>
</span>
</div>
</div>
</th>
<th>
<div class="generic-table--sort-header-outer">
<div class="generic-table--sort-header">
<span>
<%= Enumeration.human_attribute_name(:name) %>
</span>
</div>
</div>
</th>
<th>
<div class="generic-table--sort-header-outer">
<div class="generic-table--sort-header">
<span>
<%= l(:enumeration_system_activity) %>
</span>
</div>
</div>
</th>
<% TimeEntryActivity.new.available_custom_fields.each do |value| %>
<th>
<div class="generic-table--sort-header-outer">
<div class="generic-table--sort-header">
<span>
<%= h value.name %>
</span>
</div>
</div>
</th>
<% end %>
</tr>
</thead>
<% @project.activities(true).each do |enumeration| %>
<%= fields_for "enumerations[#{enumeration.id}]", enumeration do |ff| %>
<tr>
<td>
<%= label_tag "enumerations_#{enumeration.id}_active", "#{h(enumeration.name)} #{l(:description_active)}", :class => "hidden-for-sighted" %>
<%= ff.check_box :active %>
</td>
<td>
<%= ff.hidden_field :parent_id, :value => enumeration.id unless enumeration.project %>
<%= h(enumeration) %>
</td>
<td><%= checked_image !enumeration.project %></td>
<% enumeration.custom_field_values.each do |value| %>
<td>
<%= custom_field_tag "enumerations[#{enumeration.id}]", value %>
</td>
<% end %>
</tr>
<% end %>
<% end %>
</table>
<div class="generic-table--header-background"></div>
</div>
</div>
</fieldset>

@ -28,28 +28,25 @@ See doc/COPYRIGHT.rdoc for more details.
++#%>
<fieldset class="form--fieldset -with-control" id="project_issue_custom_fields">
<legend class="form--fieldset-legend"><%=l(:label_custom_field_plural)%></legend>
<legend class="form--fieldset-legend"><%=l(:label_enabled_project_custom_fields)%></legend>
<div class="form--fieldset-control">
<span class="form--fieldset-control-container">
(<%= check_all_links 'project_issue_custom_fields' %>)
</span>
</div>
<ul class="form--list">
<% work_package_custom_fields.each do |custom_field| %>
<li class="form--field -trailing-label">
<%
css_classes = custom_field.is_for_all? ? { disabled: "disabled" } : {}
css_classes[:lang] = custom_field.name_locale
%>
<%= form.collection_check_box :work_package_custom_field_ids,
custom_field.id,
@project.all_work_package_custom_fields.include?(custom_field),
custom_field.name,
css_classes %>
</li>
<% end %>
</ul>
<%
css_classes = custom_field.is_for_all? ? { disabled: "disabled" } : {}
css_classes[:lang] = custom_field.name_locale
%>
<div class="form--field">
<%= form.collection_check_box :work_package_custom_field_ids,
custom_field.id,
@project.all_work_package_custom_fields.include?(custom_field),
custom_field.name,
css_classes %>
</div>
<% end %>
</fieldset>

@ -32,7 +32,7 @@ See doc/COPYRIGHT.rdoc for more details.
%>
<fieldset class="form--fieldset -with-control">
<legend class="form--fieldset-legend"><%= l(:text_select_project_modules) %></legend>
<legend class="form--fieldset-legend"><%= l(:label_enabled_project_modules) %></legend>
<div class="form--fieldset-control">
<span class="form--fieldset-control-container">

@ -36,15 +36,15 @@ See doc/COPYRIGHT.rdoc for more details.
class: "ignored-by-flash-activation" %>
<fieldset class="form--fieldset -with-control" id="project_types">
<legend class="form--fieldset-legend"><%=l(:label_type_plural)%></legend>
<legend class="form--fieldset-legend"><%=l(:label_enabled_project_types)%></legend>
<div class="form--fieldset-control">
<span class="form--fieldset-control-container">
(<%= link_to(l(:button_check_all), "#", id: "check_all_types") + ' | ' + link_to(l(:button_uncheck_all), "#", id: "uncheck_all_types") %>)
(<%= check_all_links 'types-form' %>)
</span>
</div>
<div class="generic-table--container">
<div class="generic-table--results-container">
<table interactive-table role="grid" class="generic-table types">
<table interactive-table role="grid" class="generic-table types" id="types-form">
<colgroup>
<col highlight-col>
<col highlight-col>

@ -30,6 +30,6 @@ See doc/COPYRIGHT.rdoc for more details.
<%= toolbar title: l(:label_project_new) %>
<%= labelled_tabular_form_for @project do |f| %>
<%= render :partial => 'form', :locals => { :f => f, :project => @project, :renderTypes => true } %>
<%= styled_button_tag l(:button_save), class: '-highlight -with-icon icon-yes' %>
<%= styled_button_tag l(:button_create), class: '-highlight -with-icon icon-yes' %>
<%= javascript_tag "Form.Element.focus('project_name');" %>
<% end %>

@ -26,89 +26,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<%= form_tag(project_enumerations_path(@project), :method => :put, :class => "tabular") do %>
<div class="generic-table--container">
<div class="generic-table--results-container">
<table interactive-table role="grid" class="generic-table">
<colgroup>
<col highlight-col>
<col highlight-col>
<col highlight-col>
<% TimeEntryActivity.new.available_custom_fields.each do |value| %>
<col highlight-col>
<% end %>
</colgroup>
<thead>
<tr>
<th>
<div class="generic-table--sort-header-outer">
<div class="generic-table--sort-header">
<span>
<%= Enumeration.human_attribute_name(:active) %>
</span>
</div>
</div>
</th>
<th>
<div class="generic-table--sort-header-outer">
<div class="generic-table--sort-header">
<span>
<%= Enumeration.human_attribute_name(:name) %>
</span>
</div>
</div>
</th>
<th>
<div class="generic-table--sort-header-outer">
<div class="generic-table--sort-header">
<span>
<%= l(:enumeration_system_activity) %>
</span>
</div>
</div>
</th>
<% TimeEntryActivity.new.available_custom_fields.each do |value| %>
<th>
<div class="generic-table--sort-header-outer">
<div class="generic-table--sort-header">
<span>
<%= h value.name %>
</span>
</div>
</div>
</th>
<% end %>
</tr>
</thead>
<% @project.activities(true).each do |enumeration| %>
<%= fields_for "enumerations[#{enumeration.id}]", enumeration do |ff| %>
<tr>
<td>
<%= label_tag "enumerations_#{enumeration.id}_active", "#{h(enumeration.name)} #{l(:description_active)}", :class => "hidden-for-sighted" %>
<%= ff.check_box :active %>
</td>
<td>
<%= ff.hidden_field :parent_id, :value => enumeration.id unless enumeration.project %>
<%= h(enumeration) %>
</td>
<td><%= checked_image !enumeration.project %></td>
<% enumeration.custom_field_values.each do |value| %>
<td>
<%= custom_field_tag "enumerations[#{enumeration.id}]", value %>
</td>
<% end %>
</tr>
<% end %>
<% end %>
</table>
<div class="generic-table--header-background"></div>
</div>
</div>
<div class="contextual">
<%= link_to(l(:button_reset), project_enumerations_path(@project),
:method => :delete,
data: { confirm: l(:text_are_you_sure) },
:class => 'icon icon-delete') %>
</div>
<%= styled_button_tag l(:button_save), class: '-highlight -with-icon icon-yes' %>
<%= form_tag project_enumerations_path(@project),
method: :put,
class: "tabular" do %>
<%= render partial: 'projects/form/activities', locals: { project: @project } %>
<p><%= styled_button_tag l(:button_save), class: '-highlight -with-icon icon-yes' %></p>
<% end %>
<br/>

@ -26,81 +26,101 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<% if @project.boards.any? %>
<div class="generic-table--container">
<div class="generic-table--results-container">
<table interactive-table role="grid" class="generic-table">
<colgroup>
<col highlight-col>
<col highlight-col>
<col highlight-col>
<col>
</colgroup>
<thead>
<tr>
<th>
<div class="generic-table--sort-header-outer">
<div class="generic-table--sort-header">
<span>
<%= Board.model_name.human %>
</span>
<fieldset class="form--fieldset -with-control">
<legend class="form--fieldset-legend">
<%= l(:label_available_project_boards) %>
</legend>
<% if @project.boards.any? %>
<div class="generic-table--container">
<div class="generic-table--results-container">
<table interactive-table role="grid" class="generic-table">
<colgroup>
<col highlight-col>
<col highlight-col>
<col highlight-col>
<col>
</colgroup>
<thead>
<tr>
<th>
<div class="generic-table--sort-header-outer">
<div class="generic-table--sort-header">
<span>
<%= Board.model_name.human %>
</span>
</div>
</div>
</div>
</th>
<th>
<div class="generic-table--sort-header-outer">
<div class="generic-table--sort-header">
<span>
<%= Board.human_attribute_name(:description) %>
</span>
</th>
<th>
<div class="generic-table--sort-header-outer">
<div class="generic-table--sort-header">
<span>
<%= Board.human_attribute_name(:description) %>
</span>
</div>
</div>
</div>
</th>
<th>
<div class="generic-table--sort-header-outer">
<div class="generic-table--sort-header">
<span>
<%=l(:button_sort)%>
</span>
</th>
<th>
<div class="generic-table--sort-header-outer">
<div class="generic-table--sort-header">
<span>
<%=l(:button_sort)%>
</span>
</div>
</div>
</div>
</th>
<th></th>
</tr>
</thead>
<tbody>
<% @project.boards.each do |board|
next if board.new_record? %>
<tr>
<td><%=h board.name %></td>
<td><%=h board.description %></td>
<td class="small-icons">
<% if authorize_for("boards", "edit") %>
<%= reorder_links('board', {:controller => '/boards', :action => 'move', :project_id => @project, :id => board}) %>
<% end %>
</td>
<td class="buttons">
<%= link_to_if_authorized l(:button_edit), {:controller => '/boards', :action => 'edit', :project_id => @project, :id => board}, :class => 'icon icon-edit' %>
<%= link_to_if_authorized l(:button_delete), {:controller => '/boards', :action => 'destroy', :project_id => @project, :id => board}, data: { confirm: l(:text_are_you_sure) }, :method => :delete, :class => 'icon icon-delete' %>
</td>
</th>
<th></th>
</tr>
<% end %>
</tbody>
</table>
<div class="generic-table--header-background"></div>
</thead>
<tbody>
<% @project.boards.each do |board|
next if board.new_record? %>
<tr>
<td><%=h board.name %></td>
<td><%=h board.description %></td>
<td class="small-icons">
<% if authorize_for 'boards', 'edit' %>
<%= reorder_links 'board', controller: '/boards',
action: 'move',
project_id: @project,
id: board %>
<% end %>
</td>
<td class="buttons">
<%= link_to_if_authorized l(:button_edit),
{ controller: '/boards', action: 'edit', project_id: @project, id: board },
class: 'icon icon-edit' %>
<%= link_to_if_authorized l(:button_delete),
{ controller: '/boards', action: 'destroy', project_id: @project, id: board },
data: { confirm: l(:text_are_you_sure) },
method: :delete,
class: 'icon icon-delete' %>
</td>
</tr>
<% end %>
</tbody>
</table>
<div class="generic-table--header-background"></div>
</div>
</div>
</div>
<% else %>
<div class="generic-table--container">
<div class="generic-table--no-results-container">
<h2 class="generic-table--no-results-title">
<i class="icon-info"></i>
<%= l(:label_nothing_display) %>
</h2>
<div class="generic-table--no-results-description">
<p class="nodata"><%= l(:label_no_data) %></p>
<% else %>
<div class="generic-table--container">
<div class="generic-table--no-results-container">
<h2 class="generic-table--no-results-title">
<i class="icon-info"></i>
<%= l(:label_nothing_display) %>
</h2>
<div class="generic-table--no-results-description">
<p class="nodata"><%= l(:label_no_data) %></p>
</div>
</div>
</div>
</div>
<% end %>
<p><%= link_to_if_authorized l(:label_board_new), {:controller => '/boards', :action => 'new', :project_id => @project} %></p>
<% end %>
</fieldset>
<p>
<%= link_to_if_authorized l(:label_board_new),
{ controller: '/boards', action: 'new', project_id: @project },
class: 'button -alt-highlight' %>
</p>

@ -26,73 +26,85 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<% if @project.categories.any? %>
<div class="generic-table--container">
<div class="generic-table--results-container">
<table interactive-table role="grid" class="generic-table">
<colgroup>
<col highlight-col>
<col highlight-col>
<col>
</colgroup>
<thead>
<tr>
<th>
<div class="generic-table--sort-header-outer">
<div class="generic-table--sort-header">
<span>
<%= Category.model_name.human %>
</span>
<fieldset class="form--fieldset -with-control">
<legend class="form--fieldset-legend">
<%= l(:label_available_project_work_package_categories) %>
</legend>
<% if @project.categories.any? %>
<div class="generic-table--container">
<div class="generic-table--results-container">
<table interactive-table role="grid" class="generic-table">
<colgroup>
<col highlight-col>
<col highlight-col>
<col>
</colgroup>
<thead>
<tr>
<th>
<div class="generic-table--sort-header-outer">
<div class="generic-table--sort-header">
<span>
<%= Category.model_name.human %>
</span>
</div>
</div>
</div>
</th>
<th>
<div class="generic-table--sort-header-outer">
<div class="generic-table--sort-header">
<span>
<%= Category.human_attribute_name(:assigned_to) %>
</span>
</th>
<th>
<div class="generic-table--sort-header-outer">
<div class="generic-table--sort-header">
<span>
<%= Category.human_attribute_name(:assigned_to) %>
</span>
</div>
</div>
</div>
</th>
<th></th>
</tr>
</thead>
<tbody>
<% for category in @project.categories %>
<% unless category.new_record? %>
<tr>
<td><%=h(category.name) %></td>
<td><%=h(category.assigned_to.name) if category.assigned_to %></td>
<td class="buttons">
<%= link_to_if_authorized l(:button_edit), { :controller => '/categories', :action => 'edit', :id => category }, :class => 'icon icon-edit' %>
<%= link_to_if_authorized l(:button_delete),
{ :controller => '/categories',
:action => 'destroy',
:id => category },
data: { confirm: l(:text_are_you_sure) },
method: :delete,
:class => 'icon icon-delete' %>
</td>
</tr>
</th>
<th></th>
</tr>
</thead>
<tbody>
<% for category in @project.categories %>
<% unless category.new_record? %>
<tr>
<td><%=h(category.name) %></td>
<td><%=h(category.assigned_to.name) if category.assigned_to %></td>
<td class="buttons">
<%= link_to_if_authorized l(:button_edit),
{ controller: '/categories', action: 'edit', id: category },
class: 'icon icon-edit' %>
<%= link_to_if_authorized l(:button_delete),
{ controller: '/categories', action: 'destroy', id: category },
data: { confirm: l(:text_are_you_sure) },
method: :delete,
class: 'icon icon-delete' %>
</td>
</tr>
<% end %>
<% end %>
<% end %>
</tbody>
</table>
<div class="generic-table--header-background"></div>
</tbody>
</table>
<div class="generic-table--header-background"></div>
</div>
</div>
</div>
<% else %>
<div class="generic-table--container">
<div class="generic-table--no-results-container">
<h2 class="generic-table--no-results-title">
<i class="icon-info"></i>
<%= l(:label_nothing_display) %>
</h2>
<div class="generic-table--no-results-description">
<p class="nodata"><%= l(:label_no_data) %></p>
<% else %>
<div class="generic-table--container">
<div class="generic-table--no-results-container">
<h2 class="generic-table--no-results-title">
<i class="icon-info"></i>
<%= l(:label_nothing_display) %>
</h2>
<div class="generic-table--no-results-description">
<p class="nodata"><%= l(:label_no_data) %></p>
</div>
</div>
</div>
</div>
<% end %>
<p><%= link_to_if_authorized l(:label_work_package_category_new), :controller => '/categories', :action => 'new', :project_id => @project %></p>
<% end %>
</fieldset
<p>
<%= link_to_if_authorized l(:label_work_package_category_new),
{ controller: '/categories', action: 'new', project_id: @project },
class: 'button -alt-highlight' %>
</p>

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save