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

🪲 hide the reported dropdown #5651

Merged
merged 1 commit into from
Jul 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 30 additions & 27 deletions templates/public-adventures/body.html
Original file line number Diff line number Diff line change
Expand Up @@ -115,36 +115,39 @@
</div>
</div>

<div id="report" class="flex-1">
<div class="dropdown relative" data-type="single" id="report-select" data-value="{{selectedReport}}">
<button class="toggle-button font-semibold rounded inline-flex justify-between
appearance-none w-full border border-gray-200 text-gray-700 p-2 rounded"
onclick="$('#report_dropdown').slideToggle('medium');">
<span class="label" data-value="reported">{{selectedReported}}reported?</span>
<svg id="keyword_arrow_report" class="fill-current h-6 w-6" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
<path d="M9.293 12.95l.707.707L15.657 8l-1.414-1.414L10 10.828 5.757 6.586 4.343 8z" />
</svg>
</button>
<div class="dropdown-menu dropdown-blue z-30 mt-2 w-full" id="report_dropdown"
style="display: none; width: 100%;"
_="on mutation of @style
set arrow to #keyword_arrow_report
if *display == 'none'
remove .rotate-180 from arrow
else if not arrow.classList.contains('rotate-180')
add .rotate-180 to arrow
end">
<div class="option {% if selected %}selected{% endif %}"
<!-- false should be removed once reported is implemented in public_adventures.py after PR #5431 -->
{% if false and is_super_teacher %}
<div id="report" class="flex-1">
<div class="dropdown relative" data-type="single" id="report-select" data-value="{{selectedReport}}">
<button class="toggle-button font-semibold rounded inline-flex justify-between
appearance-none w-full border border-gray-200 text-gray-700 p-2 rounded"
onclick="$('#report_dropdown').slideToggle('medium');">
<span class="label" data-value="reported">{{selectedReported}}reported?</span>
<svg id="keyword_arrow_report" class="fill-current h-6 w-6" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
<path d="M9.293 12.95l.707.707L15.657 8l-1.414-1.414L10 10.828 5.757 6.586 4.343 8z" />
</svg>
</button>
<div class="dropdown-menu dropdown-blue z-30 mt-2 w-full" id="report_dropdown"
style="display: none; width: 100%;"
_="on mutation of @style
set arrow to #keyword_arrow_report
if *display == 'none'
remove .rotate-180 from arrow
else if not arrow.classList.contains('rotate-180')
add .rotate-180 to arrow
end">
<div class="option {% if selected %}selected{% endif %}"
{% if selected %}
{% else %}
{% endif %}>reported</div>
<div class="option {% if selected %}selected{% endif %}"
{% if selected %}
{% else %}
{% endif %}>reported</div>
<div class="option {% if selected %}selected{% endif %}"
{% if selected %}
{% else %}
{% endif %}>not reported</div>
</div>
{% endif %}>not reported</div>
</div>
</div>
</div>
</div>
{% endif %}

</div>
</div>
Expand Down
Loading