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 class="name <%= editable %>" fieldname="name" field_id="<%= sprint.id %>"><%= sprint.name %></div>
</div> </div>
<div class="editors permanent"> <% if User.current.allowed_to?(:update_sprints, @project) %>
<%= text_field_tag :effective_date, <div class="editors permanent">
sprint.effective_date, <%= text_field_tag :effective_date,
id: "effective_date_#{sprint.id}", sprint.effective_date,
class: '-augmented-datepicker effective_date editor' %> id: "effective_date_#{sprint.id}",
<%= text_field_tag :start_date, class: '-augmented-datepicker effective_date editor' %>
sprint.start_date, <%= text_field_tag :start_date,
id: "start_date_#{sprint.id}", sprint.start_date,
class: '-augmented-datepicker effective_date editor' %> id: "start_date_#{sprint.id}",
<%= text_field_tag :name, class: '-augmented-datepicker effective_date editor' %>
sprint.name, <%= text_field_tag :name,
class: 'name editor' %> sprint.name,
</div> class: 'name editor' %>
</div>
<% end %>
<div class="meta"> <div class="meta">
<%= render :partial => "shared/model_errors", :object => sprint.errors %> <%= render :partial => "shared/model_errors", :object => sprint.errors %>

Loading…
Cancel
Save