Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Admin dashboard route and page #187

Merged
merged 5 commits into from
Sep 26, 2023
Merged

Conversation

kasugaijin
Copy link
Collaborator

Describe your change in plain English.

This PR:

  • adds route to dashboard
  • adds dashboard controller
  • adds index view file with start of the navbar for dashboard UI

Note that

  • once we are happy with the basic navbar options, will need to update classes to get functionality working properly
  • some discussion (at least for my benefit) on how we want to organize view templates for this portion of the site as I am thinking we want a SPA feel here.

image

Comment on lines 21 to 25
<a class="nav-link @@if (context.page === 'allcourses') { active }"
href="@@webRoot/pages/dashboard/admin-course-overview.html">
Settings
</a>
</li>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When we get to work on this page let's make sure to use https://github.com/comfy/active_link_to which makes things a bit easier to show active states on links.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes the hrefs in there right now are dropped in from the template. All need replacing.

@kasugaijin
Copy link
Collaborator Author

kasugaijin commented Sep 25, 2023

I updated to use a dashboard layout template that renders the navbar and whatever template is required depending on the selection from the navbar using yield.

I think all we have to do is set up other templates, named and routed appropriately, and add below and it will work with the render

<% content_for :dashboard_content do %>
  <!-- Content for Dashboard link goes here -->
<% end %>

@kasugaijin kasugaijin requested a review from nsiwnf September 25, 2023 20:31
@kasugaijin
Copy link
Collaborator Author

FYI: I made this PR yesterday as a little launch pad for Jade to continue on with. As such, there's a few things that are incomplete with the intent they will be continue. I guess Jade could contribute to this branch if we don't want to merge it in. I am open.

@edwinthinks edwinthinks merged commit a50fb26 into main Sep 26, 2023
@edwinthinks edwinthinks deleted the admin_dashboard_route_and_page branch September 26, 2023 00:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants