Merge pull request #904 from opf/feature/new_wp_form_layout

pull/910/head
Hagen Schink 11 years ago
commit 636cfc157f
  1. BIN
      app/assets/images/bg_input_file.png
  2. BIN
      app/assets/images/pulldown_arrow2.png
  3. 7
      app/assets/stylesheets/content/_buttons.css.sass
  4. 174
      app/assets/stylesheets/content/_forms.css.sass
  5. 6
      app/assets/stylesheets/default/main.css.erb
  6. 84
      app/assets/stylesheets/global/_mixins.sass
  7. 17
      app/assets/stylesheets/global/_variables.sass
  8. 125
      app/assets/stylesheets/jstoolbar.css.erb
  9. 138
      app/assets/stylesheets/jstoolbar.css.sass
  10. 10
      app/assets/stylesheets/layout/_top_menu.css.sass
  11. 2
      app/helpers/application_helper.rb
  12. 12
      app/helpers/work_packages_helper.rb
  13. 2
      app/views/account/_login.html.erb
  14. 2
      app/views/account/login.html.erb
  15. 2
      app/views/my/blocks/_issuesassignedtome.html.erb
  16. 2
      app/views/my/blocks/_issuesreportedbyme.html.erb
  17. 2
      app/views/my/blocks/_issueswatched.html.erb
  18. 2
      app/views/my/blocks/_workpackagesresponsiblefor.html.erb
  19. 6
      app/views/projects/show.html.erb
  20. 107
      app/views/work_packages/_edit.html.erb
  21. 15
      app/views/work_packages/_form.html.erb
  22. 22
      app/views/work_packages/_time_entry.html.erb
  23. 8
      app/views/work_packages/_two_column_attributes.html.erb
  24. 18
      app/views/work_packages/new.html.erb
  25. 2
      features/work_packages/copy_with_watchers.feature

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 511 B

@ -28,5 +28,12 @@
@import global/all
a.button_highlight, .button_highlight
@include button-highlight
a.button, .button
@include button
input.button, input.button_highlight
margin-top: 0
padding: 2px 10px

@ -26,42 +26,71 @@
* See doc/COPYRIGHT.rdoc for more details. ++*/
@import global/all
@import fonts/openproject_icon_font
$login_form_button_font_color: #FFFFFF !default
$login_form_bg_color: #F8F8F8 !default
$login_form_border: 1px solid #EAEAEA !default
$login_form_input_border: 1px solid #CACACA !default
$login_form_button_bg_color: #06799F !default
$login_form_button_hover_bg_color: #053242 !default
@mixin input-style
width: $content_from_input_width
height: 30px
line-height: 30px
border: $content_form_input_border
padding: 0 0 0 10px
@include border-radius(2px)
font-family: $font_family_bold
font-size: $global_font_size
line-height: 30px
margin: 0
&:hover, &:focus
border: $content_form_input_hover_border
#login-form
form
padding: 30px 20px
background-color: $login_form_bg_color
display: block
border: $login_form_border
input#username, input#password, input#openid_url
width: $content_from_input_width
height: 35px
line-height: 35px
border: $login_form_input_border
padding: 0 10px
@include border-radius(2px)
font-family: $font_family_bold
font-size: $global_font_size
input[type=submit]
border: none
background-color: $login_form_button_bg_color
color: $login_form_button_font_color
padding: 5px 13px
font-size: $global_font_size
@include border-radius(2px)
@include default-transition
cursor: pointer
&:hover
background-color: $login_form_button_hover_bg_color
#lost_password
margin-top: 20px
float: none
display: inline-block
vertical-align: middle
@mixin select-style
@include input-style
margin: 0
height: 32px
min-width: $content_from_input_width + 10
max-width: $content_from_input_width + 10
padding: 0 0 0 10px
@mixin label-style
width: 155px
margin-left: 0
text-align: left
font-weight: normal
height: 30px
float: none
display: inline-block
padding-right: 5px
@include text-shortener
vertical-align: middle
#login-form form, #work_package-form, #update #work_package-form
padding: 30px 20px
background-color: $content_form_bg_color
display: block
border: $content_form_border
div.attribute_wrapper
position: relative
padding: 0
margin-bottom: 10px
font-size: 14px
line-height: 30px
label
@include label-style
.short
width: 100px
margin-right: 200px
select
@include select-style
input
&[type=password], &[type=text]
@include input-style
table
border: 0 none
@ -69,9 +98,82 @@ $login_form_button_hover_bg_color: #053242 !default
margin: 0
td
padding: 6px
label
@include label-style
display: inline
&.label
vertical-align: middle
width: 160px
#login-form form
.button_highlight
margin-right: 0
#work_package-form
.attributes
margin-bottom: 30px
overflow: auto
#watchers_form
position: relative
padding-left: 160px
margin-bottom: 30px
font-size: 14px
line-height: 30px
.watcher_label
@include label-style
width: 152px
margin-left: -160px
.floating
float: none
display: inline-block
#attachments
padding-left: 0
padding-right: 0
.handle_attachments, #attachments
> label
@include label-style
display: block
margin-bottom: 30px
#attachments_fields
display: inline-block
.attachment_field
display: block
margin-bottom: 10px
height: 32px
> input
@include input-style
border: none
&:hover, &:focus
border: none
label
@include label-style
width: auto
height: 32px
input
margin-left: 50px
.add_another_file
padding-left: 10px
fieldset
margin-bottom: 20px
padding: 30px 20px
hr.form_separator
border: 0
border-bottom: 1px solid $content_form_separator_color
margin: 0 0 30px
background: none
#lost_password
margin-top: 20px
.form-space
padding-top: 10px
@ -88,3 +190,7 @@ fieldset.with-legend-control
span
padding-left: 5px
background-color: white
.ui-widget
font-family: $font_family_normal
font-size: $global_font_size - 1px

