Skip to content

Commit

Permalink
Add Update button to the Title #178
Browse files Browse the repository at this point in the history
  • Loading branch information
schlos committed Dec 12, 2021
1 parent d8cf972 commit bc34fa5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions templates/web/popravitodev/report/_main.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
[% INCLUDE 'report/banner.html' %]

[% IF can_moderate_title %]
<h1 class="moderate-display report-title">[% problem.title | html %] <button class="update-link button" id="updateReportButton" tabindex="0" aria-label="update report"><span class="edit-button"></span><span>[% loc('Update') %]</span></button></h1>
<h1 class="moderate-display report-title">[% problem.title | html %]</h1>
<div class="moderate-edit">
[% IF problem.title != original.title %]
<label>
Expand All @@ -38,7 +38,7 @@ <h1 class="report-title"><input class="form-control" type="text" name="problem_t
</div>
[% ELSE %]

<h1 class="report-title">[% problem.title | html %]</h1>
<h1 class="report-title">[% problem.title | html %] <button class="update-link button" id="updateReportButton" tabindex="0" aria-label="update report"><span class="edit-button"></span><span>[% loc('Update') %]</span></button></h1>
[% END %]

<div class="moderate-edit">
Expand Down
10 changes: 5 additions & 5 deletions templates/web/popravitodev/report/update.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[% can_moderate = NOT update.whenanswered AND update.type != 'moderation' AND (permissions.moderate OR c.user.can_moderate(update, staff = permissions.moderate)) %]
[% IF loop.first %]
<section class="updates-content">
<p class="page-text-misc">[% loc('Updates') %] <button class="update-link button" id="updateReportButton" tabindex="0" aria-label="update report"><span class="edit-button"></span><span>[% loc('Update') %]</span></button></p>
[% can_moderate = NOT update.whenanswered AND update.type != 'moderation' AND (permissions.moderate OR c.user.can_moderate(update, staff = permissions.moderate)) %]
[% IF loop.first %]
<ul class="item-list item-list--updates">
[% END %]
[% END %]
<li class="item-list__item item-list__item--updates
[%~ ' show-moderation' IF update.id AND show_moderation == update.id ~%]
">
Expand Down Expand Up @@ -59,7 +59,7 @@
</form>
[% END %]
</li>
[% IF loop.last %]
[% IF loop.last %]
</ul>
[% END %]
</section>
[% END %]

0 comments on commit bc34fa5

Please sign in to comment.