diff options
26 files changed, 572 insertions, 454 deletions
diff --git a/archaeological_context_records/templates/ishtar/sheet_contextrecord.html b/archaeological_context_records/templates/ishtar/sheet_contextrecord.html index ee1719eda..95a44116d 100644 --- a/archaeological_context_records/templates/ishtar/sheet_contextrecord.html +++ b/archaeological_context_records/templates/ishtar/sheet_contextrecord.html @@ -129,8 +129,8 @@ <td>{{ item.context_record.parcel.short_label }}</td> <td class='ref'>{{ find.get_last_find.container.reference|default:""}}</td> <td class='string'>{{ find.get_last_find.container.location|default:""}}</td> - <td class='link'><a href="#">{% trans "Details" %}</a></td> - {#<a href="#" onclick='load_window("{% url show-find find.pk%}");'>{%trans "Details"%}</a></td>#} + <td class='link'><a class='display_details' href="#">{% trans "Details" %}</a></td> + {#<a href="#" class='display_details' onclick='load_window("{% url show-find find.pk%}");'>{%trans "Details"%}</a></td>#} </tr> {% empty %} <tr><td colspan="9" class='no_items'>{% trans "No find associated to this context record" %}</td></tr> 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)], diff --git a/archaeological_operations/forms.py b/archaeological_operations/forms.py index 76d7055d9..2754f2d1a 100644 --- a/archaeological_operations/forms.py +++ b/archaeological_operations/forms.py @@ -103,6 +103,8 @@ class ParcelForm(forms.Form): return self.cleaned_data class ParcelSelectionForm(forms.Form): + _town = forms.ChoiceField(label=_("Town"), choices=(), required=False, + validators=[valid_id(models.Town)]) _parcel_selection = forms.CharField(label=_(u"Full text input"), widget=SelectParcelWidget(attrs={'class':'parcel-select'}), max_length=100, help_text=_(u"example: \"2013: XD:1 to "\ @@ -118,6 +120,13 @@ class ParcelFormSet(FormSet): if self.forms[0].__class__.__name__ == 'ParcelForm': self.selection_form = ParcelSelectionForm() self.extra_form = self.selection_form + # copy town choices + town_choices = self.forms[0].fields['town'].choices[:] + if town_choices and not town_choices[0][0]: + # remove empty + town_choices = town_choices[1:] + if town_choices: + self.selection_form.fields['_town'].choices = town_choices def as_table(self): # add dynamic widget @@ -142,25 +151,14 @@ class ParcelFormSet(FormSet): def clean(self): # manage parcel selection - last_town, parcels = None, [] - if hasattr(self, 'cleaned_data') and self.cleaned_data: - for parcel in reversed(self.cleaned_data): - if parcel.get('town'): - last_town = parcel.get('town') - break - if not last_town and 'town' in self.forms[0].fields.keys(): - towns = self.forms[0].fields['town'].choices - if towns: - towns.pop(0) # remove first empty - if towns: - last_town = towns[0][0] + selected_town, parcels = None, [] if self.data.get('_parcel_selection'): parcels = parse_parcels(self.data['_parcel_selection']) - if last_town: - for idx, parcel in enumerate(parcels): - parcel['town'] = last_town - parcel['DELETE'] = False - parcels[idx] = parcel + selected_town = self.data.get('_town') + for idx, parcel in enumerate(parcels): + parcel['town'] = selected_town + parcel['DELETE'] = False + parcels[idx] = parcel c_max = self.total_form_count() # pop the last extra form extra_form = self.forms.pop() @@ -188,6 +186,8 @@ ParcelFormSet = formset_factory(ParcelForm, can_delete=True, ParcelFormSet.form_label = _(u"Parcels") class OperationSelect(TableSelect): + year = forms.IntegerField(label=_("Year")) + operation_code = forms.IntegerField(label=_(u"Numeric reference")) common_name = forms.CharField(label=_(u"Name (full text search)"), max_length=30) if settings.COUNTRY == 'fr': @@ -203,7 +203,6 @@ class OperationSelect(TableSelect): associated_model=Person), label=_(u"In charge")) remains = forms.ChoiceField(label=_(u"Remains"), choices=[]) periods = forms.ChoiceField(label=_(u"Periods"), choices=[]) - year = forms.IntegerField(label=_("Year")) start_before = forms.DateField(label=_(u"Started before"), widget=widgets.JQueryDate) start_after = forms.DateField(label=_(u"Started after"), @@ -591,8 +590,13 @@ OperationSourceFormSelection = get_form_selection( ################################################ class AdministrativeActOpeSelect(TableSelect): - operation__towns = get_town_field() + 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(AdministrativeActOpeSelect, self).__init__(*args, **kwargs) @@ -684,13 +688,12 @@ class GenerateDocForm(forms.Form): self.fields['doc_generation'].choices = [('', u'-'*9)] + \ [(choice.pk , unicode(choice)) for choice in choices] -class AdministrativeActRegisterSelect(TableSelect): - signature_date__year = forms.IntegerField(label=_(u"Year")) - act_type = forms.ChoiceField(label=_("Act type"), choices=[]) +class AdministrativeActRegisterSelect(AdministrativeActOpeSelect): def __init__(self, *args, **kwargs): super(AdministrativeActRegisterSelect, self).__init__(*args, **kwargs) - self.fields['act_type'].choices = models.ActType.get_types() + self.fields['act_type'].choices = models.ActType.get_types( + dct={'indexed':True}) self.fields['act_type'].help_text = models.ActType.get_help() class AdministrativeActRegisterFormSelection(forms.Form): diff --git a/archaeological_operations/locale/fr/LC_MESSAGES/django.po b/archaeological_operations/locale/fr/LC_MESSAGES/django.po index 9fc0976be..52bce19da 100644 --- a/archaeological_operations/locale/fr/LC_MESSAGES/django.po +++ b/archaeological_operations/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" @@ -18,12 +18,12 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n>1;\n" -#: forms.py:63 forms.py:188 forms.py:427 forms.py:448 forms.py:452 -#: models.py:523 templates/ishtar/sheet_operation.html:86 +#: forms.py:63 forms.py:186 forms.py:425 forms.py:446 forms.py:450 +#: models.py:534 templates/ishtar/sheet_operation.html:87 msgid "Parcels" msgstr "Parcelles" -#: forms.py:66 forms.py:405 models.py:517 +#: forms.py:66 forms.py:106 forms.py:403 models.py:528 #: templates/ishtar/dashboards/dashboard_operation.html:302 #: templates/ishtar/dashboards/dashboard_operation.html:315 #: templates/ishtar/dashboards/dashboard_operation.html:482 @@ -31,17 +31,16 @@ msgstr "Parcelles" msgid "Town" msgstr "Commune" -#: forms.py:68 forms.py:206 forms.py:306 forms.py:688 models.py:118 -#: models.py:450 models.py:515 templates/ishtar/sheet_operation.html:84 -#: templates/ishtar/sheet_operation.html:105 +#: forms.py:68 forms.py:204 forms.py:304 forms.py:686 models.py:118 +#: models.py:461 models.py:526 templates/ishtar/sheet_operation.html:85 msgid "Year" msgstr "Année" -#: forms.py:71 models.py:518 templates/ishtar/sheet_operation.html:85 +#: forms.py:71 models.py:529 templates/ishtar/sheet_operation.html:86 msgid "Section" msgstr "Section" -#: forms.py:73 models.py:519 +#: forms.py:73 models.py:530 msgid "Parcel number" msgstr "Numéro de parcelle" @@ -49,131 +48,132 @@ msgstr "Numéro de parcelle" msgid "Town section and parcel number fields are required." msgstr "La commune, la section et le numéro de parcelle sont obligatoire." -#: forms.py:106 +#: forms.py:108 msgid "Full text input" msgstr "Saisie libre" -#: forms.py:108 +#: forms.py:110 msgid "example: \"2013: XD:1 to 13,24,33 to 39, YD:24\" or \"AB:24,AC:42\"" msgstr "exemple : \"2013: XD:1 à 13,24,33 à 39, YD:24\" ou \"AB:24,AC:42\"" -#: forms.py:182 +#: forms.py:180 msgid "There are identical parcels." msgstr "Il y a des parcelles identiques." -#: forms.py:191 +#: forms.py:189 msgid "Name (full text search)" msgstr "Nom (recherche texte intégral)" -#: forms.py:196 forms.py:294 forms.py:572 models.py:44 models.py:125 +#: forms.py:194 forms.py:292 forms.py:570 models.py:44 models.py:125 msgid "Operation type" msgstr "Type d'opération" -#: forms.py:203 models.py:116 +#: forms.py:201 models.py:116 msgid "In charge" msgstr "Responsable" -#: forms.py:204 models.py:127 +#: forms.py:202 models.py:127 msgid "Remains" msgstr "Vestiges" -#: forms.py:205 forms.py:477 forms.py:496 models.py:130 -#: templates/ishtar/sheet_operation.html:160 +#: forms.py:203 forms.py:475 forms.py:494 models.py:130 +#: templates/ishtar/sheet_operation.html:144 msgid "Periods" msgstr "Périodes" -#: forms.py:207 +#: forms.py:205 msgid "Started before" msgstr "Commencé avant" -#: forms.py:209 +#: forms.py:207 msgid "Started after" msgstr "Commencé après" -#: forms.py:211 +#: forms.py:209 msgid "Ended before" msgstr "Terminé avant" -#: forms.py:213 +#: forms.py:211 msgid "Ended after" msgstr "Terminé après" -#: forms.py:215 +#: forms.py:213 msgid "Parcel (section/number)" msgstr "Parcelle (section/numéro)" -#: forms.py:216 +#: forms.py:214 msgid "Is open?" msgstr "Est ouvert ?" -#: forms.py:235 forms.py:566 views.py:168 +#: forms.py:233 forms.py:564 views.py:169 msgid "Operation search" msgstr "Recherche d'opérations" -#: forms.py:247 forms.py:568 +#: forms.py:245 forms.py:566 msgid "You should select an operation." msgstr "Vous devez sélectionner une opération." -#: forms.py:275 forms.py:622 templates/ishtar/sheet_operation.html:28 +#: forms.py:273 forms.py:620 templates/ishtar/sheet_administrativeact.html:11 +#: templates/ishtar/sheet_operation.html:28 msgid "General" msgstr "Général" -#: forms.py:283 models.py:400 +#: forms.py:281 models.py:401 msgid "Person in charge of the operation" msgstr "Responsable d'opération" -#: forms.py:290 models.py:378 models.py:414 wizards.py:80 +#: forms.py:288 models.py:378 models.py:415 wizards.py:80 msgid "Archaelogical file" msgstr "Dossier archéologique" -#: forms.py:296 models.py:66 models.py:109 models.py:569 +#: forms.py:294 models.py:66 models.py:109 models.py:580 msgid "Start date" msgstr "Date de début" -#: forms.py:298 models.py:110 +#: forms.py:296 models.py:110 msgid "Excavation end date" msgstr "Date de fin de chantier" -#: forms.py:300 models.py:113 +#: forms.py:298 models.py:113 msgid "Report delivery date" msgstr "Date de livraison du rapport" -#: forms.py:303 +#: forms.py:301 msgid "Total surface (m²)" msgstr "Surface totale des terrains (m²)" -#: forms.py:310 models.py:119 models.py:279 +#: forms.py:308 models.py:119 models.py:279 msgid "Operation code" msgstr "Code de l'opération" -#: forms.py:313 models.py:162 +#: forms.py:311 models.py:162 msgid "Generic name" msgstr "Nom générique" -#: forms.py:315 models.py:160 +#: forms.py:313 models.py:160 msgid "Operator reference" msgstr "Référence de l'opérateur" -#: forms.py:319 +#: forms.py:317 msgid "Associated archaeological sites" msgstr "Sites archéologiques associés" -#: forms.py:339 models.py:164 +#: forms.py:337 models.py:164 msgid "Comment" msgstr "Commentaire" -#: forms.py:352 +#: forms.py:350 msgid "" "If you want to set an excavation end date you have to provide a start date." msgstr "" "Avant de renseigner la date de fin de chantier, il est nécessaire de " "renseigner une date de début." -#: forms.py:355 +#: forms.py:353 msgid "The excavation end date cannot be before the start date." msgstr "La date de fin de chantier ne peut être avant la date de début." -#: forms.py:369 +#: forms.py:367 #, python-format msgid "" "Operation code already exist for year: %(year)d - use a value bigger than " @@ -182,110 +182,110 @@ msgstr "" "Ce code d'opération existe déjà pour l'année %(year)d - utilisez une valeur " "plus grande que %(last_val)d" -#: forms.py:373 +#: forms.py:371 msgid "Bad operation code" msgstr "Mauvais code d'opération" -#: forms.py:378 +#: forms.py:376 msgid "Preventive informations - excavation" msgstr "Information archéologie préventive - fouille" -#: forms.py:379 models.py:129 +#: forms.py:377 models.py:129 #: templates/ishtar/dashboards/dashboard_operation.html:495 msgid "Cost (€)" msgstr "Cout (€)" -#: forms.py:380 models.py:131 +#: forms.py:378 models.py:131 msgid "Scheduled man-days" msgstr "Jours-hommes prévus" -#: forms.py:382 models.py:133 +#: forms.py:380 models.py:133 msgid "Optional man-days" msgstr "Jours-hommes optionnels" -#: forms.py:384 models.py:135 +#: forms.py:382 models.py:135 msgid "Effective man-days" msgstr "Jours-hommes effectifs" -#: forms.py:393 +#: forms.py:391 msgid "Preventive informations - diagnostic" msgstr "Information archéologie préventive - diagnostic" -#: forms.py:396 models.py:148 +#: forms.py:394 models.py:148 msgid "Prescription on zoning" msgstr "Prescription sur zonage" -#: forms.py:398 models.py:150 +#: forms.py:396 models.py:150 msgid "Prescription on large area" msgstr "Prescription sur une vaste surface" -#: forms.py:400 models.py:152 +#: forms.py:398 models.py:152 msgid "Prescription on geoarchaeological context" msgstr "Prescription sur un contexte géoarchéologique" -#: forms.py:403 forms.py:424 models.py:128 models.py:459 +#: forms.py:401 forms.py:422 models.py:128 models.py:470 msgid "Towns" msgstr "Communes" -#: forms.py:429 models.py:522 models.py:568 -#: templates/ishtar/sheet_operation.html:132 -#: templates/ishtar/sheet_operation.html:164 +#: forms.py:427 models.py:533 models.py:579 +#: templates/ishtar/sheet_operation.html:116 +#: templates/ishtar/sheet_operation.html:148 msgid "Parcel" msgstr "Parcelle" -#: forms.py:455 forms.py:474 models.py:61 +#: forms.py:453 forms.py:472 models.py:61 msgid "Remain types" msgstr "Types de vestige" -#: forms.py:458 models.py:60 +#: forms.py:456 models.py:60 msgid "Remain type" msgstr "Type de vestige" -#: forms.py:470 +#: forms.py:468 msgid "There are identical remain types" msgstr "Il y a des types de vestige identiques." -#: forms.py:480 +#: forms.py:478 msgid "Period" msgstr "Période" -#: forms.py:492 +#: forms.py:490 msgid "There are identical periods" msgstr "Il y a des périodes identiques." -#: forms.py:499 models.py:80 +#: forms.py:497 models.py:80 msgid "Reference" msgstr "Référence" -#: forms.py:500 models.py:81 +#: forms.py:498 models.py:81 msgid "Name" msgstr "Nom" -#: forms.py:506 +#: forms.py:504 msgid "This reference already exists." msgstr "Cette référence existe déjà." -#: forms.py:515 +#: forms.py:513 msgid "Associated archaelogical sites" msgstr "Entités archéologiques associées" -#: forms.py:521 ishtar_menu.py:29 +#: forms.py:519 ishtar_menu.py:29 msgid "Search" msgstr "Recherche" -#: forms.py:525 +#: forms.py:523 msgid "Would you like to close this operation?" msgstr "Voulez vous clore cette opération ?" -#: forms.py:529 +#: forms.py:527 msgid "Would you like to delete this operation?" msgstr "Voulez vous supprimer cette opération ?" -#: forms.py:537 models.py:369 models.py:401 +#: forms.py:535 models.py:369 models.py:402 msgid "Index" msgstr "Index" -#: forms.py:560 +#: forms.py:558 #, python-format msgid "" "Index already exist for operation: %(operation)s - use a value bigger than " @@ -294,69 +294,69 @@ msgstr "" "Cet index existe déjà pour l'opération : %(operation)s, utilisez une valeur " "plus grande que %(last_val)d" -#: forms.py:571 +#: forms.py:569 msgid "Operation's town" msgstr "Commune de l'opération" -#: forms.py:574 +#: forms.py:572 msgid "Operation's year" msgstr "Année de l'opération" -#: forms.py:585 +#: forms.py:583 msgid "Documentation search" msgstr "Recherche de document" -#: forms.py:587 +#: forms.py:585 msgid "You should select a document." msgstr "Vous devez sélectionner un document." -#: forms.py:595 forms.py:625 forms.py:689 models.py:389 models.py:398 +#: forms.py:593 forms.py:623 forms.py:687 models.py:389 models.py:399 msgid "Act type" msgstr "Type d'acte" -#: forms.py:605 +#: forms.py:603 msgid "Administrative act search" msgstr "Recherche d'actes administratifs" -#: forms.py:617 forms.py:710 +#: forms.py:615 forms.py:708 msgid "You should select an administrative act." msgstr "Vous devez sélectionner un acte administratif." -#: forms.py:626 models.py:408 +#: forms.py:624 models.py:409 msgid "Signatory" msgstr "Signataire" -#: forms.py:630 models.py:417 +#: forms.py:628 models.py:418 msgid "Object" msgstr "Objet" -#: forms.py:632 models.py:415 +#: forms.py:630 models.py:416 msgid "Signature date" msgstr "Date de signature" -#: forms.py:647 +#: forms.py:645 msgid "Would you like to delete this administrative act?" msgstr "Voulez vous supprimer cet acte administratif ?" -#: forms.py:651 +#: forms.py:649 msgid "Template" msgstr "Patron" -#: forms.py:676 +#: forms.py:674 msgid "Doc generation" msgstr "Generation de document" -#: forms.py:678 +#: forms.py:676 msgid "Generate the associated doc?" msgstr "Générer le document associé ?" -#: forms.py:697 ishtar_menu.py:96 views.py:305 +#: forms.py:695 ishtar_menu.py:96 views.py:306 msgctxt "admin act register" msgid "Register" msgstr "Registre" #: ishtar_menu.py:27 models.py:172 models.py:356 models.py:367 models.py:379 -#: models.py:410 models.py:514 templates/ishtar/sheet_operation.html:6 +#: models.py:411 models.py:525 templates/ishtar/sheet_operation.html:6 msgid "Operation" msgstr "Opération" @@ -376,7 +376,8 @@ msgstr "Clotûre" msgid "Deletion" msgstr "Suppression" -#: ishtar_menu.py:51 models.py:425 +#: ishtar_menu.py:51 models.py:426 +#: templates/ishtar/sheet_administrativeact.html:6 msgid "Administrative act" msgstr "Acte administratif" @@ -421,7 +422,7 @@ msgstr "Types d'opération" msgid "Order" msgstr "Ordre" -#: models.py:67 models.py:570 +#: models.py:67 models.py:581 msgid "End date" msgstr "Date de fin" @@ -469,7 +470,7 @@ msgstr "Peut supprimer ses propres entités archéologiques" msgid "Closing date" msgstr "Date de clotûre" -#: models.py:123 models.py:512 +#: models.py:123 models.py:523 msgid "File" msgstr "Dossier" @@ -552,119 +553,124 @@ msgstr "Indexé" msgid "Act types" msgstr "Types d'acte" -#: models.py:403 +#: models.py:404 msgid "Archaeological preventive operator" msgstr "Opérateur d'archéologie préventive" -#: models.py:406 +#: models.py:407 msgid "Person in charge of the scientific part" msgstr "Responsable scientifique" -#: models.py:426 templates/ishtar/sheet_operation.html:103 +#: models.py:427 msgid "Administrative acts" msgstr "Actes administratifs" -#: models.py:429 +#: models.py:430 msgid "Can view all Administrative act" msgstr "Peut voir tout les Actes administratifs" -#: models.py:431 +#: models.py:432 msgid "Can view own Administrative act" msgstr "Peut voir son propre Acte administratif" -#: models.py:433 +#: models.py:434 msgid "Can add own Administrative act" msgstr "Peut ajouter son propre Acte administratif" -#: models.py:435 +#: models.py:436 msgid "Can change own Administrative act" msgstr "Peut changer son propre Acte administratif" -#: models.py:437 +#: models.py:438 msgid "Can delete own Administrative act" msgstr "Peut supprimer son propre Acte administratif" -#: models.py:505 +#: models.py:446 +#: templates/ishtar/blocks/window_tables/administrativacts.html:5 +msgid "Ref." +msgstr "Réf." + +#: models.py:516 msgid "This index already exists for this year" msgstr "Cet index existe déjà pour cette année." -#: models.py:567 +#: models.py:578 msgid "Owner" msgstr "Propriétaire" -#: models.py:573 +#: models.py:584 msgid "Parcel owner" msgstr "Propriétaire de parcelle" -#: models.py:574 +#: models.py:585 msgid "Parcel owners" msgstr "Propriétaires de parcelle" -#: models.py:598 +#: models.py:609 msgid "Recorded" msgstr "Enregistré" -#: models.py:599 +#: models.py:610 msgid "Effective" msgstr "Effectif" -#: models.py:600 +#: models.py:611 msgid "Active" msgstr "Actif" -#: models.py:601 +#: models.py:612 msgid "Field completed" msgstr "Terrain achevé" -#: models.py:602 +#: models.py:613 msgid "Associated report" msgstr "Rapport associé" -#: models.py:603 +#: models.py:614 msgid "Closed" msgstr "Fermé" -#: models.py:604 +#: models.py:615 msgid "Documented and closed" msgstr "Documenté et clôt" -#: views.py:182 +#: views.py:183 msgid "New operation" msgstr "Nouvelle opération" -#: views.py:213 +#: views.py:214 msgid "Operation modification" msgstr "Modification d'une opération" -#: views.py:243 +#: views.py:244 msgid "Operation closing" msgstr "Clotûre de l'opération" -#: views.py:249 +#: views.py:250 msgid "Operation deletion" msgstr "Suppression d'une opération" -#: views.py:257 +#: views.py:258 msgid "Operation: source creation" msgstr "Operation : nouvelle documentation associée" -#: views.py:265 +#: views.py:266 msgid "Operation: source modification" msgstr "Operation : modification d'une documentation associée" -#: views.py:271 +#: views.py:272 msgid "Operation: source deletion" msgstr "Operation : suppression d'une documentation associée" -#: views.py:280 +#: views.py:281 msgid "Operation: new administrative act" msgstr "Operation : nouvel acte administratif" -#: views.py:290 +#: views.py:291 msgid "Operation: administrative act modification" msgstr "Operation : modification d'un acte administratif" -#: views.py:299 +#: views.py:300 msgid "Operation: administrative act deletion" msgstr "Operation : suppression d'un acte administratif" @@ -676,46 +682,87 @@ msgstr "" "Attention : Aucun dossier archéologique n'a été précisé. S'il s'agit d'un " "oubli, définissez le à la première étape." -#: templates/ishtar/sheet_operation.html:14 -msgid "Previous version" -msgstr "Version précédente" - -#: templates/ishtar/sheet_operation.html:18 -msgid "Are you sure to rollback to this version?" -msgstr "Êtes vous sûr de vouloir revenir à cette version ?" - -#: templates/ishtar/sheet_operation.html:19 -msgid "Next version" -msgstr "Version suivante" - +#: templates/ishtar/sheet_administrativeact.html:10 #: templates/ishtar/sheet_operation.html:24 msgid "Export as:" msgstr "Exporter en :" +#: templates/ishtar/sheet_administrativeact.html:10 #: templates/ishtar/sheet_operation.html:24 msgid "OpenOffice.org file" msgstr "Fichier OpenOffice.org" +#: templates/ishtar/sheet_administrativeact.html:10 #: templates/ishtar/sheet_operation.html:24 msgid "PDF file" msgstr "Fichier PDF" -#: templates/ishtar/sheet_operation.html:26 -msgid "Modify" -msgstr "Modifier" - -#: templates/ishtar/sheet_operation.html:29 -msgid "Name:" -msgstr "Nom :" - +#: templates/ishtar/sheet_administrativeact.html:12 #: templates/ishtar/sheet_operation.html:30 msgid "Year:" msgstr "Année :" +#: templates/ishtar/sheet_administrativeact.html:13 #: templates/ishtar/sheet_operation.html:31 msgid "Numerical reference:" msgstr "Identifiant numérique :" +#: templates/ishtar/sheet_administrativeact.html:14 +#: templates/ishtar/sheet_operation.html:47 +msgid "Type:" +msgstr "Type :" + +#: templates/ishtar/sheet_administrativeact.html:15 +msgid "Signature date:" +msgstr "Date de signature :" + +#: templates/ishtar/sheet_administrativeact.html:16 +msgid "In charge:" +msgstr "Responsable :" + +#: templates/ishtar/sheet_administrativeact.html:17 +msgid "Archaeological preventive operator:" +msgstr "Opérateur d'archéologie préventive :" + +#: templates/ishtar/sheet_administrativeact.html:19 +#: templates/ishtar/sheet_operation.html:56 +msgid "Associated file:" +msgstr "Dossier archéologique associé :" + +#: templates/ishtar/sheet_administrativeact.html:20 +msgid "Associated operation:" +msgstr "Opération associée :" + +#: templates/ishtar/sheet_administrativeact.html:22 +#: templates/ishtar/sheet_operation.html:48 +msgid "Surface:" +msgstr "Surface :" + +#: templates/ishtar/sheet_administrativeact.html:23 +#: templates/ishtar/sheet_operation.html:37 +msgid "Created by:" +msgstr "Créé par :" + +#: templates/ishtar/sheet_operation.html:14 +msgid "Previous version" +msgstr "Version précédente" + +#: templates/ishtar/sheet_operation.html:18 +msgid "Are you sure to rollback to this version?" +msgstr "Êtes vous sûr de vouloir revenir à cette version ?" + +#: templates/ishtar/sheet_operation.html:19 +msgid "Next version" +msgstr "Version suivante" + +#: templates/ishtar/sheet_operation.html:26 +msgid "Modify" +msgstr "Modifier" + +#: templates/ishtar/sheet_operation.html:29 +msgid "Name:" +msgstr "Nom :" + #: templates/ishtar/sheet_operation.html:33 msgid "Patriarche OA code:" msgstr "Code d'opération Patriarche" @@ -728,231 +775,219 @@ msgstr "Code d'opération Patriarche non renseigné !" msgid "Edition date:" msgstr "Date d'édition :" -#: templates/ishtar/sheet_operation.html:38 +#: templates/ishtar/sheet_operation.html:39 msgid "Begining date:" msgstr "Date de début :" -#: templates/ishtar/sheet_operation.html:39 +#: templates/ishtar/sheet_operation.html:40 msgid "Excavation end date:" msgstr "Date de fin de chantier :" -#: templates/ishtar/sheet_operation.html:41 +#: templates/ishtar/sheet_operation.html:42 msgid "Head scientist:" msgstr "Responsable scientifique :" -#: templates/ishtar/sheet_operation.html:42 +#: templates/ishtar/sheet_operation.html:43 msgid "State:" msgstr "État :" -#: templates/ishtar/sheet_operation.html:42 +#: templates/ishtar/sheet_operation.html:43 msgid "Active file" msgstr "Dossier archéologique actif" -#: templates/ishtar/sheet_operation.html:43 +#: templates/ishtar/sheet_operation.html:44 msgid "Closed operation" msgstr "Opération fermée" -#: templates/ishtar/sheet_operation.html:44 +#: templates/ishtar/sheet_operation.html:45 msgid "Closing date:" msgstr "Date de clotûre :" -#: templates/ishtar/sheet_operation.html:44 +#: templates/ishtar/sheet_operation.html:45 msgid "by" msgstr "par" -#: templates/ishtar/sheet_operation.html:46 -msgid "Type:" -msgstr "Type :" - -#: templates/ishtar/sheet_operation.html:47 -msgid "Surface:" -msgstr "Surface :" - -#: templates/ishtar/sheet_operation.html:48 +#: templates/ishtar/sheet_operation.html:49 msgid "Cost:" msgstr "Coût :" -#: templates/ishtar/sheet_operation.html:49 +#: templates/ishtar/sheet_operation.html:50 msgid "Duration:" msgstr "Durée :" -#: templates/ishtar/sheet_operation.html:49 +#: templates/ishtar/sheet_operation.html:50 msgid "Day" msgstr "Jour" -#: templates/ishtar/sheet_operation.html:51 +#: templates/ishtar/sheet_operation.html:52 msgid "Remains:" msgstr "Vestiges :" -#: templates/ishtar/sheet_operation.html:52 +#: templates/ishtar/sheet_operation.html:53 msgid "Periods:" msgstr "Périodes :" -#: templates/ishtar/sheet_operation.html:55 -msgid "Associated file:" -msgstr "Dossier archéologique associé :" - -#: templates/ishtar/sheet_operation.html:58 +#: templates/ishtar/sheet_operation.html:59 msgid "Town planning service:" msgstr "Service instructeur :" -#: templates/ishtar/sheet_operation.html:59 +#: templates/ishtar/sheet_operation.html:60 msgid "Permit type:" msgstr "Type de permis :" -#: templates/ishtar/sheet_operation.html:60 +#: templates/ishtar/sheet_operation.html:61 msgid "Permit reference:" msgstr "Référence du permis :" -#: templates/ishtar/sheet_operation.html:61 +#: templates/ishtar/sheet_operation.html:62 msgid "General contractor organisation:" msgstr "Organisation de l'aménageur :" -#: templates/ishtar/sheet_operation.html:62 +#: templates/ishtar/sheet_operation.html:63 msgid "General contractor:" msgstr "Aménageur :" -#: templates/ishtar/sheet_operation.html:66 +#: templates/ishtar/sheet_operation.html:67 msgid "Comment:" msgstr "Commentaire :" -#: templates/ishtar/sheet_operation.html:68 +#: templates/ishtar/sheet_operation.html:69 msgid "Localisation" msgstr "Localisation" -#: templates/ishtar/sheet_operation.html:69 +#: templates/ishtar/sheet_operation.html:70 msgid "Towns:" msgstr "Communes :" -#: templates/ishtar/sheet_operation.html:71 +#: templates/ishtar/sheet_operation.html:72 msgid "Main address:" msgstr "Adresse des terrains :" -#: templates/ishtar/sheet_operation.html:72 +#: templates/ishtar/sheet_operation.html:73 msgid "Complement:" msgstr "Complément :" -#: templates/ishtar/sheet_operation.html:73 +#: templates/ishtar/sheet_operation.html:74 msgid "Postal code:" msgstr "Code postal :" -#: templates/ishtar/sheet_operation.html:81 +#: templates/ishtar/sheet_operation.html:82 msgid "Associated parcels" msgstr "Parcelles associées" -#: templates/ishtar/sheet_operation.html:83 +#: templates/ishtar/sheet_operation.html:84 msgid "Commune" msgstr "Commune" -#: templates/ishtar/sheet_operation.html:98 +#: templates/ishtar/sheet_operation.html:99 msgid "No parcel associated to this operation" msgstr "Pas de parcelle associée à cette opération" -#: templates/ishtar/sheet_operation.html:106 -msgid "Ref." -msgstr "Réf." - -#: templates/ishtar/sheet_operation.html:107 -#: templates/ishtar/sheet_operation.html:129 -#: templates/ishtar/dashboards/dashboard_operation.html:82 -msgid "Type" -msgstr "Type" - -#: templates/ishtar/sheet_operation.html:108 -msgid "Date" -msgstr "Date" - -#: templates/ishtar/sheet_operation.html:118 -msgid "No acts associated to this operation" -msgstr "Pas d'acte associé à cette opération" +#: templates/ishtar/sheet_operation.html:103 +msgid "Administrativ acts" +msgstr "Actes administratifs" -#: templates/ishtar/sheet_operation.html:122 +#: templates/ishtar/sheet_operation.html:106 msgid "Document from this operation" msgstr "Documents de cette opération" -#: templates/ishtar/sheet_operation.html:126 +#: templates/ishtar/sheet_operation.html:110 msgid "Context records" msgstr "Unité d'Enregistrement" -#: templates/ishtar/sheet_operation.html:128 +#: templates/ishtar/sheet_operation.html:112 msgid "ID" msgstr "Identifiant" -#: templates/ishtar/sheet_operation.html:130 +#: templates/ishtar/sheet_operation.html:113 +#: templates/ishtar/blocks/window_tables/administrativacts.html:6 +#: templates/ishtar/dashboards/dashboard_operation.html:82 +msgid "Type" +msgstr "Type" + +#: templates/ishtar/sheet_operation.html:114 msgid "Chronology" msgstr "Chronologie" -#: templates/ishtar/sheet_operation.html:131 -#: templates/ishtar/sheet_operation.html:161 +#: templates/ishtar/sheet_operation.html:115 +#: templates/ishtar/sheet_operation.html:145 msgid "Description" msgstr "Description" -#: templates/ishtar/sheet_operation.html:142 -#: templates/ishtar/sheet_operation.html:185 +#: templates/ishtar/sheet_operation.html:126 +#: templates/ishtar/sheet_operation.html:169 msgid "Details" msgstr "Détails" -#: templates/ishtar/sheet_operation.html:145 +#: templates/ishtar/sheet_operation.html:129 msgid "No context record associated to this operation" msgstr "Pas d'Unité d'Enregistrement associée à cette opération" -#: templates/ishtar/sheet_operation.html:149 +#: templates/ishtar/sheet_operation.html:133 msgid "Documents from associated context records" msgstr "Documents d'Unité d'Enregistrement associés" -#: templates/ishtar/sheet_operation.html:154 +#: templates/ishtar/sheet_operation.html:138 msgid "Finds" msgstr "Mobilier" -#: templates/ishtar/sheet_operation.html:156 +#: templates/ishtar/sheet_operation.html:140 msgid "Complete Id" msgstr "Id complet" -#: templates/ishtar/sheet_operation.html:157 +#: templates/ishtar/sheet_operation.html:141 msgid "Short Id" msgstr "Id court" -#: templates/ishtar/sheet_operation.html:158 +#: templates/ishtar/sheet_operation.html:142 msgid "Material type" msgstr "Type de matériau" -#: templates/ishtar/sheet_operation.html:159 +#: templates/ishtar/sheet_operation.html:143 msgctxt "short" msgid "Context record" msgstr "UE" -#: templates/ishtar/sheet_operation.html:162 +#: templates/ishtar/sheet_operation.html:146 msgid "Weight" msgstr "Poids" -#: templates/ishtar/sheet_operation.html:163 +#: templates/ishtar/sheet_operation.html:147 msgid "Numbers" msgstr "Nombre" -#: templates/ishtar/sheet_operation.html:165 +#: templates/ishtar/sheet_operation.html:149 msgid "Container ref." msgstr "Réf. du contenant" -#: templates/ishtar/sheet_operation.html:166 +#: templates/ishtar/sheet_operation.html:150 msgid "Warehouse" msgstr "Dépôt" -#: templates/ishtar/sheet_operation.html:189 +#: templates/ishtar/sheet_operation.html:173 msgid "No find associated to context record" msgstr "Pas de mobilier associé à cette Unité d'Enregistrement" -#: templates/ishtar/sheet_operation.html:192 +#: templates/ishtar/sheet_operation.html:176 msgid "No find associated to parcel" msgstr "Pas de mobilier associé à cette parcelle" -#: templates/ishtar/sheet_operation.html:192 +#: templates/ishtar/sheet_operation.html:176 msgid "(no context record)" msgstr "(pas d'Unité d'Enregistrement)" -#: templates/ishtar/sheet_operation.html:197 +#: templates/ishtar/sheet_operation.html:181 msgid "Documents from associated finds" msgstr "Documents concernant le mobilier associé" +#: templates/ishtar/blocks/window_tables/administrativacts.html:7 +msgid "Date" +msgstr "Date" + +#: templates/ishtar/blocks/window_tables/administrativacts.html:16 +msgid "No administrative act associated" +msgstr "Aucun acte administratif associé" + #: templates/ishtar/dashboards/dashboard_operation.html:11 msgid "Global informations" msgstr "Informations générales" @@ -1184,6 +1219,9 @@ msgstr "Coût FNAP" msgid "Main towns by cost" msgstr "Principales communes par coût" +#~ msgid "No acts associated to this operation" +#~ msgstr "Pas d'acte associé à cette opération" + #~ msgid "Scientific documentation" #~ msgstr "Documentation scientifique" diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py index bbffe023f..82567842f 100644 --- a/archaeological_operations/models.py +++ b/archaeological_operations/models.py @@ -391,10 +391,11 @@ class ActType(GeneralType): ordering = ('label',) class AdministrativeAct(BaseHistorizedItem, OwnPerms, ValueGetter): - TABLE_COLS = ['year', 'index', 'act_type', 'signature_date', + TABLE_COLS = ['full_ref', 'act_type', 'signature_date', 'associated_file', 'operation'] - TABLE_COLS_FILE = ['act_type', 'associated_file', 'associated_file.towns',] - TABLE_COLS_OPE = ['act_type', 'operation', 'operation.towns'] + TABLE_COLS_FILE = ['full_ref', 'act_type', 'associated_file', + 'associated_file.towns',] + TABLE_COLS_OPE = ['full_ref', 'act_type', 'operation', 'operation.towns'] act_type = models.ForeignKey(ActType, verbose_name=_(u"Act type")) in_charge = models.ForeignKey(Person, blank=True, null=True, related_name='+', verbose_name=_(u"Person in charge of the operation")) @@ -442,6 +443,18 @@ class AdministrativeAct(BaseHistorizedItem, OwnPerms, ValueGetter): for item in [self.operation, self.associated_file, self.act_object] if item]) + full_ref_lbl = _(u"Ref.") + @property + def full_ref(self): + lbl = [] + if self.year: + lbl.append(unicode(self.year)) + if self.index: + lbl.append(u"n°%d" %self.index) + if settings.COUNTRY == 'fr' and self.ref_sra: + lbl.append(u"[%s]" % self.ref_sra) + return u" ".join(lbl) + @property def year(self): if not self.signature_date: @@ -485,7 +498,7 @@ class AdministrativeAct(BaseHistorizedItem, OwnPerms, ValueGetter): def save(self, *args, **kwargs): if not self.act_type.indexed or not self.signature_date: - super(AdministrativeAct, self).save(*args, **kwargs) + return super(AdministrativeAct, self).save(*args, **kwargs) year = self.signature_date.year if not self.index: c_index = 1 diff --git a/archaeological_operations/templates/ishtar/blocks/window_tables/administrativacts.html b/archaeological_operations/templates/ishtar/blocks/window_tables/administrativacts.html new file mode 100644 index 000000000..9feb51e72 --- /dev/null +++ b/archaeological_operations/templates/ishtar/blocks/window_tables/administrativacts.html @@ -0,0 +1,18 @@ +{% load i18n %} +<table> + <caption>{{caption}}</caption> + <tr> + <th>{% trans "Ref." %}</th> + <th>{% trans "Type" %}</th> + <th>{% trans "Date" %}</th> + </tr> + {% for act in data %} + <tr> + <td>{{act.full_ref}}</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" %}</td></tr> + {% endfor %} +</table> diff --git a/archaeological_operations/templates/ishtar/sheet_administrativeact.html b/archaeological_operations/templates/ishtar/sheet_administrativeact.html index da80f6747..2cceb0222 100644 --- a/archaeological_operations/templates/ishtar/sheet_administrativeact.html +++ b/archaeological_operations/templates/ishtar/sheet_administrativeact.html @@ -11,6 +11,7 @@ <h3>{% trans "General"%}</h3> <p><label>{%trans "Year:"%}</label> <span class='value strong'>{{ item.year }}</span></p> {% if item.index %}<p><label>{%trans "Numerical reference:"%}</label> <span class='value strong'>{{ item.index }}</span></p>{% endif %} +{% if item.ref_sra %}<p><label>{%trans "Internal reference:"%}</label> <span class='value strong'>{{ item.ref_sra }}</span></p>{% endif %} <p><label>{%trans "Type:"%}</label> <span class='value'>{{ item.act_type }}</span></p> <p><label>{%trans "Signature date:"%}</label> <span class='value'>{{ item.signature_date }}</span></p> <p><label>{%trans "In charge:"%}</label> <span class='value'>{{ item.in_charge.full_label }}</span></p> diff --git a/archaeological_operations/templates/ishtar/sheet_operation.html b/archaeological_operations/templates/ishtar/sheet_operation.html index 9d9b845e3..b403d29df 100644 --- a/archaeological_operations/templates/ishtar/sheet_operation.html +++ b/archaeological_operations/templates/ishtar/sheet_operation.html @@ -1,5 +1,5 @@ {% extends "ishtar/sheet.html" %} -{% load i18n window_tables %} +{% load i18n window_tables window_ope_tables %} {% block head_sheet %} {{block.super}} @@ -100,25 +100,8 @@ {% endfor %} </table> -<table> - <caption>{%trans "Administrative 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>{% if act.ref_sra %}{{act.ref_sra}}{% endif %}</td> - <td class='string'>{{act.act_type}}</td> - <td class="string">{{act.signature_date}}</td> - </tr> - {% empty %} - <tr><td colspan="4" class='no_items'>{% trans "No acts associated to this operation" %}</td></tr> - {% endfor %} -</table> +{% trans "Administrativ acts" as administrativeacts_label %} +{% table_administrativact administrativeacts_label item.administrative_act.all %} {% trans "Document from this operation" as operation_docs %} {% if item.source.count %} {% table_document operation_docs item.source.all %}{% endif %} @@ -140,7 +123,7 @@ <td class='string'>{{ context_record.datings.all|join:", " }}</td>{# periods ?#} <td class='string'>{{ context_record.description }}</td> <td class='string'>{{ context_record.parcel.section }} - {{context_record.parcel.parcel_number}}</td> - <td class='link'><a href="#" onclick='load_window("{%url show-contextrecord context_record.pk ''%}")'>{% trans "Details" %}</a></td> + <td class='link'><a href="#" class='display_details' onclick='load_window("{%url show-contextrecord context_record.pk ''%}")'>{% trans "Details" %}</a></td> </tr> {% empty %} <tr><td colspan="6" class='no_items'>{% trans "No context record associated to this operation" %}</td></tr> @@ -183,8 +166,8 @@ <td class="ref">{{ context_record.parcel.short_label }}</td> <td class='ref'>{{ find.get_last_find.container.reference|default:""}}</td> <td class='string'>{{ find.get_last_find.container.location|default:""}}</td> - <td class='link'><a href="#">{% trans "Details" %}</a></td> - {#<a href="#" onclick='load_window("{% url show-find find.pk%}");'>{%trans "Details"%}</a></td>#} + <td class='link'><a class='display_details' href="#">{% trans "Details" %}</a></td> + {#<a href="#" class='display_details' onclick='load_window("{% url show-find find.pk%}");'>{%trans "Details"%}</a></td>#} </tr> {% empty %} <tr><td colspan="9" class='no_items'>{% trans "No find associated to context record" %} {{context_record.short_label}}</td></tr> diff --git a/archaeological_operations/templatetags/__init__.py b/archaeological_operations/templatetags/__init__.py new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/archaeological_operations/templatetags/__init__.py diff --git a/archaeological_operations/templatetags/window_ope_tables.py b/archaeological_operations/templatetags/window_ope_tables.py new file mode 100644 index 000000000..5576fe32d --- /dev/null +++ b/archaeological_operations/templatetags/window_ope_tables.py @@ -0,0 +1,10 @@ +from django import template +from django.utils.translation import ugettext as _ +import re + +register = template.Library() + +@register.inclusion_tag('ishtar/blocks/window_tables/administrativacts.html') +def table_administrativact(caption, data): + return {'caption':caption, 'data':data} + diff --git a/archaeological_operations/urls.py b/archaeological_operations/urls.py index 26dc5b3d0..17f232455 100644 --- a/archaeological_operations/urls.py +++ b/archaeological_operations/urls.py @@ -83,6 +83,12 @@ urlpatterns += patterns('archaeological_operations.views', kwargs={'full':True}), url(r'show-administrativeact(?:/(?P<pk>.+))?/(?P<type>.+)?$', 'show_administrativeact', name='show-administrativeact'), + # allow specialization for operations + url(r'show-administrativeact(?:/(?P<pk>.+))?/(?P<type>.+)?$', + 'show_administrativeact', name='show-administrativeactop'), + # allow specialization for files + url(r'show-administrativeact(?:/(?P<pk>.+))?/(?P<type>.+)?$', + 'show_administrativeact', name='show-administrativeactfile'), url(r'generatedoc-administrativeactop/(?P<pk>.+)?/(?P<template_pk>.+)?$', 'generatedoc_administrativeactop', name='generatedoc-administrativeactop'), diff --git a/archaeological_operations/views.py b/archaeological_operations/views.py index 7e5a64ab4..a957fe8c1 100644 --- a/archaeological_operations/views.py +++ b/archaeological_operations/views.py @@ -148,12 +148,14 @@ get_administrativeactop = get_item(models.AdministrativeAct, 'get_administrativeactop', 'administrativeactop', extra_request_keys={'associated_file__towns':'associated_file__towns__pk', 'operation__towns':'operation__towns__pk', - 'act_type__intented_to':'act_type__intented_to'}, + 'act_type__intented_to':'act_type__intented_to', + 'year':'signature_date__year', + }, relative_session_names={'operation':'operation__pk'}) get_administrativeact = get_item(models.AdministrativeAct, 'get_administrativeact', 'administrativeact', - extra_request_keys={}) + extra_request_keys={'year':'signature_date__year',}) show_administrativeact = show_item(models.AdministrativeAct, 'administrativeact') def dashboard_operation(request, *args, **kwargs): diff --git a/archaeological_operations/wizards.py b/archaeological_operations/wizards.py index d816cf9aa..6d25812eb 100644 --- a/archaeological_operations/wizards.py +++ b/archaeological_operations/wizards.py @@ -323,7 +323,7 @@ class OperationAdministrativeActWizard(OperationWizard): r = r[k] else: break - if level == len(keys): # the whole tree as been traversed + if level == len(keys): # the whole list as been traversed # redirect to the generated doc dct['redirect'] = reverse('generatedoc-administrativeactop', args=[admact.pk, r[0]]) diff --git a/ishtar_common/locale/fr/LC_MESSAGES/django.po b/ishtar_common/locale/fr/LC_MESSAGES/django.po index dd62db01a..214393593 100644 --- a/ishtar_common/locale/fr/LC_MESSAGES/django.po +++ b/ishtar_common/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-17 14:40+0100\n" "PO-Revision-Date: 2010-12-09\n" "Last-Translator: Étienne Loks <etienne.loks at peacefrogs net>\n" "Language-Team: \n" @@ -68,12 +68,12 @@ msgstr "Vous devez sélectionner un élément." msgid "Add a new item" msgstr "Ajouter un nouvel élément" -#: forms.py:155 models.py:637 +#: forms.py:155 models.py:648 msgid "Template" msgstr "Patron" #: forms_common.py:42 forms_common.py:82 forms_common.py:86 -#: forms_common.py:161 models.py:686 models.py:930 +#: forms_common.py:161 models.py:697 models.py:945 #: templates/ishtar/sheet_organization.html:16 #: templates/ishtar/sheet_person.html:19 templates/ishtar/sheet_person.html:29 msgid "Town" @@ -97,57 +97,57 @@ msgstr "" "<p class='example'>Par exemple tapez « saint denis 93 » pour obtenir la " "commune Saint-Denis dans le département français de Seine-Saint-Denis.</p>" -#: forms_common.py:56 forms_common.py:327 ishtar_menu.py:30 models.py:758 -#: models.py:821 models.py:855 templates/ishtar/sheet_person.html:6 +#: forms_common.py:56 forms_common.py:327 ishtar_menu.py:30 models.py:769 +#: models.py:836 models.py:870 templates/ishtar/sheet_person.html:6 msgid "Person" msgstr "Individu" -#: forms_common.py:70 forms_common.py:128 ishtar_menu.py:39 models.py:710 +#: forms_common.py:70 forms_common.py:128 ishtar_menu.py:39 models.py:721 #: templates/ishtar/sheet_organization.html:6 msgid "Organization" msgstr "Organisation" #: forms_common.py:72 forms_common.py:106 forms_common.py:124 -#: forms_common.py:153 models.py:636 models.py:705 models.py:751 models.py:916 +#: forms_common.py:153 models.py:647 models.py:716 models.py:762 models.py:931 #: templates/ishtar/sheet_organization.html:12 #: templates/ishtar/sheet_organization.html:24 #: templates/ishtar/sheet_person.html:12 templates/ishtar/sheet_person.html:25 msgid "Name" msgstr "Nom" -#: forms_common.py:74 models.py:699 +#: forms_common.py:74 models.py:710 msgid "Organization type" msgstr "Type d'organisation" -#: forms_common.py:76 forms_common.py:155 models.py:681 +#: forms_common.py:76 forms_common.py:155 models.py:692 #: templates/ishtar/sheet_organization.html:13 #: templates/ishtar/sheet_person.html:16 templates/ishtar/sheet_person.html:26 msgid "Address" msgstr "Adresse" -#: forms_common.py:78 forms_common.py:157 models.py:682 +#: forms_common.py:78 forms_common.py:157 models.py:693 #: templates/ishtar/sheet_organization.html:14 #: templates/ishtar/sheet_person.html:17 templates/ishtar/sheet_person.html:27 msgid "Address complement" msgstr "Complément d'adresse" -#: forms_common.py:80 forms_common.py:159 models.py:684 +#: forms_common.py:80 forms_common.py:159 models.py:695 #: templates/ishtar/sheet_organization.html:15 #: templates/ishtar/sheet_person.html:18 templates/ishtar/sheet_person.html:28 msgid "Postal code" msgstr "Code postal" -#: forms_common.py:83 forms_common.py:162 models.py:687 +#: forms_common.py:83 forms_common.py:162 models.py:698 msgid "Country" msgstr "Pays" -#: forms_common.py:85 models.py:689 +#: forms_common.py:85 models.py:700 #: templates/ishtar/sheet_organization.html:17 #: templates/ishtar/sheet_person.html:20 templates/ishtar/sheet_person.html:30 msgid "Phone" msgstr "Téléphone" -#: forms_common.py:107 forms_common.py:127 models.py:707 models.py:879 +#: forms_common.py:107 forms_common.py:127 models.py:718 models.py:894 #: templates/sheet_ope.html:85 templates/sheet_ope.html.py:105 #: templates/sheet_ope.html:126 templates/ishtar/sheet_organization.html:26 #: templates/ishtar/sheet_person.html:41 templates/ishtar/sheet_person.html:94 @@ -159,13 +159,13 @@ msgstr "Type" msgid "Organization search" msgstr "Recherche d'organisations" -#: forms_common.py:125 forms_common.py:151 models.py:749 +#: forms_common.py:125 forms_common.py:151 models.py:760 #: templates/ishtar/sheet_organization.html:25 #: templates/ishtar/sheet_person.html:13 msgid "Surname" msgstr "Prénom" -#: forms_common.py:126 forms_common.py:164 forms_common.py:213 models.py:752 +#: forms_common.py:126 forms_common.py:164 forms_common.py:213 models.py:763 #: templates/ishtar/sheet_person.html:14 msgid "Email" msgstr "Courriel" @@ -178,7 +178,7 @@ msgstr "Recherche d'individus" msgid "Identity" msgstr "Identité" -#: forms_common.py:150 forms_common.py:284 models.py:748 models.py:878 +#: forms_common.py:150 forms_common.py:284 models.py:759 models.py:893 #: templates/sheet_ope.html:104 templates/ishtar/sheet_person.html:93 #: templates/ishtar/blocks/window_tables/documents.html:5 msgid "Title" @@ -188,7 +188,7 @@ msgstr "Titre" msgid "Current organization" msgstr "Organisation actuelle" -#: forms_common.py:173 forms_common.py:195 forms_common.py:198 models.py:735 +#: forms_common.py:173 forms_common.py:195 forms_common.py:198 models.py:746 msgid "Person type" msgstr "Type d'individu" @@ -220,7 +220,7 @@ msgstr "Ce nom d'utilisateur existe déjà." msgid "Send the new password by email?" msgstr "Envoyer le nouveau mot de passe par courriel ?" -#: forms_common.py:264 forms_common.py:276 models.py:931 +#: forms_common.py:264 forms_common.py:276 models.py:946 #: templates/ishtar/sheet_person.html:71 msgid "Towns" msgstr "Communes" @@ -233,23 +233,23 @@ msgstr "Il y a des communes identiques." msgid "Documentation informations" msgstr "Information sur le document" -#: forms_common.py:286 forms_common.py:305 models.py:874 +#: forms_common.py:286 forms_common.py:305 models.py:889 msgid "Source type" msgstr "Type de source" -#: forms_common.py:288 models.py:883 +#: forms_common.py:288 models.py:898 msgid "Numerical ressource (web address)" msgstr "Ressource numérique (adresse web)" -#: forms_common.py:289 models.py:885 +#: forms_common.py:289 models.py:900 msgid "Receipt date" msgstr "Date de réception" -#: forms_common.py:291 models.py:887 +#: forms_common.py:291 models.py:902 msgid "Creation date" msgstr "Date de création" -#: forms_common.py:302 forms_common.py:321 forms_common.py:351 models.py:860 +#: forms_common.py:302 forms_common.py:321 forms_common.py:351 models.py:875 msgid "Author" msgstr "Auteur" @@ -257,7 +257,7 @@ msgstr "Auteur" msgid "Would you like to delete this documentation?" msgstr "Voulez vous supprimer ce document ?" -#: forms_common.py:328 models.py:851 models.py:857 +#: forms_common.py:328 models.py:866 models.py:872 msgid "Author type" msgstr "Type d'auteur" @@ -269,7 +269,7 @@ msgstr "Sélection d'auteur" msgid "There are identical authors." msgstr "Il y a des auteurs identiques." -#: forms_common.py:361 models.py:861 models.py:880 +#: forms_common.py:361 models.py:876 models.py:895 #: templates/sheet_ope.html:106 #: templates/ishtar/blocks/window_tables/documents.html:7 msgid "Authors" @@ -303,7 +303,7 @@ msgstr "Un élément sélectionné n'est pas valide." msgid "This item already exist." msgstr "Cet élément existe déjà." -#: models.py:198 models.py:525 models.py:669 +#: models.py:198 models.py:536 models.py:680 msgid "Label" msgstr "Libellé" @@ -315,7 +315,7 @@ msgstr "Identifiant textuel" msgid "Comment" msgstr "Commentaire" -#: models.py:202 models.py:640 +#: models.py:202 models.py:651 msgid "Available" msgstr "Disponible" @@ -323,176 +323,176 @@ msgstr "Disponible" msgid "Last editor" msgstr "Dernier éditeur" -#: models.py:513 models.py:524 +#: models.py:524 models.py:535 msgid "URL name" msgstr "Nom de l'URL" -#: models.py:515 models.py:523 +#: models.py:526 models.py:534 msgid "Wizard" msgstr "Assistant" -#: models.py:522 +#: models.py:533 msgid "Order" msgstr "Ordre" -#: models.py:527 +#: models.py:538 msgid "Wizard step" msgstr "Étape de l'assistant" -#: models.py:570 templates/sheet_ope.html:61 templates/sheet_ope.html.py:83 +#: models.py:581 templates/sheet_ope.html:61 templates/sheet_ope.html.py:83 #: templates/ishtar/sheet_person.html:38 templates/ishtar/sheet_person.html:67 #: templates/ishtar/sheet_person.html:92 msgid "Year" msgstr "Année" -#: models.py:573 models.py:670 +#: models.py:584 models.py:681 #: templates/ishtar/dashboards/dashboard_main.html:74 msgid "Number" msgstr "Nombre" -#: models.py:635 +#: models.py:646 msgid "Administrative Act" msgstr "Acte administratif" -#: models.py:638 +#: models.py:649 msgid "Associated object" msgstr "Objet associé" -#: models.py:643 +#: models.py:654 msgid "Document template" msgstr "Patron de document" -#: models.py:644 +#: models.py:655 msgid "Document templates" msgstr "Patrons de documents" -#: models.py:673 +#: models.py:684 msgid "Department" msgstr "Département" -#: models.py:674 +#: models.py:685 msgid "Departments" msgstr "Départements" -#: models.py:690 templates/ishtar/sheet_organization.html:18 +#: models.py:701 templates/ishtar/sheet_organization.html:18 #: templates/ishtar/sheet_person.html:21 templates/ishtar/sheet_person.html:31 msgid "Mobile phone" msgstr "Téléphone portable" -#: models.py:700 +#: models.py:711 msgid "Organization types" msgstr "Types d'organisation" -#: models.py:711 +#: models.py:722 msgid "Organizations" msgstr "Organisations" -#: models.py:713 +#: models.py:724 msgid "Can view all Organization" msgstr "Peut voir toutes les Organisations" -#: models.py:714 +#: models.py:725 msgid "Can view own Organization" msgstr "Peut voir sa propre Organisation" -#: models.py:715 +#: models.py:726 msgid "Can add own Organization" msgstr "Peut ajouter sa propre Organisation" -#: models.py:716 +#: models.py:727 msgid "Can change own Organization" msgstr "Peut changer sa propre Organisation" -#: models.py:717 +#: models.py:728 msgid "Can delete own Organization" msgstr "Peut supprimer sa propre Organisation" -#: models.py:732 +#: models.py:743 msgid "Groups" msgstr "Groupes" -#: models.py:736 +#: models.py:747 msgid "Person types" msgstr "Types d'individu" -#: models.py:741 +#: models.py:752 msgid "Mr" msgstr "M." -#: models.py:742 +#: models.py:753 msgid "Miss" msgstr "Mlle" -#: models.py:743 +#: models.py:754 msgid "Mrs" msgstr "Mme" -#: models.py:744 +#: models.py:755 msgid "Doctor" msgstr "Dr." -#: models.py:753 models.py:785 +#: models.py:764 models.py:798 msgid "Types" msgstr "Types" -#: models.py:755 +#: models.py:766 msgid "Is attached to" msgstr "Est rattaché à" -#: models.py:759 +#: models.py:770 msgid "Persons" msgstr "Individus" -#: models.py:761 +#: models.py:772 msgid "Can view all Person" msgstr "Peut voir toutes les Personnes" -#: models.py:762 +#: models.py:773 msgid "Can view own Person" msgstr "Peut voir sa propre Personne" -#: models.py:763 +#: models.py:774 msgid "Can add own Person" msgstr "Peut ajouter sa propre Personne" -#: models.py:764 +#: models.py:775 msgid "Can change own Person" msgstr "Peut changer sa propre Personne" -#: models.py:765 +#: models.py:776 msgid "Can delete own Person" msgstr "Peut supprimer sa propre Personne" -#: models.py:825 +#: models.py:840 msgid "Ishtar user" msgstr "Utilisateur d'Ishtar" -#: models.py:826 +#: models.py:841 msgid "Ishtar users" msgstr "Utilisateurs d'Ishtar" -#: models.py:852 +#: models.py:867 msgid "Author types" msgstr "Types d'auteur" -#: models.py:875 +#: models.py:890 msgid "Source types" msgstr "Types de source" -#: models.py:888 templates/ishtar/sheet_person.html:39 +#: models.py:903 templates/ishtar/sheet_person.html:39 #: templates/ishtar/sheet_person.html:66 msgid "Ref." msgstr "Réf." -#: models.py:890 +#: models.py:905 msgid "Internal reference" msgstr "Référence interne" -#: models.py:917 +#: models.py:932 msgid "Surface (m²)" msgstr "Area (m²)" -#: models.py:918 templates/sheet_ope.html:46 templates/sheet_ope.html.py:107 +#: models.py:933 templates/sheet_ope.html:46 templates/sheet_ope.html.py:107 msgid "Localisation" msgstr "Localisation" @@ -524,33 +524,34 @@ msgstr "Oui" msgid "False" msgstr "Non" -#: views.py:380 templates/ishtar/sheet_organization.html:34 +#: views.py:380 templates/base.html:75 +#: templates/ishtar/sheet_organization.html:34 #: templates/ishtar/sheet_person.html:56 templates/ishtar/sheet_person.html:82 msgid "Details" msgstr "Détails" -#: views.py:588 views.py:636 +#: views.py:590 views.py:638 msgid "Operation not permitted." msgstr "Opération non permise" -#: views.py:591 +#: views.py:593 #, python-format msgid "New %s" msgstr "Nouveau %s" -#: views.py:654 +#: views.py:656 msgid "Archaeological files" msgstr "Dossiers archéologiques" -#: views.py:657 +#: views.py:659 msgid "Operations" msgstr "Opérations" -#: views.py:660 +#: views.py:662 msgid "Context records" msgstr "Unité d'Enregistrement" -#: views.py:663 +#: views.py:665 msgid "Finds" msgstr "Mobilier" @@ -617,37 +618,37 @@ msgstr "Merci pour l'intérêt que vous portez au projet." msgid "The %(app_name)s team" msgstr "L'équipe %(app_name)s" -#: templates/base.html:28 +#: templates/base.html:29 msgid "Logged in" msgstr "Connecté" -#: templates/base.html:29 +#: templates/base.html:30 msgid "Log out" msgstr "Déconnexion" -#: templates/base.html:30 +#: templates/base.html:31 msgid "Change password" msgstr "Changement de mot de passe" -#: templates/base.html:32 templates/registration/activate.html:10 +#: templates/base.html:33 templates/registration/activate.html:10 #: templates/registration/login.html:8 templates/registration/login.html:10 #: templates/registration/password_reset_complete.html:8 msgid "Log in" msgstr "Connexion" -#: templates/base.html:38 +#: templates/base.html:39 msgid "Lang" msgstr "Langue" -#: templates/base.html:38 templates/base.html.py:83 +#: templates/base.html:39 templates/base.html.py:86 msgid ":" msgstr " :" -#: templates/base.html:63 +#: templates/base.html:64 msgid "Default selected items" msgstr "Éléments sélectionnés par défaut" -#: templates/base.html:81 +#: templates/base.html:84 msgid "Current items" msgstr "Éléments courants" @@ -914,6 +915,10 @@ msgstr "simple" msgid "full" msgstr "complet" +#: templates/blocks/JQueryJqGrid.html:81 +msgid "An error as occured during search. Check your query fields." +msgstr "Une erreur est intervenue sur cette recherche. Vérifiez la pertinence de vos critères de recherche." + #: templates/blocks/form_snippet.html:9 msgid "Help" msgstr "Aide" diff --git a/ishtar_common/static/js/ishtar.js b/ishtar_common/static/js/ishtar.js index b4a079ef8..0a15bfc23 100644 --- a/ishtar_common/static/js/ishtar.js +++ b/ishtar_common/static/js/ishtar.js @@ -105,6 +105,15 @@ function load_window(url, speed, on_success){ }); } +function load_current_window(url, model_name){ + var id = $("#current_" + model_name).val(); + if (!id) return; + url = url.split('/'); + url[url.length - 1] = id; + url.push(''); + return load_window(url.join('/')); +} + function load_url(url){ $("#progress").show(); $.ajax({ diff --git a/ishtar_common/static/media/images/info.png b/ishtar_common/static/media/images/info.png Binary files differnew file mode 100644 index 000000000..6d9beb9ed --- /dev/null +++ b/ishtar_common/static/media/images/info.png diff --git a/ishtar_common/static/media/style.css b/ishtar_common/static/media/style.css index e9f1a8bab..bbd14dd99 100644 --- a/ishtar_common/static/media/style.css +++ b/ishtar_common/static/media/style.css @@ -161,6 +161,16 @@ div#logo{ background-repeat:no-repeat; } +.display_details{ + display:inline-block; + font-size:0; + color:transparent; + width:18px; + height:16px; + background-image:url(images/info.png); + background-repeat:no-repeat; +} + div#language_form_div{ position:absolute; right:0; diff --git a/ishtar_common/templates/base.html b/ishtar_common/templates/base.html index e235df60a..baab57409 100644 --- a/ishtar_common/templates/base.html +++ b/ishtar_common/templates/base.html @@ -1,4 +1,5 @@ {% load i18n %} +{% load url from future%} <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> @@ -26,10 +27,10 @@ {% block header %} {% if user.is_authenticated %} {% trans "Logged in" %}: {{ user.username }} - (<a href="{% url auth_logout %}">{% trans "Log out" %}</a> | - <a href="{% url auth_password_change %}">{% trans "Change password" %}</a>) + (<a href="{% url 'auth_logout' %}">{% trans "Log out" %}</a> | + <a href="{% url 'auth_password_change' %}">{% trans "Change password" %}</a>) {% else %} - <strong><a href="{% url auth_login %}">{% trans "Log in" %}</a></strong> + <strong><a href="{% url 'auth_login' %}">{% trans "Log in" %}</a></strong> {% endif %} {% if LANGUAGES|length > 1 %} <div id="language_form_div"> @@ -58,7 +59,7 @@ </div> <div id="context_menu"> {% block context %}{% if current_menu %} - <form method="post" action="{% url update-current-item %}"> + <form method="post" action="{% url 'update-current-item' %}"> <fieldset> <legend>{% trans "Default selected items"%}</legend> <table id='current_items'> @@ -70,7 +71,9 @@ <option value=''>--</option> {% for val, label, selected in items %}<option value='{{val}}'{%if selected%} selected="selected"{%endif%}>{{label}}</option> {% endfor %}</select> - </td> + </td>{% with 'show-'|add:model_name as model_url%} + <td><a href='#' onclick='load_current_window("{% url model_url 0 %}", "{{model_name}}");' class='display_details'>{% trans "Details" %}</a></td> + {% endwith %} </tr> {% endfor %} </table> @@ -92,10 +95,10 @@ {% if menu_item.childs %}<li id='section-{{forloop.parentloop.counter}}-{{forloop.counter}}'>{{menu_item.label}} <ul> {% for menu_subitem in menu_item.childs %}{%if menu_subitem.available%} - <li id='section-{{forloop.parentloop.parentloop.counter}}-{{forloop.parentloop.counter}}-{{forloop.counter}}'{%ifequal menu_subitem.idx CURRENT_ACTION%} class='selected'{%endifequal%}><a href='{% url action menu_subitem.idx%}'>{{menu_subitem.label}}</a></li> + <li id='section-{{forloop.parentloop.parentloop.counter}}-{{forloop.parentloop.counter}}-{{forloop.counter}}'{%ifequal menu_subitem.idx CURRENT_ACTION%} class='selected'{%endifequal%}><a href='{% url 'action' menu_subitem.idx%}'>{{menu_subitem.label}}</a></li> {%endif%}{% endfor %}</ul></li> {%else%} - <li{%ifequal menu_item.idx CURRENT_ACTION%} class='selected'{%endifequal%}><a href='{% url action menu_item.idx%}'>{{menu_item.label}}</a></li> + <li{%ifequal menu_item.idx CURRENT_ACTION%} class='selected'{%endifequal%}><a href='{% url 'action' menu_item.idx%}'>{{menu_item.label}}</a></li> {%endif%}{% endif %}{% endfor %} </ul> </li>{%endif%} diff --git a/ishtar_common/templates/blocks/JQueryJqGrid.html b/ishtar_common/templates/blocks/JQueryJqGrid.html index 919a01bc1..6f8c94cbb 100644 --- a/ishtar_common/templates/blocks/JQueryJqGrid.html +++ b/ishtar_common/templates/blocks/JQueryJqGrid.html @@ -65,7 +65,7 @@ jQuery(document).ready(function(){ colNames:['id', '', {{col_names|safe}}], colModel:[ {name:'id', index:'id', hidden:true}, - {name:'link', index:'link', width:80}, + {name:'link', index:'link', width:30}, {{extra_cols|safe}} ], sortname: 'value', @@ -77,6 +77,9 @@ jQuery(document).ready(function(){ width:740, rowNum:20, jsonReader : {repeatitems: false}, + loadError: function (jqXHR, textStatus, errorThrown) { + alert("{% trans "An error as occured during search. Check your query fields." %}"); + } }); {% if multiple %} jQuery("#add_button_{{name}}").click(function (){ diff --git a/ishtar_common/templates/ishtar/sheet_organization.html b/ishtar_common/templates/ishtar/sheet_organization.html index 64f8fe5c7..e58d84887 100644 --- a/ishtar_common/templates/ishtar/sheet_organization.html +++ b/ishtar_common/templates/ishtar/sheet_organization.html @@ -31,7 +31,7 @@ <td class='string'>{{person.name|default:""}}</td> <td class='string'>{{person.surname|default:""}}</td> <td>{% for type in person.person_types.all %}{% if forloop.counter0 %}, {% endif %}{{type.label}}{% endfor %}</td> - <td class='link'><a href="#" onclick='load_window("{%url show-person person.pk ''%}")'>{% trans "Details" %}</a></td> + <td class='link'><a class='display_details' href="#" onclick='load_window("{%url show-person person.pk ''%}")'>{% trans "Details" %}</a></td> </tr> {% empty %} <tr><td colspan="8" class='no_items'>{% trans "No person in this organization" %}</td></tr> diff --git a/ishtar_common/templates/ishtar/sheet_person.html b/ishtar_common/templates/ishtar/sheet_person.html index 88fe59f41..47d3bc1cb 100644 --- a/ishtar_common/templates/ishtar/sheet_person.html +++ b/ishtar_common/templates/ishtar/sheet_person.html @@ -53,7 +53,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 person" %}</td></tr> diff --git a/ishtar_common/views.py b/ishtar_common/views.py index e02ed3f8b..5fc717c9f 100644 --- a/ishtar_common/views.py +++ b/ishtar_common/views.py @@ -392,7 +392,7 @@ def get_item(model, func_name, default_name, extra_request_keys=[], if sign == '-': datas = reversed(datas) datas = list(datas)[start:end] - link_template = "<a href='#' onclick='load_window(\"%%s\")'>%s</a>" % \ + link_template = "<a class='display_details' href='#' onclick='load_window(\"%%s\")'>%s</a>" % \ (unicode(_("Details"))) if data_type == "json": rows = [] diff --git a/ishtar_common/wizards.py b/ishtar_common/wizards.py index d29a8458f..d506c8552 100644 --- a/ishtar_common/wizards.py +++ b/ishtar_common/wizards.py @@ -620,7 +620,7 @@ class Wizard(NamedUrlWizardView): storage.reset() data = storage.get_step_data(form_key) if not data: - data = {}#MultiValueDict() + data = MultiValueDict() key = key if key.startswith(form_key) else form_key + '-' + key data[key] = value storage.set_step_data(form_key, data) |