-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Admin dashboard route and page (#187)
* add route, controller, and view * render footer optionally on org pages and add start of dashboard UI * lint fix * move navbar to a partial * move navbar into a partial and set up a dashboard layout template to render navbar and the appropriate template
- Loading branch information
1 parent
6cd087b
commit a50fb26
Showing
6 changed files
with
120 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
class Organizations::DashboardController < Organizations::BaseController | ||
before_action :verified_staff | ||
|
||
def index | ||
@hide_footer = true | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
<!-- Sidebar --> | ||
<nav class="navbar-vertical navbar"> | ||
<div class="vh-100" data-simplebar> | ||
<!-- Brand logo --> | ||
<a class="navbar-brand" href="@@webRoot/index.html"> | ||
<img src="@@webRoot/assets/images/brand/logo/logo-inverse.svg" alt="" > | ||
</a> | ||
<!-- Navbar nav --> | ||
<ul class="navbar-nav flex-column" id="sideNavbar"> | ||
<% if current_user.staff_account && current_user.staff_account.has_role?(:admin, current_user.staff_account.organization) %> | ||
<li class="nav-item"> | ||
<a class="nav-link @@if (context.page_group !== 'courses') { collapsed }" href="#" | ||
data-bs-toggle="collapse" data-bs-target="#navCourses" aria-expanded="false" | ||
aria-controls="navCourses"> | ||
<i class="nav-icon fe fe-book me-2"></i> Organization | ||
</a> | ||
<div id="navCourses" class="collapse @@if (context.page_group === 'courses') { show }" | ||
data-bs-parent="#sideNavbar"> | ||
<ul class="nav flex-column"> | ||
<li class="nav-item"> | ||
<a class="nav-link @@if (context.page === 'allcourses') { active }" | ||
href="@@webRoot/pages/dashboard/admin-course-overview.html"> | ||
Settings | ||
</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="nav-link @@if (context.page === 'coursescategory') { active }" | ||
href="@@webRoot/pages/dashboard/admin-course-category.html"> | ||
Staff | ||
</a> | ||
</li> | ||
</ul> | ||
</div> | ||
</li> | ||
<% end %> | ||
<li class="nav-item"> | ||
<a class="nav-link @@if (context.page_group !== 'courses') { collapsed }" href="#" | ||
data-bs-toggle="collapse" data-bs-target="#navCourses" aria-expanded="false" | ||
aria-controls="navCourses"> | ||
<i class="nav-icon fe fe-book me-2"></i> Pets | ||
</a> | ||
<div id="navCourses" class="collapse @@if (context.page_group === 'courses') { show }" | ||
data-bs-parent="#sideNavbar"> | ||
<ul class="nav flex-column"> | ||
<li class="nav-item"> | ||
<a class="nav-link @@if (context.page === 'allcourses') { active }" | ||
href="@@webRoot/pages/dashboard/admin-course-overview.html"> | ||
Manage | ||
</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="nav-link @@if (context.page === 'allcourses') { active }" | ||
href="@@webRoot/pages/dashboard/admin-course-overview.html"> | ||
Checklists | ||
</a> | ||
</li> | ||
</ul> | ||
</div> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="nav-link @@if (context.page_group !== 'courses') { collapsed }" href="#" | ||
data-bs-toggle="collapse" data-bs-target="#navCourses" aria-expanded="false" | ||
aria-controls="navCourses"> | ||
<i class="nav-icon fe fe-book me-2"></i> Applications | ||
</a> | ||
<div id="navCourses" class="collapse @@if (context.page_group === 'courses') { show }" | ||
data-bs-parent="#sideNavbar"> | ||
<ul class="nav flex-column"> | ||
<li class="nav-item"> | ||
<a class="nav-link @@if (context.page === 'allcourses') { active }" | ||
href="@@webRoot/pages/dashboard/admin-course-overview.html"> | ||
Adoption | ||
</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="nav-link @@if (context.page === 'coursescategory') { active }" | ||
href="@@webRoot/pages/dashboard/admin-course-category.html"> | ||
Foster | ||
</a> | ||
</li> | ||
</ul> | ||
</div> | ||
</li> | ||
<!-- Nav item --> | ||
<li class="nav-item"> | ||
<a class="nav-link @@if (context.page_group !== 'user') { collapsed }" href="#" | ||
data-bs-toggle="collapse" data-bs-target="#navProfile" aria-expanded="false" | ||
aria-controls="navProfile"> | ||
<i class="nav-icon fe fe-user me-2"></i> Donations | ||
</a> | ||
<div id="navProfile" class="collapse @@if (context.page_group === 'user') { show }" | ||
data-bs-parent="#sideNavbar"> | ||
<ul class="nav flex-column"> | ||
<li class="nav-item"> | ||
<a class="nav-link @@if (context.page === 'instructor') { active }" | ||
href="@@webRoot/pages/dashboard/admin-instructor.html"> | ||
Sources | ||
</a> | ||
</li> | ||
</ul> | ||
</div> | ||
</li> | ||
</div> | ||
</nav> | ||
|
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<div class="d-flex"> | ||
<%= render 'organizations/dashboard/navbar' %> | ||
<%= yield :dashboard_content %> | ||
</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