Skip to content

Commit

Permalink
Issue #297 More on button layouts
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdullRahman ElHusseini committed Apr 24, 2014
1 parent a93c618 commit 15f9c52
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion tutor/app/controllers/problems_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def update
elsif (problem_params[:description] != @problem.description)
@message = "Description updated"
elsif (problem_params[:track_id].to_i != @problem.track_id)
@message = "Problem moved to Track #{problem_params[:track_id]}"
@message = "Problem is moved to Track #{problem_params[:track_id]}"
else
flash.keep[:notice] = "You have entered the same paramater no change has been made!"
end
Expand Down
2 changes: 1 addition & 1 deletion tutor/app/views/problems/_flash.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<% if flash[:notice] %>
<div class="notice"><%= flash[:notice] %></div>
<div class= "alert alert-danger"><%= flash[:notice] %></div>
<% end %>
1 change: 0 additions & 1 deletion tutor/app/views/problems/done.js.erb

This file was deleted.

4 changes: 2 additions & 2 deletions tutor/app/views/problems/edit.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div id="div1", class= "alert alert-danger">
<div id="div1">
<% if flash[:notice] %>
<div class="notice"><%= flash[:notice] %></div>
<div class= "alert alert-danger"><%= flash[:notice] %></div>
<% end %>
</div>

Expand Down
10 changes: 5 additions & 5 deletions tutor/app/views/tracks/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
<div id="<%= problem.id.to_s %>" class="panel-collapse collapse">
<%= problem.description %>
<% if @can_edit %>
<Button><%= link_to "Edit",
edit_problem_path(:id => problem.id) %></button>
<%= link_to "Edit",
edit_problem_path(:id => problem.id), class: 'btn btn-primary' %>
<% end %>
</div>
</div>
Expand Down Expand Up @@ -78,8 +78,8 @@
<div id="<%= problem.id.to_s %>" class="panel-collapse collapse">
<%= problem.description %>
<% if @can_edit %>
<Button><%= link_to "Edit",
edit_problem_path(:id => problem.id) %></button>
<%= link_to "Edit",
edit_problem_path(:id => problem.id), class: 'btn btn-primary' %>
<% end %>
</div>
</div>
Expand All @@ -92,5 +92,5 @@
</div>

<% if @can_edit %>
<Button><%= link_to "Add", new_problem_path(:id => @track.id) %></button>
<%= link_to "Add", new_problem_path(:id => @track.id), class: 'btn btn-primary' %>
<% end %>

0 comments on commit 15f9c52

Please sign in to comment.