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

Issues #84 #146 #174 #178 #179 #192

Merged
merged 11 commits into from
Jun 12, 2023
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
123 changes: 67 additions & 56 deletions templates/web/popravitodev/footer.html
Original file line number Diff line number Diff line change
@@ -1,64 +1,75 @@
[% IF pagefooter %]

<footer class="footer" role="contentinfo">
<div class="footer-desc">
<picture class="popravi-logo">
<source srcset="/cobrands/[% c.cobrand.asset_moniker %]/images/popravi-logo-white.svg">
<img src="/cobrands/[% c.cobrand.asset_moniker %]/images/popravi-logo-white.svg" alt="[% site_name %]">
</picture>
<p class="footer-text footer-text-long-desc">
Popravi.to je online alat napravljen u svrhu poboljšanja javnih politika i inkluzivnom odlučivanju,
te kako bi građanima pružio mehanizme za prijavu problema lokalnoj administraciji te nadzoru
njihovog rješavanja u svojoj sredini.
</p>
<form class="button-link-footer">
<button formaction="/" class="button report-issue-button-footer" tabindex="0" aria-label="report problem">[%- loc('Report a problem') -%]</button>
</form>
</div>
<nav>
<ul class="menu-list-footer [% ul_class %]" [% " id='" _ ul_id _ "'" IF ul_id %]>
<!-- <li class="menu-item menu-item-footer"><a href="/reports" tabindex="0" aria-label="all reports">[%- loc('All reports') -%]</a></li>
<li class="menu-item menu-item-footer"><a href="/alert" tabindex="0" aria-label="notifications">[%- loc('Local alerts') -%]</a></li> -->
<li class="menu-item menu-item-footer"><a href="/faq" tabindex="0" aria-label="help">[%- loc('Help') -%]</a></li>
<li class="menu-item menu-item-footer"><a href="/privacy" tabindex="0" aria-label="help">[%- loc('Privacy') -%]</a></li>
<li class="menu-item menu-item-footer"><a href="/about/house-rules" tabindex="0" aria-label="help">[%- loc('Pravila ponašanja') -%]</a></li>

[%~ IF c.user_exists ~%]
<li class="menu-item menu-item-footer"><a href="/my" tabindex="0" aria-label="my profile">[%- loc('Your account') -%]</a></li>
[%~ ELSE ~%]
<li class="menu-item menu-item-footer"><a href="/auth" tabindex="0" aria-label="sign in">[%- loc('Sign in') -%]</a></li>
[%~ END ~%]

