Skip to content

Commit

Permalink
[#179] Fix Project selection for Admin and Office
Browse files Browse the repository at this point in the history
Add unique letters and numbers for id identifiers - Project selection
Use dropdown for section display when a project is selected
Update Office and Admin profile text
	modified:   templates/base.html

Add testing for Fix Project selection for Admin and Office to README
	modified:   README.md
	new file:   readme_assets/images/testing-issue179.png
  • Loading branch information
mikerae committed Oct 10, 2023
1 parent 684df41 commit 8c2087e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 17 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,8 @@ The following manual tests were made:
- [see issue #171 here](https://github.com/mikerae/string-rota/issues/171)
- [Fix CRUD Buttons for Office #175 Testing](/readme_assets/images/testing-issue175.png)
- [see issue #175 here](https://github.com/mikerae/string-rota/issues/175)
- [Fix Project selection for Admin and Orch Manager #179 Testing](/readme_assets/images/testing-issue179.png)
- [see issue #179 here](https://github.com/mikerae/string-rota/issues/179)
#### Human Testing
No human testing was done for this MVP, but once office manager functionality, and the hiding of draft rotas is implemented, user feedback will be sort.

Expand Down
Binary file added readme_assets/images/testing-issue179.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 17 additions & 17 deletions templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,9 @@
<li class="dropdown-header">
<h6>{{user.first_name}} {{user.last_name}}</h6>
{% if user.is_superuser %}
Use your super powers wisely young Padawan...
Use your super-powers wisely young Padawan...
{% elif office %}
Office Staff
{% else %}
{% if section %}
<p><span>Member of {{section}} Section</span></p>
Expand Down Expand Up @@ -110,7 +111,7 @@ <h6>{{user.first_name}} {{user.last_name}}</h6>
</a>
</li>

</ul><!-- End Profile Dropdown Items -->
</ul>
</li><!-- End Profile Nav -->
</ul>
</nav><!-- End Icons Navigation -->
Expand All @@ -124,38 +125,37 @@ <h6>{{user.first_name}} {{user.last_name}}</h6>

<!-- Projects Nav -->
<li class="nav-item">
<a id="projects-nav" class="nav-link collapsed" data-bs-target="#components-nav"
<a id="projects-nav" class="nav-link collapsed" data-bs-target="#project-nav"
data-bs-toggle="collapse" href="">
<i class="bi bi-menu-button-wide"></i><span>Projects</span><i
class="bi bi-chevron-down ms-auto"></i>
</a>
{% if office %}
<ul id="components-nav" class="nav-content collapse " data-bs-parent="#sidebar-nav">
<li class="nav-item">
<ul id="project-nav" class="nav-content collapse" data-bs-parent="#projects-nav">
<li>
{% for project in projects %}
<a class="nav-content collapsed" data-bs-target="#{{project.slug}}-nav"
data-bs-toggle="collapse" href="">
<i class="bi bi-menu-button-wide"></i><span>{{project.name}}</span><i
class="bi bi-chevron-down ms-auto"></i>
<a id="project{{project.id}}-nav" class="dropdown-toggle" role="button"
data-bs-toggle="dropdown" aria-expanded="false" data-bs-parent="#project-nav" href="">
<i class="bi bi-circle"></i><span class="text-wrap">{{project.name}}</span>
</a>
<ul id="{{project.slug}}-nav" class="nav-content collapse" data-bs-parent="#components-nav">
<li class="nav-item">
{% for section in sections %}
<a href="{% url 'rota_office' project.slug section.id %}">
<i class="bi bi-circle"></i><span>{{section.name}}</span>
<ul class="dropdown-menu" area-labelledby="project{{project.id}}-nav">
{% for section in sections %}
<li>
<a class="dropdown-item" href="{% url 'rota_office' project.slug section.id%}">
<i class="bi bi-circle"></i>{{section.name}}
</a>
{% endfor %}
</li>
{% endfor %}
</ul>
{% endfor %}
</li>
</ul>
{% else %}
<ul id="components-nav" class="nav-content collapse " data-bs-parent="#sidebar-nav">
<ul id="project-nav" class="nav-content collapse" data-bs-parent="#sidebar-nav">
<li>
{% for project in projects %}
<a href="{% url 'rota' project.slug %}">
<i class="bi bi-circle"></i><span>{{project.name}}</span>
<i class="bi bi-circle"></i>{{project.name}}
</a>
{% endfor %}
</li>
Expand Down

0 comments on commit 8c2087e

Please sign in to comment.