@ -350,7 +350,7 @@ textarea#custom_field_possible_values {width: 99%}
p.pagination {margin-top: 8px;}
/***** Tabular forms ******/
.tabular p, div.handle_attachments {
.tabular p {
margin: 0;
padding: 5px 0 8px 0;
padding-left: 180px; /*width of left column containing the label elements*/
@ -660,6 +660,7 @@ div.autocomplete {
width: 400px;
margin: 0;
padding: 0;
z-index: 500;
}
div.autocomplete ul {
list-style-type: none;
@ -1498,9 +1499,6 @@ tr.time-entry {
}
/* issue updates */
#update form#issue-form .attributes p {
padding-bottom: 5px;
}
#update fieldset .box {
padding: 0;
border: 0 none;

@ -25,17 +25,17 @@
*
* See doc/COPYRIGHT.rdoc for more details. ++*/
$vendors: "-webkit-", "-moz-", "-ms-", "-o-", ""
$button_gray_font_color: #222222
@mixin html_body_spacing
margin: 0
padding: 0
height: 100%
@mixin default-transition
-webkit-transition: all 200ms ease-in-out 0s
-moz-transition: all 200ms ease-in-out 0s
-ms-transition: all 200ms ease-in-out 0s
-o-transition: all 200ms ease-in-out 0s
transition: all 200ms ease-in-out 0s
@each $vendor in $vendors
#{$vendor}transition: all 200ms ease-in-out 0s
@mixin default-font-normal($color, $font-size: 13px)
color: $color
@ -67,19 +67,70 @@
-moz-border-radius: $radius
border-radius: $radius
@mixin button
background-color: $button_bg_color
color: $button_font_color
@include default-transition
@mixin button-highlight-background
border: 1px solid #06799F
background: #0b8db8
background: -moz-linear-gradient(top, #0b8db8 0%, #06799f 100%)
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#0b8db8), color-stop(100%,#06799f))
background: -webkit-linear-gradient(top, #0b8db8 0%,#06799f 100%)
background: -o-linear-gradient(top, #0b8db8 0%,#06799f 100%)
background: -ms-linear-gradient(top, #0b8db8 0%,#06799f 100%)
background: linear-gradient(to bottom, #0b8db8 0%,#06799f 100%)
&:hover
border: 1px solid #3493B3
background: #3493B3
@mixin button-background
border: 1px solid #ccc
background: #ffffff
background: -moz-linear-gradient(top, #ffffff 0%, #eeeeee 74%, #eeeeee 100%)
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(74%,#eeeeee), color-stop(100%,#eeeeee))
background: -webkit-linear-gradient(top, #ffffff 0%,#eeeeee 74%,#eeeeee 100%)
background: -o-linear-gradient(top, #ffffff 0%,#eeeeee 74%,#eeeeee 100%)
background: -ms-linear-gradient(top, #ffffff 0%,#eeeeee 74%,#eeeeee 100%)
background: linear-gradient(to bottom, #ffffff 0%,#eeeeee 74%,#eeeeee 100%)
&:hover
border: 1px solid #777777
background: -moz-linear-gradient(top, #ffffff 0%, #eeeeee 40%, #ddd 100%)
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(40%,#eeeeee), color-stop(100%,#ddd))
background: -webkit-linear-gradient(top, #ffffff 0%,#eeeeee 74%,#ddd 100%)
background: -o-linear-gradient(top, #ffffff 0%,#eeeeee 40%,#ddd 100%)
background: -ms-linear-gradient(top, #ffffff 0%,#eeeeee 40%,#ddd 100%)
background: linear-gradient(to bottom, #ffffff 0%,#eeeeee 40%,#ddd 100%)
@mixin button-common
@include border-radius($button_border_radius)
margin: 10px 10px 0 0
padding: 5px 13px
line-height: 23px
font-size: 12px
font-size: $global_font_size
font-weight: normal
cursor: pointer
@mixin button-normal-size
padding: 4px 10px
@mixin button-big-size
padding: 7px 16px 5px
@mixin button-highlight
color: $button_highlight_font_color
@include button-common
@include button-normal-size
@include button-highlight-background
color: $button_highlight_font_hover_color
&:hover
text-decoration: none
@mixin button
color: $button_font_color
@include button-common
@include button-normal-size
@include button-background
color: $button_font_hover_color
&:hover
background-color: $button_bg_hover_color
color: $button_font_hover_color
text-decoration: none
@mixin content-box
@ -120,3 +171,10 @@
background-color: white
ul
margin-bottom: 20px
@mixin text-shortener
white-space: nowrap
overflow: hidden
text-overflow: ellipsis
-o-text-overflow: ellipsis
-ms-text-overflow: ellipsis

@ -44,9 +44,6 @@ $header_drop_down_border_color: #E0E0E0 !default
$header_drop_down_item_font_color: #555555 !default
$header_drop_down_item_font_hover_color: #FFFFFF !default
$header_drop_down_button_bg_color: #06799F !default
$header_drop_down_button_hover_bg_color: #053242 !default
$header_logo_bg_color: #06799F !default
$header_home_link_bg: url(image-path('logo_openproject_white_big.png')) no-repeat 20px 0 !default
@ -121,8 +118,14 @@ $content_link_font_weight: bold !default
$content_icon_color: #06799F !default
$content_form_bg_color: #FFFFFF !default
$content_form_bg_color: #F8F8F8 !default
$content_form_border: 1px solid #EAEAEA !default
$content_from_input_width: 300px !default
$content_form_input_border: 1px solid #EAEAEA !default
$content_form_input_hover_border: 1px solid #888888 !default
$content_form_separator_color: #DDDDDD !default
$content_flash_msg_font_color: #111111 !default
$content_flash_error_msg_bg_color: #FF8B8B !default
@ -140,8 +143,10 @@ $content_calendar_inactive_day_bg_color: #4B4B4B !default
$button_bg_color: #3493B3 !default
$button_bg_hover_color: #06799F !default
$button_font_color: #FFFFFF !default
$button_font_hover_color: #FFFFFF !default
$button_font_color: #222222 !default
$button_font_hover_color: #222222 !default
$button_highlight_font_color: #FFFFFF !default
$button_highlight_font_hover_color: #FFFFFF !default
$button_border_radius: 2px !default
$content_box_border: 1px solid #EAEAEA !default

@ -1,125 +0,0 @@
/*-- copyright
OpenProject is a project management system.
Copyright (C) 2012-2013 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.
++*/
.jstEditor {
padding-left: 0px;
}
.jstEditor textarea, .jstEditor iframe {
margin: 0;
}
.jstHandle {
height: 10px;
font-size: 0.1em;
cursor: s-resize;
/*background: transparent url(img/resizer.png) no-repeat 45% 50%;*/
}
.jstElements {
padding: 3px 3px;
}
.jstElements button {
margin-right : 6px;
width : 24px;
height: 24px;
padding: 4px;
border-style: solid;
border-width: 1px;
border-color: #ddd;
background-color : #f7f7f7;
background-position : 50% 50%;
background-repeat: no-repeat;
}
.jstElements button:hover {
border-color : #000;
}
.jstElements button span {
display : none;
}
.jstElements span {
display : inline;
}
.jstSpacer {
width : 0px;
font-size: 1px;
margin-right: 4px;
}
.jstElements .help { float: right; margin-right: 0.5em; padding-top: 8px; font-size: 0.9em; }
.jstElements .help a {padding: 2px 0 2px 20px; }
/* Buttons
-------------------------------------------------------- */
.jstb_strong {
background-image: url(<%= asset_path 'jstoolbar/bt_strong.png' %>);
}
.jstb_em {
background-image: url(<%= asset_path 'jstoolbar/bt_em.png' %>);
}
.jstb_ins {
background-image: url(<%= asset_path 'jstoolbar/bt_ins.png' %>);
}
.jstb_del {
background-image: url(<%= asset_path 'jstoolbar/bt_del.png' %>);
}
.jstb_code {
background-image: url(<%= asset_path 'jstoolbar/bt_code.png' %>);
}
.jstb_h1 {
background-image: url(<%= asset_path 'jstoolbar/bt_h1.png' %>);
}
.jstb_h2 {
background-image: url(<%= asset_path 'jstoolbar/bt_h2.png' %>);
}
.jstb_h3 {
background-image: url(<%= asset_path 'jstoolbar/bt_h3.png' %>);
}
.jstb_ul {
background-image: url(<%= asset_path 'jstoolbar/bt_ul.png' %>);
}
.jstb_ol {
background-image: url(<%= asset_path 'jstoolbar/bt_ol.png' %>);
}
.jstb_bq {
background-image: url(<%= asset_path 'jstoolbar/bt_bq.png' %>);
}
.jstb_unbq {
background-image: url(<%= asset_path 'jstoolbar/bt_bq_remove.png' %>);
}
.jstb_pre {
background-image: url(<%= asset_path 'jstoolbar/bt_pre.png' %>);
}
.jstb_link {
background-image: url(<%= asset_path 'jstoolbar/bt_link.png' %>);
}
.jstb_img {
background-image: url(<%= asset_path 'jstoolbar/bt_img.png' %>);
}

@ -0,0 +1,138 @@
/*-- copyright
* OpenProject is a project management system.
* Copyright (C) 2012-2013 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. ++
*/
@import global/all
.jstEditor
padding-left: 0px
textarea, iframe
margin: 0
.jstHandle
height: 10px
font-size: 0.1em
cursor: s-resize
.jstElements
padding: 3px 3px
button
margin-right: 10px
width: 32px
height: 32px
padding: 6px 5px 4px 5px
border: 1px solid #CCCCCC
background: url(image-path('bg_input_file.png')) repeat-x 0 0
font-size: 18px
@include border-radius(2px)
&:before
@include icon-common
&:hover
border-color: #000
cursor: pointer
span
display: none
span
display: inline
.help
float: right
margin-right: 0.5em
padding-top: 8px
font-size: 0.9em
a
padding: 2px 0 2px 20px
.jstSpacer
width: 0px
font-size: 1px
margin-right: 4px
.jstb_strong:before
content: "\e042"
.jstb_em:before
content: "\e070"
.jstb_ins:before
content: "\e0b3"
.jstb_del:before
content: "\e072"
.jstb_code:before
content: "\e050"
.jstb_h1
padding-bottom: 5px
&:before
font-family: $font_family_normal
font-size: 15px
content: "H1"
.jstb_h2
&:before
font-family: $font_family_normal
font-size: 15px
content: "H2"
.jstb_h3
&:before
font-family: $font_family_normal
font-size: 15px
content: "H3"
.jstb_ul:before
content: "\e07b"
.jstb_ol:before
content: "\e07d"
.jstb_bq:before
content: "\e08d"
.jstb_unbq:before
content: "\e08e"
.jstb_pre
&:before
font-family: $font_family_normal
font-size: 15px
content: "pre"
.jstb_link:before
content: "\e013"
.jstb_img:before
content: "\e06c"

@ -175,16 +175,6 @@
@include default-transition
&:hover
border: 1px solid #888888
input[type=submit]
background: $header_drop_down_button_bg_color
border-radius: 20px
color: #FFFFFF
padding: 6px 13px
border: none
cursor: pointer
@include default-transition
&:hover
background: $header_drop_down_button_hover_bg_color
div a
display: inline
padding: 0

@ -104,7 +104,7 @@ module ApplicationHelper
link_to l(:label_preview),
url,
:id => id,
:class => 'preview',
:class => 'preview button',
:accesskey => accesskey(:preview)
end

@ -469,7 +469,7 @@ module WorkPackagesHelper
def work_package_form_parent_attribute(form, work_package, locals = {})
if User.current.allowed_to?(:manage_subtasks, locals[:project])
field = form.text_field :parent_id, :size => 10, :title => l(:description_autocomplete)
field = form.text_field :parent_id, :size => 10, :title => l(:description_autocomplete), :class => 'short'
field += '<div id="parent_issue_candidates" class="autocomplete"></div>'.html_safe
field += javascript_tag "observeWorkPackageParentField('#{work_packages_auto_complete_path(:id => work_package, :project_id => locals[:project], :escape => false) }')"
@ -522,7 +522,6 @@ module WorkPackagesHelper
field = form.select(:category_id,
(locals[:project].categories.collect {|c| [c.name, c.id]}),
:include_blank => true)
field += prompt_to_remote(icon_wrapper('icon icon-add',t(:label_work_package_category_new)),
t(:label_work_package_category_new),
'category[name]',
@ -551,14 +550,14 @@ module WorkPackagesHelper
end
def work_package_form_start_date_attribute(form, work_package, locals = {})
start_date_field = form.text_field :start_date, :size => 10, :disabled => attrib_disabled?(work_package, 'start_date')
start_date_field = form.text_field :start_date, :size => 10, :disabled => attrib_disabled?(work_package, 'start_date'), :class => 'short'
start_date_field += calendar_for("#{form.object_name}_start_date") unless attrib_disabled?(work_package, 'start_date')
WorkPackageAttribute.new(:start_date, start_date_field)
end
def work_package_form_due_date_attribute(form, work_package, locals = {})
due_date_field = form.text_field :due_date, :size => 10, :disabled => attrib_disabled?(work_package, 'due_date')
due_date_field = form.text_field :due_date, :size => 10, :disabled => attrib_disabled?(work_package, 'due_date'), :class => 'short'
due_date_field += calendar_for("#{form.object_name}_due_date") unless attrib_disabled?(work_package, 'due_date')
WorkPackageAttribute.new(:due_date, due_date_field)
@ -568,9 +567,10 @@ module WorkPackagesHelper
field = form.text_field :estimated_hours,
:size => 3,
:disabled => attrib_disabled?(work_package, 'estimated_hours'),
:value => number_with_precision(work_package.estimated_hours, :precision => 2)
:value => number_with_precision(work_package.estimated_hours, :precision => 2),
:class => 'short',
:placeholder => TimeEntry.human_attribute_name(:hours)
field += TimeEntry.human_attribute_name(:hours)
WorkPackageAttribute.new(:estimated_hours, field)
end

@ -41,7 +41,7 @@ See doc/COPYRIGHT.rdoc for more details.
<td><%= password_field_tag 'password',
nil,
:id => 'password-pulldown' %></td>
<td><input type="submit" name="login" value="<%=l(:button_login)%>" /></td>
<td><input type="submit" name="login" value="<%=l(:button_login)%>" class="button_highlight" /></td>
</tr>
</table>
<div id = "optional_login_fields" style = "top = 10px; white-space:nowrap">

@ -61,7 +61,7 @@ See doc/COPYRIGHT.rdoc for more details.
<td>
</td>
<td align="right">
<input type="submit" name="login" value="<%=l(:button_login)%>"/>
<input type="submit" name="login" value="<%=l(:button_login)%>" class="button_highlight" />
</td>
</tr>
</table>

@ -49,7 +49,7 @@ See doc/COPYRIGHT.rdoc for more details.
set_filter: 1,
assigned_to_id: 'me',
sort: 'priority:desc,updated_at:desc'},
:class => 'button' %>
:class => 'button_highlight' %>
</p>
<% end %>

@ -45,7 +45,7 @@ See doc/COPYRIGHT.rdoc for more details.
status_id: '*',
author_id: 'me',
sort: 'updated_at:desc'},
:class => 'button' %>
:class => 'button_highlight' %>
</p>
<% end %>

@ -38,6 +38,6 @@ See doc/COPYRIGHT.rdoc for more details.
<p class="small">
<%= link_to(I18n.t(:label_work_package_view_all_watched),
{controller: :work_packages, action: :index, set_filter: 1, watcher_id: 'me', sort: 'updated_at:desc'},
:class => 'button') %>
:class => 'button_highlight') %>
</p>
<% end %>

@ -49,7 +49,7 @@ See doc/COPYRIGHT.rdoc for more details.
set_filter: 1,
responsible_id: 'me',
sort: 'priority:desc,updated_at:desc'},
:class => 'button' %>
:class => 'button_highlight' %>
</p>
<% end %>

@ -73,9 +73,9 @@ See doc/COPYRIGHT.rdoc for more details.
<% end %>
</ul>
<p>
<%= link_to l(:label_work_package_view_all), {controller: :work_packages, action: :index, project_id: @project, set_filter: 1}, :class => 'button' %>
<%= link_to l(:label_work_package_view_all), {controller: :work_packages, action: :index, project_id: @project, set_filter: 1}, :class => 'button_highlight' %>
<% if User.current.allowed_to?(:view_calendar, @project, :global => true) %>
<%= link_to(l(:label_calendar), {:controller => '/work_packages/calendars', :action => 'index', :project_id => @project}, :class => 'button') %>
<%= link_to(l(:label_calendar), {:controller => '/work_packages/calendars', :action => 'index', :project_id => @project}, :class => 'button_highlight') %>
<% end %>
</p>
</div>
@ -90,7 +90,7 @@ See doc/COPYRIGHT.rdoc for more details.
<div class="news content-box">
<h3><%=l(:label_news_latest)%></h3>
<%= render :partial => 'news/news', :collection => @news %>
<p><%= link_to l(:label_news_view_all), {:controller => '/news', :action => 'index', :project_id => @project}, :class => 'button' %></p>
<p><%= link_to l(:label_news_view_all), {:controller => '/news', :action => 'index', :project_id => @project}, :class => 'button_highlight' %></p>
</div>
<% end %>
<%= call_hook(:view_projects_show_right, :project => @project) %>

@ -38,43 +38,42 @@ See doc/COPYRIGHT.rdoc for more details.
<%= error_messages_for work_package %>
<div class="box">
<% if edit_allowed || !allowed_statuses.empty? %>
<fieldset class="tabular">
<legend>
<%= l(:label_change_properties) %>
<% if !work_package.new_record? && !work_package.errors.any? && edit_allowed %>
<small>
(<%= link_to l(:label_more), {}, :onclick => 'Effect.toggle("work_package_descr_fields", "appear", {duration:0.3}); enable_textarea_auto_completion(jQuery("#work_package_description")); return false;' %>)
</small>
<% end %>
</legend>
<% edit_form = (edit_allowed ? 'form' : 'form_update') %>
<%= render :partial => edit_form,
:locals => { :f => f,
:work_package => work_package,
:priorities => priorities,
:project => project,
:user => user,
:time_entry => time_entry } %>
</fieldset>
<% end %>
<% if authorize_for('timelog', 'edit') %>
<fieldset class="tabular">
<legend>
<%= l(:button_log_time) %>
</legend>
<%= render :partial => 'time_entry',
:locals => { :time_entry => time_entry,
:f => f } %>
</fieldset>
<% end %>
<fieldset>
<% if edit_allowed || !allowed_statuses.empty? %>
<fieldset class="tabular">
<legend>
<%= l(:label_change_properties) %>
<% if !work_package.new_record? && !work_package.errors.any? && edit_allowed %>
<small>
(<%= link_to l(:label_more), {}, :onclick => 'Effect.toggle("work_package_descr_fields", "appear", {duration:0.3}); enable_textarea_auto_completion(jQuery("#work_package_description")); return false;' %>)
</small>
<% end %>
</legend>
<% edit_form = (edit_allowed ? 'form' : 'form_update') %>
<%= render :partial => edit_form,
:locals => { :f => f,
:work_package => work_package,
:priorities => priorities,
:project => project,
:user => user,
:time_entry => time_entry } %>
</fieldset>
<% end %>
<% if authorize_for('timelog', 'edit') %>
<fieldset class="tabular">
<legend>
<%= l(:button_log_time) %>
</legend>
<%= render :partial => 'time_entry',
:locals => { :time_entry => time_entry,
:f => f } %>
</fieldset>
<% end %>
<fieldset>
<div class="attribute_wrapper">
<legend>
<%= Journal.human_attribute_name(:notes) %>
</legend>
@ -89,26 +88,26 @@ See doc/COPYRIGHT.rdoc for more details.
<%= call_hook(:view_work_packages_edit_notes_bottom, { :issue => work_package,
:notes => work_package.journal_notes,
:form => f }) %>
</fieldset>
<fieldset id="attachments" class="header_collapsible collapsible collapsed">
<legend title="<%=l(:description_attachment_toggle)%>", onclick="toggleFieldset(this);">
<a href="javascript:"><%=l(:label_attachment_plural)%></a>
</legend>
<div style="display: none;">
<%= render :partial => 'attachments/nested_form',
:locals => { :f => f } %>
</div>
</fieldset>
<p class="email_notification">
<%= send_notification_option %>
</p>
</div>
</fieldset>
<fieldset id="attachments" class="header_collapsible collapsible collapsed">
<legend title="<%=l(:description_attachment_toggle)%>", onclick="toggleFieldset(this);">
<a href="javascript:"><%=l(:label_attachment_plural)%></a>
</legend>
<div style="display: none;">
<%= render :partial => 'attachments/nested_form',
:locals => { :f => f } %>
</div>
</fieldset>
<div class="email_notification attribute_wrapper">
<%= send_notification_option %>
</div>
<%= f.hidden_field :lock_version %>
<%= submit_tag l(:button_submit) %>
<%= submit_tag l(:button_submit), :class => 'button_highlight' %>
<%= link_to_work_package_preview(work_package) %>
<% end %>

@ -34,9 +34,9 @@ See doc/COPYRIGHT.rdoc for more details.
<% work_package_form_top_attributes(f, work_package,
:priorities => priorities,
:project => project).each do |attribute| %>
<p>
<div class="attribute_wrapper">
<%= attribute.field %>
</p>
</div>
<% end %>
@ -52,6 +52,7 @@ See doc/COPYRIGHT.rdoc for more details.
</div>
<% if work_package.new_record? %>
<hr class="form_separator" />
<div class="handle_attachments">
<%= label_tag('attachments[1][file]', l(:label_attachment_plural))%>
<%= render :partial => 'attachments/form' %>
@ -59,12 +60,16 @@ See doc/COPYRIGHT.rdoc for more details.
<% end %>
<% if work_package.new_record? && User.current.allowed_to?(:add_work_package_watchers, project) -%>
<p id="watchers_form">
<label><%= l(:label_work_package_watchers) %></label>
<hr class="form_separator" />
<div id="watchers_form">
<label class="watcher_label"><%= l(:label_work_package_watchers) %></label>
<% work_package.project.users.sort.each do |user| -%>
<label class="floating"><%= check_box_tag 'work_package[watcher_user_ids][]', user.id, work_package.watched_by?(user) %> <%=h user %></label>
<% end -%>
</p>
<% work_package.project.users.sort.each do |user| -%>
<label class="floating"><%= check_box_tag 'work_package[watcher_user_ids][]', user.id, work_package.watched_by?(user) %> <%=h user %></label>
<% end -%>
</div>
<% end %>
<%= call_hook(:view_work_packages_form_details_bottom, { :issue => work_package, :form => f }) %>

@ -33,25 +33,27 @@ See doc/COPYRIGHT.rdoc for more details.
:lang => current_language} do |fields| %>
<div class="splitcontentleft">
<p>
<div class="attribute_wrapper">
<%= fields.text_field :hours,
:label => :label_spent_time %>
<%= TimeEntry.human_attribute_name(:hours) %>
</p>
:label => :label_spent_time,
:placeholder => TimeEntry.human_attribute_name(:hours),
:class => 'short' %>
</div>
</div>
<div class="splitcontentright">
<p>
<div class="attribute_wrapper">
<%= fields.select :activity_id, activity_collection_for_select_options %>
</p>
</div>
</div>
<p>
<br class="clear" />
<div class="attribute_wrapper">
<%= fields.text_field :comments %>
</p>
</div>
<% time_entry.custom_field_values.each do |value| %>
<p>
<div class="attribute_wrapper">
<%= custom_field_tag_with_label :time_entry, value %>
</p>
</div>
<% end %>
<% end %>

@ -31,9 +31,9 @@ See doc/COPYRIGHT.rdoc for more details.
<div class="splitcontentleft">
<% left_attributes.each do |attribute| %>
<p>
<div class="attribute_wrapper">
<%= attribute.field %>
</p>
</div>
<% end %>
</div>
@ -41,9 +41,9 @@ See doc/COPYRIGHT.rdoc for more details.
<div class="splitcontentright">
<% right_attributes.each do |attribute| %>
<p>
<div class="attribute_wrapper">
<%= attribute.field %>
</p>
</div>
<% end %>
</div>

@ -40,18 +40,16 @@ See doc/COPYRIGHT.rdoc for more details.
<%= error_messages_for :object => work_package %>
<div class="box">
<%= render :partial => 'form', :locals => { :f => f,
:work_package => work_package,
:project => project,
:priorities => priorities,
:user => user } %>
<p>
<%= send_notification_option %>
</p>
<%= render :partial => 'form', :locals => { :f => f,
:work_package => work_package,
:project => project,
:priorities => priorities,
:user => user } %>
<div class="attribute_wrapper">
<%= send_notification_option %>
</div>
<%= submit_tag l(:button_create) %>
<%= submit_tag l(:button_create), :class => "button_highlight" %>
<!-- not supported by controller for now -->
<%#= submit_tag l(:button_create_and_continue), :name => 'continue' %>
<%= link_to_work_package_preview(project) %>

@ -76,7 +76,7 @@ Feature: Copying an work package can copy over the watchers
Scenario: Watchers should be copied when the user has the permission to
Given I am already logged in as "lrrr"
When I go to the copy page for the work package "Improve drive"
Then I should see "Watchers" within "p#watchers_form"
Then I should see "Watchers" within "div#watchers_form"
When I fill in "Subject" with "Improve drive even more"
And I submit the form by the "Create" button
Then I should see "Watchers (2)"

Loading…
Cancel
Save