</ul>
</nav>
<div class="poweredby">
<p class="footer-text">[% loc('Powered by') %]</p>
<picture class="fixmystreet-logo">
<source srcset="/cobrands/[% c.cobrand.asset_moniker %]/images/fixmystreetlogo.svg">
<img src="/cobrands/[% c.cobrand.asset_moniker %]/images/fixmystreetlogo.svg" alt="FixMyStreet">
</picture>
<p class="footer-text">[% loc('With love') %]</p>
<picture class="fixmystreet-logo">
<source srcset="/cobrands/[% c.cobrand.asset_moniker %]/images/logo-codeforcroatia@2x.svg">
<img src="/cobrands/[% c.cobrand.asset_moniker %]/images/logo-codeforcroatia@2x.svg" alt="Code for Croatia">
</picture>
<picture class="fixmystreet-logo">
<source srcset="/cobrands/[% c.cobrand.asset_moniker %]/images/logo-gong@2x.svg">
<img src="/cobrands/[% c.cobrand.asset_moniker %]/images/logo-gong@2x.svg" alt="Gong">
</picture>
</div>
<div>
<p class="footer-text footer-socials">[% loc('Find us on') %]</p>
<footer class="footer" role="contentinfo">
<div class="footer-desc">
<picture class="popravi-logo">
<source srcset="/cobrands/[% c.cobrand.asset_moniker %]/images/popravi-logo-white.svg">
<img src="/cobrands/[% c.cobrand.asset_moniker %]/images/popravi-logo-white.svg" alt="[% site_name %]">
</picture>
<p class="footer-text footer-text-long-desc">
Popravi.to je online alat napravljen u svrhu poboljšanja javnih politika i inkluzivnom odlučivanju,
te kako bi građanima pružio mehanizme za prijavu problema lokalnoj administraciji te nadzoru
njihovog rješavanja u svojoj sredini.
</p>
<form class="button-link-footer">
<button formaction="/" class="button report-issue-button-footer" tabindex="0"
aria-label="report problem">[%- loc('Report a problem') -%]</button>
</form>
</div>
<nav>
<ul class="socials">
<li class="footer-social-item"><a href="https://github.com/codeforcroatia/Popravi.to" tabindex="0" aria-label="GitHub"><span class="github-link"></span></a></li>
<li class="footer-social-item"><a href="https://twitter.com/PopraviTo" tabindex="0" aria-label="Twitter"><span class="twitter-link"></span></a></li>
<li class="footer-social-item"><a href="https://www.facebook.com/Popravi.to" tabindex="0" aria-label="Facebook"><span class="facebook-link"></span></a></li>
<ul class="menu-list-footer [% ul_class %]" [% " id='" _ ul_id _ "'" IF ul_id %]>
<!-- <li class="menu-item menu-item-footer"><a href="/reports" tabindex="0" aria-label="all reports">[%- loc('All reports') -%]</a></li>
<li class="menu-item menu-item-footer"><a href="/alert" tabindex="0" aria-label="notifications">[%- loc('Local alerts') -%]</a></li> -->
<li class="menu-item menu-item-footer"><a href="/faq" tabindex="0" aria-label="help">[%- loc('Help') -%]</a>
</li>
<li class="menu-item menu-item-footer"><a href="/privacy" tabindex="0" aria-label="help">[%- loc('Privacy')
-%]</a></li>
<li class="menu-item menu-item-footer"><a href="/about/house-rules" tabindex="0" aria-label="help">[%-
loc('Pravila ponašanja') -%]</a></li>

