Skip to content
This repository has been archived by the owner on Dec 9, 2019. It is now read-only.

Tags for Talks #23

Merged
merged 6 commits into from
Feb 11, 2015
Merged

Tags for Talks #23

merged 6 commits into from
Feb 11, 2015

Conversation

leriomaggio
Copy link
Contributor

Creato nuovo template tag per filtrare i tag associati ai talks della conferenza (i dettagli sono tutti nei commenti dei commit).

Migliorato (IMHO :D ) css style per tags, in modo da renderli più usabili e meno ingombranti.

Nuovo opzione di settings per il filtro sul tipo di talk (utilizzato in conference.settings e conference.views.voting) - segue PR su conference.

Fixed url per talk update (avevo dimenticato di pusharlo nell'ultima PR... sorry :( )

The new template-tag gets all the tags associated to talks proposed to the current conference.
The template tag leverages a new `detaches` function (committed as well), that demands all the computations and db hits to the `conference.dataaccess.tags_for_talks` function.
Now the voting.html template (used in `conference.views.voting` callback) includes only the set of tags associated to talks
of the current conference (thanks to the new `p3_tags_for_talks` template tag).

The template has been changed trying to not break backward compatibilities with other templates extending "base.html".
To this end, the "base.html" template now wraps the invocation to `p3_tags` and `conference_js_data` tags in a new block that
is overridden by the `voting.html` template.

Finally, the CSS style for tags has been modified as well in order to allow for a better usability of tags filter.
This filter is used in the voting page.
The setting is queried by the conference app (see `conference.settings)

(A new PR on `conference` will follow)
@@ -265,3 +270,27 @@ def tags():
tags = cache_me(
signals=(cdata.tags.invalidated,),
models=(models.P3Profile, cmodels.AttendeeProfile))(tags)

def tags_for_proposed_talks():
Copy link
Contributor

Choose a reason for hiding this comment

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

Ottimo, però io chiamerei la funzione tags_for_conference_talks e non mi limiterei ai talk "proposed".

Una funzione che restituisce tutti i tag usati in una conferenza la vedo più utile di una che lavora solo su i talk proposti (in questo caso potremmo usarla solo durante il voting).

Aggiungerei due parametri, il codice della conferenza (obbligatorio, ci penserà il template tag a fornire come default la conferenza attuale) e lo stato dei talk (default None, che significa tutti)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fatto! 👍

@dvd0101
Copy link
Contributor

dvd0101 commented Feb 11, 2015

Purtroppo ai modificato direttamente il file .css invece che i file sass e così le tue modifiche andranno perse alla prossima modifica.

Se non sai mettere le mani sui file scss ci penso io

@leriomaggio
Copy link
Contributor Author

Per Saas pensaci tu! Penso di aver capito dove e come intervenire, ma non voglio fare macelli :)

@dvd0101 dvd0101 merged commit 8531d6f into pythonitalia:develop Feb 11, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants