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

Debates with multiple days #30

Open
1 task
microstudi opened this issue Nov 4, 2020 · 2 comments
Open
1 task

Debates with multiple days #30

microstudi opened this issue Nov 4, 2020 · 2 comments

Comments

@microstudi
Copy link

Is your feature request related to a problem? Please describe.
As a visitor when I go to a Debate configured with multiple days (it starts on a day and finish on other day), I don't see the two days on the summary box.

Describe the solution you'd like
To see the design "Meeting View Longer" applied here.

Describe alternatives you've considered
On Barcelona for these kind of Debates we've made a hack with some quick and dirty javascript:

function changeMultiDatesOnDebates(url, start_date, end_date){
    // var url = "/assemblies/regidoriarespon/f/3849/debates/64";
    // var start_date = {d: "29", m: {es: "Abril", ca: "Abril"}, h: "18:00"};
    // var end_date = {d: "30", m: {es: "Abril", ca: "Abril"}, h: "19:30"};

    if ( window.location.href.indexOf(url) != -1 ) { 

        var lang = $('html').attr('lang');
        $('.extra__date, .extra__time').hide();
        var multiday_html = '<div class="card__content--multiple"><div><div class="extra__date">' + start_date["d"] + '<span class="extra__month text-small">' + start_date["m"][lang] + '</span></div><div class="extra__time text-small">' + start_date["h"] + '</div></div><svg class="icon--arrow-thin-right icon icon--big muted"><use xlink:href="/assets/decidim/icons-97ef0750b578467a7d8e39200834335350d37d20b558cff59006e62e827f13c0.svg#icon-arrow-thin-right"></use></svg><div><div class="extra__date">' + end_date["d"] + '<span class="extra__month text-small">' + end_date["m"][lang] + '</span></div><div class="extra__time text-small">' + end_date["h"] + '</div></div></div>';
        $('.card__content').prepend(multiday_html);
    }

}

changeMultiDatesOnDebates("/assemblies/regidoriarespon/f/3915/debates/60", {d: "11", m: {es: "Mayo", ca: "Maig"}, h: "18:00"}, {d: "13", m: {es: "Mayo", ca: "Maig"}, h: "19:30"});

https://www.decidim.barcelona/assemblies/regidoriarespon/f/3915/debates/60

Additional context

Does this issue could impact on users private data?
No

Acceptance criteria

  • As a visitor when I go to a Debate with multiple days I can see the "Meetings View Long" view
@microstudi
Copy link
Author

microstudi commented Nov 4, 2020

Steps:

  • Crear una nova branca on treballar, per exemple fix/multiple-days-debates
  • Identificar el problema: engegar el decidim de desenvolupament i reproduir el problema
  • Buscar on esta la vista que volem canviar (decidim-debates/app/views/...)
  • Fer un petit canvi, un commit i un PR contra aquest repositori per poder revisar
  • Afegir 2 dates al lloc on ara n'hi ha una (no cal que tingui codi, pot ser una data inventada)
  • Establir el disseny que volem
  • Fer que les dates vinguin del objecte debat
  • Afgir tests
  • Fer un PR contra decidim real!

@microstudi
Copy link
Author

microstudi commented Nov 4, 2020

Step 1:

  1. Afegir el repositori original remot de decidim per poder actualitzar la ultima versio del codi (aixo nomes un cop):
    git remote add decidim [email protected]:decidim/decidim.git
  2. actualitzar el codi a la ultima versio amb el repositori de decidim (no el nostre fork)
    git pull decidim
  3. crear la nova branca
    ... <= busqueu com es fa!!!
  4. actualitzar les gemes, per si han canviat
    bundle install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant