Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Work Package Design Update #470

Merged
merged 2 commits into from
Oct 1, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions app/assets/stylesheets/default/application.css.erb
Original file line number Diff line number Diff line change
Expand Up @@ -1909,7 +1909,7 @@ table.files {
#history .journal {
position: relative;
margin: 0 0 15px;
margin-bottom: 45px;
margin-bottom: 20px;
min-height: 40px;
clear: left;
margin-left: 3px;
Expand All @@ -1923,6 +1923,7 @@ table.files {
padding-right: 4px;
}
.journal h4 {
padding-right: 5px;
font-size: 12px;
font-weight: normal;
position: relative;
Expand All @@ -1935,7 +1936,7 @@ table.files {
color: #999;
}
.journal .wiki {
padding: 10px 10px 5px 0px;
padding: 0;
overflow: auto;
margin-left: 50px;
}
Expand Down Expand Up @@ -2740,9 +2741,15 @@ fieldset#attachments input, fieldset#attachments span.add_another_file {
#watchers .contextual {
margin-top: 0px;
}
div.description, div.issue_tree, div.relations {
padding-left: 3px;

div.work_package_part {
margin-top: 15px;
}

div.work_package_part strong {
text-decoration: underline
}

div.box-actions {
float: right;
margin-right: 16px;
Expand Down Expand Up @@ -3214,10 +3221,6 @@ a.sort.desc {
width: 700px;
}

#history .journal {
background: url(<%= asset_path 'dotted-separator.gif' %>) repeat-x scroll 0 0 transparent;
}

.my-project {
background: url(<%= asset_path 'fav.png' %>) no-repeat 0 50%;
}
Expand Down
59 changes: 30 additions & 29 deletions app/views/work_packages/_subwork_packages_paragraph.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -26,35 +26,36 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.

++#%>

<strong><%= l(:label_work_package_hierarchy) %></strong>
<% if User.current.allowed_to?(:manage_subtasks, @project) %>
(<%= link_to(l(:label_add_subtask), new_project_work_package_path(:project_id => @project,
:sti_type => WorkPackage.to_s,
:work_package => { :parent_id => work_package })) %>)
<% end %>

<% if !work_package.leaf? || work_package.parent %>
<% indent = 0 %>

<form action="#">
<table id="issue_tree" class="list">

<!-- render parent elements -->
<% ancestors.each do |ancestor| %>
<%= render_work_package_tree_row ancestor, indent, "parent" %>
<div class="work_package_hierarchy work_package_part">
<strong><%= l(:label_work_package_hierarchy) %></strong>
<% if User.current.allowed_to?(:manage_subtasks, @project) %>
(<%= link_to(l(:label_add_subtask), new_project_work_package_path(:project_id => @project,
:sti_type => WorkPackage.to_s,
:work_package => { :parent_id => work_package })) %>)
<% end %>

<% if !work_package.leaf? || work_package.parent %>
<% indent = 0 %>

<form action="#">
<table id="issue_tree" class="list">

<!-- render parent elements -->
<% ancestors.each do |ancestor| %>
<%= render_work_package_tree_row ancestor, indent, "parent" %>
<% indent += 1 %>
<% end %>

<!-- render current element -->
<%= render_work_package_tree_row work_package, indent, "root" %>
<% indent += 1 %>
<% end %>

<!-- render current element -->
<%= render_work_package_tree_row work_package, indent, "root" %>
<% indent += 1 %>

<!-- render child elements -->
<% work_package_list(descendants) do |descendant, level| %>
<%= render_work_package_tree_row descendant, indent + level, "child" %>
<% end %>
<!-- render child elements -->
<% work_package_list(descendants) do |descendant, level| %>
<%= render_work_package_tree_row descendant, indent + level, "child" %>
<% end %>

</table>
</form>
<% end %>
</table>
</form>
<% end %>
</div>
15 changes: 4 additions & 11 deletions app/views/work_packages/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ See doc/COPYRIGHT.rdoc for more details.
<% end %>
</p>

<hr />

<div class="issue details">
<div class="meta">
<table class="attributes">
Expand All @@ -66,18 +64,16 @@ See doc/COPYRIGHT.rdoc for more details.
</table>
</div>
</div>

<% if work_package.description? %>
<div class="description">
<hr />
<hr />
<div class="description work_package_part">
<div class="contextual">
<%= link_to_if_authorized(l(:button_quote), { controller: :work_packages, action: :quoted, id: work_package }, :class => 'quote-link icon icon-comment') %>
</div>
<p><strong><%= WorkPackage.human_attribute_name(:description)%></strong></p>
<div class="wiki wikicontent" data-user="<%= work_package.author %>">
<%= textilizable work_package, :description, :attachments => work_package.attachments %>
</div>
<hr />
</div>
<% end %>

Expand All @@ -87,24 +83,21 @@ See doc/COPYRIGHT.rdoc for more details.

<%= call_hook(:view_issues_show_description_bottom, :issue => work_package) %>

<hr />

<%= render :partial => 'subwork_packages_paragraph', :locals => { :work_package => work_package,
:ancestors => ancestors,
:descendants => descendants } %>

<% if authorize_for('work_package_relations', 'create') || relations.present? %>
<div id="relations">
<hr />
<div id="relations" class="work_package_part">
<%= render :partial => 'relations', :locals => { :work_package => work_package,
:relations => relations } %>
</div>
<% end %>

<% if User.current.allowed_to?(:add_work_package_watchers, project) ||
(work_package.watchers.present? && User.current.allowed_to?(:view_work_package_watchers, project)) %>
<div id="watchers">
<hr />
<div id="watchers" class="work_package_part">
<%= render :partial => 'watchers/watchers', :locals => {:watched => work_package} %>
</div>
<% end %>
Expand Down
1 change: 1 addition & 0 deletions doc/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ See doc/COPYRIGHT.rdoc for more details.
# Changelog

* `#1560` WorkPackage/update does not retain some fields when validations fail
* `#1929` Too many lines in work package view
* `#1946` Modal shown within in Modal
* `#1949` External links within modals do not work
* `#1992` Prepare schema migrations table
Expand Down