Skip to content

Commit

Permalink
Issue #206 extra-shorter lines in show.html.erb
Browse files Browse the repository at this point in the history
  • Loading branch information
serag committed Apr 24, 2014
1 parent 1c861e0 commit 0f22b6d
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 26 deletions.
31 changes: 23 additions & 8 deletions tutor/app/views/lecturers/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,36 @@
<% @courses.each do |c| %>
<tr>
<td>
<%= link_to c.name, :controller => 'courses', :action => 'show',
:id => c.id, :method => :get, class: "btn btn-success" %>
<%= link_to c.name,
:controller => 'courses',
:action => 'show',
:id => c.id, :method => :get,
class: "btn btn-success" %>
</td>
<td><%= c.code %></td>
<% if current_lecturer %>
<td>
<%= link_to "Manage Course", {:controller => 'courses',
:action => 'edit', :method => :get, :id => c.id},
class: "btn btn-success", style: "text-decoration:none" %>
<%= link_to "Manage Course",
{
:controller => 'courses',
:action => 'edit',
:method => :get,
:id => c.id
},
class: "btn btn-success",
style: "text-decoration:none" %>
</td>
<% end %>
<td>
<%= link_to "Discussion Board", {:controller => 'discussion_boards',
:action => 'show', :id => c.id }, class: "btn btn-success",
method: :get, style: "text-decoration:none" %>
<%= link_to "Discussion Board",
{
:controller => 'discussion_boards',
:action => 'show',
:id => c.id
},
class: "btn btn-success",
method: :get,
style: "text-decoration:none" %>
</td>
</tr>
<% end %>
Expand Down
42 changes: 32 additions & 10 deletions tutor/app/views/students/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,37 @@
<% @courses.each do |c| %>
<tr>
<td>
<%= link_to c.name, :controller => 'courses', :action => 'show',
:id => c.id, :method => :get, class: "btn btn-success" %>
<%= link_to c.name,
:controller => 'courses',
:action => 'show',
:id => c.id,
:method => :get,
class: "btn btn-success" %>
</td>
<td><%= c.code %></td>
<% if current_lecturer %>
<td>
<%= link_to "Manage Course", {:controller => 'courses',
:action => 'edit', :method => :get, :id => c.id},
class: "btn btn-success", style: "text-decoration:none" %>
<%= link_to "Manage Course",
{
:controller => 'courses',
:action => 'edit',
:method => :get,
:id => c.id
},
class: "btn btn-success",
style: "text-decoration:none" %>
</td>
<% end %>
<td>
<%= link_to "Discussion Board", {:controller => 'discussion_boards',
:action => 'show', :id => c.id }, class: "btn btn-success",
method: :get, style: "text-decoration:none" %>
<%= link_to "Discussion Board",
{
:controller => 'discussion_boards',
:action => 'show',
:id => c.id
},
class: "btn btn-success",
method: :get,
style: "text-decoration:none" %>
</td>
</tr>
<% end %>
Expand All @@ -45,8 +61,14 @@
<p> <b>Email:</b> <%= @student.email %> </p>
</div>
<div id="tab3" class="tab">
<%= link_to "Statistics", { :controller => 'students', :action => 'get_performance',
:id => @student.id }, :method => :get, class: "btn btn-success" %>
<%= link_to "Statistics",
{
:controller => 'students',
:action => 'get_performance',
:id => @student.id
},
:method => :get,
class: "btn btn-success" %>
</div>
</div>
</div>
29 changes: 21 additions & 8 deletions tutor/app/views/teaching_assistants/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,34 @@
<% @courses.each do |c| %>
<tr>
<td>
<%= link_to c.name, :controller => 'courses', :action => 'show',
:id => c.id, :method => :get, class: "btn btn-success" %>
<%= link_to c.name,
:controller => 'courses',
:action => 'show', :id => c.id,
:method => :get,
class: "btn btn-success" %>
</td>
<td><%= c.code %></td>
<% if current_lecturer %>
<td>
<%= link_to "Manage Course", {:controller => 'courses',
:action => 'edit', :method => :get, :id => c.id},
class: "btn btn-success", style: "text-decoration:none" %>
<%= link_to "Manage Course",
{
:controller => 'courses',
:action => 'edit',
:method => :get, :id => c.id
},
class: "btn btn-success",
style: "text-decoration:none" %>
</td>
<% end %>
<td>
<%= link_to "Discussion Board", {:controller => 'discussion_boards',
:action => 'show', :id => c.id}, class: "btn btn-success",
method: :get, style: "text-decoration:none" %>
<%= link_to "Discussion Board",
{
:controller => 'discussion_boards',
:action => 'show', :id => c.id
},
class: "btn btn-success",
method: :get,
style: "text-decoration:none" %>
</td>
</tr>
<% end %>
Expand Down

0 comments on commit 0f22b6d

Please sign in to comment.