codeforcroatia / popravi.to

This is popular map-based reporting platform FixMyStreet for Croatia named "Popravi.to"
http://popravi.to
Other
9 stars 7 forks source link

View report screen - Add moderator details (only when moderator is logged in) #193

Open schlos opened 1 year ago

schlos commented 1 year ago

Describe the bug

Pull Request: https://github.com/codeforcroatia/popravi.to/pull/192/files#diff-f350cb961a82551ba528513c980939ae22f38f34756247bd8c178e147f28da16R55

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

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.

Screenshots

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context

Contribution guidelines: https://codeforcroatia.org/popravito-contribution-guidelines

schlos commented 1 year ago

Before change:

Screenshot from 2023-06-12 09-45-55

After change:

Screenshot from 2023-06-12 09-46-06

For comparison, this is current production theme:

Screenshot from 2023-06-12 09-53-20

schlos commented 1 year ago

I'll take a look at this later on.