Skip to content

Commit

Permalink
Adiciona campo Solicitante ao tipo Compromisso (#157)
Browse files Browse the repository at this point in the history
* Cria o campo compromisso, sua traduções e melhora pontualmente algumas traduções.

* Cria a exibição do novo campo na visão da agenda diária.

* Adiciona indice e testes para o indice e o compromisso.

* Executa o comando rebuild_i18n.sh para manter o padrão do pacote.

* Remove arquivo obsoleto.

* adiciona modificações realizadas no changes.

* cria um workaroud para realizar esta entrega e contornar o problema descrito na issue #156 .
  • Loading branch information
idgserpro authored Apr 5, 2019
1 parent b03551b commit 37f614a
Show file tree
Hide file tree
Showing 16 changed files with 142 additions and 121 deletions.
4 changes: 4 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ Changelog
2.0b2 (unreleased)
^^^^^^^^^^^^^^^^^^

- Acrestenta o campo 'Solicitante' no tipo de conteúdo ``Compromisso``.
(closes `#plonegovbr/brasil.gov.agenda#153 <https://github.com/plonegovbr/brasil.gov.agenda/issues/153>`_).
[idgserpro]

- Remove o campo ``subjects`` do tipos de conteúdo ``Compromisso`` por ser considerado `desnecessário <https://listas.interlegis.gov.br/pipermail/plonegov-br/2018-June/004767.html>`_.
[hvelarde]

Expand Down
1 change: 1 addition & 0 deletions src/brasil/gov/agenda/browser/agendadiaria.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ def compromissos(self):
comp = {}
comp['autoridade'] = self.autoridade()
comp['title'] = obj.Title()
comp['solicitante'] = obj.solicitante
comp['description'] = obj.Description()
comp['start_time'] = obj.start_date.strftime('%Hh%M')
comp['start_date'] = obj.start_date.strftime('%Y-%m-%d %H:%M')
Expand Down
1 change: 1 addition & 0 deletions src/brasil/gov/agenda/browser/compromisso.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ def compromisso(self):
comp = {}
comp['autoridade'] = self.autoridade()
comp['title'] = obj.Title()
comp['solicitante'] = obj.solicitante
comp['description'] = obj.Description()
comp['start_time'] = obj.start_date.strftime('%Hh%M')
comp['start_date'] = obj.start_date.strftime('%Y-%m-%d %H:%M')
Expand Down
13 changes: 9 additions & 4 deletions src/brasil/gov/agenda/browser/templates/agenda_macros.pt
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,19 @@
tal:content="comp/title">
Reunião com Dorneles Treméa
</h4>
<p class="compromisso-solicitante"
tal:condition="comp/solicitante">
<label i18n:translate="">Solicitante</label>:
<span tal:replace="comp/solicitante">Solicitante do Compromisso</span>
</p>
<p class="compromisso-participantes"
tal:condition="comp/attendees"
tal:content="structure comp/attendees_formatted">
Dorneles Treméa
tal:condition="comp/attendees">
<label i18n:translate="">Participante(s)</label>:
<span tal:replace="comp/attendees"> Participantes</span>
</p>
<p class="compromisso-pauta"
tal:condition="comp/description">
<label i18n:translate="">Pauta:</label>
<label i18n:translate="">Pauta</label>:
<span tal:replace="comp/description">Assunto a ser tratado</span>
</p>
<p class="compromisso-local"
Expand Down
17 changes: 13 additions & 4 deletions src/brasil/gov/agenda/browser/templates/compromissoview.pt
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,26 @@

<h4 class="comprimisso-titulo" tal:content="comp/title">Reuniao com Dorneles Tremea</h4>

<p class="comprimisso-solicitante"
tal:condition="comp/solicitante">
<label i18n:translate="">Solicitante</label>: <span tal:replace="comp/solicitante">Solicitante do compromisso</span>
</p>

<p class="comprimisso-participantes"
tal:condition="comp/attendees"
tal:content="structure comp/attendees_formatted">Dorneles Tremea</p>
tal:condition="comp/attendees">
<label i18n:translate="">Participante(s)</label>: <br/>
<span tal:replace="structure comp/attendees_formatted">Participantes do compromisso</span>
</p>

<p class="comprimisso-pauta"
tal:condition="comp/description">
<label i18n:translate="">Pauta:</label> <span tal:replace="comp/description">Assunto a ser tratado</span></p>
<label i18n:translate="">Pauta</label>: <span tal:replace="comp/description">Assunto a ser tratado</span>
</p>

<p class="comprimisso-local"
tal:condition="comp/location">
<label i18n:translate="">Local:</label> <span tal:replace="comp/location">Palacio do Planalto</span></p>
<label i18n:translate="">Local</label>: <span tal:replace="comp/location">Palacio do Planalto</span>
</p>

<span class="download-compromisso">
<a class="add-agenda vcal"
Expand Down
1 change: 1 addition & 0 deletions src/brasil/gov/agenda/content/agendadiaria.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ def SearchableText_AgendaDiaria(obj):
# Campos indexaveis
SearchableText.append(child.title)
SearchableText.append(child.description)
SearchableText.append(child.solicitante)
SearchableText.append(child.autoridade)
SearchableText.append(child.location)
SearchableText.append(child.attendees)
Expand Down
5 changes: 5 additions & 0 deletions src/brasil/gov/agenda/content/schema/Compromisso.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@
<required>true</required>
<title i18n:translate="">Compromisso</title>
</field>
<field name="solicitante" type="zope.schema.TextLine">
<description i18n:translate="">Solicitante da Reuniao e o Orgao ou entidade que representa.</description>
<required>False</required>
<title i18n:translate="">Solicitante</title>
</field>
<field name="attendees" type="zope.schema.Text" indexer:searchable="true">
<description i18n:translate="">Outros participantes deste compromisso, um por linha.</description>
<required>False</required>
Expand Down
57 changes: 0 additions & 57 deletions src/brasil/gov/agenda/i18n.sh

This file was deleted.

47 changes: 29 additions & 18 deletions src/brasil/gov/agenda/locales/brasil.gov.agenda.pot
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2018-09-25 14:03+0000\n"
"POT-Creation-Date: 2019-04-03 13:15+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand All @@ -22,8 +22,8 @@ msgstr ""
msgid ".gov.br: Remoção do suporte a Agenda"
msgstr ""

#: brasil/gov/agenda/browser/templates/agenda_macros.pt:84
#: brasil/gov/agenda/browser/templates/compromissoview.pt:72
#: brasil/gov/agenda/browser/templates/agenda_macros.pt:89
#: brasil/gov/agenda/browser/templates/compromissoview.pt:81
msgid "Adicionar ao meu calendario"
msgstr ""

Expand Down Expand Up @@ -99,7 +99,7 @@ msgstr ""
msgid "Detalhe do compromisso"
msgstr ""

#: brasil/gov/agenda/browser/templates/agenda_macros.pt:90
#: brasil/gov/agenda/browser/templates/agenda_macros.pt:95
msgid "Editar"
msgstr ""

Expand Down Expand Up @@ -131,6 +131,10 @@ msgstr ""
msgid "Link do rodapé"
msgstr ""

#: brasil/gov/agenda/browser/templates/compromissoview.pt:75
msgid "Local"
msgstr ""

#: brasil/gov/agenda/content/schema/Agenda.xml
msgid "Local padrao para eventos desta agenda"
msgstr ""
Expand All @@ -139,10 +143,6 @@ msgstr ""
msgid "Local padrao para eventos durante este dia"
msgstr ""

#: brasil/gov/agenda/browser/templates/compromissoview.pt:67
msgid "Local:"
msgstr ""

#: brasil/gov/agenda/behaviors/configure.zcml:15
msgid "Name from date"
msgstr ""
Expand All @@ -161,20 +161,22 @@ msgstr ""
msgid "Outros participantes deste compromisso, um por linha."
msgstr ""

#: brasil/gov/agenda/content/schema/Compromisso.xml
msgid "Pauta"
#: brasil/gov/agenda/browser/templates/agenda_macros.pt:72
#: brasil/gov/agenda/browser/templates/compromissoview.pt:64
msgid "Participante(s)"
msgstr ""

#: brasil/gov/agenda/browser/templates/agenda_macros.pt:72
#: brasil/gov/agenda/browser/templates/compromissoview.pt:63
msgid "Pauta:"
#: brasil/gov/agenda/browser/templates/agenda_macros.pt:77
#: brasil/gov/agenda/browser/templates/compromissoview.pt:70
#: brasil/gov/agenda/content/schema/Compromisso.xml
msgid "Pauta"
msgstr ""

#: brasil/gov/agenda/profiles.zcml:26
msgid "Remove suporte de agenda de compromissos dentro de um Portal Padrão"
msgstr ""

#: brasil/gov/agenda/browser/templates/agenda_macros.pt:95
#: brasil/gov/agenda/browser/templates/agenda_macros.pt:100
msgid "Remover"
msgstr ""

Expand All @@ -194,9 +196,18 @@ msgstr ""
msgid "Sem compromissos oficiais."
msgstr ""

#: brasil/gov/agenda/browser/templates/agenda_macros.pt:67
#: brasil/gov/agenda/browser/templates/compromissoview.pt:59
#: brasil/gov/agenda/content/schema/Compromisso.xml
msgid "Solicitante"
msgstr ""

#: brasil/gov/agenda/content/schema/Compromisso.xml
msgid "Solicitante da Reuniao e o Orgao ou entidade que representa."
msgstr ""

#: brasil/gov/agenda/content/schema/Agenda.xml
#: brasil/gov/agenda/content/schema/AgendaDiaria.xml
#: brasil/gov/agenda/content/schema/Compromisso.xml
msgid "Tags são utilizadas para organização de conteúdo"
msgstr ""

Expand All @@ -212,8 +223,8 @@ msgstr ""
msgid "Title"
msgstr ""

#: brasil/gov/agenda/browser/templates/agenda_macros.pt:81
#: brasil/gov/agenda/browser/templates/compromissoview.pt:70
#: brasil/gov/agenda/browser/templates/agenda_macros.pt:86
#: brasil/gov/agenda/browser/templates/compromissoview.pt:79
msgid "VCAL"
msgstr ""

Expand Down Expand Up @@ -248,7 +259,7 @@ msgid "label_event_start"
msgstr ""

#. Default: "Atualmente não existem compromissos agendados."
#: brasil/gov/agenda/browser/templates/agenda_macros.pt:104
#: brasil/gov/agenda/browser/templates/agenda_macros.pt:109
msgid "label_no_appointments"
msgstr ""

Expand Down
47 changes: 29 additions & 18 deletions src/brasil/gov/agenda/locales/en/LC_MESSAGES/brasil.gov.agenda.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: brasil.gov.agenda\n"
"POT-Creation-Date: 2018-09-25 14:03+0000\n"
"POT-Creation-Date: 2019-04-03 13:15+0000\n"
"PO-Revision-Date: 2012-09-18 23:00+0000\n"
"Last-Translator: PloneGov.Br <[email protected]>\n"
"Language-Team: PloneGov.Br <[email protected]>\n"
Expand All @@ -22,8 +22,8 @@ msgstr ""
msgid ".gov.br: Remoção do suporte a Agenda"
msgstr ""

#: brasil/gov/agenda/browser/templates/agenda_macros.pt:84
#: brasil/gov/agenda/browser/templates/compromissoview.pt:72
#: brasil/gov/agenda/browser/templates/agenda_macros.pt:89
#: brasil/gov/agenda/browser/templates/compromissoview.pt:81
msgid "Adicionar ao meu calendario"
msgstr "Add to my calendar"

Expand Down Expand Up @@ -99,7 +99,7 @@ msgstr "Describe here if this schedule has been updated. Leave this field blank
msgid "Detalhe do compromisso"
msgstr "Appointment's details"

#: brasil/gov/agenda/browser/templates/agenda_macros.pt:90
#: brasil/gov/agenda/browser/templates/agenda_macros.pt:95
msgid "Editar"
msgstr "Edit"

Expand Down Expand Up @@ -131,6 +131,10 @@ msgstr "There's already an schedule for this date."
msgid "Link do rodapé"
msgstr "Footer's link"

#: brasil/gov/agenda/browser/templates/compromissoview.pt:75
msgid "Local"
msgstr "Place"

#: brasil/gov/agenda/content/schema/Agenda.xml
msgid "Local padrao para eventos desta agenda"
msgstr "Standard location for this schedule events"
Expand All @@ -139,10 +143,6 @@ msgstr "Standard location for this schedule events"
msgid "Local padrao para eventos durante este dia"
msgstr "Standard location for events during this day"

#: brasil/gov/agenda/browser/templates/compromissoview.pt:67
msgid "Local:"
msgstr "Place:"

#: brasil/gov/agenda/behaviors/configure.zcml:15
msgid "Name from date"
msgstr ""
Expand All @@ -161,20 +161,22 @@ msgstr "Department"
msgid "Outros participantes deste compromisso, um por linha."
msgstr "Other attendees in this appointment, one per line."

#: brasil/gov/agenda/browser/templates/agenda_macros.pt:72
#: brasil/gov/agenda/browser/templates/compromissoview.pt:64
msgid "Participante(s)"
msgstr "Participants"

#: brasil/gov/agenda/browser/templates/agenda_macros.pt:77
#: brasil/gov/agenda/browser/templates/compromissoview.pt:70
#: brasil/gov/agenda/content/schema/Compromisso.xml
msgid "Pauta"
msgstr "Agenda"

#: brasil/gov/agenda/browser/templates/agenda_macros.pt:72
#: brasil/gov/agenda/browser/templates/compromissoview.pt:63
msgid "Pauta:"
msgstr "Agenda:"

#: brasil/gov/agenda/profiles.zcml:26
msgid "Remove suporte de agenda de compromissos dentro de um Portal Padrão"
msgstr ""

#: brasil/gov/agenda/browser/templates/agenda_macros.pt:95
#: brasil/gov/agenda/browser/templates/agenda_macros.pt:100
msgid "Remover"
msgstr "Remove"

Expand All @@ -194,9 +196,18 @@ msgstr ""
msgid "Sem compromissos oficiais."
msgstr ""

#: brasil/gov/agenda/browser/templates/agenda_macros.pt:67
#: brasil/gov/agenda/browser/templates/compromissoview.pt:59
#: brasil/gov/agenda/content/schema/Compromisso.xml
msgid "Solicitante"
msgstr "Requester"

#: brasil/gov/agenda/content/schema/Compromisso.xml
msgid "Solicitante da Reuniao e o Orgao ou entidade que representa."
msgstr "Requester of the Meeting and the Organ or entity it represents."

#: brasil/gov/agenda/content/schema/Agenda.xml
#: brasil/gov/agenda/content/schema/AgendaDiaria.xml
#: brasil/gov/agenda/content/schema/Compromisso.xml
msgid "Tags são utilizadas para organização de conteúdo"
msgstr "Tags are used for content organization."

Expand All @@ -212,8 +223,8 @@ msgstr ""
msgid "Title"
msgstr "Title"

#: brasil/gov/agenda/browser/templates/agenda_macros.pt:81
#: brasil/gov/agenda/browser/templates/compromissoview.pt:70
#: brasil/gov/agenda/browser/templates/agenda_macros.pt:86
#: brasil/gov/agenda/browser/templates/compromissoview.pt:79
msgid "VCAL"
msgstr "VCAL"

Expand Down Expand Up @@ -248,7 +259,7 @@ msgid "label_event_start"
msgstr "Event Starts"

#. Default: "Atualmente não existem compromissos agendados."
#: brasil/gov/agenda/browser/templates/agenda_macros.pt:104
#: brasil/gov/agenda/browser/templates/agenda_macros.pt:109
msgid "label_no_appointments"
msgstr ""

Expand Down
Loading

0 comments on commit 37f614a

Please sign in to comment.