[%~ IF c.user_exists ~%]
<li class="menu-item menu-item-footer"><a href="/my" tabindex="0" aria-label="my profile">[%- loc('Your
account') -%]</a></li>
[%~ ELSE ~%]
<li class="menu-item menu-item-footer"><a href="/auth" tabindex="0" aria-label="sign in">[%- loc('Sign in')
-%]</a></li>
[%~ END ~%]

</ul>
</nav>
</div>
</footer>
<div class="poweredby">
<p class="footer-text">[% loc('Powered by') %]</p>
<picture class="fixmystreet-logo">
<source srcset="/cobrands/[% c.cobrand.asset_moniker %]/images/fixmystreetlogo.svg">
<img src="/cobrands/[% c.cobrand.asset_moniker %]/images/fixmystreetlogo.svg" alt="FixMyStreet">
</picture>
<p class="footer-text">[% loc('With love') %]</p>
<picture class="fixmystreet-logo">
<source srcset="/cobrands/[% c.cobrand.asset_moniker %]/images/logo-codeforcroatia@2x.svg">
<img src="/cobrands/[% c.cobrand.asset_moniker %]/images/logo-codeforcroatia@2x.svg" alt="Code for Croatia">
</picture>
<picture class="fixmystreet-logo">
<source srcset="/cobrands/[% c.cobrand.asset_moniker %]/images/logo-gong@2x.svg">
<img src="/cobrands/[% c.cobrand.asset_moniker %]/images/logo-gong@2x.svg" alt="Gong">
</picture>
</div>
<div>
<p class="footer-text footer-socials">[% loc('Find us on') %]</p>
<nav>
<ul class="socials">
<li class="footer-social-item"><a href="https://github.com/codeforcroatia/Popravi.to" tabindex="0"
aria-label="GitHub"><span class="github-link"></span></a></li>
<li class="footer-social-item"><a href="https://twitter.com/PopraviTo" tabindex="0"
aria-label="Twitter"><span class="twitter-link"></span></a></li>
<li class="footer-social-item"><a href="https://www.facebook.com/Popravi.to" tabindex="0"
aria-label="Facebook"><span class="facebook-link"></span></a></li>
<li class="footer-social-item"><a href="https://www.linkedin.com/showcase/popravi.to" tabindex="0"
aria-label="LinkedIn"><span class="linkedin-link"></span></a></li>
</ul>
</nav>
</div>
</footer>

[% END %]

[% INCLUDE 'common_footer_tags.html' %]
[% INCLUDE 'common_footer_tags.html' %]
92 changes: 65 additions & 27 deletions templates/web/popravitodev/report/_main.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,26 +30,47 @@ <h1 class="moderate-display report-title">[% problem.title | html %]</h1>
<div class="moderate-edit">
[% IF problem.title != original.title %]
<label>
<input type="checkbox" name="problem_revert_title" class="revert-title"[% " checked" IF c.req.params.problem_revert_title %]>
<input type="checkbox" name="problem_revert_title" class="revert-title" [% " checked" IF c.req.params.problem_revert_title %]>
[% loc('Revert to original title') %]
</label>
[% END %]
<h1 class="report-title"><input class="form-control" type="text" name="problem_title" value="[% (c.req.params.problem_title || problem.title) | html %]" data-original-value="[% original.title | html %]"></h1>
</div>
[% ELSE %]

<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>
<!--<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">
<label>
<input type="checkbox" name="problem_show_name" [% 'checked' IF !problem.anonymous OR c.req.params.problem_show_name %]>
[% loc('Show reporter&rsquo;s name') %]
</label>
<label>
<input type="checkbox" name="problem_show_name" [% 'checked' IF !problem.anonymous OR c.req.params.problem_show_name %]>
[% loc('Show reporter&rsquo;s name') %]
</label>
</div>

<div class="issue-details-container">
<p class="page-text-misc">[% loc('Category') %]</p>
<p class="page-text-left-aligned">[% problem.category %]</p>
<br>
<p class="page-text-misc">[% loc('Subcategory') %]</p>
Copy link
Member

Choose a reason for hiding this comment

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

For category and sub-category we need to implement these conditions like shown on this sub-template from parent repo:
https://github.com/mysociety/fixmystreet/blob/v3.1/templates/web/base/report/new/category_wrapper.html
and
https://github.com/mysociety/fixmystreet/blob/v3.1/templates/web/base/report/new/category.html
and
https://github.com/mysociety/fixmystreet/blob/v3.1/templates/web/base/report/new/_category_select.html
and all sub-nested templates they have under category from pages above.

You can also follow the same patch as in the example, i.e. create new file under:
templates/web/popravitodev/report/new/category.html with content same but design elements updated to our code. Since _category_select.html is included in their example, we need to add also that bit in our template. To make it easier, you can add that code snippet in place where they have "[%~ INCLUDE 'report/new/_category_select.html' ~%]" *replace this with _category_select.html content + apply our css for our design.

In this file (_main.html) in place where categories snippet has to be executed, add this:
[% PROCESS "report/new/category_wrapper.html" %]
like shown in their example here:
https://github.com/mysociety/fixmystreet/blob/v3.1/templates/web/base/report/new/form_report.html#L16

Ping me if you need more infos.

p.s. fix for this can be included in the next Pull Request as I will merge this one.

Copy link
Member

Choose a reason for hiding this comment

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

I've opened a ticket for this bug: #193

<p class="page-text-left-aligned">[% (problem.subcategory_display OR '-') %]</p>
<br>
<p class="page-text-misc">[% loc('Description') %]</p>
<p class="page-text-left-aligned">[% problem.detail | add_links | html_para %]</p>
<br>
</div>
<div class="applicant-details-container">
<p class="page-text-misc">[% loc('Applicant') %]</p>
<p class="page-text-left-aligned">[% problem.user.name %]</p>
<br>

<p class="page-text-misc">[% loc('Date') %]</p>
<p class="report_meta_info">
[% problem.confirmed.strftime('%d.%m.%Y ') %][% loc('in') %][% problem.confirmed.strftime(' %H:%M') %]
</p>
<br>
<p class="page-text-misc">[% loc('Administrative unit') %]</p>
</div>
<p class="report_meta_info">
[% INCLUDE 'report/_report_meta_info.html' %]
</p>

[% IF anonymized ~%]
<p class="form-success">[% anonymized %]</p>
Expand All @@ -62,14 +83,8 @@ <h1 class="report-title">[% problem.title | html %] <button class="update-link b

[% INCLUDE 'report/_support.html' %]

<div class="issue-details-container">
<p class="page-text-misc">[% loc('Category') %]</p>
<p class="page-text-left-aligned">[% problem.category %]</p>
<br>
<p class="page-text-misc">[% loc('Description') %]</p>
<p class="page-text-left-aligned">[% problem.detail | add_links | html_para %]</p>
<br>
</div>
<br>

<div class="img-gallery-container">
<p class="page-text-misc">[% loc('Photos') %]</p>
[% INCLUDE 'report/photo.html' object=problem %]
Expand Down Expand Up @@ -110,16 +125,39 @@ <h1 class="report-title">[% problem.title | html %] <button class="update-link b
[% END %]

[% IF can_moderate OR permissions.planned_reports %]
<div class="moderate-display segmented-control" role="menu">
[% IF can_moderate %]
<form class="button-link">
<button formaction="/report/[% problem.id %]/moderate" class="button" tabindex="0" aria-label="[% loc('Moderate this report') %]">[% loc('Moderate') %]</button>
</form>
<!--
<a class="js-moderate btn" role="menuitem" href="/report/[% problem.id %]/moderate"
aria-label="[% loc('Moderate this report') %]">[% loc('Moderate') %]</a>
-->
<div class="moderate-display segmented-control" role="menu">
[% IF can_moderate %]
<form class="button-link">
<button formaction="/report/[% problem.id %]/moderate" class="button" tabindex="0" aria-label="[% loc('Moderate this report') %]">[% loc('Moderate') %]</button>
</form>
<!--
<a class="js-moderate btn" role="menuitem" href="/report/[% problem.id %]/moderate"
aria-label="[% loc('Moderate this report') %]">[% loc('Moderate') %]</a>
-->
[% END %]

[% UNLESS c.cobrand.updates_disallowed(problem) %]

[% IF NOT c.user_exists AND problem.non_public # Came via other-reported token or similar %]
<p>[% tprintf(loc('To provide an update, please <a href="%s">sign in</a>.'), '/auth?r=report/' _ problem.id) %]</p>
[% ELSE %]
[% IF two_column_sidebar %]
<p class="page-text-misc">[% loc('Updates') %]</p>
<button type="button" class="btn btn--provide-update js-provide-update hidden-nojs"><span
class="edit-button"></span><span>[% loc('Update') %]</span></button>

<div class="hidden-js">
[% END %]
[% INCLUDE 'report/update-form.html' %]
[% IF two_column_sidebar %]
[% END %]

[% END %]

[% ELSE %]
[% TRY %][% INCLUDE 'report/_updates_disallowed_message.html' %][% CATCH file %][% END %]
[% END %]

[% IF permissions.planned_reports %]
<form method="post" action="/my/planned/change" id="planned_form" class="hidden-label-target">
<input type="hidden" name="id" value="[% problem.id %]">
Expand Down Expand Up @@ -166,4 +204,4 @@ <h3>[% tprintf(loc('Shortlisted by %s'), problem.shortlisted_user.name) %]</h3>
[% END %]

[% TRY %][% PROCESS 'report/_main_after.html' %][% CATCH file %][% END %]
</div>
</div>
2 changes: 1 addition & 1 deletion templates/web/popravitodev/report/display.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,4 @@
<script src="/cobrands/[% c.cobrand.asset_moniker %]/menu.js"></script>
<script src="/cobrands/[% c.cobrand.asset_moniker %]/toggleUpdateForm.js"></script>
</body>
</html>
</html>
Loading