Skip to content
Browse files

delete button

  • Loading branch information...
1 parent 111f5f7 commit 0f679059ae799eeb01483a284bf1a2741ffd8cd4 Kimberly Merrill committed Apr 30, 2012
View
2 app/assets/stylesheets/requests.css.scss
@@ -57,7 +57,7 @@ th {
padding-bottom: 10px;
}
- #back-button {
+ .footer-button {
float: left;
margin: 20px 0px 20px 20px;
}
View
2 app/views/requests/_form.html.erb
@@ -30,7 +30,7 @@
<div class="control-group">
<%= f.label :date, "Needed by", class: "control-label"%>
<div class="controls">
- <%= f.datetime_select :date, { order: [:month, :day, :year], discard_minute: true, discard_hour: true} , { class: "input-small"} %>
+ <%= f.datetime_select :date, { order: [:month, :day, :year], discard_minute: true, discard_hour: true, start_year: 2012} , { class: "input-small"} %>
</div>
</div>
View
11 app/views/requests/show.html.erb
@@ -31,12 +31,15 @@
</table>
</div>
<div id="footer-row" class="row-fluid">
- <div class="span4">
- <div id="back-button">
- <a class="btn btn-default btn-large" href=<%=root_url%>>
+ <div class="footer-button">
+ <a class="btn btn-large" href=<%=root_url%>>
<i class="icon-chevron-left"></i> Back</a>
</div>
- </div>
+ <div class="footer-button">
+ <% if owner?(@request) %>
+ <%= button_to 'Delete', {:controller => 'requests', :action => 'destroy', :id => @request}, :method => :delete, :confirm => "Delete this request?", :class => "btn btn-danger btn-large" %>
+ <% end %>
+ </div>
</div>
</div>
</div>

0 comments on commit 0f67905

Please sign in to comment.
Something went wrong with that request. Please try again.