Skip to content

Commit

Permalink
Merge pull request #182 from mikerae/179-bugproject-selection-for-adm…
Browse files Browse the repository at this point in the history
…inorch-manager-fails-on-some-projects

[#179] Fix Project selection for Admin and Office
  • Loading branch information
mikerae authored Oct 10, 2023
2 parents 684df41 + 8c2087e commit 1272f78
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 1272f78

Please sign in to comment.