diff --git a/README.md b/README.md index 6376af8..deacf7f 100644 --- a/README.md +++ b/README.md @@ -264,6 +264,8 @@ The following manual tests were made: - [see issue #138 here](https://github.com/mikerae/string-rota/issues/138) - [External BoostrapMade link #157 Testing](/readme_assets/images/testing-issue157.png) - [see issue #157 here](https://github.com/mikerae/string-rota/issues/157) +- [Display Draft/Published rota data #159 Testing](/readme_assets/images/testing-issue159.png) + - [see issue #159 here](https://github.com/mikerae/string-rota/issues/159) #### 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. diff --git a/readme_assets/images/testing-issue159.png b/readme_assets/images/testing-issue159.png new file mode 100644 index 0000000..f9f41de Binary files /dev/null and b/readme_assets/images/testing-issue159.png differ diff --git a/string_rota/templates/string_rota/rota.html b/string_rota/templates/string_rota/rota.html index be7d4d5..311bed4 100644 --- a/string_rota/templates/string_rota/rota.html +++ b/string_rota/templates/string_rota/rota.html @@ -73,19 +73,24 @@ <h2 class="card-title">Repertoire<span></h2> <div class="card-body"> <h2 class="card-title"> Seating Plan for {{seating_plan.section}} Section - Status: {{seating_plan.get_plan_status_display}} + <span {% if not rota_manager %}class="d-none" + {% elif rota_manager and seating_plan.plan_status == "D"%}class="text-danger" + {% elif rota_manager and seating_plan.plan_status == "P"%}class="text-success" {% endif %}>Status: + {{seating_plan.get_plan_status_display}}</span> </h2> - <p>This project needs <strong>{{ strength }}</strong> players.</p> + <p {% if not rota_manager %}class="d-none" {% endif %}>This project + needs <strong>{{ strength }}</strong> players.</p> {% if not rota_manager %} {% if seating_plan.get_plan_status_display == "Draft" %} - <h3>The Seating Plan for {{ project.name }} is not ready yet.</h3> - <h5>Please contact your Rota Manager</h5> + <h3 class="text-danger">The Seating Plan for {{ project.name }} is not ready yet.</h3> + <h5 class="text-info">Please contact your Rota Manager</h5> {% endif %} {% endif %} <!-- Active Table --> - <table class="rota table table-borderless"> + <table + class="rota table table-borderless {% if seating_plan.plan_status == 'D' and not rota_manager %}d-none {% endif %}"> <thead> <tr> <th scope="col">Name</th> @@ -137,7 +142,8 @@ <h5>Please contact your Rota Manager</h5> <!-- Right side columns --> <div class="col-lg-5"> <!-- Reserve Player --> - <div class="col-xxl-5 col-md-6"> + <div class="col-xxl-5 col-md-6 {% if seating_plan.plan_status == 'D' and not rota_manager %}d-none + {% endif %}"> <div class="card info-card sales-card"> <div class="card-body"> <h2 class="card-title">Reserve Player<span></h2> @@ -166,7 +172,8 @@ <h2 class="card-title">Reserve Player<span></h2> </div> </div><!-- End Reserve Player --> <!-- Reduced Rep Player --> - <div class="col-xxl-5 col-md-6"> + <div class="col-xxl-5 col-md-6 {% if seating_plan.plan_status == 'D' and not rota_manager %}d-none + {% endif %}"> <div class="card info-card sales-card"> <div class="card-body"> <h2 class="card-title">Reduced Rep Player(s)<span></h2> @@ -189,7 +196,8 @@ <h2 class="card-title">Reduced Rep Player(s)<span></h2> </div> </div><!-- End Reduced Rep Player --> <!-- Not Available --> - <div class="col-xxl-5 col-md-6"> + <div class="col-xxl-5 col-md-6 {% if seating_plan.plan_status == 'D' and not rota_manager %}d-none + {% endif %}"> <div class="card info-card sales-card"> <div class="card-body"> <h2 class="card-title">Players Not Available<span></h2>