diff options
Diffstat (limited to 'archaeological_files')
| -rw-r--r-- | archaeological_files/forms.py | 32 | ||||
| -rw-r--r-- | archaeological_files/locale/fr/LC_MESSAGES/django.po | 126 | ||||
| -rw-r--r-- | archaeological_files/templates/ishtar/sheet_file.html | 25 | ||||
| -rw-r--r-- | archaeological_files/views.py | 3 |
4 files changed, 100 insertions, 86 deletions
diff --git a/archaeological_files/forms.py b/archaeological_files/forms.py index f65ee85c0..18e7bcc82 100644 --- a/archaeological_files/forms.py +++ b/archaeological_files/forms.py @@ -45,6 +45,10 @@ from archaeological_operations.forms import AdministrativeActOpeForm, \ from ishtar_common import widgets class FileSelect(TableSelect): + year = forms.IntegerField(label=_("Year")) + numeric_reference = forms.IntegerField(label=_("Numeric reference")) + internal_reference = forms.CharField(max_length=200, + label=_("Other reference")) towns = get_town_field() name = forms.CharField(label=_(u"File name"), max_length=200) file_type = forms.ChoiceField(label=_("File type"), choices=[]) @@ -66,11 +70,6 @@ class FileSelect(TableSelect): txt_idx='general_contractor').pk]), associated_model=Organization), validators=[valid_id(Organization)]) - numeric_reference = forms.IntegerField( - label=_("Numeric reference")) - year = forms.IntegerField(label=_("Year")) - internal_reference = forms.CharField(max_length=200, - label=_("Other reference")) in_charge = forms.IntegerField( label=_(u"In charge"), widget=widgets.JQueryAutoComplete( @@ -220,6 +219,22 @@ class FinalFileDeleteForm(FinalForm): confirm_msg = " " confirm_end_msg = _(u"Would you like to delete this archaelogical file ?") +class AdministrativeActFileModifySelect(TableSelect): + year = forms.IntegerField(label=_("Year")) + index = forms.IntegerField(label=_("Index")) + if settings.COUNTRY == 'fr': + ref_sra = forms.CharField(label=u"Référence SRA", + max_length=15) + act_type = forms.ChoiceField(label=_("Act type"), choices=[]) + operation__towns = get_town_field() + + def __init__(self, *args, **kwargs): + super(AdministrativeActFileModifySelect, self).__init__(*args, **kwargs) + self.fields['act_type'].choices = ActType.get_types( + dct={'intented_to':'F'}) + self.fields['act_type'].help_text = ActType.get_help( + dct={'intented_to':'F'}) + class AdministrativeActFileSelect(TableSelect): associated_file__towns = get_town_field() act_type = forms.ChoiceField(label=_("Act type"), choices=[]) @@ -273,6 +288,13 @@ class AdministrativeActFileFormSelection(AdministrativeActOpeFormSelection): table_cols='TABLE_COLS_FILE'), validators=[valid_id(AdministrativeAct)]) +class AdministrativeActFileModifyFormSelection(AdministrativeActOpeFormSelection): + pk = forms.IntegerField(label="", required=False, + widget=widgets.JQueryJqGrid(reverse_lazy('get-administrativeactfile'), + AdministrativeActFileModifySelect, AdministrativeAct, + table_cols='TABLE_COLS_FILE'), + validators=[valid_id(AdministrativeAct)]) + class AdministrativeActFileForm(AdministrativeActOpeForm): act_type = forms.ChoiceField(label=_(u"Act type"), choices=[]) diff --git a/archaeological_files/locale/fr/LC_MESSAGES/django.po b/archaeological_files/locale/fr/LC_MESSAGES/django.po index 92f9ecf0f..69b205bb1 100644 --- a/archaeological_files/locale/fr/LC_MESSAGES/django.po +++ b/archaeological_files/locale/fr/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: alpha\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-01-07 21:50+0100\n" +"POT-Creation-Date: 2014-01-16 22:23+0100\n" "PO-Revision-Date: 2010-12-09\n" "Last-Translator: Étienne Loks <etienne.loks at peacefrogs net>\n" "Language-Team: \n" @@ -51,8 +51,8 @@ msgid "Numeric reference" msgstr "Référence numérique" #: forms.py:71 forms.py:123 forms.py:155 forms.py:249 models.py:66 -#: templates/ishtar/sheet_file.html:76 templates/ishtar/sheet_file.html:97 -#: templates/ishtar/sheet_file.html:117 templates/ishtar/sheet_file.html:145 +#: templates/ishtar/sheet_file.html:78 templates/ishtar/sheet_file.html:102 +#: templates/ishtar/sheet_file.html:130 msgid "Year" msgstr "Année" @@ -60,7 +60,7 @@ msgstr "Année" msgid "Other reference" msgstr "Autre référence" -#: forms.py:75 forms.py:253 templates/ishtar/sheet_file.html:121 +#: forms.py:75 forms.py:253 templates/ishtar/sheet_file.html:106 msgid "In charge" msgstr "Responsable" @@ -318,7 +318,7 @@ msgstr "Dossier archéologique : modification d'acte administratif" msgid "File: administrative act deletion" msgstr "Dossier archéologique : suppression acte administratif" -#: wizards.py:139 templates/ishtar/sheet_file.html:115 +#: wizards.py:139 templates/ishtar/sheet_file.html:100 msgid "Associated operations" msgstr "Opérations associées" @@ -370,177 +370,179 @@ msgstr "Année :" msgid "Numerical reference:" msgstr "Référence numérique :" -#: templates/ishtar/sheet_file.html:28 -msgid "File's name:" -msgstr "Nom du dossier :" +#: templates/ishtar/sheet_file.html:27 +msgid "Other reference:" +msgstr "Autre référence :" -#: templates/ishtar/sheet_file.html:30 +#: templates/ishtar/sheet_file.html:29 +msgid "Name:" +msgstr "Nom :" + +#: templates/ishtar/sheet_file.html:31 msgid "Edition date:" msgstr "Date d'édition :" -#: templates/ishtar/sheet_file.html:31 +#: templates/ishtar/sheet_file.html:32 msgid "Reception date:" msgstr "Date de réception :" -#: templates/ishtar/sheet_file.html:32 +#: templates/ishtar/sheet_file.html:33 msgid "Creation date:" msgstr "Date de création :" -#: templates/ishtar/sheet_file.html:39 +#: templates/ishtar/sheet_file.html:34 +msgid "Created by:" +msgstr "Créé par :" + +#: templates/ishtar/sheet_file.html:41 msgid "In charge:" msgstr "Responsable :" -#: templates/ishtar/sheet_file.html:40 +#: templates/ishtar/sheet_file.html:42 msgid "State:" msgstr "État :" -#: templates/ishtar/sheet_file.html:40 +#: templates/ishtar/sheet_file.html:42 msgid "Active file" msgstr "Dossier actif" -#: templates/ishtar/sheet_file.html:41 +#: templates/ishtar/sheet_file.html:43 msgid "Closed file" msgstr "Dossier fermé" -#: templates/ishtar/sheet_file.html:42 +#: templates/ishtar/sheet_file.html:44 msgid "Closing date:" msgstr "Date de clotûre :" -#: templates/ishtar/sheet_file.html:42 +#: templates/ishtar/sheet_file.html:44 msgid "by" msgstr "par" -#: templates/ishtar/sheet_file.html:45 +#: templates/ishtar/sheet_file.html:47 msgid "Type:" msgstr "Type :" -#: templates/ishtar/sheet_file.html:47 +#: templates/ishtar/sheet_file.html:49 msgid "Related file:" msgstr "Dossier en relation avec :" -#: templates/ishtar/sheet_file.html:48 +#: templates/ishtar/sheet_file.html:50 msgid "Comment:" msgstr "Commentaire :" -#: templates/ishtar/sheet_file.html:50 +#: templates/ishtar/sheet_file.html:52 msgid "Localisation" msgstr "Localisation" -#: templates/ishtar/sheet_file.html:51 +#: templates/ishtar/sheet_file.html:53 msgid "Towns:" msgstr "Communes :" -#: templates/ishtar/sheet_file.html:53 +#: templates/ishtar/sheet_file.html:55 msgid "Main address:" msgstr "Adresse principale :" -#: templates/ishtar/sheet_file.html:54 +#: templates/ishtar/sheet_file.html:56 msgid "Complement:" msgstr "Complément :" -#: templates/ishtar/sheet_file.html:55 +#: templates/ishtar/sheet_file.html:57 msgid "Postal code:" msgstr "Code postal :" -#: templates/ishtar/sheet_file.html:57 +#: templates/ishtar/sheet_file.html:59 msgid "Surface:" msgstr "Surface :" -#: templates/ishtar/sheet_file.html:62 +#: templates/ishtar/sheet_file.html:64 msgid "Preventive archaelogical file" msgstr "Dossier d'archéologie préventive" -#: templates/ishtar/sheet_file.html:63 +#: templates/ishtar/sheet_file.html:65 msgid "Developed surface:" msgstr "Surface aménagée :" -#: templates/ishtar/sheet_file.html:64 +#: templates/ishtar/sheet_file.html:66 msgid "Saisine type:" msgstr "Type de saisine :" -#: templates/ishtar/sheet_file.html:65 +#: templates/ishtar/sheet_file.html:67 msgid "Town planning service:" msgstr "Service instructeur :" -#: templates/ishtar/sheet_file.html:66 +#: templates/ishtar/sheet_file.html:68 msgid "Permit type:" msgstr "Type de permis :" -#: templates/ishtar/sheet_file.html:67 +#: templates/ishtar/sheet_file.html:69 msgid "Permit reference:" msgstr "Référence du permis :" -#: templates/ishtar/sheet_file.html:68 +#: templates/ishtar/sheet_file.html:70 msgid "General contractor organisation:" msgstr "Aménageur (organiation) :" -#: templates/ishtar/sheet_file.html:69 +#: templates/ishtar/sheet_file.html:71 msgid "General contractor:" msgstr "Aménageur :" -#: templates/ishtar/sheet_file.html:73 +#: templates/ishtar/sheet_file.html:75 msgid "Associated parcels" msgstr "Opérations associées" -#: templates/ishtar/sheet_file.html:75 +#: templates/ishtar/sheet_file.html:77 msgid "Town" msgstr "Commune" -#: templates/ishtar/sheet_file.html:77 +#: templates/ishtar/sheet_file.html:79 msgid "Section" msgstr "Section" -#: templates/ishtar/sheet_file.html:78 +#: templates/ishtar/sheet_file.html:80 msgid "Parcels" msgstr "Parcelles" -#: templates/ishtar/sheet_file.html:90 +#: templates/ishtar/sheet_file.html:92 msgid "No parcel associated to this operation" msgstr "Pas de parcelle associée à cette opération" -#: templates/ishtar/sheet_file.html:95 -msgid "Admninistrative acts" +#: templates/ishtar/sheet_file.html:96 +msgid "Administrativ acts" msgstr "Actes administratif" -#: templates/ishtar/sheet_file.html:98 templates/ishtar/sheet_file.html:118 -#: templates/ishtar/sheet_file.html:146 +#: templates/ishtar/sheet_file.html:103 templates/ishtar/sheet_file.html:131 msgid "Ref." msgstr "Ref." -#: templates/ishtar/sheet_file.html:99 templates/ishtar/sheet_file.html:120 -#: templates/ishtar/sheet_file.html:147 +#: templates/ishtar/sheet_file.html:105 templates/ishtar/sheet_file.html:132 msgid "Type" msgstr "Type" -#: templates/ishtar/sheet_file.html:100 templates/ishtar/sheet_file.html:148 -msgid "Date" -msgstr "Date" - -#: templates/ishtar/sheet_file.html:110 -msgid "No administrative act associated to this archaelogical file" -msgstr "Pas d'acte administratif associé à ce dossier archéologique" - -#: templates/ishtar/sheet_file.html:122 +#: templates/ishtar/sheet_file.html:107 msgid "Start date" msgstr "Date de début" -#: templates/ishtar/sheet_file.html:123 +#: templates/ishtar/sheet_file.html:108 msgid "Excavation end date" msgstr "Date de fin de chantier" -#: templates/ishtar/sheet_file.html:135 +#: templates/ishtar/sheet_file.html:120 msgid "Details" msgstr "Détails" -#: templates/ishtar/sheet_file.html:138 +#: templates/ishtar/sheet_file.html:123 msgid "No operation associated to this archaelogical file" msgstr "Pas d'opération associée à ce dossier archéologique" -#: templates/ishtar/sheet_file.html:143 +#: templates/ishtar/sheet_file.html:128 msgid "Admninistrative acts linked to associated operations" msgstr "Actes administratifs associé à ces opérations" -#: templates/ishtar/sheet_file.html:158 +#: templates/ishtar/sheet_file.html:133 +msgid "Date" +msgstr "Date" + +#: templates/ishtar/sheet_file.html:143 msgid "No administrative act linked to operations" msgstr "Pas d'acte administratif associé à ces opérations" @@ -621,6 +623,12 @@ msgstr "Principales communes en nombre" msgid "Main towns by surface (ha)" msgstr "Principales communes en surface (ha)" +#~ msgid "File's name:" +#~ msgstr "Nom du dossier :" + +#~ msgid "No administrative act associated to this archaelogical file" +#~ msgstr "Pas d'acte administratif associé à ce dossier archéologique" + #~ msgid "Template" #~ msgstr "Patron" diff --git a/archaeological_files/templates/ishtar/sheet_file.html b/archaeological_files/templates/ishtar/sheet_file.html index 40ac707d6..b329e8279 100644 --- a/archaeological_files/templates/ishtar/sheet_file.html +++ b/archaeological_files/templates/ishtar/sheet_file.html @@ -1,5 +1,5 @@ {% extends "ishtar/sheet.html" %} -{% load i18n %} +{% load i18n window_ope_tables %} {% block head_sheet %} {{block.super}} @@ -93,25 +93,8 @@ {% endfor %} </table> -<table> - <caption>{%trans "Admninistrative acts"%}</caption> - <tr> - <th>{% trans "Year" %}</th> - <th>{% trans "Ref." %}</th> - <th>{% trans "Type" %}</th> - <th>{% trans "Date" %}</th> - </tr> - {% for act in item.administrative_act.all %} - <tr> - <td>{{act.signature_date.year}}</td> - <td>{{act.ref_sra}}</td> - <td class='string'>{{act.act_type}}</td> - <td>{{act.signature_date}}</td> - </tr> - {% empty %} - <tr><td colspan="4" class='no_items'>{% trans "No administrative act associated to this archaelogical file" %}</td></tr> - {% endfor %} -</table> +{% trans "Administrativ acts" as administrativeacts_label %} +{% table_administrativact administrativeacts_label item.administrative_act.all %} <table> <caption>{%trans "Associated operations"%}</caption> @@ -134,7 +117,7 @@ <td class='string'>{{operation.in_charge|default:""}}</td> <td>{{operation.start_date|default:""}}</td> <td>{{operation.excavation_end_date|default:""}}</td> - <td class='link'><a href="#" onclick='load_window("{%url show-operation operation.pk ''%}")'>{% trans "Details" %}</a></td> + <td class='link'><a href="#" class='display_details' onclick='load_window("{%url show-operation operation.pk ''%}")'>{% trans "Details" %}</a></td> </tr> {% empty %} <tr><td colspan="8" class='no_items'>{% trans "No operation associated to this archaelogical file" %}</td></tr> diff --git a/archaeological_files/views.py b/archaeological_files/views.py index 46032ba48..75443aab5 100644 --- a/archaeological_files/views.py +++ b/archaeological_files/views.py @@ -87,6 +87,7 @@ get_administrativeactfile = get_item(AdministrativeAct, (Person, 'associated_file__general_contractor')], dated_fields = ['signature_date__lte', 'signature_date__gte'], extra_request_keys={ + 'year':'signature_date__year', 'associated_file__towns':'associated_file__towns__pk', 'operation__towns':'operation__towns__pk', 'act_type__intented_to':'act_type__intented_to', @@ -170,7 +171,7 @@ file_administrativeactfile_wizard = FileAdministrativeActWizard.as_view([ file_administrativeactfile_modification_wizard = \ FileEditAdministrativeActWizard.as_view([ ('selec-file_administrativeactfile_modification', - AdministrativeActFileFormSelection), + AdministrativeActFileModifyFormSelection), ('administrativeact-file_administrativeactfile_modification', AdministrativeActFileForm), ('final-file_administrativeactfile_modification', FinalForm)], |
