diff options
| -rw-r--r-- | ishtar/__init__.py | 2 | ||||
| -rw-r--r-- | ishtar/furnitures/forms_common.py | 42 | ||||
| -rw-r--r-- | ishtar/furnitures/forms_context_records.py | 19 | ||||
| -rw-r--r-- | ishtar/furnitures/forms_files.py | 48 | ||||
| -rw-r--r-- | ishtar/furnitures/forms_items.py | 15 | ||||
| -rw-r--r-- | ishtar/furnitures/forms_operations.py | 53 | ||||
| -rw-r--r-- | ishtar/furnitures/models.py | 67 | ||||
| -rw-r--r-- | ishtar/furnitures/widgets.py | 4 | ||||
| -rw-r--r-- | ishtar/locale/fr/LC_MESSAGES/django.po | 810 | ||||
| -rw-r--r-- | ishtar/templates/default_wizard.html | 20 | ||||
| -rw-r--r-- | ishtar/templates/grid_form.html | 10 | ||||
| -rw-r--r-- | static/js/ishtar.js | 6 | ||||
| -rw-r--r-- | static/media/style.css | 28 | 
13 files changed, 657 insertions, 467 deletions
| diff --git a/ishtar/__init__.py b/ishtar/__init__.py index d73e2ee0b..c6c05bd5c 100644 --- a/ishtar/__init__.py +++ b/ishtar/__init__.py @@ -5,6 +5,8 @@ _(u"email address")  _(u"warehouse")  _(u"New warehouse")  _(u"warehouse") +_(u"New organization") +_(u"New person")  if settings.XHTML2ODT_PATH:      import sys      sys.path.append(settings.XHTML2ODT_PATH) diff --git a/ishtar/furnitures/forms_common.py b/ishtar/furnitures/forms_common.py index c62160df6..2082cd2b7 100644 --- a/ishtar/furnitures/forms_common.py +++ b/ishtar/furnitures/forms_common.py @@ -28,6 +28,7 @@ from django.shortcuts import render_to_response  from django.core import validators  from django.core.mail import send_mail  from django.core.exceptions import ObjectDoesNotExist +from django.utils.safestring import mark_safe  from django.forms.formsets import formset_factory, DELETION_FIELD_NAME  from django.utils.translation import ugettext_lazy as _  from django.contrib.auth.models import User @@ -40,11 +41,24 @@ import widgets  from forms import Wizard, FinalForm, FormSet, reverse_lazy, name_validator,\                    clean_duplicated +def get_town_field(required=True): +    help_text = _(u"<p>Type name, department code and/or postal code of the " +    u"town you would like to select. The search is insensitive to case.</p>\n" +    u"<p>Only the first twenty results are displayed but specifying the " +    u"department code is generally sufficient to get the appropriate result.</p>" +    u"\n<p class='example'>For instance type \"saint denis 93\" for getting " +    u"the french town Saint-Denis in the Seine-Saint-Denis department.</p>") +    return forms.IntegerField( +         widget=widgets.JQueryAutoComplete("/" + settings.URL_PATH + \ +                     'autocomplete-town', associated_model=models.Town), +         validators=[models.valid_id(models.Town)], label=_(u"Town"), +         help_text=mark_safe(help_text), required=required) +  class WarehouseForm(forms.Form):      name = forms.CharField(label=_(u"Name"), max_length=40,                                validators=[name_validator])      warehouse_type = forms.ChoiceField(label=_(u"Warehouse type"), -                                  choices=models.WarehouseType.get_types()) +                                       choices=[])      person_in_charge = forms.IntegerField(label=_(u"Person in charge"),           widget=widgets.JQueryAutoComplete(             reverse_lazy('autocomplete-person'), associated_model=models.Person), @@ -65,6 +79,13 @@ class WarehouseForm(forms.Form):      mobile_phone = forms.CharField(label=_(u"Town"), max_length=18,                                     required=False) +    def __init__(self, *args, **kwargs): +        super(WarehouseForm, self).__init__(*args, **kwargs) +        self.fields['warehouse_type'].choices = \ +                                          models.WarehouseType.get_types() +        self.fields['warehouse_type'].help_text = \ +                                          models.WarehouseType.get_help() +      def save(self, user):          dct = self.cleaned_data          dct['history_modifier'] = user @@ -81,7 +102,7 @@ class OrganizationForm(forms.Form):      name = forms.CharField(label=_(u"Name"), max_length=40,                                validators=[name_validator])      organization_type = forms.ChoiceField(label=_(u"Organization type"), -                                  choices=models.OrganizationType.get_types()) +                                          choices=[])      address = forms.CharField(label=_(u"Address"), widget=forms.Textarea,                                required=False)      address_complement = forms.CharField(label=_(u"Address complement"), @@ -95,6 +116,13 @@ class OrganizationForm(forms.Form):      mobile_phone = forms.CharField(label=_(u"Town"), max_length=18,                                     required=False) +    def __init__(self, *args, **kwargs): +        super(OrganizationForm, self).__init__(*args, **kwargs) +        self.fields['organization_type'].choices = \ +                                          models.OrganizationType.get_types() +        self.fields['organization_type'].help_text = \ +                                          models.OrganizationType.get_help() +      def save(self, user):          dct = self.cleaned_data          dct['history_modifier'] = user @@ -128,7 +156,7 @@ class PersonForm(forms.Form):      email = forms.CharField(label=_(u"Email"), max_length=40, required=False,                              validators=[validators.validate_email])      person_type = forms.ChoiceField(label=_("Person type"), -                                  choices=models.PersonType.get_types()) +                                  choices=[])      attached_to = forms.IntegerField(label=_("Current organization"),    widget=widgets.JQueryAutoComplete(reverse_lazy('autocomplete-organization'),    associated_model=models.Organization, new=True), @@ -141,6 +169,7 @@ class PersonForm(forms.Form):      def __init__(self, *args, **kwargs):          super(PersonForm, self).__init__(*args, **kwargs)          self.fields['person_type'].choices = models.PersonType.get_types() +        self.fields['person_type'].help_text = models.PersonType.get_help()      def save(self, user):          dct = self.cleaned_data @@ -255,7 +284,7 @@ class AccountForm(forms.Form):      form_label = _("Account")      associated_models = {'pk':models.Person}      currents = {'pk':models.Person} -    pk = forms.IntegerField(widget=forms.HiddenInput, required=False) +    pk = forms.IntegerField(label=u"", widget=forms.HiddenInput, required=False)      username = forms.CharField(label=_(u"Account"), max_length=30)      email = forms.CharField(label=_(u"Email"), max_length=75,                              validators=[validators.validate_email]) @@ -310,10 +339,7 @@ class TownForm(forms.Form):      form_label = _("Towns")      associated_models = {'town':models.Town}      # !FIXME hard_link, reverse_lazy doen't seem to work with formsets -    town = forms.IntegerField(label=_(u"Town"), required=False, -         widget=widgets.JQueryAutoComplete("/" + settings.URL_PATH + \ -                     'autocomplete-town', associated_model=models.Town), -         validators=[models.valid_id(models.Town)]) +    town = get_town_field(required=False)  class TownFormSet(FormSet):      def clean(self): diff --git a/ishtar/furnitures/forms_context_records.py b/ishtar/furnitures/forms_context_records.py index d28bd998c..3af7d3f71 100644 --- a/ishtar/furnitures/forms_context_records.py +++ b/ishtar/furnitures/forms_context_records.py @@ -35,6 +35,7 @@ import models  import widgets  from forms import Wizard, FinalForm, FormSet, SearchWizard, DeletionWizard, \                    formset_factory, get_now, reverse_lazy +from forms_common import get_town_field  from forms_operations import OperationFormSelection  class RecordWizard(Wizard): @@ -81,10 +82,7 @@ class RecordModifWizard(RecordWizard):      model = models.ContextRecord  class RecordSelect(forms.Form): -    parcel__town = forms.IntegerField(label=_(u"Town"), -         widget=widgets.JQueryAutoComplete("/" + settings.URL_PATH + \ -                     'autocomplete-town', associated_model=models.Town), -         validators=[models.valid_id(models.Town)]) +    parcel__town = get_town_field()      parcel__operation__year = forms.IntegerField(label=_("Year"))      datings__period = forms.ChoiceField(label=_("Period"),                                          choices=models.Period.get_types()) @@ -164,7 +162,13 @@ class DatingForm(forms.Form):      quality = forms.ChoiceField(label=_("Quality"), required=False,                                 choices=models.DatingQuality.get_types())      dating_type = forms.ChoiceField(label=_("Dating type"), required=False, -                               choices=models.DatingType.get_types()) +                               choices=[]) + +    def __init__(self, *args, **kwargs): +        super(DatingForm, self).__init__(*args, **kwargs) +        self.fields['dating_type'].choices = models.DatingType.get_types() +        self.fields['dating_type'].help_text = models.DatingType.get_help() +  DatingFormSet = formset_factory(DatingForm, can_delete=True,                                formset=FormSet) @@ -180,7 +184,7 @@ class RecordFormInterpretation(forms.Form):                                    widget=forms.Textarea, required=False)      interpretation = forms.CharField(label=_(u"Interpretation"),                                    widget=forms.Textarea, required=False) -    activity = forms.ChoiceField(label=_("Activity"), required=False, +    activity = forms.ChoiceField(label=_(u"Activity"), required=False,                                   choices=[])      identification = forms.ChoiceField(label=_("Identification"),                                         required=False, choices=[]) @@ -194,8 +198,11 @@ class RecordFormInterpretation(forms.Form):      def __init__(self, *args, **kwargs):          super(RecordFormInterpretation, self).__init__(*args, **kwargs)          self.fields['activity'].choices = models.ActivityType.get_types() +        self.fields['activity'].help_text = models.ActivityType.get_help()          self.fields['identification'].choices = \                                            models.IdentificationType.get_types() +        self.fields['identification'].help_text = \ +                                          models.IdentificationType.get_help()  record_search_wizard = SearchWizard([                            ('general-record_search', RecordFormSelection)], diff --git a/ishtar/furnitures/forms_files.py b/ishtar/furnitures/forms_files.py index 632f1d9f3..da77eff85 100644 --- a/ishtar/furnitures/forms_files.py +++ b/ishtar/furnitures/forms_files.py @@ -36,7 +36,7 @@ import models  import widgets  from forms import Wizard, FinalForm, FormSet, ClosingWizard, SearchWizard, \                    formset_factory, get_now, reverse_lazy -from forms_common import TownFormSet, ParcelFormSet +from forms_common import TownFormSet, ParcelFormSet, get_town_field  from forms_operations import OperationAdministrativeActWizard, \  AdministrativeActOpeForm, AdministrativeActOpeFormSelection, \  AdministrativeActDeletionWizard, FinalAdministrativeActDeleteForm, is_preventive @@ -125,16 +125,17 @@ class FileWizard(Wizard):          return res  class FileSelect(forms.Form): -    towns = forms.IntegerField(label=_(u"Town"), -         widget=widgets.JQueryAutoComplete("/" + settings.URL_PATH + \ -                     'autocomplete-town', associated_model=models.Town), -         validators=[models.valid_id(models.Town)]) +    towns = get_town_field()      file_type = forms.ChoiceField(label=_("File type"),                                    choices=models.FileType.get_types()) -    saisine_type = forms.ChoiceField(label=_("Saisine type"), -                                  choices=models.SaisineType.get_types()) +    saisine_type = forms.ChoiceField(label=_("Saisine type"), choices=[])      year = forms.IntegerField(label=_("Year")) +    def __init__(self, *args, **kwargs): +        super(FileSelect, self).__init__(*args, **kwargs) +        self.fields['saisine_type'].choices = models.SaisineType.get_types() +        self.fields['saisine_type'].help_text = models.SaisineType.get_help() +  class FileFormSelection(forms.Form):      form_label = _("Archaeological file search")      associated_models = {'pk':models.File} @@ -229,10 +230,14 @@ class FileFormPreventive(forms.Form):             required=False, validators=[validators.MinValueValidator(0),                                         validators.MaxValueValidator(999999999)])      if settings.COUNTRY == 'fr': -        saisine_type = forms.ChoiceField(label=_("Saisine type"), -                                  choices=models.SaisineType.get_types()) +        saisine_type = forms.ChoiceField(label=_(u"Saisine type"), +                                         choices=[])      reception_date = forms.DateField(label=_(u"Reception date"),                                       initial=get_now, widget=widgets.JQueryDate) +    def __init__(self, *args, **kwargs): +        super(FileFormPreventive, self).__init__(*args, **kwargs) +        self.fields['saisine_type'].choices = models.SaisineType.get_types() +        self.fields['saisine_type'].help_text = models.SaisineType.get_help()  file_search_wizard = SearchWizard([('general-file_search', FileFormSelection)],                              url_name='file_search',) @@ -320,12 +325,15 @@ class FileEditAdministrativeActWizard(FileAdministrativeActWizard):          return self.get_current_object(request, storage).associated_file  class AdministrativeActFileSelect(forms.Form): -    associated_file__towns = forms.IntegerField(label=_(u"Town"), -         widget=widgets.JQueryAutoComplete("/" + settings.URL_PATH + \ -                     'autocomplete-town', associated_model=models.Town), -         validators=[models.valid_id(models.Town)]) -    act_type = forms.ChoiceField(label=_("Act type"), -                choices=models.ActType.get_types(dct={'intented_to':'F'})) +    associated_file__towns = get_town_field() +    act_type = forms.ChoiceField(label=_("Act type"), choices=[]) + +    def __init__(self, *args, **kwargs): +        super(AdministrativeActFileSelect, self).__init__(*args, **kwargs) +        self.fields['act_type'].choices = models.ActType.get_types( +                                                   dct={'intented_to':'F'}) +        self.fields['act_type'].help_text = models.ActType.get_help( +                                                   dct={'intented_to':'F'})  class AdministrativeActFileFormSelection(AdministrativeActOpeFormSelection):      pk = forms.IntegerField(label="", required=False, @@ -335,8 +343,14 @@ class AdministrativeActFileFormSelection(AdministrativeActOpeFormSelection):         validators=[models.valid_id(models.AdministrativeAct)])  class AdministrativeActFileForm(AdministrativeActOpeForm): -    act_type = forms.ChoiceField(label=_("Act type"), -                choices=models.ActType.get_types(dct={'intented_to':'F'})) +    act_type = forms.ChoiceField(label=_(u"Act type"), choices=[]) + +    def __init__(self, *args, **kwargs): +        super(AdministrativeActFileForm, self).__init__(*args, **kwargs) +        self.fields['act_type'].choices = models.ActType.get_types( +                                                   dct={'intented_to':'F'}) +        self.fields['act_type'].help_text = models.ActType.get_help( +                                                   dct={'intented_to':'F'})  file_administrativeactfile_wizard = FileAdministrativeActWizard([         ('selec-file_administrativeactfile', FileFormSelection), diff --git a/ishtar/furnitures/forms_items.py b/ishtar/furnitures/forms_items.py index d4cec0ce9..b3f360db3 100644 --- a/ishtar/furnitures/forms_items.py +++ b/ishtar/furnitures/forms_items.py @@ -34,6 +34,7 @@ import models  import widgets  from forms import Wizard, FinalForm, FormSet, SearchWizard, \                    formset_factory, get_now, reverse_lazy +from forms_common import get_town_field  from forms_context_records import RecordFormSelection  class ItemWizard(Wizard): @@ -77,7 +78,12 @@ class DateForm(forms.Form):      dating__quality = forms.ChoiceField(label=_("Quality"), required=False,                                 choices=models.DatingQuality.get_types())      dating__dating_type = forms.ChoiceField(label=_("Dating type"), -                required=False, choices=models.DatingType.get_types()) +                required=False, choices=[]) + +    def __init__(self, *args, **kwargs): +        super(DateForm, self).__init__(*args, **kwargs) +        self.fields['dating__dating_type'].choices = models.DatingType.get_types() +        self.fields['dating__dating_type'].help_text = models.DatingType.get_help()  item_creation_wizard = ItemWizard([      ('selecrecord-item_creation', RecordFormSelection), @@ -87,10 +93,7 @@ item_creation_wizard = ItemWizard([       url_name='item_creation',)  class ItemSelect(forms.Form): -    base_items__context_record__parcel__town = forms.IntegerField( -         widget=widgets.JQueryAutoComplete("/" + settings.URL_PATH + \ -                     'autocomplete-town', associated_model=models.Town), -         validators=[models.valid_id(models.Town)], label=_(u"Town")) +    base_items__context_record__parcel__town = get_town_field()      base_items__context_record__parcel__operation__year = forms.IntegerField(                                                               label=_("Year"))      dating__period = forms.ChoiceField( @@ -100,7 +103,7 @@ class ItemSelect(forms.Form):      base_items__is_isolated = forms.NullBooleanField(label=_("Is isolated?"))  class ItemFormSelection(forms.Form): -    form_label = _("Item") +    form_label = _("Item search")      associated_models = {'pk':models.Item}      currents = {'pk':models.Item}      pk = forms.IntegerField(label="", required=False, diff --git a/ishtar/furnitures/forms_operations.py b/ishtar/furnitures/forms_operations.py index c69c62e84..17fd8f69d 100644 --- a/ishtar/furnitures/forms_operations.py +++ b/ishtar/furnitures/forms_operations.py @@ -36,7 +36,8 @@ import models  import widgets  from forms import Wizard, FinalForm, FormSet, SearchWizard, ClosingWizard, \       DeletionWizard, formset_factory, get_now, reverse_lazy, clean_duplicated -from forms_common import TownForm, TownFormSet, ParcelFormSet, ParcelForm +from forms_common import TownForm, TownFormSet, ParcelFormSet, ParcelForm,\ +                         get_town_field  def is_preventive(form_name, model, type_key='operation_type', key=''):      def func(self, request, storage): @@ -187,16 +188,18 @@ class OperationWizard(Wizard):          return datas  class OperationSelect(forms.Form): -    towns = forms.IntegerField(label=_(u"Town"), -         widget=widgets.JQueryAutoComplete("/" + settings.URL_PATH + \ -                     'autocomplete-town', associated_model=models.Town), -         validators=[models.valid_id(models.Town)]) +    towns = get_town_field()      operation_type = forms.ChoiceField(label=_("Operation type"), -                                       choices=models.OperationType.get_types()) +                                       choices=[])      remains = forms.ChoiceField(label=_("Remains"),                                  choices=models.RemainType.get_types())      year = forms.IntegerField(label=_("Year")) +    def __init__(self, *args, **kwargs): +        super(OperationSelect, self).__init__(*args, **kwargs) +        self.fields['operation_type'].choices = models.OperationType.get_types() +        self.fields['operation_type'].help_text = models.OperationType.get_help() +  class OperationFormSelection(forms.Form):      form_label = _(u"Operation search")      associated_models = {'pk':models.Operation} @@ -225,25 +228,30 @@ class OperationFormGeneral(forms.Form):            unicode(models.PersonType.objects.get(txt_idx='sra_agent').pk)])]),          associated_model=models.Person, new=True),          validators=[models.valid_id(models.Person)], required=False) -    associated_file = forms.IntegerField(label=_("Archaelogical file"), +    associated_file = forms.IntegerField(label=_(u"Archaelogical file"),           widget=widgets.JQueryAutoComplete(reverse_lazy('autocomplete-file'),                                             associated_model=models.File),           validators=[models.valid_id(models.File)], required=False) -    operation_type = forms.ChoiceField(label=_("Operation type"), -                                       choices=models.OperationType.get_types()) +    operation_type = forms.ChoiceField(label=_(u"Operation type"), +                                       choices=[])      start_date = forms.DateField(label=_(u"Start date"), required=False,                                   widget=widgets.JQueryDate)      surface = forms.IntegerField(required=False, widget=widgets.AreaWidget,                             label=_(u"Total surface"),                             validators=[validators.MinValueValidator(0),                                         validators.MaxValueValidator(999999999)]) -    year = forms.IntegerField(label=_("Year"), +    year = forms.IntegerField(label=_(u"Year"),                                initial=lambda:datetime.datetime.now().year,                                validators=[validators.MinValueValidator(1900),                                            validators.MaxValueValidator(2100)])      comment = forms.CharField(label=_(u"Comment"), widget=forms.Textarea,                                required=False) +    def __init__(self, *args, **kwargs): +        super(OperationFormGeneral, self).__init__(*args, **kwargs) +        self.fields['operation_type'].choices = models.OperationType.get_types() +        self.fields['operation_type'].help_text = models.OperationType.get_help() +  class OperationFormReference(forms.Form):      form_label = _("References")      associated_models = {'in_charge':models.Person, @@ -529,12 +537,15 @@ class OperationEditAdministrativeActWizard(OperationAdministrativeActWizard):          return self.get_current_object(request, storage).operation  class AdministrativeActOpeSelect(forms.Form): -    operation__towns = forms.IntegerField(label=_(u"Town"), -         widget=widgets.JQueryAutoComplete("/" + settings.URL_PATH + \ -                     'autocomplete-town', associated_model=models.Town), -         validators=[models.valid_id(models.Town)]) -    act_type = forms.ChoiceField(label=_("Act type"), -                choices=models.ActType.get_types(dct={'intented_to':'O'})) +    operation__towns = get_town_field() +    act_type = forms.ChoiceField(label=_("Act type"), choices=[]) + +    def __init__(self, *args, **kwargs): +        super(AdministrativeActOpeSelect, self).__init__(*args, **kwargs) +        self.fields['act_type'].choices = models.ActType.get_types( +                                                   dct={'intented_to':'O'}) +        self.fields['act_type'].help_text = models.ActType.get_help( +                                                   dct={'intented_to':'O'})  class AdministrativeActOpeFormSelection(forms.Form):      form_label = _("Administrative act search") @@ -557,8 +568,7 @@ class AdministrativeActOpeForm(forms.Form):      form_label = _("General")      associated_models = {'act_type':models.ActType,                           'signatory':models.Person} -    act_type = forms.ChoiceField(label=_("Act type"), -                choices=models.ActType.get_types(dct={'intented_to':'O'})) +    act_type = forms.ChoiceField(label=_("Act type"), choices=[])      signatory = forms.IntegerField(label=_("Signatory"),           widget=widgets.JQueryAutoComplete(reverse_lazy('autocomplete-person'),                                       associated_model=models.Person, new=True), @@ -570,6 +580,13 @@ class AdministrativeActOpeForm(forms.Form):      if settings.COUNTRY == 'fr':          ref_sra = forms.CharField(label=u"Référence SRA", max_length=15) +    def __init__(self, *args, **kwargs): +        super(AdministrativeActOpeForm, self).__init__(*args, **kwargs) +        self.fields['act_type'].choices = models.ActType.get_types( +                                                   dct={'intented_to':'O'}) +        self.fields['act_type'].help_text = models.ActType.get_help( +                                                   dct={'intented_to':'O'}) +  class AdministrativeActDeletionWizard(ClosingWizard):      model = models.AdministrativeAct      fields = ['act_type', 'in_charge', 'operator', 'scientific', 'signatory', diff --git a/ishtar/furnitures/models.py b/ishtar/furnitures/models.py index 6dda192ea..3d6e12536 100644 --- a/ishtar/furnitures/models.py +++ b/ishtar/furnitures/models.py @@ -26,7 +26,7 @@ from django.core.exceptions import ObjectDoesNotExist, ValidationError  from django.core.validators import validate_slug  from django.utils.translation import ugettext_lazy as _, ugettext  from django.db.utils import DatabaseError -from django.utils.safestring import SafeUnicode +from django.utils.safestring import SafeUnicode, mark_safe  from django.db.models import Q, Max  from django.db.models.signals import m2m_changed @@ -130,6 +130,7 @@ class GeneralType(models.Model):                           validators=[validate_slug], max_length=30, unique=True)      comment = models.TextField(_(u"Comment"), blank=True, null=True)      available = models.BooleanField(_(u"Available")) +    HELP_TEXT = u""      class Meta:          abstract = True @@ -138,43 +139,79 @@ class GeneralType(models.Model):          return self.label      @classmethod -    def get_types(cls, dct={}): +    def get_help(cls, dct={}): +        help_text = cls.HELP_TEXT +        c_rank = -1 +        help_items = u"\n" +        for item in cls.get_types(dct=dct, instances=True): +            if not item.comment: +                continue +            if c_rank > item.rank: +                help_items += u"</dl>\n" +            elif c_rank < item.rank: +                help_items += u"<dl>\n" +            c_rank = item.rank +            help_items += u"<dt>%s</dt><dd>%s</dd>" % (item.label, +                                u"<br/>".join(item.comment.split('\n'))) +        c_rank += 1 +        if c_rank: +            help_items += c_rank*u"</dl>" +        return mark_safe(help_text + help_items) + +    @classmethod +    def get_types(cls, dct={}, instances=False):          base_dct = dct.copy()          if hasattr(cls, 'parent'): -            return cls._get_parent_types(base_dct) -        return cls._get_types(base_dct) +            return cls._get_parent_types(base_dct, instances) +        return cls._get_types(base_dct, instances)      @classmethod -    def _get_types(cls, dct={}): +    def _get_types(cls, dct={}, instances=False):          dct['available'] = True -        yield ('', '--') +        if not instances: +            yield ('', '--')          for item in cls.objects.filter(**dct).all(): -            yield (item.pk, _(unicode(item))) +            if instances: +                item.rank = 0 +                yield item +            else: +                yield (item.pk, _(unicode(item))) + +    PREFIX = "› "      @classmethod -    def _get_childs(cls, item, dct, prefix=""): -        prefix += "› " +    def _get_childs(cls, item, dct, prefix=0, instances=False): +        prefix += 1          dct['parent'] = item          childs = cls.objects.filter(**dct)          if hasattr(cls, 'order'):              childs = childs.order_by('order')          for child in childs.all(): -            yield (child.pk, SafeUnicode(prefix + \ +            if instances: +                child.rank = prefix +                yield child +            else: +                yield (child.pk, SafeUnicode(prefix*cls.PREFIX + \                                           unicode(_(unicode(child))) )) -            for sub_child in cls._get_childs(child, dct, prefix): +            for sub_child in cls._get_childs(child, dct, prefix, instances):                  yield sub_child      @classmethod -    def _get_parent_types(cls, dct={}): +    def _get_parent_types(cls, dct={}, instances=False):          dct['available'] = True -        yield ('', '--') +        if not instances: +            yield ('', '--')          dct['parent'] = None          items = cls.objects.filter(**dct)          if hasattr(cls, 'order'):              items = items.order_by('order')          for item in items.all(): -            yield (item.pk, unicode(item)) -            for child in cls._get_childs(item, dct): +            if instances: +                item.rank = 0 +                yield item +            else: +                yield (item.pk, unicode(item)) +            for child in cls._get_childs(item, dct, instances):                  yield child  class HistoryError(Exception): diff --git a/ishtar/furnitures/widgets.py b/ishtar/furnitures/widgets.py index d70f08dda..d813e2e63 100644 --- a/ishtar/furnitures/widgets.py +++ b/ishtar/furnitures/widgets.py @@ -19,6 +19,7 @@  # See the file COPYING for details.
  from django import forms
 +from django.template import Context, loader
  from django.utils.safestring import mark_safe
  from django.forms.widgets import flatatt
  from django.utils.encoding import smart_unicode
 @@ -213,7 +214,8 @@ class JQueryJqGrid(forms.RadioSelect):          self.multiple = multiple
      def render(self, name, value=None, attrs=None):
 -        rendered = unicode(self.form)
 +        t = loader.get_template('grid_form.html')
 +        rendered = t.render(Context({'form':self.form}))
          rendered += """
  </table>
  <button id='search_%s' class='submit'>%s</button>
 diff --git a/ishtar/locale/fr/LC_MESSAGES/django.po b/ishtar/locale/fr/LC_MESSAGES/django.po index f136502de..399bfa7a2 100644 --- a/ishtar/locale/fr/LC_MESSAGES/django.po +++ b/ishtar/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: 2011-06-10 13:32+0200\n" +"POT-Creation-Date: 2011-06-13 14:43+0200\n"  "PO-Revision-Date: 2010-12-09\n"  "Last-Translator: Étienne Loks <etienne.loks at peacefrogs net>\n"  "Language-Team: \n" @@ -28,18 +28,30 @@ msgstr "identifiant"  msgid "email address"  msgstr "courriel" -#: __init__.py:5 +#: __init__.py:5 __init__.py:7  msgid "warehouse"  msgstr "dépôt" -#: furnitures/context_processors.py:42 furnitures/forms_operations.py:228 -#: furnitures/menus.py:102 furnitures/models.py:989 furnitures/models.py:1015 +#: __init__.py:6 +msgid "New warehouse" +msgstr "Nouveau dépôt" + +#: __init__.py:8 +msgid "New organization" +msgstr "Nouvelle organisation" + +#: __init__.py:9 +msgid "New person" +msgstr "Nouvelle personne" + +#: furnitures/context_processors.py:42 furnitures/forms_operations.py:231 +#: furnitures/menus.py:102 furnitures/models.py:1027 furnitures/models.py:1053  msgid "Archaelogical file"  msgstr "Dossier archéologique"  #: furnitures/context_processors.py:43 furnitures/menus.py:132 -#: furnitures/models.py:569 furnitures/models.py:610 furnitures/models.py:990 -#: furnitures/models.py:1013 +#: furnitures/models.py:607 furnitures/models.py:648 furnitures/models.py:1028 +#: furnitures/models.py:1051  msgid "Operation"  msgstr "Opération" @@ -51,179 +63,205 @@ msgstr "Il y a des éléments identiques."  msgid "Enter a valid name consisting of letters, spaces and hyphens."  msgstr "Entrez un nom correct composé de lettres, espaces et tirets." -#: furnitures/forms.py:74 furnitures/forms_common.py:62 -#: furnitures/models.py:320 furnitures/models.py:350 furnitures/models.py:968 -#: furnitures/models.py:1075 +#: furnitures/forms.py:75 furnitures/forms_common.py:324 +msgid "Confirm" +msgstr "Confirmation" + +#: furnitures/forms.py:191 +msgid "Yes" +msgstr "Oui" + +#: furnitures/forms.py:193 +msgid "No" +msgstr "Non" + +#: furnitures/forms_common.py:45 +msgid "" +"<p>Type name, department code and/or postal code of the town you would like " +"to select. The search is insensitive to case.</p>\n" +"<p>Only the first twenty results are displayed but specifying the department " +"code is generally sufficient to get the appropriate result.</p>\n" +"<p class='example'>For instance type \"saint denis 93\" for getting the " +"french town Saint-Denis in the Seine-Saint-Denis department.</p>" +msgstr "" +"<p>Tapez le nom, le numéro de département et - ou le code postal de la " +"commune que vous voulez sélectionner. La recherche n'est pas sensible à la " +"casse.</p>\n" +"<p>Seuls les vingt premiers résultats sont affichés mais en plus du nom " +"préciser le numéro de département est généralement suffisant pour obtenir le " +"résultat souhaité.</p>\n" +"<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>" + +#: furnitures/forms_common.py:54 furnitures/forms_common.py:75 +#: furnitures/forms_common.py:79 furnitures/forms_common.py:112 +#: furnitures/forms_common.py:116 furnitures/forms_common.py:368 +#: furnitures/forms_operations.py:307 furnitures/models.py:340 +#: furnitures/models.py:652 furnitures/models.py:1127 +msgid "Town" +msgstr "Commune" + +#: furnitures/forms_common.py:58 furnitures/forms_common.py:102 +#: furnitures/forms_common.py:154 furnitures/models.py:357 +#: furnitures/models.py:387 furnitures/models.py:1006 +#: furnitures/models.py:1113  msgid "Name"  msgstr "Nom" -#: furnitures/forms.py:76 furnitures/models.py:964 furnitures/models.py:970 +#: furnitures/forms_common.py:60 furnitures/models.py:1002 +#: furnitures/models.py:1008  msgid "Warehouse type"  msgstr "Type de dépôt" -#: furnitures/forms.py:78 furnitures/forms_files.py:158 -#: furnitures/models.py:429 furnitures/models.py:972 +#: furnitures/forms_common.py:62 furnitures/forms_files.py:159 +#: furnitures/models.py:466 furnitures/models.py:1010  msgid "Person in charge"  msgstr "Responsable" -#: furnitures/forms.py:83 furnitures/forms_files.py:179 -#: furnitures/forms_items.py:162 furnitures/forms_operations.py:244 -#: furnitures/models.py:131 furnitures/models.py:459 furnitures/models.py:565 -#: furnitures/models.py:973 furnitures/models.py:1053 +#: furnitures/forms_common.py:67 furnitures/forms_files.py:180 +#: furnitures/forms_items.py:165 furnitures/forms_operations.py:247 +#: furnitures/models.py:131 furnitures/models.py:497 furnitures/models.py:603 +#: furnitures/models.py:1011 furnitures/models.py:1091  msgid "Comment"  msgstr "Commentaire" -#: furnitures/forms.py:85 furnitures/forms_files.py:191 -#: furnitures/models.py:298 +#: furnitures/forms_common.py:69 furnitures/forms_common.py:106 +#: furnitures/forms_files.py:192 furnitures/models.py:335  msgid "Address"  msgstr "Adresse" -#: furnitures/forms.py:87 furnitures/models.py:299 +#: furnitures/forms_common.py:71 furnitures/forms_common.py:108 +#: furnitures/models.py:336  msgid "Address complement"  msgstr "Complément d'adresse" -#: furnitures/forms.py:89 furnitures/models.py:301 +#: furnitures/forms_common.py:73 furnitures/forms_common.py:110 +#: furnitures/models.py:338  msgid "Postal code"  msgstr "Code postal" -#: furnitures/forms.py:91 furnitures/forms.py:95 -#: furnitures/forms_common.py:236 furnitures/forms_common.py:265 -#: furnitures/forms_context_records.py:84 furnitures/forms_files.py:128 -#: furnitures/forms_files.py:323 furnitures/forms_items.py:93 -#: furnitures/forms_operations.py:190 furnitures/forms_operations.py:299 -#: furnitures/forms_operations.py:532 furnitures/models.py:303 -#: furnitures/models.py:614 furnitures/models.py:1089 -msgid "Town" -msgstr "Commune" - -#: furnitures/forms.py:92 furnitures/models.py:304 +#: furnitures/forms_common.py:76 furnitures/forms_common.py:113 +#: furnitures/models.py:341  msgid "Country"  msgstr "Pays" -#: furnitures/forms.py:94 furnitures/models.py:306 +#: furnitures/forms_common.py:78 furnitures/forms_common.py:115 +#: furnitures/models.py:343  msgid "Phone"  msgstr "Téléphone" -#: furnitures/forms.py:112 furnitures/forms_common.py:218 -msgid "Confirm" -msgstr "Confirmation" - -#: furnitures/forms.py:228 -msgid "Yes" -msgstr "Oui" - -#: furnitures/forms.py:230 -msgid "No" -msgstr "Non" +#: furnitures/forms_common.py:104 furnitures/models.py:353 +msgid "Organization type" +msgstr "Type d'organisation" -#: furnitures/forms_common.py:47 +#: furnitures/forms_common.py:139  msgid "Person search"  msgstr "Recherche d'individus" -#: furnitures/forms_common.py:50 furnitures/forms_items.py:134 -#: furnitures/menus.py:89 furnitures/models.py:361 furnitures/models.py:386 -#: furnitures/models.py:1113 furnitures/models.py:1135 -#: furnitures/models.py:1150 +#: furnitures/forms_common.py:142 furnitures/forms_items.py:137 +#: furnitures/menus.py:89 furnitures/models.py:398 furnitures/models.py:423 +#: furnitures/models.py:1151 furnitures/models.py:1173 +#: furnitures/models.py:1188  msgid "Person"  msgstr "Individu" -#: furnitures/forms_common.py:56 +#: furnitures/forms_common.py:148  msgid "Identity"  msgstr "Identité" -#: furnitures/forms_common.py:59 furnitures/models.py:348 -#: furnitures/models.py:787 templates/sheet_contextrecord.html:83 +#: furnitures/forms_common.py:151 furnitures/models.py:385 +#: furnitures/models.py:825 templates/sheet_contextrecord.html:83  #: templates/sheet_ope.html:104 templates/sheet_ope_modif.html:104  #: templates/sheet_operation.html:104  msgid "Title"  msgstr "Titre" -#: furnitures/forms_common.py:60 furnitures/models.py:349 +#: furnitures/forms_common.py:152 furnitures/models.py:386  msgid "Surname"  msgstr "Prénom" -#: furnitures/forms_common.py:64 furnitures/forms_common.py:183 -#: furnitures/models.py:351 +#: furnitures/forms_common.py:156 furnitures/forms_common.py:289 +#: furnitures/models.py:388  msgid "Email"  msgstr "Courriel" -#: furnitures/forms_common.py:66 furnitures/models.py:339 +#: furnitures/forms_common.py:158 furnitures/models.py:376  msgid "Person type"  msgstr "Type d'individu" -#: furnitures/forms_common.py:68 +#: furnitures/forms_common.py:160  msgid "Current organization"  msgstr "Organisation actuelle" -#: furnitures/forms_common.py:72 furnitures/models.py:355 +#: furnitures/forms_common.py:164 furnitures/models.py:392  msgid "Is an author?"  msgstr "Est un auteur ?" -#: furnitures/forms_common.py:75 furnitures/models.py:357 +#: furnitures/forms_common.py:167 furnitures/models.py:394  msgid "In charge of a storage?"  msgstr "Est responsable d'un dépôt ?" -#: furnitures/forms_common.py:101 furnitures/forms_common.py:185 +#: furnitures/forms_common.py:207 furnitures/forms_common.py:291  msgid "New password"  msgstr "Nouveau mot de passe" -#: furnitures/forms_common.py:155 +#: furnitures/forms_common.py:261  #, python-format  msgid "[%(app_name)s] Account creation/modification"  msgstr "[%(app_name)s] Création - modification du compte" -#: furnitures/forms_common.py:178 furnitures/forms_common.py:182 +#: furnitures/forms_common.py:284 furnitures/forms_common.py:288  msgid "Account"  msgstr "Compte" -#: furnitures/forms_common.py:189 +#: furnitures/forms_common.py:295  msgid "New password (confirmation)"  msgstr "Nouveau mot de passe (confirmation)" -#: furnitures/forms_common.py:207 +#: furnitures/forms_common.py:313  msgid "Your password and confirmation password do not match."  msgstr "La vérification du mot de passe a échoué." -#: furnitures/forms_common.py:212 +#: furnitures/forms_common.py:318  msgid "You must provide a correct password."  msgstr "Vous devez fournir un mot de passe correct." -#: furnitures/forms_common.py:219 +#: furnitures/forms_common.py:325  msgid "Send the new password by email?"  msgstr "Envoyer le nouveau mot de passe par courriel ?" -#: furnitures/forms_common.py:233 furnitures/forms_common.py:259 -#: furnitures/forms_operations.py:297 furnitures/forms_operations.py:318 -#: furnitures/forms_operations.py:322 furnitures/models.py:439 -#: furnitures/models.py:548 furnitures/models.py:1090 +#: furnitures/forms_common.py:339 furnitures/forms_common.py:362 +#: furnitures/forms_operations.py:305 furnitures/forms_operations.py:326 +#: furnitures/forms_operations.py:330 furnitures/models.py:476 +#: furnitures/models.py:586 furnitures/models.py:1128  msgid "Towns"  msgstr "Communes" -#: furnitures/forms_common.py:255 +#: furnitures/forms_common.py:358  msgid "There are identical towns."  msgstr "Il y a des communes identiques." -#: furnitures/forms_common.py:262 furnitures/forms_common.py:310 -#: furnitures/forms_operations.py:325 furnitures/forms_operations.py:346 -#: furnitures/forms_operations.py:350 furnitures/models.py:620 +#: furnitures/forms_common.py:365 furnitures/forms_common.py:413 +#: furnitures/forms_operations.py:333 furnitures/forms_operations.py:354 +#: furnitures/forms_operations.py:358 furnitures/models.py:658  msgid "Parcels"  msgstr "Parcelles" -#: furnitures/forms_common.py:267 furnitures/models.py:615 +#: furnitures/forms_common.py:370 furnitures/models.py:653  #: templates/sheet_ope.html:62 templates/sheet_ope_modif.html:62  #: templates/sheet_operation.html:63  msgid "Section"  msgstr "Section" -#: furnitures/forms_common.py:269 furnitures/models.py:616 +#: furnitures/forms_common.py:372 furnitures/models.py:654  msgid "Parcel number"  msgstr "Numéro de parcelle" -#: furnitures/forms_common.py:271 furnitures/forms_context_records.py:88 -#: furnitures/forms_files.py:136 furnitures/forms_files.py:163 -#: furnitures/forms_files.py:183 furnitures/forms_items.py:95 -#: furnitures/forms_operations.py:198 furnitures/forms_operations.py:240 -#: furnitures/models.py:422 furnitures/models.py:540 furnitures/models.py:611 +#: furnitures/forms_common.py:374 furnitures/forms_context_records.py:86 +#: furnitures/forms_files.py:132 furnitures/forms_files.py:164 +#: furnitures/forms_files.py:184 furnitures/forms_items.py:98 +#: furnitures/forms_operations.py:196 furnitures/forms_operations.py:243 +#: furnitures/models.py:459 furnitures/models.py:578 furnitures/models.py:649  #: templates/sheet_file.html:68 templates/sheet_file.html.py:88  #: templates/sheet_file.html:116 templates/sheet_ope.html:61  #: templates/sheet_ope.html.py:83 templates/sheet_ope_modif.html:61 @@ -232,38 +270,38 @@ msgstr "Numéro de parcelle"  msgid "Year"  msgstr "Année" -#: furnitures/forms_common.py:299 +#: furnitures/forms_common.py:402  msgid "All fields are required"  msgstr "Tous les champs sont nécessaires" -#: furnitures/forms_context_records.py:89 -#: furnitures/forms_context_records.py:160 furnitures/forms_items.py:72 -#: furnitures/forms_items.py:97 furnitures/forms_operations.py:370 -#: furnitures/models.py:659 +#: furnitures/forms_context_records.py:87 +#: furnitures/forms_context_records.py:158 furnitures/forms_items.py:73 +#: furnitures/forms_items.py:100 furnitures/forms_operations.py:378 +#: furnitures/models.py:697  msgid "Period"  msgstr "Période" -#: furnitures/forms_context_records.py:91 +#: furnitures/forms_context_records.py:89  msgid "Unit type"  msgstr "Type d'unité" -#: furnitures/forms_context_records.py:95 +#: furnitures/forms_context_records.py:93  msgid "Context record search"  msgstr "Recherche d'Unité d'Enregistrement" -#: furnitures/forms_context_records.py:106 +#: furnitures/forms_context_records.py:104  msgid "You should select a context record."  msgstr "Vous devez sélectionner une Unité d'Enregistrement." -#: furnitures/forms_context_records.py:112 furnitures/forms_files.py:154 -#: furnitures/forms_operations.py:216 furnitures/forms_operations.py:557 +#: furnitures/forms_context_records.py:110 furnitures/forms_files.py:155 +#: furnitures/forms_operations.py:219 furnitures/forms_operations.py:568  #: templates/sheet_file.html:17 templates/sheet_ope.html:5  #: templates/sheet_ope_modif.html:5 templates/sheet_operation.html:5  msgid "General"  msgstr "Général" -#: furnitures/forms_context_records.py:114 furnitures/forms_operations.py:327 -#: furnitures/models.py:619 furnitures/models.py:715 furnitures/models.py:951 +#: furnitures/forms_context_records.py:112 furnitures/forms_operations.py:335 +#: furnitures/models.py:657 furnitures/models.py:753 furnitures/models.py:989  #: templates/sheet_contextrecord.html:110 templates/sheet_ope.html:63  #: templates/sheet_ope.html.py:129 templates/sheet_ope_modif.html:63  #: templates/sheet_ope_modif.html.py:129 templates/sheet_ope_modif.html:157 @@ -272,17 +310,17 @@ msgstr "Général"  msgid "Parcel"  msgstr "Parcelle" -#: furnitures/forms_context_records.py:115 furnitures/forms_items.py:54 -#: furnitures/forms_items.py:189 furnitures/models.py:717 -#: furnitures/models.py:807 furnitures/models.py:884 +#: furnitures/forms_context_records.py:113 furnitures/forms_items.py:55 +#: furnitures/forms_items.py:192 furnitures/models.py:755 +#: furnitures/models.py:845 furnitures/models.py:922  #: templates/sheet_ope.html:125 templates/sheet_ope_modif.html:125  #: templates/sheet_operation.html:124  msgid "ID"  msgstr "Identifiant" -#: furnitures/forms_context_records.py:117 furnitures/forms_items.py:56 -#: furnitures/forms_items.py:132 furnitures/models.py:718 -#: furnitures/models.py:808 furnitures/models.py:885 furnitures/models.py:1108 +#: furnitures/forms_context_records.py:115 furnitures/forms_items.py:57 +#: furnitures/forms_items.py:135 furnitures/models.py:756 +#: furnitures/models.py:846 furnitures/models.py:923 furnitures/models.py:1146  #: templates/sheet_contextrecord.html:23  #: templates/sheet_contextrecord.html:107 templates/sheet_ope.html:128  #: templates/sheet_ope_modif.html:128 templates/sheet_ope_modif.html.py:154 @@ -290,283 +328,287 @@ msgstr "Identifiant"  msgid "Description"  msgstr "Description" -#: furnitures/forms_context_records.py:119 furnitures/models.py:719 -#: furnitures/models.py:1038 +#: furnitures/forms_context_records.py:117 furnitures/models.py:757 +#: furnitures/models.py:1076  msgid "Length"  msgstr "Longueur (cm)" -#: furnitures/forms_context_records.py:120 furnitures/models.py:720 -#: furnitures/models.py:1039 +#: furnitures/forms_context_records.py:118 furnitures/models.py:758 +#: furnitures/models.py:1077  msgid "Width"  msgstr "Largeur (cm)" -#: furnitures/forms_context_records.py:121 furnitures/models.py:721 +#: furnitures/forms_context_records.py:119 furnitures/models.py:759  msgid "Thickness"  msgstr "Épaisseur (cm)" -#: furnitures/forms_context_records.py:122 furnitures/models.py:722 +#: furnitures/forms_context_records.py:120 furnitures/models.py:760  msgid "Depth"  msgstr "Profondeur (cm)" -#: furnitures/forms_context_records.py:123 furnitures/models.py:727 +#: furnitures/forms_context_records.py:121 furnitures/models.py:765  msgid "Unit"  msgstr "Unité" -#: furnitures/forms_context_records.py:125 furnitures/forms_items.py:138 -#: furnitures/models.py:723 furnitures/models.py:1049 -#: furnitures/models.py:1111 +#: furnitures/forms_context_records.py:123 furnitures/forms_items.py:141 +#: furnitures/models.py:761 furnitures/models.py:1087 +#: furnitures/models.py:1149  msgid "Location"  msgstr "Lieu" -#: furnitures/forms_context_records.py:155 -#: furnitures/forms_context_records.py:171 furnitures/forms_items.py:67 -#: furnitures/models.py:668 furnitures/models.py:895 +#: furnitures/forms_context_records.py:153 +#: furnitures/forms_context_records.py:175 furnitures/forms_items.py:68 +#: furnitures/models.py:706 furnitures/models.py:933  msgid "Dating"  msgstr "Datation" -#: furnitures/forms_context_records.py:162 furnitures/forms_items.py:74 -#: furnitures/forms_items.py:143 furnitures/forms_operations.py:234 -#: furnitures/models.py:536 furnitures/models.py:636 furnitures/models.py:660 -#: furnitures/models.py:952 furnitures/models.py:1115 -#: furnitures/models.py:1151 templates/sheet_file.html:93 +#: furnitures/forms_context_records.py:160 furnitures/forms_items.py:75 +#: furnitures/forms_items.py:146 furnitures/forms_operations.py:237 +#: furnitures/models.py:574 furnitures/models.py:674 furnitures/models.py:698 +#: furnitures/models.py:990 furnitures/models.py:1153 +#: furnitures/models.py:1189 templates/sheet_file.html:93  msgid "Start date"  msgstr "Date de début" -#: furnitures/forms_context_records.py:163 furnitures/forms_items.py:76 -#: furnitures/forms_items.py:145 furnitures/models.py:637 -#: furnitures/models.py:661 furnitures/models.py:953 furnitures/models.py:1116 -#: furnitures/models.py:1152 templates/sheet_file.html:94 +#: furnitures/forms_context_records.py:161 furnitures/forms_items.py:77 +#: furnitures/forms_items.py:148 furnitures/models.py:675 +#: furnitures/models.py:699 furnitures/models.py:991 furnitures/models.py:1154 +#: furnitures/models.py:1190 templates/sheet_file.html:94  msgid "End date"  msgstr "Date de fin" -#: furnitures/forms_context_records.py:164 furnitures/forms_items.py:77 -#: furnitures/models.py:664 +#: furnitures/forms_context_records.py:162 furnitures/forms_items.py:78 +#: furnitures/models.py:702  msgid "Quality"  msgstr "Qualité" -#: furnitures/forms_context_records.py:166 furnitures/forms_items.py:79 -#: furnitures/models.py:650 furnitures/models.py:662 +#: furnitures/forms_context_records.py:164 furnitures/forms_items.py:80 +#: furnitures/models.py:688 furnitures/models.py:700  msgid "Dating type"  msgstr "Type de datation" -#: furnitures/forms_context_records.py:174 -#: furnitures/forms_context_records.py:181 furnitures/models.py:732 +#: furnitures/forms_context_records.py:178 +#: furnitures/forms_context_records.py:185 furnitures/models.py:770  #: templates/sheet_contextrecord.html:32  msgid "Interpretation"  msgstr "Interpretation" -#: furnitures/forms_context_records.py:177 +#: furnitures/forms_context_records.py:181  msgid "Has furniture?"  msgstr "A du matériel ?" -#: furnitures/forms_context_records.py:179 furnitures/models.py:731 +#: furnitures/forms_context_records.py:183 furnitures/models.py:769  msgid "Filling"  msgstr "Remplissage" -#: furnitures/forms_context_records.py:183 furnitures/models.py:747 +#: furnitures/forms_context_records.py:187 furnitures/models.py:785  msgid "Activity"  msgstr "Activité" -#: furnitures/forms_context_records.py:185 furnitures/models.py:745 +#: furnitures/forms_context_records.py:189 furnitures/models.py:783  msgid "Identification"  msgstr "Identification" -#: furnitures/forms_context_records.py:187 furnitures/models.py:734 +#: furnitures/forms_context_records.py:191 furnitures/models.py:772  msgid "TAQ"  msgstr "TAQ" -#: furnitures/forms_context_records.py:188 furnitures/models.py:737 +#: furnitures/forms_context_records.py:192 furnitures/models.py:775  msgid "Estimated TAQ"  msgstr "TAQ estimé" -#: furnitures/forms_context_records.py:190 furnitures/models.py:739 +#: furnitures/forms_context_records.py:194 furnitures/models.py:777  msgid "TPQ"  msgstr "TPQ" -#: furnitures/forms_context_records.py:191 furnitures/models.py:742 +#: furnitures/forms_context_records.py:195 furnitures/models.py:780  msgid "Estimated TPQ"  msgstr "TPQ estimé" -#: furnitures/forms_context_records.py:229 +#: furnitures/forms_context_records.py:236  msgid "Would you like to delete this context record?"  msgstr "Voulez vous supprimer cette Unité d'Enregistrement ?" -#: furnitures/forms_files.py:132 furnitures/forms_files.py:173 -#: furnitures/models.py:427 +#: furnitures/forms_files.py:129 furnitures/forms_files.py:174 +#: furnitures/models.py:464  msgid "File type"  msgstr "Type de dossier" -#: furnitures/forms_files.py:134 furnitures/forms_files.py:232 +#: furnitures/forms_files.py:131 furnitures/forms_files.py:233  msgid "Saisine type"  msgstr "Type de saisine" -#: furnitures/forms_files.py:139 +#: furnitures/forms_files.py:140  msgid "Archaeological file search"  msgstr "Recherche de dossiers archéologiques" -#: furnitures/forms_files.py:150 +#: furnitures/forms_files.py:151  msgid "You should select a file."  msgstr "Vous devez sélectionner un dossier archéologique." -#: furnitures/forms_files.py:167 furnitures/forms_files.py:185 -#: furnitures/models.py:424 +#: furnitures/forms_files.py:168 furnitures/forms_files.py:186 +#: furnitures/models.py:461  msgid "Numeric reference"  msgstr "Référence numérique" -#: furnitures/forms_files.py:169 furnitures/forms_files.py:187 -#: furnitures/models.py:425 +#: furnitures/forms_files.py:170 furnitures/forms_files.py:188 +#: furnitures/models.py:462  msgid "Internal reference"  msgstr "Référence interne" -#: furnitures/forms_files.py:171 furnitures/models.py:440 +#: furnitures/forms_files.py:172 furnitures/models.py:477  msgid "Creation date"  msgstr "Date de création" -#: furnitures/forms_files.py:175 furnitures/models.py:444 +#: furnitures/forms_files.py:176 furnitures/models.py:481  msgid "Related file"  msgstr "Dossier en relation avec" -#: furnitures/forms_files.py:195 furnitures/forms_operations.py:237 -#: furnitures/models.py:451 +#: furnitures/forms_files.py:196 furnitures/forms_operations.py:240 +#: furnitures/models.py:488  msgid "Total surface"  msgstr "Surface totale" -#: furnitures/forms_files.py:198 furnitures/models.py:454 +#: furnitures/forms_files.py:199 furnitures/models.py:492  msgid "Main address"  msgstr "Adresse principale" -#: furnitures/forms_files.py:199 furnitures/models.py:455 +#: furnitures/forms_files.py:200 furnitures/models.py:493  msgid "Main address - complement"  msgstr "Adresse principale - complément" -#: furnitures/forms_files.py:201 furnitures/models.py:457 +#: furnitures/forms_files.py:202 furnitures/models.py:495  msgid "Main address - postal code"  msgstr "Adresse principale - code postal" -#: furnitures/forms_files.py:205 +#: furnitures/forms_files.py:206  msgid "Preventive informations"  msgstr "Information archéologie préventive" -#: furnitures/forms_files.py:210 furnitures/models.py:431 +#: furnitures/forms_files.py:211 furnitures/models.py:468  msgid "General contractor"  msgstr "Aménageur" -#: furnitures/forms_files.py:217 furnitures/models.py:433 +#: furnitures/forms_files.py:218 furnitures/models.py:470  msgid "Town planning service"  msgstr "Service instructeur" -#: furnitures/forms_files.py:223 furnitures/models.py:409 -#: furnitures/models.py:434 +#: furnitures/forms_files.py:224 furnitures/models.py:446 +#: furnitures/models.py:471  msgid "Permit type"  msgstr "Type de permis" -#: furnitures/forms_files.py:225 furnitures/models.py:436 +#: furnitures/forms_files.py:226 furnitures/models.py:473  msgid "Permit reference"  msgstr "Référence du permis" -#: furnitures/forms_files.py:228 furnitures/models.py:452 +#: furnitures/forms_files.py:229 furnitures/models.py:490  msgid "Total developed surface"  msgstr "Surface totale aménagée" -#: furnitures/forms_files.py:234 furnitures/models.py:442 +#: furnitures/forms_files.py:235 furnitures/models.py:479  msgid "Reception date"  msgstr "Date de réception" -#: furnitures/forms_files.py:280 templates/sheet_file.html:86 +#: furnitures/forms_files.py:285 templates/sheet_file.html:86  msgid "Associated operations"  msgstr "Opérations associées" -#: furnitures/forms_files.py:299 +#: furnitures/forms_files.py:304  msgid "Would you like to delete this archaelogical file ?"  msgstr "Voulez vous supprimer ce dossier archéologique ?" -#: furnitures/forms_files.py:327 furnitures/forms_files.py:338 -#: furnitures/forms_operations.py:536 furnitures/forms_operations.py:560 -#: furnitures/models.py:995 furnitures/models.py:1003 +#: furnitures/forms_files.py:329 furnitures/forms_files.py:346 +#: furnitures/forms_operations.py:541 furnitures/forms_operations.py:571 +#: furnitures/models.py:1033 furnitures/models.py:1041  msgid "Act type"  msgstr "Type d'acte" -#: furnitures/forms_items.py:51 furnitures/forms_items.py:103 -#: furnitures/menus.py:193 furnitures/models.py:899 furnitures/models.py:1147 +#: furnitures/forms_items.py:52 furnitures/menus.py:193 +#: furnitures/models.py:937 furnitures/models.py:1185  msgid "Item"  msgstr "Mobilier" -#: furnitures/forms_items.py:58 furnitures/forms_items.py:100 -#: furnitures/models.py:811 +#: furnitures/forms_items.py:59 furnitures/forms_items.py:103 +#: furnitures/models.py:849  msgid "Is isolated?"  msgstr "Est isolé ?" -#: furnitures/forms_items.py:60 furnitures/forms_items.py:99 -#: furnitures/forms_items.py:193 furnitures/models.py:803 -#: furnitures/models.py:887 templates/sheet_contextrecord.html:104 +#: furnitures/forms_items.py:61 furnitures/forms_items.py:102 +#: furnitures/forms_items.py:196 furnitures/models.py:841 +#: furnitures/models.py:925 templates/sheet_contextrecord.html:104  #: templates/sheet_operation.html:153  msgid "Material type"  msgstr "Type de matériau" -#: furnitures/forms_items.py:62 furnitures/forms_items.py:195 -#: furnitures/models.py:888 furnitures/models.py:1041 +#: furnitures/forms_items.py:63 furnitures/forms_items.py:198 +#: furnitures/models.py:926 furnitures/models.py:1079  msgid "Volume"  msgstr "Volume" -#: furnitures/forms_items.py:63 furnitures/forms_items.py:196 -#: furnitures/models.py:889 templates/sheet_contextrecord.html:108 +#: furnitures/forms_items.py:64 furnitures/forms_items.py:199 +#: furnitures/models.py:927 templates/sheet_contextrecord.html:108  #: templates/sheet_ope_modif.html:155 templates/sheet_operation.html:157  msgid "Weight"  msgstr "Poids" -#: furnitures/forms_items.py:64 furnitures/forms_items.py:197 -#: furnitures/models.py:890 +#: furnitures/forms_items.py:65 furnitures/forms_items.py:200 +#: furnitures/models.py:928  msgid "Item number"  msgstr "Nombre d'artefacts" -#: furnitures/forms_items.py:126 +#: furnitures/forms_items.py:106 +msgid "Item search" +msgstr "Recherche de mobilier" + +#: furnitures/forms_items.py:129  msgid "Base treatment"  msgstr "Traitement de base" -#: furnitures/forms_items.py:130 furnitures/models.py:1102 -#: furnitures/models.py:1110 +#: furnitures/forms_items.py:133 furnitures/models.py:1140 +#: furnitures/models.py:1148  msgid "Treatment type"  msgstr "Type de traitement" -#: furnitures/forms_items.py:149 +#: furnitures/forms_items.py:152  msgid "Upstream items"  msgstr "Mobilier amont" -#: furnitures/forms_items.py:157 furnitures/models.py:1056 -#: furnitures/models.py:1106 +#: furnitures/forms_items.py:160 furnitures/models.py:1094 +#: furnitures/models.py:1144  msgid "Container"  msgstr "Contenant" -#: furnitures/forms_items.py:159 furnitures/models.py:1042 -#: furnitures/models.py:1052 templates/sheet_file.html:69 +#: furnitures/forms_items.py:162 furnitures/models.py:1080 +#: furnitures/models.py:1090 templates/sheet_file.html:69  #: templates/sheet_file.html.py:89 templates/sheet_file.html:117  #: templates/sheet_ope.html:84 templates/sheet_ope_modif.html:84  #: templates/sheet_operation.html:84  msgid "Reference"  msgstr "Référence" -#: furnitures/forms_items.py:160 furnitures/models.py:1045 -#: furnitures/models.py:1051 +#: furnitures/forms_items.py:163 furnitures/models.py:1083 +#: furnitures/models.py:1089  msgid "Container type"  msgstr "Type de contenant" -#: furnitures/forms_items.py:187 +#: furnitures/forms_items.py:190  msgid "Resulting item"  msgstr "Mobilier résultant" -#: furnitures/forms_items.py:191 +#: furnitures/forms_items.py:194  msgid "Precise description"  msgstr "Description précise" -#: furnitures/forms_items.py:201 +#: furnitures/forms_items.py:204  msgid "Resulting items"  msgstr "Mobiliers résultants" -#: furnitures/forms_items.py:204 +#: furnitures/forms_items.py:207  msgid "Upstream item"  msgstr "Mobilier amont" -#: furnitures/forms_operations.py:184 +#: furnitures/forms_operations.py:185  msgid ""  "Warning: No Archaelogical File is provided. If you have forget it return to "  "the first step." @@ -574,36 +616,36 @@ 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." -#: furnitures/forms_operations.py:194 furnitures/forms_operations.py:232 -#: furnitures/models.py:516 furnitures/models.py:545 +#: furnitures/forms_operations.py:192 furnitures/forms_operations.py:235 +#: furnitures/models.py:554 furnitures/models.py:583  msgid "Operation type"  msgstr "Type d'opération" -#: furnitures/forms_operations.py:196 furnitures/models.py:547 +#: furnitures/forms_operations.py:194 furnitures/models.py:585  msgid "Remains"  msgstr "Vestiges" -#: furnitures/forms_operations.py:201 +#: furnitures/forms_operations.py:204  msgid "Operation search"  msgstr "Recherche d'opérations" -#: furnitures/forms_operations.py:212 +#: furnitures/forms_operations.py:215  msgid "You should select an operation."  msgstr "Vous devez sélectionner une opération." -#: furnitures/forms_operations.py:221 furnitures/models.py:1005 +#: furnitures/forms_operations.py:224 furnitures/models.py:1043  msgid "Person in charge of the operation"  msgstr "Responsable d'opération" -#: furnitures/forms_operations.py:248 +#: furnitures/forms_operations.py:256  msgid "References"  msgstr "Référence" -#: furnitures/forms_operations.py:255 furnitures/models.py:541 +#: furnitures/forms_operations.py:263 furnitures/models.py:579  msgid "Operation code"  msgstr "Code de l'opération" -#: furnitures/forms_operations.py:272 +#: furnitures/forms_operations.py:280  #, python-format  msgid ""  "Operation code already exist for year: %(year)d - use a value bigger than " @@ -612,79 +654,79 @@ msgstr ""  "Ce code d'opération existe déjà pour l'année %(year)d - utilisez une valeur "  "plus grande que %(last_val)d" -#: furnitures/forms_operations.py:278 +#: furnitures/forms_operations.py:286  msgid "Preventive informations - excavation"  msgstr "Information archéologie préventive - fouille" -#: furnitures/forms_operations.py:279 furnitures/models.py:549 +#: furnitures/forms_operations.py:287 furnitures/models.py:587  msgid "Cost"  msgstr "Coût" -#: furnitures/forms_operations.py:287 +#: furnitures/forms_operations.py:295  msgid "Preventive informations - diagnostic"  msgstr "Information archéologie préventive - diagnostic" -#: furnitures/forms_operations.py:290 furnitures/models.py:560 +#: furnitures/forms_operations.py:298 furnitures/models.py:598  msgid "Prescription on zoning"  msgstr "Prescription sur zonage" -#: furnitures/forms_operations.py:292 furnitures/models.py:562 +#: furnitures/forms_operations.py:300 furnitures/models.py:600  msgid "Prescription on large area"  msgstr "Prescription sur une vaste surface" -#: furnitures/forms_operations.py:294 furnitures/models.py:564 +#: furnitures/forms_operations.py:302 furnitures/models.py:602  msgid "Prescription on geoarchaeological context"  msgstr "Prescription sur un contexte géoarchéologique" -#: furnitures/forms_operations.py:353 furnitures/forms_operations.py:365 -#: furnitures/models.py:531 +#: furnitures/forms_operations.py:361 furnitures/forms_operations.py:373 +#: furnitures/models.py:569  msgid "Remain types"  msgstr "Types de vestige" -#: furnitures/forms_operations.py:355 furnitures/models.py:530 +#: furnitures/forms_operations.py:363 furnitures/models.py:568  msgid "Remain type"  msgstr "Type de vestige" -#: furnitures/forms_operations.py:368 furnitures/forms_operations.py:380 -#: furnitures/models.py:550 templates/sheet_contextrecord.html:106 +#: furnitures/forms_operations.py:376 furnitures/forms_operations.py:388 +#: furnitures/models.py:588 templates/sheet_contextrecord.html:106  #: templates/sheet_ope_modif.html:153 templates/sheet_operation.html:155  msgid "Periods"  msgstr "Périodes" -#: furnitures/forms_operations.py:460 furnitures/forms_operations.py:461 -#: furnitures/models.py:537 +#: furnitures/forms_operations.py:468 furnitures/forms_operations.py:469 +#: furnitures/models.py:575  msgid "Closing date"  msgstr "Date de clotûre" -#: furnitures/forms_operations.py:471 +#: furnitures/forms_operations.py:479  msgid "Would you like to close this operation?"  msgstr "Voulez vous clôturer cette opération ?" -#: furnitures/forms_operations.py:484 +#: furnitures/forms_operations.py:492  msgid "Would you like to delete this operation?"  msgstr "Voulez vous supprimer cette opération ?" -#: furnitures/forms_operations.py:540 +#: furnitures/forms_operations.py:551  msgid "Administrative act search"  msgstr "Recherche d'actes administratifs" -#: furnitures/forms_operations.py:552 +#: furnitures/forms_operations.py:563  msgid "You should select an administrative act."  msgstr "Vous devez sélectionner un acte administratif." -#: furnitures/forms_operations.py:562 furnitures/models.py:1011 +#: furnitures/forms_operations.py:572 furnitures/models.py:1049  msgid "Signatory"  msgstr "Signataire" -#: furnitures/forms_operations.py:566 furnitures/models.py:1017 +#: furnitures/forms_operations.py:576 furnitures/models.py:1055  msgid "Object"  msgstr "Objet" -#: furnitures/forms_operations.py:568 furnitures/models.py:1016 +#: furnitures/forms_operations.py:578 furnitures/models.py:1054  msgid "Signature date"  msgstr "Date de signature" -#: furnitures/forms_operations.py:588 +#: furnitures/forms_operations.py:605  msgid "Would you like to delete this administrative act?"  msgstr "Voulez vous supprimer cet acte administratif ?" @@ -708,7 +750,7 @@ msgid "Account management"  msgstr "Gestion des comptes"  #: furnitures/menus.py:104 furnitures/menus.py:134 furnitures/menus.py:176 -#: furnitures/menus.py:195 furnitures/widgets.py:219 +#: furnitures/menus.py:195 furnitures/widgets.py:223  msgid "Search"  msgstr "Recherche" @@ -717,13 +759,13 @@ msgstr "Recherche"  msgid "Deletion"  msgstr "Suppression" -#: furnitures/menus.py:116 furnitures/menus.py:155 furnitures/models.py:1023 -#: furnitures/models.py:1149 +#: furnitures/menus.py:116 furnitures/menus.py:155 furnitures/models.py:1061 +#: furnitures/models.py:1187  msgid "Administrative act"  msgstr "Acte administratif" -#: furnitures/menus.py:119 furnitures/menus.py:158 furnitures/widgets.py:181 -#: furnitures/widgets.py:252 templates/window.html:33 +#: furnitures/menus.py:119 furnitures/menus.py:158 furnitures/widgets.py:256 +#: templates/window.html:37  msgid "Add"  msgstr "Ajout" @@ -740,7 +782,7 @@ msgstr "Unité d'Enregistrement"  msgid "Add a treatment"  msgstr "Ajouter un traitement" -#: furnitures/menus.py:212 furnitures/models.py:976 +#: furnitures/menus.py:212 furnitures/models.py:1014  msgid "Warehouse"  msgstr "Dépôt" @@ -768,15 +810,15 @@ msgstr "Tableau de bord"  msgid "Files"  msgstr "Dossiers" -#: furnitures/menus.py:232 furnitures/models.py:570 +#: furnitures/menus.py:232 furnitures/models.py:608  msgid "Operations"  msgstr "Opérations" -#: furnitures/menus.py:235 furnitures/models.py:1121 +#: furnitures/menus.py:235 furnitures/models.py:1159  msgid "Treatments"  msgstr "Traitements" -#: furnitures/menus.py:238 furnitures/models.py:977 +#: furnitures/menus.py:238 furnitures/models.py:1015  msgid "Warehouses"  msgstr "Dépôts" @@ -788,7 +830,7 @@ msgstr "Élément invalide."  msgid "This item already exist."  msgstr "Cet élément existe déjà." -#: furnitures/models.py:128 furnitures/models.py:286 +#: furnitures/models.py:128 furnitures/models.py:323  msgid "Label"  msgstr "Libellé" @@ -800,35 +842,31 @@ msgstr "Identifiant textuel"  msgid "Available"  msgstr "Disponible" -#: furnitures/models.py:188 +#: furnitures/models.py:225  msgid "Last modifier"  msgstr "Dernier modifieur" -#: furnitures/models.py:287 +#: furnitures/models.py:324  msgid "Number"  msgstr "Nombre" -#: furnitures/models.py:290 +#: furnitures/models.py:327  msgid "Departement"  msgstr "Département" -#: furnitures/models.py:291 +#: furnitures/models.py:328  msgid "Departements"  msgstr "Départements" -#: furnitures/models.py:307 +#: furnitures/models.py:344  msgid "Mobile phone"  msgstr "Téléphone portable" -#: furnitures/models.py:316 -msgid "Organization type" -msgstr "Type d'organisation" - -#: furnitures/models.py:317 +#: furnitures/models.py:354  msgid "Organization types"  msgstr "Types d'organisation" -#: furnitures/models.py:322 furnitures/models.py:352 furnitures/models.py:788 +#: furnitures/models.py:359 furnitures/models.py:389 furnitures/models.py:826  #: templates/sheet_contextrecord.html:84 templates/sheet_file.html:70  #: templates/sheet_file.html.py:91 templates/sheet_file.html:118  #: templates/sheet_ope.html:85 templates/sheet_ope.html.py:105 @@ -839,236 +877,236 @@ msgstr "Types d'organisation"  msgid "Type"  msgstr "Type" -#: furnitures/models.py:325 +#: furnitures/models.py:362  msgid "Organization"  msgstr "Organisation" -#: furnitures/models.py:326 +#: furnitures/models.py:363  msgid "Organizations"  msgstr "Organisations" -#: furnitures/models.py:328 +#: furnitures/models.py:365  msgid "Can view own Organization"  msgstr "Peut voir sa propre Organisation" -#: furnitures/models.py:329 +#: furnitures/models.py:366  msgid "Can add own Organization"  msgstr "Peut ajouter sa propre Organisation" -#: furnitures/models.py:330 +#: furnitures/models.py:367  msgid "Can change own Organization"  msgstr "Peut changer sa propre Organisation" -#: furnitures/models.py:331 +#: furnitures/models.py:368  msgid "Can delete own Organization"  msgstr "Peut supprimer sa propre Organisation" -#: furnitures/models.py:340 +#: furnitures/models.py:377  msgid "Person types"  msgstr "Types d'individu" -#: furnitures/models.py:343 +#: furnitures/models.py:380  msgid "Mr"  msgstr "M" -#: furnitures/models.py:344 +#: furnitures/models.py:381  msgid "Miss"  msgstr "Mlle" -#: furnitures/models.py:345 +#: furnitures/models.py:382  msgid "Mrs"  msgstr "Mme" -#: furnitures/models.py:346 +#: furnitures/models.py:383  msgid "Doctor"  msgstr "Dr" -#: furnitures/models.py:354 +#: furnitures/models.py:391  msgid "Is attached to"  msgstr "Est rattaché à" -#: furnitures/models.py:362 +#: furnitures/models.py:399  msgid "Persons"  msgstr "Individus" -#: furnitures/models.py:364 +#: furnitures/models.py:401  msgid "Can view Person"  msgstr "Peut voir les Personnes" -#: furnitures/models.py:365 +#: furnitures/models.py:402  msgid "Can view own Person"  msgstr "Peut voir sa propre Personne" -#: furnitures/models.py:366 +#: furnitures/models.py:403  msgid "Can add own Person"  msgstr "Peut ajouter sa propre Personne" -#: furnitures/models.py:367 +#: furnitures/models.py:404  msgid "Can change own Person"  msgstr "Peut changer sa propre Personne" -#: furnitures/models.py:368 +#: furnitures/models.py:405  msgid "Can delete own Person"  msgstr "Peut supprimer sa propre Personne" -#: furnitures/models.py:389 +#: furnitures/models.py:426  msgid "Ishtar user"  msgstr "Utilisateur d'Ishtar" -#: furnitures/models.py:390 +#: furnitures/models.py:427  msgid "Ishtar users"  msgstr "Utilisateurs d'Ishtar" -#: furnitures/models.py:395 +#: furnitures/models.py:432  msgid "Archaeological file type"  msgstr "Type de dossier archéologique" -#: furnitures/models.py:396 +#: furnitures/models.py:433  msgid "Archaeological file types"  msgstr "Types de dossier archéologique" -#: furnitures/models.py:410 +#: furnitures/models.py:447  msgid "Permit types"  msgstr "Types de permis" -#: furnitures/models.py:414 +#: furnitures/models.py:451  msgid "Delay (in days)"  msgstr "Delai (en jours)" -#: furnitures/models.py:438 +#: furnitures/models.py:475  msgid "Is active?"  msgstr "Est actif ?" -#: furnitures/models.py:449 +#: furnitures/models.py:486  msgid "Reference number"  msgstr "Référence" -#: furnitures/models.py:463 +#: furnitures/models.py:501  msgid "Archaeological file"  msgstr "Dossier archéologique" -#: furnitures/models.py:464 +#: furnitures/models.py:502  msgid "Archaeological files"  msgstr "Dossiers archéologiques" -#: furnitures/models.py:466 +#: furnitures/models.py:504  msgid "Can view own Archaelogical file"  msgstr "Peut voir son propre Dossier archéologique" -#: furnitures/models.py:467 +#: furnitures/models.py:505  msgid "Can add own Archaelogical file"  msgstr "Peut ajouter son propre Dossier archéologique" -#: furnitures/models.py:468 +#: furnitures/models.py:506  msgid "Can change own Archaelogical file"  msgstr "Peut changer son propre Dossier archéologique" -#: furnitures/models.py:469 +#: furnitures/models.py:507  msgid "Can delete own Archaelogical file"  msgstr "Peut supprimer son propre Dossier archéologique" -#: furnitures/models.py:474 furnitures/models.py:579 +#: furnitures/models.py:512 furnitures/models.py:617  msgid "Intercommunal"  msgstr "Intercommunal" -#: furnitures/models.py:517 +#: furnitures/models.py:555  msgid "Operation types"  msgstr "Types d'opération" -#: furnitures/models.py:539 templates/sheet_file.html:92 +#: furnitures/models.py:577 templates/sheet_file.html:92  msgid "In charge"  msgstr "Responsable" -#: furnitures/models.py:543 furnitures/models.py:608 +#: furnitures/models.py:581 furnitures/models.py:646  msgid "File"  msgstr "Dossier" -#: furnitures/models.py:546 +#: furnitures/models.py:584  msgid "Surface (m²)"  msgstr "Area (m²)" -#: furnitures/models.py:572 +#: furnitures/models.py:610  msgid "Can view own Operation"  msgstr "Peut voir sa propre Opération" -#: furnitures/models.py:573 +#: furnitures/models.py:611  msgid "Can add own Operation"  msgstr "Peut ajouter sa propre Opération" -#: furnitures/models.py:574 +#: furnitures/models.py:612  msgid "Can change own Operation"  msgstr "Peut changer sa propre Opération" -#: furnitures/models.py:575 +#: furnitures/models.py:613  msgid "Can delete own Operation"  msgstr "Peut supprimer sa propre Opération" -#: furnitures/models.py:635 furnitures/models.py:679 furnitures/models.py:691 -#: furnitures/models.py:701 furnitures/models.py:883 +#: furnitures/models.py:673 furnitures/models.py:717 furnitures/models.py:729 +#: furnitures/models.py:739 furnitures/models.py:921  msgid "Order"  msgstr "Ordre" -#: furnitures/models.py:638 +#: furnitures/models.py:676  msgid "Parent period"  msgstr "Période parente" -#: furnitures/models.py:642 +#: furnitures/models.py:680  msgid "Type Period"  msgstr "Type de période" -#: furnitures/models.py:643 +#: furnitures/models.py:681  msgid "Types Period"  msgstr "Types de période" -#: furnitures/models.py:651 +#: furnitures/models.py:689  msgid "Dating types"  msgstr "Types de datation" -#: furnitures/models.py:655 +#: furnitures/models.py:693  msgid "Dating quality"  msgstr "Qualité de datation" -#: furnitures/models.py:656 +#: furnitures/models.py:694  msgid "Dating qualities"  msgstr "Qualités de datation" -#: furnitures/models.py:669 +#: furnitures/models.py:707  msgid "Datings"  msgstr "Datations" -#: furnitures/models.py:680 +#: furnitures/models.py:718  msgid "Parent unit"  msgstr "Unité parente" -#: furnitures/models.py:684 +#: furnitures/models.py:722  msgid "Type Unit"  msgstr "Type d'unité" -#: furnitures/models.py:685 +#: furnitures/models.py:723  msgid "Types Unit"  msgstr "Types d'unité" -#: furnitures/models.py:694 +#: furnitures/models.py:732  msgid "Type Activity"  msgstr "Type d'activité" -#: furnitures/models.py:695 +#: furnitures/models.py:733  msgid "Types Activity"  msgstr "Types d'activités" -#: furnitures/models.py:703 +#: furnitures/models.py:741  msgid "Type Identification"  msgstr "Type d'identification" -#: furnitures/models.py:704 +#: furnitures/models.py:742  msgid "Types Identification"  msgstr "Types d'identification" -#: furnitures/models.py:725 +#: furnitures/models.py:763  msgid "A short description of the location of the context record"  msgstr "Une courte description de la situation de l'Unité d'Enregistrement" -#: furnitures/models.py:735 +#: furnitures/models.py:773  msgid ""  "\"Terminus Ante Quem\" the context record can't have been created after this "  "date" @@ -1076,11 +1114,11 @@ msgstr ""  "« Terminus Ante Quem » l'Unité d'Enregistrement ne peut avoir été crée après "  "cette date" -#: furnitures/models.py:738 +#: furnitures/models.py:776  msgid "Estimation of a \"Terminus Ante Quem\""  msgstr "Estimation d'un « Terminus Ante Quem »" -#: furnitures/models.py:740 +#: furnitures/models.py:778  msgid ""  "\"Terminus Post Quem\" the context record can't have been  created before "  "this date" @@ -1088,201 +1126,201 @@ msgstr ""  "« Terminus Post Quem » l'Unité d'Enregistrement ne peut avoir été crée avant "  "cette date" -#: furnitures/models.py:743 +#: furnitures/models.py:781  msgid "Estimation of a \"Terminus Post Quem\""  msgstr "Estimation d'un « Terminus Post Quem »" -#: furnitures/models.py:751 furnitures/models.py:752 furnitures/models.py:810 +#: furnitures/models.py:789 furnitures/models.py:790 furnitures/models.py:848  #: templates/sheet_contextrecord.html:6  msgid "Context Record"  msgstr "Unité d'Enregistrement" -#: furnitures/models.py:754 +#: furnitures/models.py:792  msgid "Can view own Context Record"  msgstr "Peut voir sa propre Unité d'Enregistrement" -#: furnitures/models.py:755 +#: furnitures/models.py:793  msgid "Can add own Context Record"  msgstr "Peut ajouter sa propre Unité d'Enregistrement" -#: furnitures/models.py:756 +#: furnitures/models.py:794  msgid "Can change own Context Record"  msgstr "Peut changer sa propre Unité d'Enregistrement" -#: furnitures/models.py:757 +#: furnitures/models.py:795  msgid "Can delete own Context Record"  msgstr "Peut supprimer sa propre Unité d'Enregistrement" -#: furnitures/models.py:783 +#: furnitures/models.py:821  msgid "Source type"  msgstr "Type de source" -#: furnitures/models.py:784 +#: furnitures/models.py:822  msgid "Source types"  msgstr "Types de source" -#: furnitures/models.py:791 furnitures/models.py:1136 +#: furnitures/models.py:829 furnitures/models.py:1174  msgid "Source"  msgstr "Source" -#: furnitures/models.py:792 +#: furnitures/models.py:830  msgid "Sources"  msgstr "Sources" -#: furnitures/models.py:798 +#: furnitures/models.py:836  msgid "Recommendation"  msgstr "Recommendation" -#: furnitures/models.py:800 +#: furnitures/models.py:838  msgid "Parent material"  msgstr "Matériau parent" -#: furnitures/models.py:804 +#: furnitures/models.py:842  msgid "Material types"  msgstr "Types de matériaux" -#: furnitures/models.py:819 furnitures/models.py:881 +#: furnitures/models.py:857 furnitures/models.py:919  msgid "Base item"  msgstr "Mobilier de base" -#: furnitures/models.py:820 +#: furnitures/models.py:858  msgid "Base items"  msgstr "Mobiliers de base" -#: furnitures/models.py:822 +#: furnitures/models.py:860  msgid "Can view own Base item"  msgstr "Peut voir son propre Mobilier de base" -#: furnitures/models.py:823 +#: furnitures/models.py:861  msgid "Can add own Base item"  msgstr "Peut ajouter son propre Mobilier de base" -#: furnitures/models.py:824 +#: furnitures/models.py:862  msgid "Can change own Base item"  msgstr "Peut changer son propre Mobilier de base" -#: furnitures/models.py:825 +#: furnitures/models.py:863  msgid "Can delete own Base item"  msgstr "Peut supprimer son propre Mobilier de base" -#: furnitures/models.py:841 +#: furnitures/models.py:879  msgid ":"  msgstr ": " -#: furnitures/models.py:892 +#: furnitures/models.py:930  msgid "Upstream treatment"  msgstr "Traitement amont" -#: furnitures/models.py:894 +#: furnitures/models.py:932  msgid "Downstream treatment"  msgstr "Traitement aval" -#: furnitures/models.py:900 +#: furnitures/models.py:938  msgid "Items"  msgstr "Mobiliers" -#: furnitures/models.py:902 +#: furnitures/models.py:940  msgid "Can view own Item"  msgstr "Peut voir son propre Mobilier" -#: furnitures/models.py:903 +#: furnitures/models.py:941  msgid "Can add own Item"  msgstr "Peut ajouter son propre Mobilier" -#: furnitures/models.py:904 +#: furnitures/models.py:942  msgid "Can change own Item"  msgstr "Peut changer son propre Mobilier" -#: furnitures/models.py:905 +#: furnitures/models.py:943  msgid "Can delete own Item"  msgstr "Peut supprimer son propre Mobilier" -#: furnitures/models.py:950 templates/sheet_ope.html:64 +#: furnitures/models.py:988 templates/sheet_ope.html:64  #: templates/sheet_ope_modif.html:64  msgid "Owner"  msgstr "Propriétaire" -#: furnitures/models.py:956 +#: furnitures/models.py:994  msgid "Parcel owner"  msgstr "Propriétaire de parcelle" -#: furnitures/models.py:957 +#: furnitures/models.py:995  msgid "Parcel owners"  msgstr "Propriétaires de parcelle" -#: furnitures/models.py:965 +#: furnitures/models.py:1003  msgid "Warehouse types"  msgstr "Types de dépôts" -#: furnitures/models.py:979 +#: furnitures/models.py:1017  msgid "Can view own Warehouse"  msgstr "Peut voir son propre Dépôt" -#: furnitures/models.py:980 +#: furnitures/models.py:1018  msgid "Can add own Warehouse"  msgstr "Peut ajouter son propre Dépôt" -#: furnitures/models.py:981 +#: furnitures/models.py:1019  msgid "Can change own Warehouse"  msgstr "Peut changer son propre Dépôt" -#: furnitures/models.py:982 +#: furnitures/models.py:1020  msgid "Can delete own Warehouse"  msgstr "Peut supprimer son propre Dépôt" -#: furnitures/models.py:992 +#: furnitures/models.py:1030  msgid "Intended to"  msgstr "Destiné à" -#: furnitures/models.py:996 +#: furnitures/models.py:1034  msgid "Act types"  msgstr "Types d'acte" -#: furnitures/models.py:1007 +#: furnitures/models.py:1045  msgid "Archaeological preventive operator"  msgstr "Opérateur d'archéologie préventive" -#: furnitures/models.py:1009 +#: furnitures/models.py:1047  msgid "Person in charge of the scientific part"  msgstr "Responsable scientifique" -#: furnitures/models.py:1024 +#: furnitures/models.py:1062  msgid "Administrative acts"  msgstr "Actes administratifs" -#: furnitures/models.py:1026 +#: furnitures/models.py:1064  msgid "Can view own Administrative act"  msgstr "Peut voir son propre Acte administratif" -#: furnitures/models.py:1027 +#: furnitures/models.py:1065  msgid "Can add own Administrative act"  msgstr "Peut ajouter son propre Acte administratif" -#: furnitures/models.py:1028 +#: furnitures/models.py:1066  msgid "Can change own Administrative act"  msgstr "Peut changer son propre Acte administratif" -#: furnitures/models.py:1029 +#: furnitures/models.py:1067  msgid "Can delete own Administrative act"  msgstr "Peut supprimer son propre Acte administratif" -#: furnitures/models.py:1040 +#: furnitures/models.py:1078  msgid "Height"  msgstr "Hauteur" -#: furnitures/models.py:1046 +#: furnitures/models.py:1084  msgid "Container types"  msgstr "Types de contenant" -#: furnitures/models.py:1057 +#: furnitures/models.py:1095  msgid "Containers"  msgstr "Contenants" -#: furnitures/models.py:1076 +#: furnitures/models.py:1114  msgid "Surface"  msgstr "Surface" -#: furnitures/models.py:1077 templates/sheet_contextrecord.html:72 +#: furnitures/models.py:1115 templates/sheet_contextrecord.html:72  #: templates/sheet_contextrecord.html:86 templates/sheet_file.html:43  #: templates/sheet_ope.html:46 templates/sheet_ope.html.py:107  #: templates/sheet_ope_modif.html:46 templates/sheet_ope_modif.html.py:107 @@ -1290,57 +1328,57 @@ msgstr "Surface"  msgid "Localisation"  msgstr "Localisation" -#: furnitures/models.py:1100 +#: furnitures/models.py:1138  msgid "Virtual"  msgstr "Virtuel" -#: furnitures/models.py:1103 +#: furnitures/models.py:1141  msgid "Treatment types"  msgstr "Types de traitements" -#: furnitures/models.py:1120 +#: furnitures/models.py:1158  msgid "Treatment"  msgstr "Traitement" -#: furnitures/models.py:1123 +#: furnitures/models.py:1161  msgid "Can view own Treatment"  msgstr "Peut voir son propre Traitement" -#: furnitures/models.py:1124 +#: furnitures/models.py:1162  msgid "Can add own Treatment"  msgstr "Peut ajouter son propre Traitement" -#: furnitures/models.py:1125 +#: furnitures/models.py:1163  msgid "Can change own Treatment"  msgstr "Peut changer son propre Traitement" -#: furnitures/models.py:1126 +#: furnitures/models.py:1164  msgid "Can delete own Treatment"  msgstr "Peut supprimer son propre traitement" -#: furnitures/models.py:1131 furnitures/models.py:1137 +#: furnitures/models.py:1169 furnitures/models.py:1175  msgid "Author type"  msgstr "Type d'auteur" -#: furnitures/models.py:1132 +#: furnitures/models.py:1170  msgid "Author types"  msgstr "Types d'auteur" -#: furnitures/models.py:1140 +#: furnitures/models.py:1178  msgid "Author"  msgstr "Auteur" -#: furnitures/models.py:1141 templates/sheet_contextrecord.html:85 +#: furnitures/models.py:1179 templates/sheet_contextrecord.html:85  #: templates/sheet_ope.html:106 templates/sheet_ope_modif.html:106  #: templates/sheet_operation.html:106  msgid "Authors"  msgstr "Auteurs" -#: furnitures/models.py:1155 +#: furnitures/models.py:1193  msgid "Property"  msgstr "Propriété" -#: furnitures/models.py:1156 +#: furnitures/models.py:1194  msgid "Properties"  msgstr "Propriétés" @@ -1359,35 +1397,36 @@ msgstr "Non"  msgid "Details"  msgstr "Détails" -#: furnitures/views.py:511 furnitures/views.py:541 +#: furnitures/views.py:511 furnitures/views.py:544  msgid "Operation not permitted."  msgstr "Opération non permise"  #: furnitures/views.py:514 -msgid "New " -msgstr "Nouveau " +#, python-format +msgid "New %s" +msgstr "Nouveau %s" -#: furnitures/widgets.py:38 +#: furnitures/widgets.py:39  msgid "Delete"  msgstr "Supprimer" -#: furnitures/widgets.py:219 +#: furnitures/widgets.py:223  msgid "Search and select an item"  msgstr "Rechercher puis sélectionner un élément" -#: furnitures/widgets.py:246 +#: furnitures/widgets.py:250  msgid "Export as CSV"  msgstr "Export en CSV" -#: furnitures/widgets.py:257 +#: furnitures/widgets.py:261  msgid "No results"  msgstr "Pas de résultats" -#: furnitures/widgets.py:257 +#: furnitures/widgets.py:261  msgid "Loading..."  msgstr "Chargement..." -#: furnitures/widgets.py:258 +#: furnitures/widgets.py:262  msgid "Remove"  msgstr "Enlever" @@ -1422,12 +1461,17 @@ msgid "Would you like to save them?"  msgstr "Voulez vous sauver ces informations ?"  #: templates/confirm_wizard.html:30 templates/default_wizard.html:17 -#: templates/default_wizard.html.py:33 templates/search.html:13 +#: templates/default_wizard.html.py:49 templates/search.html:13  #: templates/towns_wizard.html:18 templates/towns_wizard.html.py:37  msgid "Validate"  msgstr "Valider" -#: templates/default_wizard.html:24 templates/search.html:20 +#: templates/default_wizard.html:26 templates/default_wizard.html.py:40 +#: templates/grid_form.html:6 +msgid "Help" +msgstr "Aide" + +#: templates/default_wizard.html:32 templates/search.html:20  #: templates/towns_wizard.html:25  msgid "Add/Modify"  msgstr "Ajouter-Modifier" @@ -2045,15 +2089,3 @@ msgid "You are now registered. Activation email sent."  msgstr ""  "Vous être maintenant enregistré. Un courriel d'activation de votre compte "  "vous a été envoyé." - -#~ msgid "General ID" -#~ msgstr "Identifiant général" - -#~ msgid "General description" -#~ msgstr "Description générale" - -#~ msgid "Administrative Act" -#~ msgstr "Acte administratif" - -#~ msgid "No context record associated to parcel:" -#~ msgstr "Pas d'Unité d'Enregistrement associée à cette parcelle :" diff --git a/ishtar/templates/default_wizard.html b/ishtar/templates/default_wizard.html index 33eac942c..752728ab3 100644 --- a/ishtar/templates/default_wizard.html +++ b/ishtar/templates/default_wizard.html @@ -21,9 +21,13 @@    {% for formsetform in form.forms %}    {% for field in formsetform %}    <tr{% if field.field.required %} class='required'{% endif %}> -    <th><label for="{{ field.label }}">{{ field.label_tag }}</th> -    <td> {{ field.errors }}{{field|safe}}</td> -  </tr>{% endfor %} +    <th>{{ field.label_tag }}</th> +    <td> {{ field.errors }}{{field|safe}}</td>{% if field.help_text %} +    <td><a href="#{{field.name}}" class="help_display" title="{% trans "Help"%}">?</a></td> +  </tr> +  <tr class="help_text" id="{{field.name}}_help"> +    <td colspan="3"><div>{{field.help_text}}</div></td> +  {%endif%}</tr>{% endfor %}    {% endfor %}    <tr class='modify'><td colspan="2"><button name="formset_modify" value="{{form_step}}">{% trans "Add/Modify" %}</button></td></tr></li>  </table> @@ -31,9 +35,13 @@  <table>    {% for field in form %}    <tr{% if field.field.required %} class='required'{% endif %}> -    <th><label for="{{ field.label }}">{{ field.label_tag }}</th> -    <td> {{ field.errors }}{{field|safe}}</td> -  </tr>{% endfor %} +    <th>{{ field.label_tag }}</th> +    <td> {{ field.errors }}{{field|safe}}</td>{% if field.help_text %} +    <td><a href="#{{field.name}}" class="help_display" title="{% trans "Help"%}">?</a></td> +  </tr> +  <tr class="help_text" id="{{field.name}}_help"> +    <td colspan="3"><div>{{field.help_text}}</div></td> +  {%endif%}</tr>{% endfor %}  </table>  {% endif %}  <input type="hidden" name="{{ step_field }}" value="{{ step0 }}" /> diff --git a/ishtar/templates/grid_form.html b/ishtar/templates/grid_form.html new file mode 100644 index 000000000..8c02197b4 --- /dev/null +++ b/ishtar/templates/grid_form.html @@ -0,0 +1,10 @@ +{% load i18n %} +  {% for field in form %} +  <tr{% if field.field.required %} class='required'{% endif %}> +    <th>{{ field.label_tag }}</th> +    <td> {{ field.errors }}{{field|safe}}</td>{% if field.help_text %} +    <td><a href="#{{field.name}}" class="help_display" title="{% trans "Help"%}">?</a></td> +  </tr> +  <tr class="help_text" id="{{field.name}}_help"> +    <td colspan="3"><div>{{field.help_text}}</div></td> +  {%endif%}</tr>{% endfor %} diff --git a/static/js/ishtar.js b/static/js/ishtar.js index b7b0403c8..26fbbd950 100644 --- a/static/js/ishtar.js +++ b/static/js/ishtar.js @@ -45,6 +45,12 @@ $("#main_menu ul li").live('click', function(){      $(this).find('ul').show('slow');  }); +/* manage help texts */ +$(".help_display").live("click", function(){ +    var help_text_id = $(this).attr("href") + "_help"; +    $(help_text_id).toggle(); +}) +  var last_window;  function load_window(url, speed){ diff --git a/static/media/style.css b/static/media/style.css index 75a5f975d..e8c94c552 100644 --- a/static/media/style.css +++ b/static/media/style.css @@ -33,6 +33,12 @@ textarea{      height:80px;  } +dt{ +    font-weight:bold; +    color:#922; +    padding:1em; +} +  td{      text-align:left;  } @@ -165,7 +171,7 @@ ul#form_path button {      color:#D14;      border:none;      background-color:white; -    font-size: 11pt; +    font-size: 1em;      cursor:pointer;      padding:0;      margin:0; @@ -191,6 +197,7 @@ div.form {      padding:0.2em;      margin-left:auto;      margin-right:auto; +    width:600px;  }  .form table th{ @@ -212,6 +219,25 @@ div.form {      border:0;  } +.help_text{ +    display:none; +    font-size:0.9em; +} + +.help_text div{ +    background-color:#FFF; +    margin:1em;; +    padding:0 1em; +    -moz-border-radius:8px; +    -webkit-border-radius:8px; +    border-radius:8px; +    border:1px solid #AAA; +} + +.help_text .example{ +    font-style:italic; +} +  .info{      margin-left:auto;      margin-right:auto; | 
