Skip to content

Adjust direction of dropdowns at the bottom of the page #4

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

Merged
merged 5 commits into from
Jan 20, 2025
Merged
Show file tree
Hide file tree
Changes from 4 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
2 changes: 2 additions & 0 deletions pgcommitfest/commitfest/templates/patch.html
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,9 @@ <h4>Annotations</h4>
</tbody>
</table>

{% with dropdown_mode="dropup" %}
Copy link
Collaborator

Choose a reason for hiding this comment

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

After sleeping on this, I think if you make this a <div class="dropup"> you get the same effect without having to change patch_commands.inc at all.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ha, that works! Very clean. :)

{%include "patch_commands.inc"%}
{% endwith %}

{%comment%}commit dialog{%endcomment%}
<div class="modal fade" id="commitModal" role="dialog">
Expand Down
6 changes: 3 additions & 3 deletions pgcommitfest/commitfest/templates/patch_commands.inc
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<div style="margin-bottom:5px;">
<a class="btn btn-default" href="edit/">Edit</a>

<div class="btn-group">
<div class="btn-group {{ dropdown_mode }}">
<a class="btn btn-default dropdown-toggle" data-toggle="dropdown" href="#">Comment/Review <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="comment/">Comment</a>
<li><a href="review/">Review</a>
</ul>
</div>

<div class="btn-group">
<div class="btn-group {{ dropdown_mode }}">
<a class="btn btn-default dropdown-toggle" data-toggle="dropdown" href="#">Change Status <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li role="presentation" class="dropdown-header">Open statuses</li>
Expand All @@ -27,7 +27,7 @@
</div>

{%if request.user.is_staff%}
<div class="btn-group">
<div class="btn-group {{ dropdown_mode }}">
<a class="btn btn-default dropdown-toggle" data-toggle="dropdown" href="#">Send private mail <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="send_email/?authors={{patch.id}}">Send mail to authors</a></li>
Expand Down