Skip to content
Snippets Groups Projects
Commit 6593406b authored by Tyler Lemburg's avatar Tyler Lemburg
Browse files

Fix links on admin home page

parent b965de36
No related branches found
No related tags found
No related merge requests found
......@@ -42,4 +42,9 @@ class ServiceSpace < ActiveRecord::Base
def admin_email_href
"/#{self.url_name}/admin/email/"
end
alias_method :admin_emails_href, :admin_email_href
def agenda_href
"/#{self.url_name}/admin/agenda/"
end
end
\ No newline at end of file
<div id="pagetitle">
<h3>NIS Manager Administration</h3>
<h3><%= @space.name %> Resource Scheduler Administration</h3>
<span class="wdn-subhead">Hello, <%= @user.full_name %> (<%= @user.username %>) <% if @user.is_super_user?(@space) %><br>Super User<% end %></span>
</div>
......@@ -9,7 +9,7 @@
<tr>
<td><strong>Users</strong></td>
<td></td>
<td><a class="wdn-button wdn-button-brand" href="/admin/users/">Manage</a></td>
<td><a class="wdn-button wdn-button-brand" href="<%= @space.admin_users_href %>">Manage</a></td>
</tr>
<% end %>
<% if @user.has_permission?(Permission::MANAGE_EVENTS, @space) %>
......@@ -23,7 +23,7 @@
<tr>
<td><strong>Resources</strong></td>
<td><%= resource_count %> resources</td>
<td><a class="wdn-button wdn-button-brand" href="/admin/tools/">Manage</a></td>
<td><a class="wdn-button wdn-button-brand" href="<%= @space.admin_resources_href %>">Manage</a></td>
</tr>
<% end %>
<% if @user.has_permission?(Permission::MANAGE_SPACE_HOURS, @space) %>
......@@ -40,21 +40,21 @@
The space is open all day.
<% end %>
</td>
<td><a class="wdn-button wdn-button-brand" href="/admin/hours/">Manage</a></td>
<td><a class="wdn-button wdn-button-brand" href="<%= @space.admin_hours_href %>">Manage</a></td>
</tr>
<% end %>
<% if @user.has_permission?(Permission::MANAGE_EMAILS, @space) %>
<tr>
<td><strong>Emails</strong></td>
<td></td>
<td><a class="wdn-button wdn-button-brand" href="/admin/emails/">Manage</a></td>
<td><a class="wdn-button wdn-button-brand" href="<%= @space.admin_emails_href %>">Manage</a></td>
</tr>
<% end %>
<% if @user.has_permission?(Permission::SEE_AGENDA, @space) %>
<tr>
<td><strong>Agenda</strong></td>
<td></td>
<td><a class="wdn-button wdn-button-brand" href="/admin/agenda/">View</a></td>
<td><a class="wdn-button wdn-button-brand" href="<%= @space.agenda_href %>">View</a></td>
</tr>
<% end %>
</tbody>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment