Skip to content

Commit

Permalink
Issue #297 Buttons layout changes
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdullRahman ElHusseini committed Apr 24, 2014
1 parent f9ef9ee commit ff92bef
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
3 changes: 2 additions & 1 deletion tutor/app/views/problems/_failure_options.html.erb
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
<%= button_to 'Save as Incomplete', track_path(:id => @problem.track_id), method: :get %>
<%= button_to 'Save as Incomplete', track_path(:id => @problem.track_id), method: :get,
class: 'btn btn-primary' %>
3 changes: 2 additions & 1 deletion tutor/app/views/problems/_success_options.html.erb
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
<%= button_to ' Save as complete ', problem_done_path(:problem_id => @problem.id), method: :get %>
<%= button_to ' Save as complete ', problem_done_path(:problem_id => @problem.id), method: :get,
class: 'btn btn-primary' %>
12 changes: 4 additions & 8 deletions tutor/app/views/problems/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,10 @@
<br>
<br>
<%= render partial: "problems/success_options" %>
<!-- A division for the flash message output to view the action's output -->
<% if flash[:notice] %>
<div class="notice"><%= flash[:notice] %></div>
<% end %>
<%= button_to "Delete Problem", {:action => 'destroy'}, method: :delete,
class: 'btn btn-primary', :id => params[:id],
:confirm => "Are you sure you want to delete this problem ??" %>

<%= button_to "Delete Problem", {:action => 'destroy'}, method: :delete,
class: 'btn btn-primary', :id => params[:id],
:confirm => "Are you sure you want to delete this problem ??" %>
<% if @problem.model_answers.empty? || @problem.test_cases.empty? %>
<%= render partial: "problems/failure_options" %>
<% end %>
<br>

0 comments on commit ff92bef

Please sign in to comment.