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

Fix template issue with the karma thumb display #4562

Merged
merged 2 commits into from
Jun 17, 2022
Merged
Show file tree
Hide file tree
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
37 changes: 22 additions & 15 deletions bodhi-server/bodhi/server/templates/fragments.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,38 +17,45 @@
usually provided by _composite_karma property.

</%doc>
% if show_details == (0,0):
<% show_details = None %>\
% endif
% if karma < 0:
<span class="text-danger">
<span class="text-danger">
% if show_details:
<span class="min-width-3 d-inline-block text-center">
% if show_details and show_details[0] > 0:
% if show_details[0] > 0:
<sup class="text-success"><i class="fa fa-thumbs-up"></i></sup>
% endif
% endif
<i class="fa fa-thumbs-down pr-1"></i>
% elif karma > 0:
<span class="text-success">
<span class="text-success">
% if show_details:
<span class="min-width-3 d-inline-block text-center">
% if show_details and show_details[1] < 0:
% if show_details[1] < 0:
<i class="fa fa-thumbs-up"></i>
<sub class="text-danger"><i class="fa fa-thumbs-down pr-1"></i></sub>
% else:
% else:
<i class="fa fa-thumbs-up pr-1"></i>
% endif
% else:
<i class="fa fa-thumbs-up pr-1"></i>
% endif
% else:
<span class="text-muted">
<span class="text-muted">
% if show_details:
<span class="min-width-3 d-inline-block text-center">
% if zero_thumbsup and not show_details:
<i class="fa fa-thumbs-up text-muted pr-1"></i>
% elif not show_details:
<i class="fa fa-thumbs-down text-muted pr-1"></i>
% else:
% endif
% if show_details and show_details != (0,0):
<sup class="text-success"><i class="fa fa-thumbs-up"></i></sup>
<sub class="text-danger"><i class="fa fa-thumbs-down pr-1"></i></sub>
% elif zero_thumbsup:
<i class="fa fa-thumbs-up text-muted pr-1"></i>
% else:
<i class="fa fa-thumbs-down text-muted pr-1"></i>
% endif
%endif
</span>
% if show_details:
</span>
% endif
% if optional_text:
${optional_text}
% endif
Expand Down
1 change: 1 addition & 0 deletions news/PR4562.bug
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix a small template issue about the karma thumbs display