Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
view edits, hooking together all the pieces
- Loading branch information
Showing
28 changed files
with
101 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
class ApplicationController < ActionController::Base | ||
before_filter :authenticate_user! | ||
before_filter :verify_credentials | ||
protect_from_forgery | ||
|
||
private | ||
def verify_credentials | ||
user_signed_in? || admin_signed_in? | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
<div class="floor line" id="floor-<%= floor.id %>"> | ||
<h3><%= link_to(floor.name, library_floor_path(@library,floor) ) %></h3> | ||
|
||
<!-- If authorized to edit --> | ||
<%= link_to('Move Up', move_higher_library_floor_path(@library,floor), :method => :post, :id => "move_up-#{floor.id}") %> | | ||
<%= link_to('Move Down', move_lower_library_floor_path(@library,floor), :method => :post, :id => "move_down-#{floor.id}") %> | | ||
<%= link_to('Edit', edit_library_floor_path(@library,floor)) %> | | ||
<%= link_to('Delete', library_floor_path(@library,floor), :method => :delete, :id => "delete-#{floor.id}") %> | ||
<% if admin_signed_in? %> | ||
<%= link_to('Move Up', move_higher_library_floor_path(@library,floor), :method => :post, :id => "move_up-#{floor.id}") %> | | ||
<%= link_to('Move Down', move_lower_library_floor_path(@library,floor), :method => :post, :id => "move_down-#{floor.id}") %> | | ||
<%= link_to('Edit', edit_library_floor_path(@library,floor)) %> | | ||
<%= link_to('Delete', library_floor_path(@library,floor), :method => :delete, :id => "delete-#{floor.id}") %> | ||
<% end %> | ||
|
||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
<div class="library line" id="library-<%= library.id %>"> | ||
<h3><%= library %></h3> | ||
<%= link_to 'Show', library %> | | ||
<%= link_to('Delete', library_path(library), :method => :delete, :id => "delete-#{library.id}") %> | ||
<h3><%= link_to library, library %></h3> | ||
|
||
<% if admin_signed_in? %> | ||
<%= link_to 'Edit', edit_library_path(library) %> | | ||
<%= link_to('Delete', library_path(library), :method => :delete, :id => "delete-#{library.id}") %> | ||
<% end %> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
<div class="reservable_asset line" id="reservable_asset-<%= reservable_asset.id %>"> | ||
<h3><%= link_to(reservable_asset.reservable_asset_type.name, reservable_asset ) %></h3> | ||
<h3><%= link_to("#{reservable_asset.reservable_asset_type.name}-#{reservable_asset.name}", reservable_asset ) %> on <%= link_to reservable_asset.floor.name, library_floor_path(reservable_asset.floor.library,reservable_asset.floor) %></h3> | ||
|
||
<% if admin_signed_in? %> | ||
<%= link_to('Edit', edit_reservable_asset_path(reservable_asset)) %> | | ||
<%= link_to('Delete', reservable_asset_path(reservable_asset), :method => :delete, :id => "delete-#{reservable_asset.id}") %> | ||
<% end %> | ||
|
||
<!-- If authorized to edit --> | ||
<%= link_to('Edit', edit_reservable_asset_path(reservable_asset)) %> | | ||
<%= link_to('Delete', reservable_asset_path(reservable_asset), :method => :delete, :id => "delete-#{reservable_asset.id}") %> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
<div class="reservable_asset_type line" id="reservable_asset_type-<%= reservable_asset_type.id %>"> | ||
<h3><%= link_to(reservable_asset_type.name, reservable_asset_type ) %></h3> | ||
|
||
<!-- If authorized to edit --> | ||
<%= link_to('Edit', edit_reservable_asset_type_path(reservable_asset_type)) %> | | ||
<%= link_to('Delete', reservable_asset_type_path(reservable_asset_type), :method => :delete, :id => "delete-#{reservable_asset_type.id}") %> | ||
<% if admin_signed_in? %> | ||
<%= link_to('Edit', edit_reservable_asset_type_path(reservable_asset_type)) %> | | ||
<%= link_to('Delete', reservable_asset_type_path(reservable_asset_type), :method => :delete, :id => "delete-#{reservable_asset_type.id}") %> | ||
<% end %> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
<div class="subject_area line" id="subject_area-<%= subject_area.id %>"> | ||
<h3><%= link_to(subject_area.name, subject_area ) %></h3> | ||
|
||
<!-- If authorized to edit --> | ||
<%= link_to('Edit', edit_subject_area_path(subject_area)) %> | | ||
<%= link_to('Delete', subject_area_path(subject_area), :method => :delete, :id => "delete-#{subject_area.id}") %> | ||
<% if admin_signed_in? %> | ||
<%= link_to('Edit', edit_subject_area_path(subject_area)) %> | | ||
<%= link_to('Delete', subject_area_path(subject_area), :method => :delete, :id => "delete-#{subject_area.id}") %> | ||
<% end %> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.