Skip to content

Commit

Permalink
Issue #206 fixed descriptivity and indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
serag committed Apr 24, 2014
1 parent 0f22b6d commit c369f25
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 26 deletions.
4 changes: 2 additions & 2 deletions tutor/app/assets/javascripts/lecturers.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
$(document).ready(function() {
$('.tabs .tab-links a').on('click', function(e) {
$('.tabs .tab-links a').on('click', function(element) {
var currentAttrValue = $(this).attr('href');
// Show/Hide Tabs
$('.tabs ' + currentAttrValue).siblings().slideUp(400);
Expand All @@ -8,6 +8,6 @@ $(document).ready(function() {
//$('.tabs ' + currentAttrValue).fadeIn(400).siblings().hide();
// Change/remove current tab to active
$(this).parent('li').addClass('active').siblings().removeClass('active');
e.preventDefault();
element.preventDefault();
});
});
4 changes: 2 additions & 2 deletions tutor/app/assets/javascripts/students.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
$(document).ready(function() {
$('.tabs .tab-links a').on('click', function(e) {
$('.tabs .tab-links a').on('click', function(element) {
var currentAttrValue = $(this).attr('href');
// Show/Hide Tabs
$('.tabs ' + currentAttrValue).siblings().slideUp(400);
Expand All @@ -8,6 +8,6 @@ $(document).ready(function() {
//$('.tabs ' + currentAttrValue).fadeIn(400).siblings().hide();
// Change/remove current tab to active
$(this).parent('li').addClass('active').siblings().removeClass('active');
e.preventDefault();
element.preventDefault();
});
});
4 changes: 2 additions & 2 deletions tutor/app/assets/javascripts/teaching_assistants.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
$(document).ready(function() {
$('.tabs .tab-links a').on('click', function(e) {
$('.tabs .tab-links a').on('click', function(element) {
var currentAttrValue = $(this).attr('href');
// Show/Hide Tabs
$('.tabs ' + currentAttrValue).siblings().slideUp(400);
Expand All @@ -8,6 +8,6 @@ $(document).ready(function() {
//$('.tabs ' + currentAttrValue).fadeIn(400).siblings().hide();
// Change/remove current tab to active
$(this).parent('li').addClass('active').siblings().removeClass('active');
e.preventDefault();
element.preventDefault();
});
});
14 changes: 7 additions & 7 deletions tutor/app/views/lecturers/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,24 @@
<th>Options</th>
<th></th>
</tr>
<% @courses.each do |c| %>
<% @courses.each do |course| %>
<tr>
<td>
<%= link_to c.name,
<%= link_to course.name,
:controller => 'courses',
:action => 'show',
:id => c.id, :method => :get,
:id => course.id, :method => :get,
class: "btn btn-success" %>
</td>
<td><%= c.code %></td>
<td><%= course.code %></td>
<% if current_lecturer %>
<td>
<%= link_to "Manage Course",
{
:controller => 'courses',
:action => 'edit',
:method => :get,
:id => c.id
:id => course.id
},
class: "btn btn-success",
style: "text-decoration:none" %>
Expand All @@ -44,8 +44,8 @@
{
:controller => 'discussion_boards',
:action => 'show',
:id => c.id
},
:id => course.id
},
class: "btn btn-success",
method: :get,
style: "text-decoration:none" %>
Expand Down
14 changes: 7 additions & 7 deletions tutor/app/views/students/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,25 @@
<th>Options</th>
<th></th>
</tr>
<% @courses.each do |c| %>
<% @courses.each do |course| %>
<tr>
<td>
<%= link_to c.name,
<%= link_to course.name,
:controller => 'courses',
:action => 'show',
:id => c.id,
:id => course.id,
:method => :get,
class: "btn btn-success" %>
</td>
<td><%= c.code %></td>
<td><%= course.code %></td>
<% if current_lecturer %>
<td>
<%= link_to "Manage Course",
{
:controller => 'courses',
:action => 'edit',
:method => :get,
:id => c.id
:id => course.id
},
class: "btn btn-success",
style: "text-decoration:none" %>
Expand All @@ -46,8 +46,8 @@
{
:controller => 'discussion_boards',
:action => 'show',
:id => c.id
},
:id => course.id
},
class: "btn btn-success",
method: :get,
style: "text-decoration:none" %>
Expand Down
14 changes: 8 additions & 6 deletions tutor/app/views/teaching_assistants/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,24 @@
<th>Options</th>
<th></th>
</tr>
<% @courses.each do |c| %>
<% @courses.each do |course| %>
<tr>
<td>
<%= link_to c.name,
<%= link_to course.name,
:controller => 'courses',
:action => 'show', :id => c.id,
:action => 'show', :id => course.id,
:method => :get,
class: "btn btn-success" %>
</td>
<td><%= c.code %></td>
<td><%= course.code %></td>
<% if current_lecturer %>
<td>
<%= link_to "Manage Course",
{
:controller => 'courses',
:action => 'edit',
:method => :get, :id => c.id
:method => :get,
:id => course.id
},
class: "btn btn-success",
style: "text-decoration:none" %>
Expand All @@ -42,7 +43,8 @@
<%= link_to "Discussion Board",
{
:controller => 'discussion_boards',
:action => 'show', :id => c.id
:action => 'show',
:id => course.id
},
class: "btn btn-success",
method: :get,
Expand Down

0 comments on commit c369f25

Please sign in to comment.