only render sprint editor field if editable

pull/8687/head
ulferts 4 years ago
parent 5968c0b18a
commit 0b5ece1c36
No known key found for this signature in database
GPG Key ID: A205708DE1284017
  1. 28
      modules/backlogs/app/views/rb_sprints/_sprint.html.erb

@ -45,19 +45,21 @@ See docs/COPYRIGHT.rdoc for more details.
<div class="name <%= editable %>" fieldname="name" field_id="<%= sprint.id %>"><%= sprint.name %></div>
</div>
<div class="editors permanent">
<%= text_field_tag :effective_date,
sprint.effective_date,
id: "effective_date_#{sprint.id}",
class: '-augmented-datepicker effective_date editor' %>
<%= text_field_tag :start_date,
sprint.start_date,
id: "start_date_#{sprint.id}",
class: '-augmented-datepicker effective_date editor' %>
<%= text_field_tag :name,
sprint.name,
class: 'name editor' %>
</div>
<% if User.current.allowed_to?(:update_sprints, @project) %>
<div class="editors permanent">
<%= text_field_tag :effective_date,
sprint.effective_date,
id: "effective_date_#{sprint.id}",
class: '-augmented-datepicker effective_date editor' %>
<%= text_field_tag :start_date,
sprint.start_date,
id: "start_date_#{sprint.id}",
class: '-augmented-datepicker effective_date editor' %>
<%= text_field_tag :name,
sprint.name,
class: 'name editor' %>
</div>
<% end %>
<div class="meta">
<%= render :partial => "shared/model_errors", :object => sprint.errors %>

Loading…
Cancel
Save