Revision 57387640
Réécriture des (tosca)widgets dans VigiBoard pour se conformer aux exemples de TurboGears.
Mise à jour des fichiers de traductions.
git-svn-id: https://vigilo-dev.si.c-s.fr/svn@2403 b22e2e97-25c9-44ff-b637-2e5ceca36478
vigiboard/controllers/vigiboardrequest.py | ||
---|---|---|
16 | 16 |
Host, LowLevelService, StateName |
17 | 17 |
from vigilo.models.secondary_tables import HOST_GROUP_TABLE, \ |
18 | 18 |
SERVICE_GROUP_TABLE |
19 |
from vigiboard.widgets.edit_event import EditEventForm |
|
20 |
from vigiboard.widgets.search_form import SearchForm |
|
19 |
from vigiboard.widgets.edit_event import create_edit_event_form, EditEventForm
|
|
20 |
from vigiboard.widgets.search_form import create_search_form, SearchForm
|
|
21 | 21 |
from vigiboard.controllers.plugins import VigiboardRequestPlugin |
22 | 22 |
|
23 | 23 |
LOGGER = getLogger(__name__) |
... | ... | |
386 | 386 |
# Sinon, il s'agit de CorrEvent(s) dont on récupère l'idcause. |
387 | 387 |
else: |
388 | 388 |
ids = [data[0].idcause for data in self.events] |
389 |
|
|
390 |
# Dialogue d'édition |
|
391 |
tmpl_context.edit_event_form = EditEventForm('edit_event_form', |
|
392 |
last_modification=mktime(get_last_modification_timestamp( |
|
393 |
ids).timetuple()), |
|
394 |
action=url('/update'), |
|
395 |
) |
|
396 | 389 |
|
397 |
# Dialogue de recherche |
|
398 |
tmpl_context.search_form = SearchForm('search_form', lang=self.lang, |
|
399 |
# TRANSLATORS: Format de date et heure. |
|
400 |
date_format=_('%Y-%m-%d %I:%M:%S %p')) |
|
390 |
# Ajout des formulaires et préparation |
|
391 |
# des données pour ces formulaires. |
|
392 |
tmpl_context.last_modification = \ |
|
393 |
mktime(get_last_modification_timestamp(ids).timetuple()) |
|
394 |
|
|
395 |
tmpl_context.calendar_lang = self.lang |
|
396 |
# TRANSLATORS: Format de date et heure compatible Python/JavaScript. |
|
397 |
tmpl_context.calendar_date_format = _('%Y-%m-%d %I:%M:%S %p') |
|
398 |
|
|
399 |
tmpl_context.edit_event_form = create_edit_event_form |
|
400 |
tmpl_context.search_form = create_search_form |
|
401 | 401 |
|
Also available in: Unified diff