diff options
| author | Valérie-Emma Leroux <emma@iggdrasil.net> | 2017-04-07 11:40:31 +0200 | 
|---|---|---|
| committer | Valérie-Emma Leroux <emma@iggdrasil.net> | 2017-04-07 11:40:31 +0200 | 
| commit | 7f22d3c20cc24debfe123425efa63ec5293e4b4c (patch) | |
| tree | f773b80964981c231c892ee5255b94285bc5620a | |
| parent | 9127307734c85b816ac7dbb539b565ffb106d60f (diff) | |
| parent | da4af2ab5d105f6d2ce442b517e532b7570616e3 (diff) | |
| download | Ishtar-7f22d3c20cc24debfe123425efa63ec5293e4b4c.tar.bz2 Ishtar-7f22d3c20cc24debfe123425efa63ec5293e4b4c.zip  | |
Merge branch 'master' of git.iggdrasil.net:/srv/git/ishtar
Conflicts:
	archaeological_operations/templates/ishtar/sheet_operation.html
143 files changed, 20197 insertions, 3211 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7a5476081..1510bd619 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -13,19 +13,25 @@ variables:  services:    - iggdrasil/postgis-1.5 -master: -  script: "make test_gitlab" +build: +  stage: "build" +  script: "make build_gitlab"    only:      - master +    - v0.9 +    - wheezy -stable: +test: +  stage: "test"    script: "make test_gitlab"    only: +    - master      - v0.9 +    - wheezy  debian: +  stage: "test"    script: -    - make test_gitlab      - apt-get install -q -y devscripts build-essential lintian wget      - make deb      - wget -O /etc/apt/sources.list.d/iggdrasil.list http://deb.iggdrasil.net/dists/wheezy/iggdrasil.list diff --git a/CHANGES.md b/CHANGES.md index 76edd8b3d..34d7ccd2e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,48 @@  Ishtar changelog  ================ +v0.99.16 (2017-03-21) +--------------------- + +### Features ### +- Operation: add a location field +- Operation sheet: add list of containers +- Operation sheet: add INSEE code to towns +- Operation source table: change headers +- Context record: add type of excavation technics +- Context record form/sheet: add documentation types, diameter and depth of appearance +- Context records table: add new fields and reorder +- Find table: add new fields and reorder +- Find search: conditionnal search (warehouse module available) for warehouses and containers +- Find search: search by warehouse (location & responsible) +- Find sheet: link for documents related to finds +- Warehouse form: can add a warehouse responsible if not available +- Warehouse/Container sheet: add a Modify button +- Container: add an image +- Container wizard: display container sheet at the end of the process +- Treatment/Treatment file history: navigation between version and restore action +- Treatment/Treatment file sheet: add source list, administrative act list +- Basket: add a close button +- Sources: ordering author by author type +- Person sheet: link to the attached organization +- Sheets: remove ":" from labels +- Sheets: mark explicitly some fields as translated fields +- Sheets: improve layout +- Sheets: add ishtar ID +- Tables: add missing headers +- Admin: add batch types +- Imports: admin can see all imports +- Imports: add a name +- Imports: clean empty m2m +- Add a default robots.txt + +### Bug fixes ### +- Refactoring: EXTRA_FULL_FIELDS_LABELS -> COL_LABELS (with merge) +- Warehouse modification: error message is displayed when putting identical division types +- Container form: fix message when no warehouse is set +- Dashboard: fix area unity and effective operation tables +- Test import of files with exotic encoding +  v0.99.15 (2017-03-09)  ---------------------  ### Features ### @@ -37,7 +79,7 @@ v0.99.14 (2017-03-06)  v0.99.13.1 (2017-02-20)  -----------------------  ### Bug fixes ### -- Warehouse: fix warehouse creation with no divisions (refs #3481) +- Warehouse: fix warehouse creation with no divisions  v0.99.13 (2017-02-17)  -------------------- @@ -237,7 +279,7 @@ v0.99.10 (2017-02-04)  ### Bug fixes ### -- Fix simple form for adding containers (refs #3410) +- Fix simple form for adding containers  - Treatment file select form: fix treatment file check  0.99.0 (2017-01-10) diff --git a/Makefile.example b/Makefile.example index f3ec3f7fd..ac8e54cc5 100644 --- a/Makefile.example +++ b/Makefile.example @@ -52,15 +52,11 @@ coverage: clean  			archaeological_context_records,archaeological_files,archaeological_finds,archaeological_warehouse,\  			archaeological_files_pdl" ./manage.py test $(apps) && coverage report -test_gitlab: clean -	# test migrations -	cd $(project); $(PYTHON) ./manage.py syncdb --noinput -	# only necessary on master -	cd $(project); $(PYTHON) ./manage.py migrate ishtar_common -	cd $(project); $(PYTHON) ./manage.py migrate archaeological_files 0013 -	cd $(project); $(PYTHON) ./manage.py migrate archaeological_operations 0040 -	cd $(project); $(PYTHON) ./manage.py migrate archaeological_files +build_gitlab: +	cd $(project); $(PYTHON) ./manage.py syncdb --noinput 2> /dev/null > /dev/null  	cd $(project); $(PYTHON) ./manage.py migrate + +test_gitlab: clean  	cd $(project); $(PYTHON) manage.py test $(apps)  pep8: diff --git a/archaeological_context_records/admin.py b/archaeological_context_records/admin.py index e3d627ca8..567f50014 100644 --- a/archaeological_context_records/admin.py +++ b/archaeological_context_records/admin.py @@ -36,8 +36,9 @@ admin.site.register(models.Dating, DatingAdmin)  class ContextRecordAdmin(HistorizedObjectAdmin):      list_display = ('label', 'length', 'width',                      'thickness', 'depth') -    list_filter = ('has_furniture',) -    search_fields = ('label', 'parcel__operation__common_name', 'datings__period__label') +    list_filter = ('documentations',) +    search_fields = ('label', 'parcel__operation__common_name', +                     'datings__period__label')      model = models.ContextRecord  admin.site.register(models.ContextRecord, ContextRecordAdmin) @@ -65,8 +66,10 @@ class RelationTypeAdmin(admin.ModelAdmin):  admin.site.register(models.RelationType, RelationTypeAdmin) +  class UnitAdmin(admin.ModelAdmin): -    list_display = ['label', 'txt_idx', 'parent', 'available', 'order', 'comment'] +    list_display = ['label', 'txt_idx', 'parent', 'available', 'order', +                    'comment']  admin.site.register(models.Unit, UnitAdmin) @@ -77,8 +80,9 @@ class IdentificationTypeAdmin(admin.ModelAdmin):  admin.site.register(models.IdentificationType, IdentificationTypeAdmin) -general_models = [models.DatingType, models.DatingQuality, -                  models.ActivityType, models.ExcavationTechnicType] +general_models = [ +    models.DatingType, models.DatingQuality, models.DocumentationType, +    models.ActivityType, models.ExcavationTechnicType]  for model in general_models:      admin.site.register(model, GeneralTypeAdmin) diff --git a/archaeological_context_records/forms.py b/archaeological_context_records/forms.py index ef17e561e..522c69deb 100644 --- a/archaeological_context_records/forms.py +++ b/archaeological_context_records/forms.py @@ -130,8 +130,11 @@ class RecordFormSelection(forms.Form):  class RecordFormGeneral(ManageOldType, forms.Form):      form_label = _("General")      file_upload = True -    associated_models = {'parcel': Parcel, 'unit': models.Unit, -                         'excavation_technic': models.ExcavationTechnicType} +    base_models = ["documentation"] +    associated_models = { +        'parcel': Parcel, 'unit': models.Unit, +        'documentation': models.DocumentationType, +        'excavation_technic': models.ExcavationTechnicType}      pk = forms.IntegerField(required=False, widget=forms.HiddenInput)      operation_id = forms.IntegerField(widget=forms.HiddenInput)      parcel = forms.ChoiceField(label=_("Parcel"), choices=[]) @@ -146,10 +149,15 @@ class RecordFormGeneral(ManageOldType, forms.Form):      length = forms.FloatField(label=_(u"Length (m)"), required=False)      width = forms.FloatField(label=_(u"Width (m)"), required=False)      thickness = forms.FloatField(label=_(u"Thickness (m)"), required=False) +    diameter = forms.FloatField(label=_(u"Diameter (m)"), required=False)      depth = forms.FloatField(label=_(u"Depth (m)"), required=False) -    unit = forms.ChoiceField(label=_("Context record type"), required=False, choices=[]) -    has_furniture = forms.NullBooleanField(label=_(u"Has furniture?"), -                                           required=False) +    depth_of_appearance = forms.FloatField( +        label=_(u"Depth of appearance (m)"), required=False) +    unit = forms.ChoiceField(label=_(u"Context record type"), required=False, +                             choices=[]) +    documentation = forms.MultipleChoiceField( +        label=_("Documentation"), choices=[], required=False, +        widget=forms.CheckboxSelectMultiple)      location = forms.CharField(          label=_(u"Location"), widget=forms.Textarea,          required=False, validators=[validators.MaxLengthValidator(200)]) @@ -216,6 +224,11 @@ class RecordFormGeneral(ManageOldType, forms.Form):              initial=self.init_data.get('excavation_technic'))          self.fields['excavation_technic'].help_text = \              models.ExcavationTechnicType.get_help() +        self.fields['documentation'].choices = \ +            models.DocumentationType.get_types(empty_first=False, +                initial=self.init_data.get('documentation')) +        self.fields['documentation'].help_text = \ +            models.DocumentationType.get_help()      def clean(self):          # manage unique context record ID diff --git a/archaeological_context_records/locale/django.pot b/archaeological_context_records/locale/django.pot index 3320c91a6..82c64ac4c 100644 --- a/archaeological_context_records/locale/django.pot +++ b/archaeological_context_records/locale/django.pot @@ -4,14 +4,15 @@  # Étienne Loks <etienne.loks at peacefrogs net>, 2010-2015.  # Valérie-Emma Leroux <emma@iggdrasil.net>, 2016. #zanata  # Valérie-Emma Leroux <emma@iggdrasil.net>, 2017. #zanata +# Étienne Loks <etienne.loks@iggdrasil.net>, 2017. #zanata  msgid ""  msgstr "" -#: forms.py:47 forms.py:51 models.py:207 models.py:577 wizards.py:77 +#: forms.py:47 forms.py:51 models.py:216 models.py:599 wizards.py:77  msgid "Operation"  msgstr "" -#: forms.py:59 forms.py:138 models.py:209 models.py:545 +#: forms.py:59 forms.py:141 models.py:218 models.py:567  msgid "ID"  msgstr "" @@ -35,7 +36,7 @@ msgstr ""  msgid "Search within related operations"  msgstr "" -#: forms.py:77 forms.py:241 models.py:56 +#: forms.py:77 forms.py:254 models.py:56  msgid "Period"  msgstr "" @@ -51,7 +52,7 @@ msgstr ""  msgid "Search within relations"  msgstr "" -#: forms.py:111 forms.py:344 views.py:92 +#: forms.py:111 forms.py:357 views.py:92  msgid "Context record search"  msgstr "" @@ -63,168 +64,176 @@ msgstr ""  msgid "General"  msgstr "" -#: forms.py:137 models.py:172 models.py:205 models.py:547 +#: forms.py:140 models.py:181 models.py:214 models.py:569  msgid "Parcel"  msgstr "" -#: forms.py:140 models.py:210 models.py:548 +#: forms.py:143 models.py:219 models.py:570  #: templates/ishtar/sheet_contextrecord.html:30  msgid "Description"  msgstr "" -#: forms.py:142 models.py:211 +#: forms.py:145 models.py:220  msgid "General comment"  msgstr "" -#: forms.py:145 models.py:255 +#: forms.py:148 models.py:267  msgid "Excavation technique"  msgstr "" -#: forms.py:146 models.py:215 +#: forms.py:149 models.py:224  msgid "Length (m)"  msgstr "" -#: forms.py:147 models.py:216 +#: forms.py:150 models.py:225  msgid "Width (m)"  msgstr "" -#: forms.py:148 models.py:217 +#: forms.py:151 models.py:226  msgid "Thickness (m)"  msgstr "" -#: forms.py:149 models.py:219 +#: forms.py:152 models.py:228 +msgid "Diameter (m)" +msgstr "" + +#: forms.py:153 models.py:229  msgid "Depth (m)"  msgstr "" -#: forms.py:150 forms.py:363 models.py:227 models.py:546 +#: forms.py:155 models.py:231 +msgid "Depth of appearance (m)" +msgstr "" + +#: forms.py:156 forms.py:376 models.py:241 models.py:568  msgid "Context record type"  msgstr "" -#: forms.py:151 models.py:229 -msgid "Has furniture?" +#: forms.py:159 ishtar_menu.py:48 +msgid "Documentation"  msgstr "" -#: forms.py:154 models.py:221 +#: forms.py:162 models.py:233  msgid "Location"  msgstr "" -#: forms.py:157 +#: forms.py:165  msgid "Image"  msgstr "" -#: forms.py:158 +#: forms.py:166  #, python-format  msgid ""  "<p>Heavy images are resized to: %(width)dx%(height)d (ratio is preserved).</"  "p>"  msgstr "" -#: forms.py:230 +#: forms.py:243  msgid "This ID already exists for this operation."  msgstr "" -#: forms.py:236 forms.py:263 models.py:67 +#: forms.py:249 forms.py:276 models.py:67  msgid "Dating"  msgstr "" -#: forms.py:242 models.py:57 +#: forms.py:255 models.py:57  msgid "Start date"  msgstr "" -#: forms.py:243 models.py:58 models.py:214 +#: forms.py:256 models.py:58 models.py:223  msgid "End date"  msgstr "" -#: forms.py:244 models.py:61 +#: forms.py:257 models.py:61  msgid "Quality"  msgstr "" -#: forms.py:245 models.py:39 models.py:59 +#: forms.py:258 models.py:39 models.py:59  msgid "Dating type"  msgstr "" -#: forms.py:272 ishtar_menu.py:29 models.py:607 +#: forms.py:285 ishtar_menu.py:29 models.py:641  msgid "Context record"  msgstr "" -#: forms.py:293 +#: forms.py:306  msgid "Relations"  msgstr "" -#: forms.py:297 forms.py:305 models.py:232 -#: templates/ishtar/sheet_contextrecord.html:42 +#: forms.py:310 forms.py:318 models.py:244 +#: templates/ishtar/sheet_contextrecord.html:44  msgid "Interpretation"  msgstr "" -#: forms.py:301 +#: forms.py:314  msgid "Comments on dating"  msgstr "" -#: forms.py:303 models.py:231 +#: forms.py:316 models.py:243  msgid "Filling"  msgstr "" -#: forms.py:307 models.py:252 +#: forms.py:320 models.py:264  msgid "Activity"  msgstr "" -#: forms.py:309 models.py:250 +#: forms.py:322 models.py:262  msgid "Identification"  msgstr "" -#: forms.py:311 models.py:235 +#: forms.py:324 models.py:247  msgid "TAQ"  msgstr "" -#: forms.py:312 models.py:239 +#: forms.py:325 models.py:251  msgid "Estimated TAQ"  msgstr "" -#: forms.py:314 models.py:242 +#: forms.py:327 models.py:254  msgid "TPQ"  msgstr "" -#: forms.py:315 models.py:246 +#: forms.py:328 models.py:258  msgid "Estimated TPQ"  msgstr "" -#: forms.py:330 +#: forms.py:343  msgid "Operation search"  msgstr "" -#: forms.py:332 +#: forms.py:345  msgid "You should select an operation."  msgstr "" -#: forms.py:337 +#: forms.py:350  msgid "Would you like to delete this context record?"  msgstr "" -#: forms.py:346 +#: forms.py:359  msgid "You should select a context record."  msgstr "" -#: forms.py:351 +#: forms.py:364  msgid "Year of the operation"  msgstr "" -#: forms.py:353 +#: forms.py:366  msgid "Numeric reference"  msgstr "" -#: forms.py:359 +#: forms.py:372  msgid "Town of the operation"  msgstr "" -#: forms.py:361 +#: forms.py:374  msgid "Period of the context record"  msgstr "" -#: forms.py:376 +#: forms.py:389  msgid "Documentation search"  msgstr "" -#: forms.py:378 +#: forms.py:391  msgid "You should select a document."  msgstr "" @@ -244,10 +253,6 @@ msgstr ""  msgid "Deletion"  msgstr "" -#: ishtar_menu.py:48 -msgid "Documentation" -msgstr "" -  #: models.py:40  msgid "Dating types"  msgstr "" @@ -308,179 +313,207 @@ msgstr ""  msgid "Excavation technique types"  msgstr "" -#: models.py:163 models.py:549 +#: models.py:134 +msgid "Documentation type" +msgstr "" + +#: models.py:135 +msgid "Documentation types" +msgstr "" + +#: models.py:172 models.py:571  msgid "Periods"  msgstr "" -#: models.py:164 +#: models.py:173  msgid "Datings (period)"  msgstr "" -#: models.py:165 +#: models.py:174  msgid "Related context records"  msgstr "" -#: models.py:168 +#: models.py:177  msgid "Parcel (external ID)"  msgstr "" -#: models.py:169 models.py:170 +#: models.py:178 models.py:179  msgid "Parcel (town)"  msgstr "" -#: models.py:171 +#: models.py:180  msgid "Parcel (year)"  msgstr "" -#: models.py:202 +#: models.py:211  msgid "External ID"  msgstr "" -#: models.py:204 +#: models.py:213  msgid "External ID is set automatically"  msgstr "" -#: models.py:212 +#: models.py:221  msgid "Date d'ouverture"  msgstr "" -#: models.py:222 +#: models.py:234  msgid "A short description of the location of the context record"  msgstr "" -#: models.py:225 +#: models.py:239  msgid "Comment on datings"  msgstr "" -#: models.py:236 +#: models.py:248  msgid ""  "\"Terminus Ante Quem\" the context record can't have been created after this "  "date"  msgstr "" -#: models.py:240 +#: models.py:252  msgid "Estimation of a \"Terminus Ante Quem\""  msgstr "" -#: models.py:243 +#: models.py:255  msgid ""  "\"Terminus Post Quem\" the context record can't have been created before "  "this date"  msgstr "" -#: models.py:247 +#: models.py:259  msgid "Estimation of a \"Terminus Post Quem\""  msgstr "" -#: models.py:258 +#: models.py:270  msgid "Point"  msgstr "" -#: models.py:259 +#: models.py:271  msgid "Polygon"  msgstr "" -#: models.py:260 +#: models.py:272  msgid "Cached name"  msgstr "" -#: models.py:264 models.py:265 templates/ishtar/sheet_contextrecord.html:4 +#: models.py:276 models.py:277 templates/ishtar/sheet_contextrecord.html:4  msgid "Context Record"  msgstr "" -#: models.py:267 +#: models.py:279  msgid "Can view all Context Records"  msgstr "" -#: models.py:269 +#: models.py:281  msgid "Can view own Context Record"  msgstr "" -#: models.py:271 +#: models.py:283  msgid "Can add own Context Record"  msgstr "" -#: models.py:273 +#: models.py:285  msgid "Can change own Context Record"  msgstr "" -#: models.py:275 +#: models.py:287  msgid "Can delete own Context Record"  msgstr "" -#: models.py:285 +#: models.py:297  msgctxt "short"  msgid "Context record"  msgstr "" -#: models.py:479 +#: models.py:501  msgid "Inverse relation"  msgstr "" -#: models.py:483 models.py:506 models.py:544 +#: models.py:505 models.py:528 models.py:566  msgid "Relation type"  msgstr "" -#: models.py:484 +#: models.py:506  msgid "Relation types"  msgstr "" -#: models.py:501 +#: models.py:523  msgid "ID (left)"  msgstr "" -#: models.py:502 +#: models.py:524  msgid "Context record type (left)"  msgstr "" -#: models.py:503 +#: models.py:525  msgid "Parcel (left)"  msgstr "" -#: models.py:504 +#: models.py:526  msgid "Description (left)"  msgstr "" -#: models.py:505 +#: models.py:527  msgid "Periods (left)"  msgstr "" -#: models.py:507 +#: models.py:529  msgid "ID (right)"  msgstr "" -#: models.py:508 +#: models.py:530  msgid "Context record type (right)"  msgstr "" -#: models.py:509 +#: models.py:531  msgid "Parcel (right)"  msgstr "" -#: models.py:510 +#: models.py:532  msgid "Description (right)"  msgstr "" -#: models.py:511 +#: models.py:533  msgid "Periods (right)"  msgstr "" -#: models.py:520 +#: models.py:542  msgid "Record relation"  msgstr "" -#: models.py:521 +#: models.py:543  msgid "Record relations"  msgstr "" -#: models.py:604 +#: models.py:626  msgid "Context record documentation"  msgstr "" -#: models.py:605 +#: models.py:627  msgid "Context record documentations"  msgstr "" +#: models.py:630 +msgid "Can view all Context record sources" +msgstr "" + +#: models.py:632 +msgid "Can view own Context record source" +msgstr "" + +#: models.py:634 +msgid "Can add own Context record source" +msgstr "" + +#: models.py:636 +msgid "Can change own Context record source" +msgstr "" + +#: models.py:638 +msgid "Can delete own Context record source" +msgstr "" +  #: views.py:102  msgid "New context record"  msgstr "" @@ -517,71 +550,71 @@ msgstr ""  msgid "Temporary ID:"  msgstr "" -#: templates/ishtar/sheet_contextrecord.html:54 +#: templates/ishtar/sheet_contextrecord.html:56  msgid "Datations"  msgstr "" -#: templates/ishtar/sheet_contextrecord.html:63 +#: templates/ishtar/sheet_contextrecord.html:65  msgid "Context record relations"  msgstr "" -#: templates/ishtar/sheet_contextrecord.html:70 +#: templates/ishtar/sheet_contextrecord.html:72  msgid "Operation summary"  msgstr "" -#: templates/ishtar/sheet_contextrecord.html:72 +#: templates/ishtar/sheet_contextrecord.html:74  msgid "Patriarche OA code not yet recorded!"  msgstr "" -#: templates/ishtar/sheet_contextrecord.html:76 +#: templates/ishtar/sheet_contextrecord.html:78  msgid "Numerical reference"  msgstr "" -#: templates/ishtar/sheet_contextrecord.html:80 +#: templates/ishtar/sheet_contextrecord.html:82  msgid "State:"  msgstr "" -#: templates/ishtar/sheet_contextrecord.html:80 +#: templates/ishtar/sheet_contextrecord.html:82  msgid "Active file"  msgstr "" -#: templates/ishtar/sheet_contextrecord.html:80 +#: templates/ishtar/sheet_contextrecord.html:82  msgid "Closed operation"  msgstr "" -#: templates/ishtar/sheet_contextrecord.html:82 +#: templates/ishtar/sheet_contextrecord.html:84  msgid "Closing date:"  msgstr "" -#: templates/ishtar/sheet_contextrecord.html:82 +#: templates/ishtar/sheet_contextrecord.html:84  msgid "by"  msgstr "" -#: templates/ishtar/sheet_contextrecord.html:90 +#: templates/ishtar/sheet_contextrecord.html:92  msgid "Localisation"  msgstr "" -#: templates/ishtar/sheet_contextrecord.html:91 +#: templates/ishtar/sheet_contextrecord.html:93  msgid "Towns:"  msgstr "" -#: templates/ishtar/sheet_contextrecord.html:92 +#: templates/ishtar/sheet_contextrecord.html:94  msgid "Related operation:"  msgstr "" -#: templates/ishtar/sheet_contextrecord.html:94 +#: templates/ishtar/sheet_contextrecord.html:96  msgid "No operation linked to this context unit!"  msgstr "" -#: templates/ishtar/sheet_contextrecord.html:97 +#: templates/ishtar/sheet_contextrecord.html:99  msgid "Document from this context record"  msgstr "" -#: templates/ishtar/sheet_contextrecord.html:102 +#: templates/ishtar/sheet_contextrecord.html:104  msgid "Finds"  msgstr "" -#: templates/ishtar/sheet_contextrecord.html:107 +#: templates/ishtar/sheet_contextrecord.html:109  msgid "Documents from associated finds"  msgstr "" diff --git a/archaeological_context_records/migrations/0031_auto__add_documentationtype__add_field_contextrecord_diameter__add_fie.py b/archaeological_context_records/migrations/0031_auto__add_documentationtype__add_field_contextrecord_diameter__add_fie.py new file mode 100644 index 000000000..f56f26e9f --- /dev/null +++ b/archaeological_context_records/migrations/0031_auto__add_documentationtype__add_field_contextrecord_diameter__add_fie.py @@ -0,0 +1,732 @@ +# -*- coding: utf-8 -*- +import datetime +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + + +class Migration(SchemaMigration): + +    def forwards(self, orm): +        # Adding model 'DocumentationType' +        db.create_table('archaeological_context_records_documentationtype', ( +            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), +            ('label', self.gf('django.db.models.fields.CharField')(max_length=100)), +            ('txt_idx', self.gf('django.db.models.fields.CharField')(unique=True, max_length=100)), +            ('comment', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), +            ('available', self.gf('django.db.models.fields.BooleanField')(default=True)), +        )) +        db.send_create_signal('archaeological_context_records', ['DocumentationType']) + +        # Adding field 'ContextRecord.diameter' +        db.add_column('archaeological_context_records_contextrecord', 'diameter', +                      self.gf('django.db.models.fields.FloatField')(null=True, blank=True), +                      keep_default=False) + +        # Adding field 'ContextRecord.depth_of_appearance' +        db.add_column('archaeological_context_records_contextrecord', 'depth_of_appearance', +                      self.gf('django.db.models.fields.FloatField')(null=True, blank=True), +                      keep_default=False) + +        # Adding M2M table for field documentations on 'ContextRecord' +        db.create_table('archaeological_context_records_contextrecord_documentations', ( +            ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), +            ('contextrecord', models.ForeignKey(orm['archaeological_context_records.contextrecord'], null=False)), +            ('documentationtype', models.ForeignKey(orm['archaeological_context_records.documentationtype'], null=False)) +        )) +        db.create_unique('archaeological_context_records_contextrecord_documentations', ['contextrecord_id', 'documentationtype_id']) + +        # Adding field 'HistoricalContextRecord.diameter' +        db.add_column('archaeological_context_records_historicalcontextrecord', 'diameter', +                      self.gf('django.db.models.fields.FloatField')(null=True, blank=True), +                      keep_default=False) + +        # Adding field 'HistoricalContextRecord.depth_of_appearance' +        db.add_column('archaeological_context_records_historicalcontextrecord', 'depth_of_appearance', +                      self.gf('django.db.models.fields.FloatField')(null=True, blank=True), +                      keep_default=False) + + +    def backwards(self, orm): +        # Deleting model 'DocumentationType' +        db.delete_table('archaeological_context_records_documentationtype') + +        # Deleting field 'ContextRecord.diameter' +        db.delete_column('archaeological_context_records_contextrecord', 'diameter') + +        # Deleting field 'ContextRecord.depth_of_appearance' +        db.delete_column('archaeological_context_records_contextrecord', 'depth_of_appearance') + +        # Removing M2M table for field documentations on 'ContextRecord' +        db.delete_table('archaeological_context_records_contextrecord_documentations') + +        # Deleting field 'HistoricalContextRecord.diameter' +        db.delete_column('archaeological_context_records_historicalcontextrecord', 'diameter') + +        # Deleting field 'HistoricalContextRecord.depth_of_appearance' +        db.delete_column('archaeological_context_records_historicalcontextrecord', 'depth_of_appearance') + + +    models = { +        'archaeological_context_records.activitytype': { +            'Meta': {'ordering': "('order',)", 'object_name': 'ActivityType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'order': ('django.db.models.fields.IntegerField', [], {}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_context_records.contextrecord': { +            'Meta': {'ordering': "('cached_label',)", 'object_name': 'ContextRecord'}, +            'activity': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.ActivityType']", 'null': 'True', 'blank': 'True'}), +            'auto_external_id': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'cached_label': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'closing_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'datings': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['archaeological_context_records.Dating']", 'symmetrical': 'False'}), +            'datings_comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'depth': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), +            'depth_of_appearance': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), +            'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'diameter': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), +            'documentations': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['archaeological_context_records.DocumentationType']", 'symmetrical': 'False'}), +            'excavation_technic': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.ExcavationTechnicType']", 'null': 'True', 'blank': 'True'}), +            'external_id': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'filling': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'has_furniture': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'identification': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.IdentificationType']", 'null': 'True', 'blank': 'True'}), +            'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), +            'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_archaeological_context_records_contextrecord'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), +            'interpretation': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '200'}), +            'length': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), +            'location': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'opening_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'operation': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'context_record'", 'to': "orm['archaeological_operations.Operation']"}), +            'parcel': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'context_record'", 'to': "orm['archaeological_operations.Parcel']"}), +            'point': ('django.contrib.gis.db.models.fields.PointField', [], {'dim': '3', 'null': 'True', 'blank': 'True'}), +            'polygon': ('django.contrib.gis.db.models.fields.PolygonField', [], {'null': 'True', 'blank': 'True'}), +            'related_context_records': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_context_records.ContextRecord']", 'null': 'True', 'through': "orm['archaeological_context_records.RecordRelations']", 'blank': 'True'}), +            'taq': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'taq_estimated': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'thickness': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), +            'thumbnail': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), +            'tpq': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'tpq_estimated': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'unit': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['archaeological_context_records.Unit']"}), +            'width': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}) +        }, +        'archaeological_context_records.contextrecordsource': { +            'Meta': {'object_name': 'ContextRecordSource'}, +            'additional_information': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'associated_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), +            'authors': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'contextrecordsource_related'", 'symmetrical': 'False', 'to': "orm['ishtar_common.Author']"}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'context_record': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'source'", 'to': "orm['archaeological_context_records.ContextRecord']"}), +            'creation_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'duplicate': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'external_id': ('django.db.models.fields.CharField', [], {'max_length': '12', 'null': 'True', 'blank': 'True'}), +            'format_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Format']", 'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), +            'internal_reference': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), +            'item_number': ('django.db.models.fields.IntegerField', [], {'default': '1'}), +            'receipt_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'receipt_date_in_documentation': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'reference': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), +            'scale': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), +            'source_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.SourceType']"}), +            'support_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.SupportType']", 'null': 'True', 'blank': 'True'}), +            'thumbnail': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), +            'title': ('django.db.models.fields.CharField', [], {'max_length': '300'}) +        }, +        'archaeological_context_records.dating': { +            'Meta': {'object_name': 'Dating'}, +            'dating_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.DatingType']", 'null': 'True', 'blank': 'True'}), +            'end_date': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'period': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.Period']"}), +            'precise_dating': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'quality': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.DatingQuality']", 'null': 'True', 'blank': 'True'}), +            'start_date': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) +        }, +        'archaeological_context_records.datingquality': { +            'Meta': {'ordering': "('label',)", 'object_name': 'DatingQuality'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_context_records.datingtype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'DatingType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_context_records.documentationtype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'DocumentationType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_context_records.excavationtechnictype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'ExcavationTechnicType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_context_records.historicalcontextrecord': { +            'Meta': {'ordering': "('-history_date', '-history_id')", 'object_name': 'HistoricalContextRecord'}, +            'activity_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'auto_external_id': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'cached_label': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'closing_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'datings_comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'depth': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), +            'depth_of_appearance': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), +            'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'diameter': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), +            'excavation_technic_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'external_id': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'filling': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'has_furniture': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'history_creator_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'history_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), +            'history_id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'history_modifier_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'history_type': ('django.db.models.fields.CharField', [], {'max_length': '1'}), +            'history_user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}), +            'id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}), +            'identification_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), +            'interpretation': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '200'}), +            'length': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), +            'location': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'opening_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'operation_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'parcel_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'point': ('django.contrib.gis.db.models.fields.PointField', [], {'dim': '3', 'null': 'True', 'blank': 'True'}), +            'polygon': ('django.contrib.gis.db.models.fields.PolygonField', [], {'null': 'True', 'blank': 'True'}), +            'taq': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'taq_estimated': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'thickness': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), +            'thumbnail': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), +            'tpq': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'tpq_estimated': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'unit_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'width': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}) +        }, +        'archaeological_context_records.identificationtype': { +            'Meta': {'ordering': "('order', 'label')", 'object_name': 'IdentificationType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'order': ('django.db.models.fields.IntegerField', [], {}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_context_records.recordrelations': { +            'Meta': {'object_name': 'RecordRelations'}, +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'left_record': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'right_relations'", 'to': "orm['archaeological_context_records.ContextRecord']"}), +            'relation_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.RelationType']"}), +            'right_record': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'left_relations'", 'to': "orm['archaeological_context_records.ContextRecord']"}) +        }, +        'archaeological_context_records.recordrelationview': { +            'Meta': {'unique_together': "(('id', 'right_record'),)", 'object_name': 'RecordRelationView', 'db_table': "'record_relations'", 'managed': 'False'}, +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'left_record': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'on_delete': 'models.DO_NOTHING', 'to': "orm['archaeological_context_records.ContextRecord']"}), +            'relation_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'on_delete': 'models.DO_NOTHING', 'to': "orm['archaeological_context_records.RelationType']"}), +            'right_record': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'on_delete': 'models.DO_NOTHING', 'to': "orm['archaeological_context_records.ContextRecord']"}) +        }, +        'archaeological_context_records.relationtype': { +            'Meta': {'ordering': "('order', 'label')", 'object_name': 'RelationType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'inverse_relation': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.RelationType']", 'null': 'True', 'blank': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'order': ('django.db.models.fields.IntegerField', [], {'default': '1'}), +            'symmetrical': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'tiny_label': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_context_records.unit': { +            'Meta': {'ordering': "('order', 'label')", 'object_name': 'Unit'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'order': ('django.db.models.fields.IntegerField', [], {}), +            'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.Unit']", 'null': 'True', 'blank': 'True'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_files.file': { +            'Meta': {'ordering': "('cached_label',)", 'object_name': 'File'}, +            'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'auto_external_id': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'cached_label': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'cira_advised': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'classified_area': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'corporation_general_contractor': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'general_contractor_files'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), +            'creation_date': ('django.db.models.fields.DateField', [], {'default': 'datetime.date.today', 'null': 'True', 'blank': 'True'}), +            'departments': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['ishtar_common.Department']", 'null': 'True', 'blank': 'True'}), +            'end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'external_id': ('django.db.models.fields.CharField', [], {'max_length': '120', 'null': 'True', 'blank': 'True'}), +            'file_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.FileType']"}), +            'general_contractor': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'general_contractor_files'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), +            'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'imported_line': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_archaeological_files_file'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), +            'in_charge': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'file_responsability'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), +            'instruction_deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'internal_reference': ('django.db.models.fields.CharField', [], {'max_length': '60', 'null': 'True', 'blank': 'True'}), +            'locality': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), +            'main_town': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'file_main'", 'null': 'True', 'to': "orm['ishtar_common.Town']"}), +            'mh_listing': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'mh_register': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'name': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'numeric_reference': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'organization': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'files'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), +            'permit_reference': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'permit_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.PermitType']", 'null': 'True', 'blank': 'True'}), +            'planning_service': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'planning_service_files'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), +            'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), +            'protected_area': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'raw_general_contractor': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), +            'raw_town_planning_service': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), +            'reception_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'related_file': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.File']", 'null': 'True', 'blank': 'True'}), +            'requested_operation_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.OperationType']"}), +            'research_comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'responsible_town_planning_service': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'responsible_town_planning_service_files'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), +            'saisine_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.SaisineType']", 'null': 'True', 'blank': 'True'}), +            'scientist': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'scientist'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), +            'total_developed_surface': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), +            'total_surface': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), +            'towns': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'file'", 'symmetrical': 'False', 'to': "orm['ishtar_common.Town']"}), +            'year': ('django.db.models.fields.IntegerField', [], {'default': '2017'}) +        }, +        'archaeological_files.filetype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'FileType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_files.permittype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'PermitType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_files.saisinetype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'SaisineType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'delay': ('django.db.models.fields.IntegerField', [], {'default': '30'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_operations.archaeologicalsite': { +            'Meta': {'object_name': 'ArchaeologicalSite'}, +            'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_archaeological_operations_archaeologicalsite'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), +            'periods': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_operations.Period']", 'null': 'True', 'blank': 'True'}), +            'reference': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '20'}), +            'remains': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_operations.RemainType']", 'null': 'True', 'blank': 'True'}) +        }, +        'archaeological_operations.operation': { +            'Meta': {'ordering': "('cached_label',)", 'object_name': 'Operation'}, +            'abstract': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'archaeological_sites': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_operations.ArchaeologicalSite']", 'null': 'True', 'blank': 'True'}), +            'associated_file': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'operations'", 'null': 'True', 'to': "orm['archaeological_files.File']"}), +            'cached_label': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}), +            'cira_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'cira_rapporteur': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'cira_rapporteur'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), +            'code_patriarche': ('django.db.models.fields.IntegerField', [], {'unique': 'True', 'null': 'True', 'blank': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'common_name': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'cost': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'creation_date': ('django.db.models.fields.DateField', [], {'default': 'datetime.date.today'}), +            'documentation_deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'documentation_received': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'eas_number': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}), +            'effective_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'excavation_end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'finds_deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'finds_received': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'fnap_cost': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'fnap_financing': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), +            'geoarchaeological_context_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), +            'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_archaeological_operations_operation'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), +            'in_charge': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'operation_responsability'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), +            'large_area_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'multi_polygon': ('django.contrib.gis.db.models.fields.MultiPolygonField', [], {'null': 'True', 'blank': 'True'}), +            'negative_result': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'old_code': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), +            'operation_code': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'operation_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['ishtar_common.OperationType']"}), +            'operator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'operator'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), +            'operator_reference': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}), +            'optional_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'periods': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_operations.Period']", 'null': 'True', 'blank': 'True'}), +            'point': ('django.contrib.gis.db.models.fields.PointField', [], {'null': 'True', 'blank': 'True'}), +            'record_quality': ('django.db.models.fields.CharField', [], {'max_length': '2', 'null': 'True', 'blank': 'True'}), +            'remains': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_operations.RemainType']", 'null': 'True', 'blank': 'True'}), +            'report_delivery_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'report_processing': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.ReportState']", 'null': 'True', 'blank': 'True'}), +            'scheduled_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'scientific_documentation_comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'scientist': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'operation_scientist_responsability'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), +            'start_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'thumbnail': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), +            'towns': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'operations'", 'symmetrical': 'False', 'to': "orm['ishtar_common.Town']"}), +            'virtual_operation': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'year': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'zoning_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}) +        }, +        'archaeological_operations.parcel': { +            'Meta': {'ordering': "('year', 'section', 'parcel_number')", 'object_name': 'Parcel'}, +            'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'associated_file': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'parcels'", 'null': 'True', 'to': "orm['archaeological_files.File']"}), +            'auto_external_id': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'external_id': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), +            'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'history_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), +            'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_archaeological_operations_parcel'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), +            'operation': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'parcels'", 'null': 'True', 'to': "orm['archaeological_operations.Operation']"}), +            'parcel_number': ('django.db.models.fields.CharField', [], {'max_length': '6', 'null': 'True', 'blank': 'True'}), +            'public_domain': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'section': ('django.db.models.fields.CharField', [], {'max_length': '4', 'null': 'True', 'blank': 'True'}), +            'town': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'parcels'", 'to': "orm['ishtar_common.Town']"}), +            'year': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) +        }, +        'archaeological_operations.period': { +            'Meta': {'ordering': "('order',)", 'object_name': 'Period'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'end_date': ('django.db.models.fields.IntegerField', [], {}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'order': ('django.db.models.fields.IntegerField', [], {}), +            'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.Period']", 'null': 'True', 'blank': 'True'}), +            'start_date': ('django.db.models.fields.IntegerField', [], {}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_operations.remaintype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'RemainType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_operations.reportstate': { +            'Meta': {'ordering': "('order',)", 'object_name': 'ReportState'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'order': ('django.db.models.fields.IntegerField', [], {}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'auth.group': { +            'Meta': {'object_name': 'Group'}, +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), +            'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) +        }, +        'auth.permission': { +            'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, +            'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) +        }, +        'auth.user': { +            'Meta': {'object_name': 'User'}, +            'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), +            'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), +            'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), +            'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), +            'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), +            'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), +            'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), +            'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) +        }, +        'contenttypes.contenttype': { +            'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, +            'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) +        }, +        'ishtar_common.arrondissement': { +            'Meta': {'object_name': 'Arrondissement'}, +            'department': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Department']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '30'}) +        }, +        'ishtar_common.author': { +            'Meta': {'ordering': "('author_type__order', 'person__name')", 'object_name': 'Author'}, +            'author_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.AuthorType']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'person': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'author'", 'to': "orm['ishtar_common.Person']"}) +        }, +        'ishtar_common.authortype': { +            'Meta': {'ordering': "['order', 'label']", 'object_name': 'AuthorType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'order': ('django.db.models.fields.IntegerField', [], {'default': '1'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'ishtar_common.canton': { +            'Meta': {'object_name': 'Canton'}, +            'arrondissement': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Arrondissement']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '30'}) +        }, +        'ishtar_common.department': { +            'Meta': {'ordering': "['number']", 'object_name': 'Department'}, +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '30'}), +            'number': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '3'}), +            'state': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.State']", 'null': 'True', 'blank': 'True'}) +        }, +        'ishtar_common.format': { +            'Meta': {'ordering': "['label']", 'object_name': 'Format'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'ishtar_common.import': { +            'Meta': {'object_name': 'Import'}, +            'conservative_import': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'creation_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}), +            'encoding': ('django.db.models.fields.CharField', [], {'default': "'utf-8'", 'max_length': '15'}), +            'end_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), +            'error_file': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'imported_file': ('django.db.models.fields.files.FileField', [], {'max_length': '220'}), +            'imported_images': ('django.db.models.fields.files.FileField', [], {'max_length': '220', 'null': 'True', 'blank': 'True'}), +            'importer_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.ImporterType']"}), +            'match_file': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}), +            'result_file': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), +            'seconds_remaining': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'skip_lines': ('django.db.models.fields.IntegerField', [], {'default': '1'}), +            'state': ('django.db.models.fields.CharField', [], {'default': "'C'", 'max_length': '2'}), +            'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.IshtarUser']"}) +        }, +        'ishtar_common.importermodel': { +            'Meta': {'ordering': "('name',)", 'object_name': 'ImporterModel'}, +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'klass': ('django.db.models.fields.CharField', [], {'max_length': '200'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '200'}) +        }, +        'ishtar_common.importertype': { +            'Meta': {'ordering': "('name',)", 'object_name': 'ImporterType'}, +            'associated_models': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.ImporterModel']"}), +            'created_models': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.ImporterModel']"}), +            'description': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'is_template': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), +            'slug': ('django.db.models.fields.SlugField', [], {'max_length': '100', 'unique': 'True', 'null': 'True', 'blank': 'True'}), +            'unicity_keys': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}), +            'users': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['ishtar_common.IshtarUser']", 'null': 'True', 'blank': 'True'}) +        }, +        'ishtar_common.ishtaruser': { +            'Meta': {'object_name': 'IshtarUser', '_ormbases': ['auth.User']}, +            'advanced_shortcut_menu': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'person': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'ishtaruser'", 'unique': 'True', 'to': "orm['ishtar_common.Person']"}), +            'user_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True', 'primary_key': 'True'}) +        }, +        'ishtar_common.operationtype': { +            'Meta': {'ordering': "['-preventive', 'order', 'label']", 'object_name': 'OperationType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'order': ('django.db.models.fields.IntegerField', [], {'default': '1'}), +            'preventive': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'ishtar_common.organization': { +            'Meta': {'object_name': 'Organization'}, +            'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'alt_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'alt_address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'alt_address_is_prefered': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'alt_country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), +            'alt_postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), +            'alt_town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}), +            'archived': ('django.db.models.fields.NullBooleanField', [], {'default': 'False', 'null': 'True', 'blank': 'True'}), +            'country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), +            'email': ('django.db.models.fields.EmailField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_ishtar_common_organization'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), +            'merge_candidate': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'merge_candidate_rel_+'", 'null': 'True', 'to': "orm['ishtar_common.Organization']"}), +            'merge_exclusion': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'merge_exclusion_rel_+'", 'null': 'True', 'to': "orm['ishtar_common.Organization']"}), +            'merge_key': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'mobile_phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '500'}), +            'organization_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.OrganizationType']"}), +            'phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'phone2': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'phone3': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'phone_desc': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'phone_desc2': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'phone_desc3': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), +            'raw_phone': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}) +        }, +        'ishtar_common.organizationtype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'OrganizationType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'ishtar_common.person': { +            'Meta': {'object_name': 'Person'}, +            'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'alt_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'alt_address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'alt_address_is_prefered': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'alt_country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), +            'alt_postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), +            'alt_town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}), +            'archived': ('django.db.models.fields.NullBooleanField', [], {'default': 'False', 'null': 'True', 'blank': 'True'}), +            'attached_to': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'members'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'contact_type': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), +            'email': ('django.db.models.fields.EmailField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_ishtar_common_person'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), +            'merge_candidate': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'merge_candidate_rel_+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), +            'merge_exclusion': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'merge_exclusion_rel_+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), +            'merge_key': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'mobile_phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), +            'old_title': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), +            'person_types': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['ishtar_common.PersonType']", 'symmetrical': 'False'}), +            'phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'phone2': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'phone3': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'phone_desc': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'phone_desc2': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'phone_desc3': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), +            'raw_name': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'raw_phone': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'salutation': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), +            'surname': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}), +            'title': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.TitleType']", 'null': 'True', 'blank': 'True'}), +            'town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}) +        }, +        'ishtar_common.persontype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'PersonType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['auth.Group']", 'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'ishtar_common.sourcetype': { +            'Meta': {'ordering': "['label']", 'object_name': 'SourceType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'ishtar_common.state': { +            'Meta': {'ordering': "['number']", 'object_name': 'State'}, +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '30'}), +            'number': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '3'}) +        }, +        'ishtar_common.supporttype': { +            'Meta': {'object_name': 'SupportType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'ishtar_common.titletype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'TitleType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'ishtar_common.town': { +            'Meta': {'ordering': "['numero_insee']", 'object_name': 'Town'}, +            'canton': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Canton']", 'null': 'True', 'blank': 'True'}), +            'center': ('django.contrib.gis.db.models.fields.PointField', [], {'srid': '27572', 'null': 'True', 'blank': 'True'}), +            'departement': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Department']", 'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_ishtar_common_town'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'numero_insee': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '6'}), +            'surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) +        } +    } + +    complete_apps = ['archaeological_context_records']
\ No newline at end of file diff --git a/archaeological_context_records/migrations/0032_has_furniture_to_documentations.py b/archaeological_context_records/migrations/0032_has_furniture_to_documentations.py new file mode 100644 index 000000000..0b5de776a --- /dev/null +++ b/archaeological_context_records/migrations/0032_has_furniture_to_documentations.py @@ -0,0 +1,686 @@ +# -*- coding: utf-8 -*- +import datetime +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + + +class Migration(SchemaMigration): + +    def forwards(self, orm): +        has_fur, created = orm[ +            'archaeological_context_records.DocumentationType' +        ].objects.get_or_create( +            txt_idx='has-furniture', defaults={"label": u"Présence de mobilier"} +        ) +        for cr in orm['archaeological_context_records.ContextRecord' +                ].objects.filter(has_furniture=True).all(): +            if has_fur not in cr.documentations.all(): +                cr.documentations.add(has_fur) + +    def backwards(self, orm): +        pass + +    models = { +        'archaeological_context_records.activitytype': { +            'Meta': {'ordering': "('order',)", 'object_name': 'ActivityType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'order': ('django.db.models.fields.IntegerField', [], {}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_context_records.contextrecord': { +            'Meta': {'ordering': "('cached_label',)", 'object_name': 'ContextRecord'}, +            'activity': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.ActivityType']", 'null': 'True', 'blank': 'True'}), +            'auto_external_id': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'cached_label': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'closing_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'datings': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['archaeological_context_records.Dating']", 'symmetrical': 'False'}), +            'datings_comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'depth': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), +            'depth_of_appearance': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), +            'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'diameter': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), +            'documentations': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_context_records.DocumentationType']", 'null': 'True', 'blank': 'True'}), +            'excavation_technic': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.ExcavationTechnicType']", 'null': 'True', 'blank': 'True'}), +            'external_id': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'filling': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'has_furniture': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'identification': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.IdentificationType']", 'null': 'True', 'blank': 'True'}), +            'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), +            'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_archaeological_context_records_contextrecord'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), +            'interpretation': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '200'}), +            'length': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), +            'location': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'opening_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'operation': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'context_record'", 'to': "orm['archaeological_operations.Operation']"}), +            'parcel': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'context_record'", 'to': "orm['archaeological_operations.Parcel']"}), +            'point': ('django.contrib.gis.db.models.fields.PointField', [], {'dim': '3', 'null': 'True', 'blank': 'True'}), +            'polygon': ('django.contrib.gis.db.models.fields.PolygonField', [], {'null': 'True', 'blank': 'True'}), +            'related_context_records': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_context_records.ContextRecord']", 'null': 'True', 'through': "orm['archaeological_context_records.RecordRelations']", 'blank': 'True'}), +            'taq': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'taq_estimated': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'thickness': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), +            'thumbnail': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), +            'tpq': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'tpq_estimated': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'unit': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['archaeological_context_records.Unit']"}), +            'width': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}) +        }, +        'archaeological_context_records.contextrecordsource': { +            'Meta': {'object_name': 'ContextRecordSource'}, +            'additional_information': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'associated_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), +            'authors': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'contextrecordsource_related'", 'symmetrical': 'False', 'to': "orm['ishtar_common.Author']"}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'context_record': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'source'", 'to': "orm['archaeological_context_records.ContextRecord']"}), +            'creation_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'duplicate': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'external_id': ('django.db.models.fields.CharField', [], {'max_length': '12', 'null': 'True', 'blank': 'True'}), +            'format_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Format']", 'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), +            'internal_reference': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), +            'item_number': ('django.db.models.fields.IntegerField', [], {'default': '1'}), +            'receipt_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'receipt_date_in_documentation': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'reference': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), +            'scale': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), +            'source_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.SourceType']"}), +            'support_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.SupportType']", 'null': 'True', 'blank': 'True'}), +            'thumbnail': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), +            'title': ('django.db.models.fields.CharField', [], {'max_length': '300'}) +        }, +        'archaeological_context_records.dating': { +            'Meta': {'object_name': 'Dating'}, +            'dating_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.DatingType']", 'null': 'True', 'blank': 'True'}), +            'end_date': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'period': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.Period']"}), +            'precise_dating': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'quality': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.DatingQuality']", 'null': 'True', 'blank': 'True'}), +            'start_date': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) +        }, +        'archaeological_context_records.datingquality': { +            'Meta': {'ordering': "('label',)", 'object_name': 'DatingQuality'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_context_records.datingtype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'DatingType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_context_records.documentationtype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'DocumentationType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_context_records.excavationtechnictype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'ExcavationTechnicType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_context_records.historicalcontextrecord': { +            'Meta': {'ordering': "('-history_date', '-history_id')", 'object_name': 'HistoricalContextRecord'}, +            'activity_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'auto_external_id': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'cached_label': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'closing_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'datings_comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'depth': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), +            'depth_of_appearance': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), +            'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'diameter': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), +            'excavation_technic_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'external_id': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'filling': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'has_furniture': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'history_creator_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'history_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), +            'history_id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'history_modifier_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'history_type': ('django.db.models.fields.CharField', [], {'max_length': '1'}), +            'history_user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}), +            'id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}), +            'identification_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), +            'interpretation': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '200'}), +            'length': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), +            'location': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'opening_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'operation_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'parcel_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'point': ('django.contrib.gis.db.models.fields.PointField', [], {'dim': '3', 'null': 'True', 'blank': 'True'}), +            'polygon': ('django.contrib.gis.db.models.fields.PolygonField', [], {'null': 'True', 'blank': 'True'}), +            'taq': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'taq_estimated': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'thickness': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), +            'thumbnail': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), +            'tpq': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'tpq_estimated': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'unit_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'width': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}) +        }, +        'archaeological_context_records.identificationtype': { +            'Meta': {'ordering': "('order', 'label')", 'object_name': 'IdentificationType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'order': ('django.db.models.fields.IntegerField', [], {}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_context_records.recordrelations': { +            'Meta': {'object_name': 'RecordRelations'}, +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'left_record': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'right_relations'", 'to': "orm['archaeological_context_records.ContextRecord']"}), +            'relation_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.RelationType']"}), +            'right_record': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'left_relations'", 'to': "orm['archaeological_context_records.ContextRecord']"}) +        }, +        'archaeological_context_records.recordrelationview': { +            'Meta': {'unique_together': "(('id', 'right_record'),)", 'object_name': 'RecordRelationView', 'db_table': "'record_relations'", 'managed': 'False'}, +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'left_record': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'on_delete': 'models.DO_NOTHING', 'to': "orm['archaeological_context_records.ContextRecord']"}), +            'relation_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'on_delete': 'models.DO_NOTHING', 'to': "orm['archaeological_context_records.RelationType']"}), +            'right_record': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'on_delete': 'models.DO_NOTHING', 'to': "orm['archaeological_context_records.ContextRecord']"}) +        }, +        'archaeological_context_records.relationtype': { +            'Meta': {'ordering': "('order', 'label')", 'object_name': 'RelationType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'inverse_relation': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.RelationType']", 'null': 'True', 'blank': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'order': ('django.db.models.fields.IntegerField', [], {'default': '1'}), +            'symmetrical': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'tiny_label': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_context_records.unit': { +            'Meta': {'ordering': "('order', 'label')", 'object_name': 'Unit'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'order': ('django.db.models.fields.IntegerField', [], {}), +            'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.Unit']", 'null': 'True', 'blank': 'True'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_files.file': { +            'Meta': {'ordering': "('cached_label',)", 'object_name': 'File'}, +            'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'auto_external_id': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'cached_label': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'cira_advised': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'classified_area': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'corporation_general_contractor': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'general_contractor_files'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), +            'creation_date': ('django.db.models.fields.DateField', [], {'default': 'datetime.date.today', 'null': 'True', 'blank': 'True'}), +            'departments': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['ishtar_common.Department']", 'null': 'True', 'blank': 'True'}), +            'end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'external_id': ('django.db.models.fields.CharField', [], {'max_length': '120', 'null': 'True', 'blank': 'True'}), +            'file_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.FileType']"}), +            'general_contractor': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'general_contractor_files'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), +            'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'imported_line': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_archaeological_files_file'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), +            'in_charge': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'file_responsability'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), +            'instruction_deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'internal_reference': ('django.db.models.fields.CharField', [], {'max_length': '60', 'null': 'True', 'blank': 'True'}), +            'locality': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), +            'main_town': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'file_main'", 'null': 'True', 'to': "orm['ishtar_common.Town']"}), +            'mh_listing': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'mh_register': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'name': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'numeric_reference': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'organization': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'files'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), +            'permit_reference': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'permit_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.PermitType']", 'null': 'True', 'blank': 'True'}), +            'planning_service': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'planning_service_files'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), +            'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), +            'protected_area': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'raw_general_contractor': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), +            'raw_town_planning_service': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), +            'reception_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'related_file': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.File']", 'null': 'True', 'blank': 'True'}), +            'requested_operation_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.OperationType']"}), +            'research_comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'responsible_town_planning_service': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'responsible_town_planning_service_files'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), +            'saisine_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.SaisineType']", 'null': 'True', 'blank': 'True'}), +            'scientist': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'scientist'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), +            'total_developed_surface': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), +            'total_surface': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), +            'towns': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'file'", 'symmetrical': 'False', 'to': "orm['ishtar_common.Town']"}), +            'year': ('django.db.models.fields.IntegerField', [], {'default': '2017'}) +        }, +        'archaeological_files.filetype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'FileType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_files.permittype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'PermitType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_files.saisinetype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'SaisineType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'delay': ('django.db.models.fields.IntegerField', [], {'default': '30'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_operations.archaeologicalsite': { +            'Meta': {'object_name': 'ArchaeologicalSite'}, +            'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_archaeological_operations_archaeologicalsite'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), +            'periods': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_operations.Period']", 'null': 'True', 'blank': 'True'}), +            'reference': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '20'}), +            'remains': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_operations.RemainType']", 'null': 'True', 'blank': 'True'}) +        }, +        'archaeological_operations.operation': { +            'Meta': {'ordering': "('cached_label',)", 'object_name': 'Operation'}, +            'abstract': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'archaeological_sites': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_operations.ArchaeologicalSite']", 'null': 'True', 'blank': 'True'}), +            'associated_file': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'operations'", 'null': 'True', 'to': "orm['archaeological_files.File']"}), +            'cached_label': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}), +            'cira_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'cira_rapporteur': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'cira_rapporteur'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), +            'code_patriarche': ('django.db.models.fields.IntegerField', [], {'unique': 'True', 'null': 'True', 'blank': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'common_name': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'cost': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'creation_date': ('django.db.models.fields.DateField', [], {'default': 'datetime.date.today'}), +            'documentation_deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'documentation_received': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'eas_number': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}), +            'effective_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'excavation_end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'finds_deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'finds_received': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'fnap_cost': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'fnap_financing': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), +            'geoarchaeological_context_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), +            'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_archaeological_operations_operation'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), +            'in_charge': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'operation_responsability'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), +            'large_area_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'multi_polygon': ('django.contrib.gis.db.models.fields.MultiPolygonField', [], {'null': 'True', 'blank': 'True'}), +            'negative_result': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'old_code': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), +            'operation_code': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'operation_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['ishtar_common.OperationType']"}), +            'operator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'operator'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), +            'operator_reference': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}), +            'optional_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'periods': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_operations.Period']", 'null': 'True', 'blank': 'True'}), +            'point': ('django.contrib.gis.db.models.fields.PointField', [], {'null': 'True', 'blank': 'True'}), +            'record_quality': ('django.db.models.fields.CharField', [], {'max_length': '2', 'null': 'True', 'blank': 'True'}), +            'remains': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_operations.RemainType']", 'null': 'True', 'blank': 'True'}), +            'report_delivery_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'report_processing': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.ReportState']", 'null': 'True', 'blank': 'True'}), +            'scheduled_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'scientific_documentation_comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'scientist': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'operation_scientist_responsability'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), +            'start_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'thumbnail': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), +            'towns': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'operations'", 'symmetrical': 'False', 'to': "orm['ishtar_common.Town']"}), +            'virtual_operation': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'year': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'zoning_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}) +        }, +        'archaeological_operations.parcel': { +            'Meta': {'ordering': "('year', 'section', 'parcel_number')", 'object_name': 'Parcel'}, +            'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'associated_file': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'parcels'", 'null': 'True', 'to': "orm['archaeological_files.File']"}), +            'auto_external_id': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'external_id': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), +            'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'history_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), +            'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_archaeological_operations_parcel'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), +            'operation': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'parcels'", 'null': 'True', 'to': "orm['archaeological_operations.Operation']"}), +            'parcel_number': ('django.db.models.fields.CharField', [], {'max_length': '6', 'null': 'True', 'blank': 'True'}), +            'public_domain': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'section': ('django.db.models.fields.CharField', [], {'max_length': '4', 'null': 'True', 'blank': 'True'}), +            'town': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'parcels'", 'to': "orm['ishtar_common.Town']"}), +            'year': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) +        }, +        'archaeological_operations.period': { +            'Meta': {'ordering': "('order',)", 'object_name': 'Period'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'end_date': ('django.db.models.fields.IntegerField', [], {}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'order': ('django.db.models.fields.IntegerField', [], {}), +            'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.Period']", 'null': 'True', 'blank': 'True'}), +            'start_date': ('django.db.models.fields.IntegerField', [], {}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_operations.remaintype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'RemainType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_operations.reportstate': { +            'Meta': {'ordering': "('order',)", 'object_name': 'ReportState'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'order': ('django.db.models.fields.IntegerField', [], {}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'auth.group': { +            'Meta': {'object_name': 'Group'}, +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), +            'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) +        }, +        'auth.permission': { +            'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, +            'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) +        }, +        'auth.user': { +            'Meta': {'object_name': 'User'}, +            'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), +            'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), +            'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), +            'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), +            'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), +            'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), +            'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), +            'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) +        }, +        'contenttypes.contenttype': { +            'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, +            'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) +        }, +        'ishtar_common.arrondissement': { +            'Meta': {'object_name': 'Arrondissement'}, +            'department': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Department']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '30'}) +        }, +        'ishtar_common.author': { +            'Meta': {'ordering': "('author_type__order', 'person__name')", 'object_name': 'Author'}, +            'author_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.AuthorType']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'person': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'author'", 'to': "orm['ishtar_common.Person']"}) +        }, +        'ishtar_common.authortype': { +            'Meta': {'ordering': "['order', 'label']", 'object_name': 'AuthorType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'order': ('django.db.models.fields.IntegerField', [], {'default': '1'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'ishtar_common.canton': { +            'Meta': {'object_name': 'Canton'}, +            'arrondissement': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Arrondissement']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '30'}) +        }, +        'ishtar_common.department': { +            'Meta': {'ordering': "['number']", 'object_name': 'Department'}, +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '30'}), +            'number': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '3'}), +            'state': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.State']", 'null': 'True', 'blank': 'True'}) +        }, +        'ishtar_common.format': { +            'Meta': {'ordering': "['label']", 'object_name': 'Format'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'ishtar_common.import': { +            'Meta': {'object_name': 'Import'}, +            'conservative_import': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'creation_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}), +            'encoding': ('django.db.models.fields.CharField', [], {'default': "'utf-8'", 'max_length': '15'}), +            'end_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), +            'error_file': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'imported_file': ('django.db.models.fields.files.FileField', [], {'max_length': '220'}), +            'imported_images': ('django.db.models.fields.files.FileField', [], {'max_length': '220', 'null': 'True', 'blank': 'True'}), +            'importer_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.ImporterType']"}), +            'match_file': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}), +            'result_file': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), +            'seconds_remaining': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'skip_lines': ('django.db.models.fields.IntegerField', [], {'default': '1'}), +            'state': ('django.db.models.fields.CharField', [], {'default': "'C'", 'max_length': '2'}), +            'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.IshtarUser']"}) +        }, +        'ishtar_common.importermodel': { +            'Meta': {'ordering': "('name',)", 'object_name': 'ImporterModel'}, +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'klass': ('django.db.models.fields.CharField', [], {'max_length': '200'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '200'}) +        }, +        'ishtar_common.importertype': { +            'Meta': {'ordering': "('name',)", 'object_name': 'ImporterType'}, +            'associated_models': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.ImporterModel']"}), +            'created_models': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.ImporterModel']"}), +            'description': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'is_template': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), +            'slug': ('django.db.models.fields.SlugField', [], {'max_length': '100', 'unique': 'True', 'null': 'True', 'blank': 'True'}), +            'unicity_keys': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}), +            'users': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['ishtar_common.IshtarUser']", 'null': 'True', 'blank': 'True'}) +        }, +        'ishtar_common.ishtaruser': { +            'Meta': {'object_name': 'IshtarUser', '_ormbases': ['auth.User']}, +            'advanced_shortcut_menu': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'person': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'ishtaruser'", 'unique': 'True', 'to': "orm['ishtar_common.Person']"}), +            'user_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True', 'primary_key': 'True'}) +        }, +        'ishtar_common.operationtype': { +            'Meta': {'ordering': "['-preventive', 'order', 'label']", 'object_name': 'OperationType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'order': ('django.db.models.fields.IntegerField', [], {'default': '1'}), +            'preventive': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'ishtar_common.organization': { +            'Meta': {'object_name': 'Organization'}, +            'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'alt_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'alt_address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'alt_address_is_prefered': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'alt_country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), +            'alt_postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), +            'alt_town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}), +            'archived': ('django.db.models.fields.NullBooleanField', [], {'default': 'False', 'null': 'True', 'blank': 'True'}), +            'country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), +            'email': ('django.db.models.fields.EmailField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_ishtar_common_organization'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), +            'merge_candidate': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'merge_candidate_rel_+'", 'null': 'True', 'to': "orm['ishtar_common.Organization']"}), +            'merge_exclusion': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'merge_exclusion_rel_+'", 'null': 'True', 'to': "orm['ishtar_common.Organization']"}), +            'merge_key': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'mobile_phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '500'}), +            'organization_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.OrganizationType']"}), +            'phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'phone2': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'phone3': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'phone_desc': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'phone_desc2': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'phone_desc3': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), +            'raw_phone': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}) +        }, +        'ishtar_common.organizationtype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'OrganizationType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'ishtar_common.person': { +            'Meta': {'object_name': 'Person'}, +            'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'alt_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'alt_address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'alt_address_is_prefered': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'alt_country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), +            'alt_postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), +            'alt_town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}), +            'archived': ('django.db.models.fields.NullBooleanField', [], {'default': 'False', 'null': 'True', 'blank': 'True'}), +            'attached_to': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'members'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'contact_type': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), +            'email': ('django.db.models.fields.EmailField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_ishtar_common_person'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), +            'merge_candidate': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'merge_candidate_rel_+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), +            'merge_exclusion': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'merge_exclusion_rel_+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), +            'merge_key': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'mobile_phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), +            'old_title': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), +            'person_types': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['ishtar_common.PersonType']", 'symmetrical': 'False'}), +            'phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'phone2': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'phone3': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'phone_desc': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'phone_desc2': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'phone_desc3': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), +            'raw_name': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'raw_phone': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'salutation': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), +            'surname': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}), +            'title': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.TitleType']", 'null': 'True', 'blank': 'True'}), +            'town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}) +        }, +        'ishtar_common.persontype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'PersonType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['auth.Group']", 'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'ishtar_common.sourcetype': { +            'Meta': {'ordering': "['label']", 'object_name': 'SourceType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'ishtar_common.state': { +            'Meta': {'ordering': "['number']", 'object_name': 'State'}, +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '30'}), +            'number': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '3'}) +        }, +        'ishtar_common.supporttype': { +            'Meta': {'object_name': 'SupportType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'ishtar_common.titletype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'TitleType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'ishtar_common.town': { +            'Meta': {'ordering': "['numero_insee']", 'object_name': 'Town'}, +            'canton': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Canton']", 'null': 'True', 'blank': 'True'}), +            'center': ('django.contrib.gis.db.models.fields.PointField', [], {'srid': '27572', 'null': 'True', 'blank': 'True'}), +            'departement': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Department']", 'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_ishtar_common_town'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'numero_insee': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '6'}), +            'surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) +        } +    } + +    complete_apps = ['archaeological_context_records']
\ No newline at end of file diff --git a/archaeological_context_records/migrations/0033_auto__del_field_contextrecord_has_furniture__del_field_historicalconte.py b/archaeological_context_records/migrations/0033_auto__del_field_contextrecord_has_furniture__del_field_historicalconte.py new file mode 100644 index 000000000..65c5d54da --- /dev/null +++ b/archaeological_context_records/migrations/0033_auto__del_field_contextrecord_has_furniture__del_field_historicalconte.py @@ -0,0 +1,690 @@ +# -*- coding: utf-8 -*- +import datetime +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + + +class Migration(SchemaMigration): + +    def forwards(self, orm): +        # Deleting field 'ContextRecord.has_furniture' +        db.delete_column('archaeological_context_records_contextrecord', 'has_furniture') + +        # Deleting field 'HistoricalContextRecord.has_furniture' +        db.delete_column('archaeological_context_records_historicalcontextrecord', 'has_furniture') + + +    def backwards(self, orm): +        # Adding field 'ContextRecord.has_furniture' +        db.add_column('archaeological_context_records_contextrecord', 'has_furniture', +                      self.gf('django.db.models.fields.NullBooleanField')(null=True, blank=True), +                      keep_default=False) + +        # Adding field 'HistoricalContextRecord.has_furniture' +        db.add_column('archaeological_context_records_historicalcontextrecord', 'has_furniture', +                      self.gf('django.db.models.fields.NullBooleanField')(null=True, blank=True), +                      keep_default=False) + + +    models = { +        'archaeological_context_records.activitytype': { +            'Meta': {'ordering': "('order',)", 'object_name': 'ActivityType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'order': ('django.db.models.fields.IntegerField', [], {}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_context_records.contextrecord': { +            'Meta': {'ordering': "('cached_label',)", 'object_name': 'ContextRecord'}, +            'activity': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.ActivityType']", 'null': 'True', 'blank': 'True'}), +            'auto_external_id': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'cached_label': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'closing_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'datings': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['archaeological_context_records.Dating']", 'symmetrical': 'False'}), +            'datings_comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'depth': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), +            'depth_of_appearance': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), +            'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'diameter': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), +            'documentations': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_context_records.DocumentationType']", 'null': 'True', 'blank': 'True'}), +            'excavation_technic': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.ExcavationTechnicType']", 'null': 'True', 'blank': 'True'}), +            'external_id': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'filling': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'identification': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.IdentificationType']", 'null': 'True', 'blank': 'True'}), +            'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), +            'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_archaeological_context_records_contextrecord'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), +            'interpretation': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '200'}), +            'length': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), +            'location': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'opening_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'operation': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'context_record'", 'to': "orm['archaeological_operations.Operation']"}), +            'parcel': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'context_record'", 'to': "orm['archaeological_operations.Parcel']"}), +            'point': ('django.contrib.gis.db.models.fields.PointField', [], {'dim': '3', 'null': 'True', 'blank': 'True'}), +            'polygon': ('django.contrib.gis.db.models.fields.PolygonField', [], {'null': 'True', 'blank': 'True'}), +            'related_context_records': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_context_records.ContextRecord']", 'null': 'True', 'through': "orm['archaeological_context_records.RecordRelations']", 'blank': 'True'}), +            'taq': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'taq_estimated': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'thickness': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), +            'thumbnail': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), +            'tpq': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'tpq_estimated': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'unit': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['archaeological_context_records.Unit']"}), +            'width': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}) +        }, +        'archaeological_context_records.contextrecordsource': { +            'Meta': {'object_name': 'ContextRecordSource'}, +            'additional_information': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'associated_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), +            'authors': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'contextrecordsource_related'", 'symmetrical': 'False', 'to': "orm['ishtar_common.Author']"}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'context_record': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'source'", 'to': "orm['archaeological_context_records.ContextRecord']"}), +            'creation_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'duplicate': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'external_id': ('django.db.models.fields.CharField', [], {'max_length': '12', 'null': 'True', 'blank': 'True'}), +            'format_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Format']", 'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), +            'internal_reference': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), +            'item_number': ('django.db.models.fields.IntegerField', [], {'default': '1'}), +            'receipt_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'receipt_date_in_documentation': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'reference': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), +            'scale': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), +            'source_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.SourceType']"}), +            'support_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.SupportType']", 'null': 'True', 'blank': 'True'}), +            'thumbnail': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), +            'title': ('django.db.models.fields.CharField', [], {'max_length': '300'}) +        }, +        'archaeological_context_records.dating': { +            'Meta': {'object_name': 'Dating'}, +            'dating_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.DatingType']", 'null': 'True', 'blank': 'True'}), +            'end_date': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'period': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.Period']"}), +            'precise_dating': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'quality': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.DatingQuality']", 'null': 'True', 'blank': 'True'}), +            'start_date': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) +        }, +        'archaeological_context_records.datingquality': { +            'Meta': {'ordering': "('label',)", 'object_name': 'DatingQuality'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_context_records.datingtype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'DatingType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_context_records.documentationtype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'DocumentationType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_context_records.excavationtechnictype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'ExcavationTechnicType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_context_records.historicalcontextrecord': { +            'Meta': {'ordering': "('-history_date', '-history_id')", 'object_name': 'HistoricalContextRecord'}, +            'activity_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'auto_external_id': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'cached_label': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'closing_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'datings_comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'depth': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), +            'depth_of_appearance': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), +            'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'diameter': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), +            'excavation_technic_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'external_id': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'filling': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'history_creator_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'history_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), +            'history_id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'history_modifier_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'history_type': ('django.db.models.fields.CharField', [], {'max_length': '1'}), +            'history_user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}), +            'id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}), +            'identification_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), +            'interpretation': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '200'}), +            'length': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), +            'location': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'opening_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'operation_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'parcel_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'point': ('django.contrib.gis.db.models.fields.PointField', [], {'dim': '3', 'null': 'True', 'blank': 'True'}), +            'polygon': ('django.contrib.gis.db.models.fields.PolygonField', [], {'null': 'True', 'blank': 'True'}), +            'taq': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'taq_estimated': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'thickness': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), +            'thumbnail': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), +            'tpq': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'tpq_estimated': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'unit_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'width': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}) +        }, +        'archaeological_context_records.identificationtype': { +            'Meta': {'ordering': "('order', 'label')", 'object_name': 'IdentificationType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'order': ('django.db.models.fields.IntegerField', [], {}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_context_records.recordrelations': { +            'Meta': {'object_name': 'RecordRelations'}, +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'left_record': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'right_relations'", 'to': "orm['archaeological_context_records.ContextRecord']"}), +            'relation_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.RelationType']"}), +            'right_record': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'left_relations'", 'to': "orm['archaeological_context_records.ContextRecord']"}) +        }, +        'archaeological_context_records.recordrelationview': { +            'Meta': {'unique_together': "(('id', 'right_record'),)", 'object_name': 'RecordRelationView', 'db_table': "'record_relations'", 'managed': 'False'}, +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'left_record': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'on_delete': 'models.DO_NOTHING', 'to': "orm['archaeological_context_records.ContextRecord']"}), +            'relation_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'on_delete': 'models.DO_NOTHING', 'to': "orm['archaeological_context_records.RelationType']"}), +            'right_record': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'on_delete': 'models.DO_NOTHING', 'to': "orm['archaeological_context_records.ContextRecord']"}) +        }, +        'archaeological_context_records.relationtype': { +            'Meta': {'ordering': "('order', 'label')", 'object_name': 'RelationType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'inverse_relation': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.RelationType']", 'null': 'True', 'blank': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'order': ('django.db.models.fields.IntegerField', [], {'default': '1'}), +            'symmetrical': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'tiny_label': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_context_records.unit': { +            'Meta': {'ordering': "('order', 'label')", 'object_name': 'Unit'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'order': ('django.db.models.fields.IntegerField', [], {}), +            'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.Unit']", 'null': 'True', 'blank': 'True'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_files.file': { +            'Meta': {'ordering': "('cached_label',)", 'object_name': 'File'}, +            'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'auto_external_id': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'cached_label': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'cira_advised': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'classified_area': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'corporation_general_contractor': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'general_contractor_files'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), +            'creation_date': ('django.db.models.fields.DateField', [], {'default': 'datetime.date.today', 'null': 'True', 'blank': 'True'}), +            'departments': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['ishtar_common.Department']", 'null': 'True', 'blank': 'True'}), +            'end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'external_id': ('django.db.models.fields.CharField', [], {'max_length': '120', 'null': 'True', 'blank': 'True'}), +            'file_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.FileType']"}), +            'general_contractor': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'general_contractor_files'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), +            'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'imported_line': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_archaeological_files_file'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), +            'in_charge': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'file_responsability'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), +            'instruction_deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'internal_reference': ('django.db.models.fields.CharField', [], {'max_length': '60', 'null': 'True', 'blank': 'True'}), +            'locality': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), +            'main_town': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'file_main'", 'null': 'True', 'to': "orm['ishtar_common.Town']"}), +            'mh_listing': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'mh_register': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'name': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'numeric_reference': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'organization': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'files'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), +            'permit_reference': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'permit_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.PermitType']", 'null': 'True', 'blank': 'True'}), +            'planning_service': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'planning_service_files'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), +            'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), +            'protected_area': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'raw_general_contractor': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), +            'raw_town_planning_service': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), +            'reception_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'related_file': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.File']", 'null': 'True', 'blank': 'True'}), +            'requested_operation_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.OperationType']"}), +            'research_comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'responsible_town_planning_service': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'responsible_town_planning_service_files'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), +            'saisine_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.SaisineType']", 'null': 'True', 'blank': 'True'}), +            'scientist': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'scientist'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), +            'total_developed_surface': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), +            'total_surface': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), +            'towns': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'file'", 'symmetrical': 'False', 'to': "orm['ishtar_common.Town']"}), +            'year': ('django.db.models.fields.IntegerField', [], {'default': '2017'}) +        }, +        'archaeological_files.filetype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'FileType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_files.permittype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'PermitType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_files.saisinetype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'SaisineType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'delay': ('django.db.models.fields.IntegerField', [], {'default': '30'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_operations.archaeologicalsite': { +            'Meta': {'object_name': 'ArchaeologicalSite'}, +            'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_archaeological_operations_archaeologicalsite'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), +            'periods': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_operations.Period']", 'null': 'True', 'blank': 'True'}), +            'reference': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '20'}), +            'remains': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_operations.RemainType']", 'null': 'True', 'blank': 'True'}) +        }, +        'archaeological_operations.operation': { +            'Meta': {'ordering': "('cached_label',)", 'object_name': 'Operation'}, +            'abstract': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'archaeological_sites': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_operations.ArchaeologicalSite']", 'null': 'True', 'blank': 'True'}), +            'associated_file': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'operations'", 'null': 'True', 'to': "orm['archaeological_files.File']"}), +            'cached_label': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}), +            'cira_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'cira_rapporteur': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'cira_rapporteur'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), +            'code_patriarche': ('django.db.models.fields.IntegerField', [], {'unique': 'True', 'null': 'True', 'blank': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'common_name': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'cost': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'creation_date': ('django.db.models.fields.DateField', [], {'default': 'datetime.date.today'}), +            'documentation_deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'documentation_received': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'eas_number': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}), +            'effective_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'excavation_end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'finds_deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'finds_received': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'fnap_cost': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'fnap_financing': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), +            'geoarchaeological_context_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), +            'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_archaeological_operations_operation'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), +            'in_charge': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'operation_responsability'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), +            'large_area_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'multi_polygon': ('django.contrib.gis.db.models.fields.MultiPolygonField', [], {'null': 'True', 'blank': 'True'}), +            'negative_result': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'old_code': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), +            'operation_code': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'operation_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['ishtar_common.OperationType']"}), +            'operator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'operator'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), +            'operator_reference': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}), +            'optional_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'periods': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_operations.Period']", 'null': 'True', 'blank': 'True'}), +            'point': ('django.contrib.gis.db.models.fields.PointField', [], {'null': 'True', 'blank': 'True'}), +            'record_quality': ('django.db.models.fields.CharField', [], {'max_length': '2', 'null': 'True', 'blank': 'True'}), +            'remains': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_operations.RemainType']", 'null': 'True', 'blank': 'True'}), +            'report_delivery_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'report_processing': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.ReportState']", 'null': 'True', 'blank': 'True'}), +            'scheduled_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'scientific_documentation_comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'scientist': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'operation_scientist_responsability'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), +            'start_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'thumbnail': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), +            'towns': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'operations'", 'symmetrical': 'False', 'to': "orm['ishtar_common.Town']"}), +            'virtual_operation': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'year': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'zoning_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}) +        }, +        'archaeological_operations.parcel': { +            'Meta': {'ordering': "('year', 'section', 'parcel_number')", 'object_name': 'Parcel'}, +            'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'associated_file': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'parcels'", 'null': 'True', 'to': "orm['archaeological_files.File']"}), +            'auto_external_id': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'external_id': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), +            'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'history_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), +            'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_archaeological_operations_parcel'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), +            'operation': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'parcels'", 'null': 'True', 'to': "orm['archaeological_operations.Operation']"}), +            'parcel_number': ('django.db.models.fields.CharField', [], {'max_length': '6', 'null': 'True', 'blank': 'True'}), +            'public_domain': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'section': ('django.db.models.fields.CharField', [], {'max_length': '4', 'null': 'True', 'blank': 'True'}), +            'town': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'parcels'", 'to': "orm['ishtar_common.Town']"}), +            'year': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) +        }, +        'archaeological_operations.period': { +            'Meta': {'ordering': "('order',)", 'object_name': 'Period'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'end_date': ('django.db.models.fields.IntegerField', [], {}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'order': ('django.db.models.fields.IntegerField', [], {}), +            'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.Period']", 'null': 'True', 'blank': 'True'}), +            'start_date': ('django.db.models.fields.IntegerField', [], {}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_operations.remaintype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'RemainType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_operations.reportstate': { +            'Meta': {'ordering': "('order',)", 'object_name': 'ReportState'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'order': ('django.db.models.fields.IntegerField', [], {}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'auth.group': { +            'Meta': {'object_name': 'Group'}, +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), +            'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) +        }, +        'auth.permission': { +            'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, +            'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) +        }, +        'auth.user': { +            'Meta': {'object_name': 'User'}, +            'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), +            'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), +            'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), +            'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), +            'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), +            'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), +            'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), +            'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) +        }, +        'contenttypes.contenttype': { +            'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, +            'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) +        }, +        'ishtar_common.arrondissement': { +            'Meta': {'object_name': 'Arrondissement'}, +            'department': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Department']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '30'}) +        }, +        'ishtar_common.author': { +            'Meta': {'ordering': "('author_type__order', 'person__name')", 'object_name': 'Author'}, +            'author_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.AuthorType']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'person': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'author'", 'to': "orm['ishtar_common.Person']"}) +        }, +        'ishtar_common.authortype': { +            'Meta': {'ordering': "['order', 'label']", 'object_name': 'AuthorType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'order': ('django.db.models.fields.IntegerField', [], {'default': '1'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'ishtar_common.canton': { +            'Meta': {'object_name': 'Canton'}, +            'arrondissement': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Arrondissement']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '30'}) +        }, +        'ishtar_common.department': { +            'Meta': {'ordering': "['number']", 'object_name': 'Department'}, +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '30'}), +            'number': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '3'}), +            'state': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.State']", 'null': 'True', 'blank': 'True'}) +        }, +        'ishtar_common.format': { +            'Meta': {'ordering': "['label']", 'object_name': 'Format'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'ishtar_common.import': { +            'Meta': {'object_name': 'Import'}, +            'conservative_import': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'creation_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}), +            'encoding': ('django.db.models.fields.CharField', [], {'default': "'utf-8'", 'max_length': '15'}), +            'end_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), +            'error_file': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'imported_file': ('django.db.models.fields.files.FileField', [], {'max_length': '220'}), +            'imported_images': ('django.db.models.fields.files.FileField', [], {'max_length': '220', 'null': 'True', 'blank': 'True'}), +            'importer_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.ImporterType']"}), +            'match_file': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}), +            'result_file': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), +            'seconds_remaining': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'skip_lines': ('django.db.models.fields.IntegerField', [], {'default': '1'}), +            'state': ('django.db.models.fields.CharField', [], {'default': "'C'", 'max_length': '2'}), +            'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.IshtarUser']"}) +        }, +        'ishtar_common.importermodel': { +            'Meta': {'ordering': "('name',)", 'object_name': 'ImporterModel'}, +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'klass': ('django.db.models.fields.CharField', [], {'max_length': '200'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '200'}) +        }, +        'ishtar_common.importertype': { +            'Meta': {'ordering': "('name',)", 'object_name': 'ImporterType'}, +            'associated_models': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.ImporterModel']"}), +            'created_models': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.ImporterModel']"}), +            'description': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'is_template': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), +            'slug': ('django.db.models.fields.SlugField', [], {'max_length': '100', 'unique': 'True', 'null': 'True', 'blank': 'True'}), +            'unicity_keys': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}), +            'users': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['ishtar_common.IshtarUser']", 'null': 'True', 'blank': 'True'}) +        }, +        'ishtar_common.ishtaruser': { +            'Meta': {'object_name': 'IshtarUser', '_ormbases': ['auth.User']}, +            'advanced_shortcut_menu': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'person': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'ishtaruser'", 'unique': 'True', 'to': "orm['ishtar_common.Person']"}), +            'user_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True', 'primary_key': 'True'}) +        }, +        'ishtar_common.operationtype': { +            'Meta': {'ordering': "['-preventive', 'order', 'label']", 'object_name': 'OperationType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'order': ('django.db.models.fields.IntegerField', [], {'default': '1'}), +            'preventive': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'ishtar_common.organization': { +            'Meta': {'object_name': 'Organization'}, +            'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'alt_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'alt_address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'alt_address_is_prefered': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'alt_country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), +            'alt_postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), +            'alt_town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}), +            'archived': ('django.db.models.fields.NullBooleanField', [], {'default': 'False', 'null': 'True', 'blank': 'True'}), +            'country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), +            'email': ('django.db.models.fields.EmailField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_ishtar_common_organization'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), +            'merge_candidate': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'merge_candidate_rel_+'", 'null': 'True', 'to': "orm['ishtar_common.Organization']"}), +            'merge_exclusion': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'merge_exclusion_rel_+'", 'null': 'True', 'to': "orm['ishtar_common.Organization']"}), +            'merge_key': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'mobile_phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '500'}), +            'organization_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.OrganizationType']"}), +            'phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'phone2': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'phone3': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'phone_desc': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'phone_desc2': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'phone_desc3': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), +            'raw_phone': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}) +        }, +        'ishtar_common.organizationtype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'OrganizationType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'ishtar_common.person': { +            'Meta': {'object_name': 'Person'}, +            'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'alt_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'alt_address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'alt_address_is_prefered': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'alt_country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), +            'alt_postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), +            'alt_town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}), +            'archived': ('django.db.models.fields.NullBooleanField', [], {'default': 'False', 'null': 'True', 'blank': 'True'}), +            'attached_to': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'members'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'contact_type': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), +            'email': ('django.db.models.fields.EmailField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_ishtar_common_person'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), +            'merge_candidate': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'merge_candidate_rel_+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), +            'merge_exclusion': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'merge_exclusion_rel_+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), +            'merge_key': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'mobile_phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), +            'old_title': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), +            'person_types': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['ishtar_common.PersonType']", 'symmetrical': 'False'}), +            'phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'phone2': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'phone3': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'phone_desc': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'phone_desc2': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'phone_desc3': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), +            'raw_name': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'raw_phone': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'salutation': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), +            'surname': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}), +            'title': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.TitleType']", 'null': 'True', 'blank': 'True'}), +            'town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}) +        }, +        'ishtar_common.persontype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'PersonType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['auth.Group']", 'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'ishtar_common.sourcetype': { +            'Meta': {'ordering': "['label']", 'object_name': 'SourceType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'ishtar_common.state': { +            'Meta': {'ordering': "['number']", 'object_name': 'State'}, +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '30'}), +            'number': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '3'}) +        }, +        'ishtar_common.supporttype': { +            'Meta': {'object_name': 'SupportType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'ishtar_common.titletype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'TitleType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'ishtar_common.town': { +            'Meta': {'ordering': "['numero_insee']", 'object_name': 'Town'}, +            'canton': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Canton']", 'null': 'True', 'blank': 'True'}), +            'center': ('django.contrib.gis.db.models.fields.PointField', [], {'srid': '27572', 'null': 'True', 'blank': 'True'}), +            'departement': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Department']", 'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_ishtar_common_town'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'numero_insee': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '6'}), +            'surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) +        } +    } + +    complete_apps = ['archaeological_context_records']
\ No newline at end of file diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py index 14e98e76b..bb3afc899 100644 --- a/archaeological_context_records/models.py +++ b/archaeological_context_records/models.py @@ -1,6 +1,6 @@  #!/usr/bin/env python  # -*- coding: utf-8 -*- -# Copyright (C) 2012-2016 Étienne Loks  <etienne.loks_AT_peacefrogsDOTnet> +# Copyright (C) 2012-2017 Étienne Loks  <etienne.loks_AT_peacefrogsDOTnet>  # This program is free software: you can redistribute it and/or modify  # it under the terms of the GNU Affero General Public License as @@ -129,6 +129,15 @@ post_save.connect(post_save_cache, sender=ExcavationTechnicType)  post_delete.connect(post_save_cache, sender=ExcavationTechnicType) +class DocumentationType(GeneralType): +    class Meta: +        verbose_name = _(u"Documentation type") +        verbose_name_plural = _(u"Documentation types") +        ordering = ('label',) +post_save.connect(post_save_cache, sender=DocumentationType) +post_delete.connect(post_save_cache, sender=DocumentationType) + +  class CRBulkView(object):      CREATE_SQL = """          CREATE VIEW context_records_cached_label_bulk_update @@ -150,7 +159,7 @@ class CRBulkView(object):  class ContextRecord(BaseHistorizedItem, ImageModel, OwnPerms, -                      ValueGetter, ShortMenuItem): +                    ValueGetter, ShortMenuItem):      SHOW_URL = 'show-contextrecord'      SLUG = 'contextrecord'      TABLE_COLS = ['label', 'operation__common_name', 'parcel__town__name', @@ -216,18 +225,21 @@ class ContextRecord(BaseHistorizedItem, ImageModel, OwnPerms,      width = models.FloatField(_(u"Width (m)"), blank=True, null=True)      thickness = models.FloatField(_(u"Thickness (m)"), blank=True,                                    null=True) +    diameter = models.FloatField(_(u"Diameter (m)"), blank=True, null=True)      depth = models.FloatField(_(u"Depth (m)"), blank=True, null=True) +    depth_of_appearance = models.FloatField( +        _(u"Depth of appearance (m)"), blank=True, null=True)      location = models.TextField(          _(u"Location"), blank=True, null=True,          help_text=_(u"A short description of the location of the context "                      u"record"))      datings = models.ManyToManyField(Dating) +    documentations = models.ManyToManyField(DocumentationType, blank=True, +                                            null=True)      datings_comment = models.TextField(_(u"Comment on datings"), blank=True,                                         null=True)      unit = models.ForeignKey(Unit, verbose_name=_(u"Context record type"),                               related_name='+', blank=True, null=True) -    has_furniture = models.NullBooleanField(_(u"Has furniture?"), blank=True, -                                            null=True)      filling = models.TextField(_(u"Filling"), blank=True, null=True)      interpretation = models.TextField(_(u"Interpretation"), blank=True,                                        null=True) @@ -353,9 +365,11 @@ class ContextRecord(BaseHistorizedItem, ImageModel, OwnPerms,      @classmethod      def get_query_owns(cls, user): -        return Q(operation__scientist=user.ishtaruser.person) |\ -            Q(operation__in_charge=user.ishtaruser.person) |\ -            Q(history_creator=user) +        return (Q(operation__scientist=user.ishtaruser.person) | +                Q(operation__in_charge=user.ishtaruser.person) | +                Q(operation__collaborators__pk=user.ishtaruser.person.pk) | +                Q(history_creator=user)) \ +            & Q(operation__end_date__isnull=True)      @classmethod      def get_owns(cls, user, menu_filtr=None, limit=None, @@ -389,8 +403,16 @@ class ContextRecord(BaseHistorizedItem, ImageModel, OwnPerms,          return self.full_label()      def _get_associated_cached_labels(self): -        from archaeological_finds.models import Find -        return list(Find.objects.filter(base_finds__context_record=self).all()) +        from archaeological_finds.models import Find, BaseFind +        return list(Find.objects.filter(base_finds__context_record=self).all())\ +            + list(BaseFind.objects.filter(context_record=self).all()) + +    def _cached_labels_bulk_update(self): +        if settings.TESTING and settings.USE_SPATIALITE_FOR_TESTS: +            return +        self.base_finds.model.cached_label_bulk_update( +            context_record_id=self.pk) +        return True      @property      def reference(self): @@ -603,6 +625,18 @@ class ContextRecordSource(Source):      class Meta:          verbose_name = _(u"Context record documentation")          verbose_name_plural = _(u"Context record documentations") +        permissions = ( +            ("view_contextrecordsource", +             ugettext(u"Can view all Context record sources")), +            ("view_own_contextrecordsource", +             ugettext(u"Can view own Context record source")), +            ("add_own_contextrecordsource", +             ugettext(u"Can add own Context record source")), +            ("change_own_contextrecordsource", +             ugettext(u"Can change own Context record source")), +            ("delete_own_contextrecordsource", +             ugettext(u"Can delete own Context record source")), +        )      context_record = models.ForeignKey(          ContextRecord, verbose_name=_(u"Context record"),          related_name="source") @@ -610,3 +644,12 @@ class ContextRecordSource(Source):      @property      def owner(self):          return self.context_record + +    @classmethod +    def get_query_owns(cls, user): +        return ( +            Q(context_record__operation__scientist=user.ishtaruser.person) | +            Q(context_record__operation__in_charge=user.ishtaruser.person) | +            Q(context_record__operation__collaborators__pk= +              user.ishtaruser.person.pk)) \ +               & Q(context_record__operation__end_date__isnull=True) diff --git a/archaeological_context_records/templates/ishtar/sheet_contextrecord.html b/archaeological_context_records/templates/ishtar/sheet_contextrecord.html index c5693edfb..29e45d3a9 100644 --- a/archaeological_context_records/templates/ishtar/sheet_contextrecord.html +++ b/archaeological_context_records/templates/ishtar/sheet_contextrecord.html @@ -26,15 +26,17 @@  </ul>  {% field "Comment on datings" item.datings_comment "<pre>" "</pre>" %} -{% if item.description or item.lenght or item.width or item.depth or item.thickness or item.comment %} +{% if item.diameter or item.depth_of_appearance or item.documentations.count or item.description or item.lenght or item.width or item.depth or item.thickness or item.comment %}  <h3>{% trans "Description"%}</h3>  {% field "Description" item.description "<pre>" "</pre>" %}  {% field "Comment" item.comment "<pre>" "</pre>" %}  <ul class='form-flex'> -{% field_li "Length (m)" item.lenght %} -{% field_li "Width (m)" item.width %} -{% field_li "Depth (m)" item.depth %} -{% field_li "Thickness (m)" item.thickness %} +    {% field_li "Length (m)" item.lenght %} +    {% field_li "Width (m)" item.width %} +    {% field_li "Diameter (m)" item.diameter %} +    {% field_li "Depth (m)" item.depth %} +    {% field_li "Thickness (m)" item.thickness %} +    {% field_li "Depth of appearance (m)" item.depth_of_appearance %}  </ul>  {% endif %} @@ -42,9 +44,9 @@  <h3>{% trans "Interpretation"%}</h3>  <ul class='form-flex'> -{% field_li "Activity" item.activity %} -{% field_li "Identification" item.identification %} -{% field_li "Has furniture?" item.has_furniture %} +    {% field_li_multiple "Documentation" item.documentations %} +    {% field_li "Activity" item.activity %} +    {% field_li "Identification" item.identification %}  </ul>  {% field "Filling" item.filling "<pre>" "</pre>" %}  {% field "Interpretation" item.interpretation "<pre>" "</pre>" %} diff --git a/archaeological_context_records/tests.py b/archaeological_context_records/tests.py index 6bb293e4d..4226b42ea 100644 --- a/archaeological_context_records/tests.py +++ b/archaeological_context_records/tests.py @@ -235,7 +235,7 @@ class ContextRecordTest(ContextRecordInit, TestCase):          models.RecordRelations.objects.create(              left_record=cr_1, right_record=cr_2, relation_type=sym_rel_type) -    def testExternalID(self): +    def test_external_id(self):          cr = self.context_records[0]          self.assertEqual(              cr.external_id, @@ -255,7 +255,7 @@ class ContextRecordTest(ContextRecordInit, TestCase):              cr.operation          ) -    def test_cache_update(self): +    def test_upstream_cache_update(self):          cr = self.create_context_record()[0]          cr_pk = cr.pk          # OP2010 - 1 | A | 1 | CR 1 @@ -288,6 +288,54 @@ class ContextRecordTest(ContextRecordInit, TestCase):          ope_id, parcel_sec, parcel_nb, cr_label = cr.cached_label.split(' | ')          self.assertEqual(ope_id, 'OP2017-1') +    def test_downstream_cache_update(self): +        if settings.USE_SPATIALITE_FOR_TESTS: +            # using views - can only be tested with postgresql +            return + +        cr = self.create_context_record()[0] + +        from archaeological_finds.models import Find, BaseFind, MaterialType + +        data = { +            'label': "Find me a reason", +            'context_record': cr, +            'history_modifier': self.get_default_user() +        } +        bf = BaseFind.objects.create(**data) +        find = Find.objects.create( +            history_modifier=self.get_default_user(), +            label='Find me too' +        ) +        find.base_finds.add(bf) + +        mat = MaterialType.objects.create( +            label='Adamentium', txt_idx='admentium', code='ADA') +        find.material_types.add(mat) + +        class TestObj(object): +            def __init__(self): +                self.find_reached = [] + +            def reached(self, sender, **kwargs): +                instance = kwargs.get('instance') +                if sender in (Find, BaseFind): +                    self.find_reached.append(instance) + +        test_obj = TestObj() +        cr = models.ContextRecord.objects.get(pk=cr.pk) +        cr.test_obj = test_obj +        cr.label = "New label!" +        cr.save() + +        # verify the relevance of the update +        bf = BaseFind.objects.get(pk=bf.pk) +        self.assertIn("New label!", bf.cache_complete_id) + +        # bulk update of find cached label gen don't have to be +        # reached +        self.assertEqual(len(test_obj.find_reached), 0) +  class ContextRecordSearchTest(ContextRecordInit, TestCase):      fixtures = ImportContextRecordTest.fixtures diff --git a/archaeological_context_records/urls.py b/archaeological_context_records/urls.py index 341d321f9..e89a76aef 100644 --- a/archaeological_context_records/urls.py +++ b/archaeological_context_records/urls.py @@ -23,7 +23,7 @@ from archaeological_context_records import models  from ishtar_common.wizards import check_rights  import views -# be carreful: each check_rights must be relevant with ishtar_menu +# be careful: each check_rights must be relevant with ishtar_menu  # forms  urlpatterns = patterns( @@ -33,7 +33,7 @@ urlpatterns = patterns(          check_rights(['view_contextrecord', 'view_own_contextrecord'])(              views.record_search_wizard), name='record_search'),      url(r'record_creation/(?P<step>.+)?$', -        check_rights(['add_contextrecord'])( +        check_rights(['add_contextrecord', 'add_own_contextrecord'])(              views.record_creation_wizard), name='record_creation'),      url(r'record_modification/(?P<step>.+)?$',          check_rights(['change_contextrecord', 'change_own_contextrecord'])( diff --git a/archaeological_context_records/wizards.py b/archaeological_context_records/wizards.py index 0d877929f..fd48ef3d9 100644 --- a/archaeological_context_records/wizards.py +++ b/archaeological_context_records/wizards.py @@ -138,7 +138,7 @@ class RecordModifWizard(RecordWizard):  class RecordDeletionWizard(DeletionWizard):      model = models.ContextRecord      fields = ['label', 'parcel', 'description', 'length', 'width', 'thickness', -              'depth', 'location', 'datings', 'units', 'has_furniture', +              'depth', 'location', 'datings', 'units', 'documentations',                'filling', 'interpretation', 'taq', 'taq_estimated', 'tpq',                'tpq_estimated']      filter_owns = {'selec-record_deletion': ['pk']} diff --git a/archaeological_files/forms.py b/archaeological_files/forms.py index 45a05b9b1..d8738f511 100644 --- a/archaeological_files/forms.py +++ b/archaeological_files/forms.py @@ -209,7 +209,7 @@ class FileFormGeneral(ManageOldType, forms.Form):          validators=[valid_id(Person)])      year = forms.IntegerField(label=_("Year"),                                initial=lambda: datetime.datetime.now().year, -                              validators=[validators.MinValueValidator(1900), +                              validators=[validators.MinValueValidator(1600),                                            validators.MaxValueValidator(2100)])      numeric_reference = forms.IntegerField(          label=_("Numeric reference"), widget=forms.HiddenInput, required=False) @@ -336,10 +336,8 @@ class FileFormResearch(ManageOldType, forms.Form):                           'requested_operation_type': OperationType,                           'organization': Organization,                           'department': Department} -    department = widgets.MultipleAutocompleteField( -        model=Department, -        label=_("Departments"), -        required=False) +    department = widgets.Select2MultipleField( +        model=Department, label=_("Departments"), required=False)      scientist = forms.IntegerField(          widget=widgets.JQueryAutoComplete(              reverse_lazy( diff --git a/archaeological_files/locale/django.pot b/archaeological_files/locale/django.pot index 1e513ae12..62dcf19ae 100644 --- a/archaeological_files/locale/django.pot +++ b/archaeological_files/locale/django.pot @@ -9,7 +9,7 @@  msgid ""  msgstr "" -#: forms.py:47 forms.py:210 forms.py:255 forms.py:396 forms.py:423 +#: forms.py:47 forms.py:210 forms.py:255 forms.py:394 forms.py:421  #: models.py:108 templates/ishtar/sheet_file.html:144  msgid "Year"  msgstr "" @@ -22,15 +22,15 @@ msgstr ""  msgid "Other reference"  msgstr "" -#: forms.py:52 forms.py:431 +#: forms.py:52 forms.py:429  msgid "Parcel (section/number/public domain)"  msgstr "" -#: forms.py:55 forms.py:407 forms.py:434 models.py:558 +#: forms.py:55 forms.py:405 forms.py:432 models.py:558  msgid "Department"  msgstr "" -#: forms.py:56 forms.py:443 +#: forms.py:56 forms.py:441  msgid "File name"  msgstr "" @@ -54,7 +54,7 @@ msgstr ""  msgid "Permit reference"  msgstr "" -#: forms.py:63 forms.py:227 forms.py:364 models.py:180 +#: forms.py:63 forms.py:227 forms.py:362 models.py:180  #: templates/ishtar/sheet_file.html:97  msgid "Comment"  msgstr "" @@ -63,19 +63,19 @@ msgstr ""  msgid "In charge"  msgstr "" -#: forms.py:72 forms.py:281 forms.py:445 models.py:126 +#: forms.py:72 forms.py:281 forms.py:443 models.py:126  msgid "General contractor"  msgstr "" -#: forms.py:79 forms.py:453 +#: forms.py:79 forms.py:451  msgid "Organization of general contractor"  msgstr "" -#: forms.py:87 forms.py:476 +#: forms.py:87 forms.py:474  msgid "Created by"  msgstr "" -#: forms.py:94 forms.py:484 +#: forms.py:94 forms.py:482  msgid "Modified by"  msgstr "" @@ -169,83 +169,83 @@ msgstr ""  msgid "Research archaeology"  msgstr "" -#: forms.py:341 models.py:183 templates/ishtar/sheet_file.html:88 +#: forms.py:340 models.py:183 templates/ishtar/sheet_file.html:88  msgid "Departments"  msgstr "" -#: forms.py:351 models.py:192 +#: forms.py:349 models.py:192  msgid "Scientist in charge"  msgstr "" -#: forms.py:353 models.py:186 templates/ishtar/sheet_file.html:90 +#: forms.py:351 models.py:186 templates/ishtar/sheet_file.html:90  msgid "Requested operation type"  msgstr "" -#: forms.py:355 +#: forms.py:353  msgid "Lead organization"  msgstr "" -#: forms.py:371 models.py:196 templates/ishtar/sheet_file.html:95 +#: forms.py:369 models.py:196 templates/ishtar/sheet_file.html:95  msgid "Classified area"  msgstr "" -#: forms.py:373 models.py:198 templates/ishtar/sheet_file.html:96 +#: forms.py:371 models.py:198 templates/ishtar/sheet_file.html:96  msgid "Protected area"  msgstr "" -#: forms.py:387 +#: forms.py:385  msgid "Would you like to close this archaeological file?"  msgstr "" -#: forms.py:392 +#: forms.py:390  msgid "Would you like to delete this archaeological file ?"  msgstr "" -#: forms.py:397 forms.py:424 forms.py:547 +#: forms.py:395 forms.py:422 forms.py:545  msgid "Index"  msgstr "" -#: forms.py:401 forms.py:428 forms.py:533 +#: forms.py:399 forms.py:426 forms.py:531  msgid "Act type"  msgstr "" -#: forms.py:402 +#: forms.py:400  msgid "Object (full text search)"  msgstr "" -#: forms.py:429 +#: forms.py:427  msgid "Indexed?"  msgstr "" -#: forms.py:435 +#: forms.py:433  msgid "Object"  msgstr "" -#: forms.py:439 +#: forms.py:437  msgid "Signature date after"  msgstr "" -#: forms.py:441 +#: forms.py:439  msgid "Signature date before"  msgstr "" -#: forms.py:461 +#: forms.py:459  msgid "File numeric reference"  msgstr "" -#: forms.py:462 +#: forms.py:460  msgid "File year"  msgstr "" -#: forms.py:464 +#: forms.py:462  msgid "File other reference"  msgstr "" -#: forms.py:466 +#: forms.py:464  msgid "File in charge"  msgstr "" -#: forms.py:474 +#: forms.py:472  msgid "File permit reference"  msgstr "" diff --git a/archaeological_files/models.py b/archaeological_files/models.py index 7f37a298f..52f628817 100644 --- a/archaeological_files/models.py +++ b/archaeological_files/models.py @@ -1,6 +1,6 @@  #!/usr/bin/env python  # -*- coding: utf-8 -*- -# Copyright (C) 2012-2016 Étienne Loks  <etienne.loks_AT_peacefrogsDOTnet> +# Copyright (C) 2012-2017 Étienne Loks  <etienne.loks_AT_peacefrogsDOTnet>  # This program is free software: you can redistribute it and/or modify  # it under the terms of the GNU Affero General Public License as diff --git a/archaeological_files_pdl/forms.py b/archaeological_files_pdl/forms.py index 4890eb5d6..73f1d789c 100644 --- a/archaeological_files_pdl/forms.py +++ b/archaeological_files_pdl/forms.py @@ -40,7 +40,7 @@ class FileFormGeneral(ManageOldType, forms.Form):      file_type = forms.ChoiceField(label=_("File type"), choices=[])      year = forms.IntegerField(label=_("Year"),                                initial=lambda: datetime.datetime.now().year, -                              validators=[validators.MinValueValidator(1900), +                              validators=[validators.MinValueValidator(1600),                                            validators.MaxValueValidator(2100)])      creation_date = forms.DateField(label=_(u"Creation date"),                                      initial=get_now, widget=widgets.JQueryDate) @@ -86,9 +86,9 @@ class FileFormPlanning(forms.Form):      associated_models = {'town': Town, 'department': Department}      name = forms.CharField(label=_(u"Planning name"), required=False,                             max_length=100) -    town = widgets.MultipleAutocompleteField( -        model=Town, label=_("Towns"), required=False) -    department = widgets.MultipleAutocompleteField( +    town = widgets.Select2MultipleField( +        model=Town, label=_("Towns"), required=False, remote=True) +    department = widgets.Select2MultipleField(          model=Department, label=_("Departments"), required=False)      locality = forms.CharField(label=_(u"Locality"), max_length=100,                                 required=False) @@ -118,9 +118,9 @@ class FileFormResearchAddress(forms.Form):      associated_models = {'town': Town, 'department': Department}      name = forms.CharField(label=_(u"Project name"), required=False,                             max_length=100) -    town = widgets.MultipleAutocompleteField( -        model=Town, label=_("Towns"), required=False) -    department = widgets.MultipleAutocompleteField( +    town = widgets.Select2MultipleField( +        model=Town, label=_("Towns"), required=False, remote=True) +    department = widgets.Select2MultipleField(          model=Department, label=_("Departments"), required=False)      locality = forms.CharField(label=_(u"Locality"), max_length=100,                                 required=False) @@ -413,7 +413,7 @@ class FileFormInstruction(forms.Form):      instruction_deadline = forms.DateField(widget=widgets.JQueryDate,                                             required=False)      year = forms.IntegerField(label=_("Year"), -                              validators=[validators.MinValueValidator(1900), +                              validators=[validators.MinValueValidator(1600),                                            validators.MaxValueValidator(2100)])      numeric_reference = forms.IntegerField(label=_("Numeric reference"),                                             required=False) diff --git a/archaeological_finds/forms.py b/archaeological_finds/forms.py index 2c367043c..8fe945e88 100644 --- a/archaeological_finds/forms.py +++ b/archaeological_finds/forms.py @@ -48,6 +48,8 @@ from ishtar_common.utils import convert_coordinates_to_point  from ishtar_common import widgets  from archaeological_operations.widgets import OAWidget +from archaeological_warehouse.models import Warehouse +  from archaeological_finds.forms_treatments import TreatmentSelect, \      TreatmentFormSelection, BaseTreatmentForm, TreatmentModifyForm, \      AdministrativeActTreatmentForm, TreatmentFormFileChoice, \ @@ -75,7 +77,8 @@ __all__ = [      'SourceTreatmentFileFormSelection', 'TreatmentSourceFormSelection',      'TreatmentFileSourceFormSelection',      'RecordFormSelection', 'FindForm', 'DateForm', 'DatingFormSet', -    'FindSelect', 'FindFormSelection', 'MultipleFindFormSelection', +    'FindSelect', 'FindFormSelection', 'FindFormSelectionWarehouseModule', +    'MultipleFindFormSelection', 'MultipleFindFormSelectionWarehouseModule',      'FindMultipleFormSelection', 'check_form', 'check_exist', 'check_not_exist',      'check_value', 'check_type_field', 'check_type_not_field',      'check_treatment', 'ResultFindForm', 'ResultFindFormSet', @@ -144,18 +147,22 @@ class FindForm(ManageOldType, forms.Form):          required=False)      is_complete = forms.NullBooleanField(label=_(u"Is complete?"),                                           required=False) -    material_type = widgets.MultipleAutocompleteField( -        model=models.MaterialType, label=_(u"Material type"), required=False) +    material_type = widgets.Select2MultipleField( +        model=models.MaterialType, label=_(u"Material type"), required=False, +        available=True +    )      conservatory_state = forms.ChoiceField(label=_(u"Conservatory state"),                                             choices=[], required=False)      conservatory_comment = forms.CharField(          label=_(u"Conservatory comment"), required=False,          widget=forms.Textarea) -    object_type = widgets.MultipleAutocompleteField( -        model=models.ObjectType, label=_(u"Object types"), required=False) +    object_type = widgets.Select2MultipleField( +        model=models.ObjectType, label=_(u"Object types"), required=False, +        available=True +    )      preservation_to_consider = forms.MultipleChoiceField(          label=_(u"Preservation type"), choices=[], -        widget=widgets.CheckboxSelectMultiple, required=False) +        widget=widgets.Select2Multiple, required=False)      integritie = forms.MultipleChoiceField(          label=_(u"Integrity / interest"), choices=[],          widget=widgets.CheckboxSelectMultiple, required=False) @@ -348,7 +355,6 @@ class FindSelect(TableSelect):          label=_(u"Search within related operations"), choices=[],          widget=widgets.CheckboxSelectMultiple)      datings__period = forms.ChoiceField(label=_(u"Period"), choices=[]) -    # TODO search by warehouse      material_types = forms.ChoiceField(label=_(u"Material type"), choices=[])      object_types = forms.ChoiceField(label=_(u"Object type"), choices=[])      preservation_to_considers = forms.ChoiceField( @@ -410,6 +416,23 @@ class FindSelect(TableSelect):          return ids +class FindSelectWarehouseModule(FindSelect): +    container__location = forms.IntegerField( +        label=_(u"Warehouse (location)"), +        widget=widgets.JQueryAutoComplete( +            reverse_lazy('autocomplete-warehouse'), +            associated_model=Warehouse), +        validators=[valid_id(Warehouse)]) +    container__responsible = forms.IntegerField( +        label=_(u"Warehouse (responsible)"), +        widget=widgets.JQueryAutoComplete( +            reverse_lazy('autocomplete-warehouse'), +            associated_model=Warehouse), +        validators=[valid_id(Warehouse)]) +    container__index = forms.IntegerField(label=_(u"Container ID")) +    container__reference = forms.IntegerField(label=_(u"Container ref.")) + +  class FindFormSelection(forms.Form):      form_label = _("Find search")      associated_models = {'pk': models.Find} @@ -423,6 +446,16 @@ class FindFormSelection(forms.Form):          validators=[valid_id(models.Find)]) +class FindFormSelectionWarehouseModule(FindFormSelection): +    pk = forms.IntegerField( +        label="", required=False, +        widget=widgets.JQueryJqGrid( +            reverse_lazy('get-find'), +            FindSelectWarehouseModule, models.Find, +            source_full=reverse_lazy('get-find-full')), +        validators=[valid_id(models.Find)]) + +  class MultipleFindFormSelection(forms.Form):      form_label = _("Find search")      associated_models = {'pk': models.Find} @@ -437,15 +470,28 @@ class MultipleFindFormSelection(forms.Form):          validators=[valid_id(models.Find)]) +class MultipleFindFormSelectionWarehouseModule(MultipleFindFormSelection): +    pk = forms.IntegerField( +        label="", required=False, +        widget=widgets.JQueryJqGrid( +            reverse_lazy('get-find'), +            FindSelectWarehouseModule, models.Find, +            multiple_select=True, +            source_full=reverse_lazy('get-find-full')), +        validators=[valid_id(models.Find)]) + +  class FindMultipleFormSelection(forms.Form):      form_label = _(u"Upstream finds")      associated_models = {'finds': models.Find}      associated_labels = {'finds': _(u"Finds")} +    # using FindSelectWarehouseModule because this form is only used with +    # the warehouse module activated      finds = forms.CharField(          label="", required=False,          widget=widgets.JQueryJqGrid( -            reverse_lazy('get-find'), FindSelect, models.Find, multiple=True, -            multiple_cols=[2, 3, 4]), +            reverse_lazy('get-find'), FindSelectWarehouseModule, models.Find, +            multiple=True, multiple_cols=[2, 3, 4]),          validators=[valid_ids(models.Find)])      def clean(self): diff --git a/archaeological_finds/forms_treatments.py b/archaeological_finds/forms_treatments.py index 3c6668c9d..b3ad8b115 100644 --- a/archaeological_finds/forms_treatments.py +++ b/archaeological_finds/forms_treatments.py @@ -95,7 +95,7 @@ class BaseTreatmentForm(ManageOldType, forms.Form):          label=_(u"Other ref."), max_length=200, required=False)      year = forms.IntegerField(label=_("Year"),                                initial=lambda: datetime.datetime.now().year, -                              validators=[validators.MinValueValidator(1900), +                              validators=[validators.MinValueValidator(1600),                                            validators.MaxValueValidator(2100)])      treatment_type = forms.MultipleChoiceField(          label=_(u"Treatment type"), choices=[], @@ -405,7 +405,7 @@ class TreatmentFileForm(ManageOldType, forms.Form):                             max_length=1000, required=False)      year = forms.IntegerField(label=_("Year"),                                initial=lambda: datetime.datetime.now().year, -                              validators=[validators.MinValueValidator(1900), +                              validators=[validators.MinValueValidator(1600),                                            validators.MaxValueValidator(2100)])      internal_reference = forms.CharField(          label=_(u"Internal ref."), max_length=60, required=False) diff --git a/archaeological_finds/ishtar_menu.py b/archaeological_finds/ishtar_menu.py index 44a19dc02..4877e442c 100644 --- a/archaeological_finds/ishtar_menu.py +++ b/archaeological_finds/ishtar_menu.py @@ -112,23 +112,23 @@ MENU_SECTIONS = [               MenuItem('treatmentfle_search',                        _(u"Search"),                        model=models.TreatmentFile, -                      access_controls=['view_find', -                                       'view_own_find']), +                      access_controls=['view_treatmentfile', +                                       'view_own_treatmentfile']),               MenuItem('treatmentfle_creation',                        _(u"Creation"),                        model=models.TreatmentFile, -                      access_controls=['change_find', -                                       'change_own_find']), +                      access_controls=['change_treatmentfile', +                                       'change_own_treatmentfile']),               MenuItem('treatmentfle_modification',                        _(u"Modification"),                        model=models.TreatmentFile, -                      access_controls=['change_find', -                                       'change_own_find']), +                      access_controls=['change_treatmentfile', +                                       'change_own_treatmentfile']),               MenuItem('treatmentfle_deletion',                        _(u"Deletion"),                        model=models.TreatmentFile, -                      access_controls=['change_find', -                                       'change_own_find']), +                      access_controls=['change_treatmentfile', +                                       'change_own_treatmentfile']),               SectionItem(                   'admin_act_fletreatments', _(u"Administrative act"),                   childs=[ @@ -192,23 +192,23 @@ MENU_SECTIONS = [                      MenuItem('treatment_search',                               _(u"Search"),                               model=models.Treatment, -                             access_controls=['view_find', -                                              'view_own_find']), +                             access_controls=['view_treatment', +                                              'view_own_treatment']),                      MenuItem('treatment_creation',                               _(u"Creation"),                               model=models.Treatment, -                             access_controls=['change_find', -                                              'change_own_find']), +                             access_controls=['change_treatment', +                                              'change_own_treatment']),                      MenuItem('treatment_modification',                               _(u"Modification"),                               model=models.Treatment, -                             access_controls=['change_find', -                                              'change_own_find']), +                             access_controls=['change_treatment', +                                              'change_own_treatment']),                      MenuItem('treatment_deletion',                               _(u"Deletion"),                               model=models.Treatment, -                             access_controls=['change_find', -                                              'change_own_find']), +                             access_controls=['change_treatment', +                                              'change_own_treatment']),                  ]),              SectionItem(                   'admin_act_treatments', _(u"Administrative act"), diff --git a/archaeological_finds/locale/django.pot b/archaeological_finds/locale/django.pot index 21cfba64a..dcbf94fca 100644 --- a/archaeological_finds/locale/django.pot +++ b/archaeological_finds/locale/django.pot @@ -5,332 +5,349 @@  # Valérie-Emma Leroux <emma@iggdrasil.net>, 2016. #zanata  # Étienne Loks <etienne.loks@iggdrasil.net>, 2016. #zanata  # Valérie-Emma Leroux <emma@iggdrasil.net>, 2017. #zanata +# Étienne Loks <etienne.loks@iggdrasil.net>, 2017. #zanata  msgid ""  msgstr "" -#: forms.py:90 forms.py:94 models_finds.py:505 wizards.py:64 +#: forms.py:93 forms.py:97 models_finds.py:518 wizards.py:64  msgid "Context record"  msgstr "" -#: forms.py:123 ishtar_menu.py:32 models_finds.py:664 models_finds.py:1067 -#: models_finds.py:1076 models_treatments.py:281 +#: forms.py:126 ishtar_menu.py:32 models_finds.py:682 models_finds.py:1113 +#: models_finds.py:1134 models_treatments.py:281  #: templates/ishtar/sheet_find.html:5  msgid "Find"  msgstr "" -#: forms.py:137 forms.py:330 forms.py:559 models_finds.py:151 -#: models_finds.py:595 +#: forms.py:140 forms.py:337 forms.py:605 models_finds.py:150 +#: models_finds.py:612  msgid "Free ID"  msgstr "" -#: forms.py:139 models_finds.py:647 +#: forms.py:142 models_finds.py:665  msgid "Previous ID"  msgstr "" -#: forms.py:140 forms.py:362 forms_treatments.py:134 models_finds.py:155 -#: models_finds.py:596 models_treatments.py:127 +#: forms.py:143 forms.py:368 forms_treatments.py:134 models_finds.py:154 +#: models_finds.py:613 models_treatments.py:127  msgid "Description"  msgstr "" -#: forms.py:143 forms.py:364 models_finds.py:164 +#: forms.py:146 forms.py:370 models_finds.py:163  msgid "Batch/object"  msgstr "" -#: forms.py:145 models_finds.py:624 +#: forms.py:148 models_finds.py:642  msgid "Is complete?"  msgstr "" -#: forms.py:148 forms.py:352 forms.py:563 models_finds.py:51 +#: forms.py:151 forms.py:358 forms.py:609 models_finds.py:50  msgid "Material type"  msgstr "" -#: forms.py:149 forms.py:356 models_finds.py:63 models_finds.py:600 +#: forms.py:154 forms.py:362 models_finds.py:62 models_finds.py:617  msgid "Conservatory state"  msgstr "" -#: forms.py:152 models_finds.py:602 +#: forms.py:157 models_finds.py:619  msgid "Conservatory comment"  msgstr "" -#: forms.py:155 models_finds.py:113 models_finds.py:627 +#: forms.py:160 models_finds.py:112 models_finds.py:645  msgid "Object types"  msgstr "" -#: forms.py:157 forms.py:355 models_finds.py:72 +#: forms.py:164 forms.py:361 models_finds.py:71  msgid "Preservation type"  msgstr "" -#: forms.py:160 forms.py:358 models_finds.py:629 +#: forms.py:167 forms.py:364 models_finds.py:647  msgid "Integrity / interest"  msgstr "" -#: forms.py:163 forms.py:360 models_finds.py:632 +#: forms.py:170 forms.py:366 models_finds.py:650  msgid "Remarkability"  msgstr "" -#: forms.py:166 models_finds.py:169 +#: forms.py:173 models_finds.py:168  msgid "Point of topographic reference"  msgstr "" -#: forms.py:169 models_finds.py:171 +#: forms.py:176 models_finds.py:170  msgid "X"  msgstr "" -#: forms.py:170 models_finds.py:172 +#: forms.py:177 models_finds.py:171  msgid "Y"  msgstr "" -#: forms.py:171 models_finds.py:173 +#: forms.py:178 models_finds.py:172  msgid "Z"  msgstr "" -#: forms.py:173 models_finds.py:181 +#: forms.py:180 models_finds.py:180  msgid "Spatial Reference System"  msgstr "" -#: forms.py:176 models_finds.py:174 +#: forms.py:183 models_finds.py:173  msgid "Estimated error for X"  msgstr "" -#: forms.py:178 models_finds.py:176 +#: forms.py:185 models_finds.py:175  msgid "Estimated error for Y"  msgstr "" -#: forms.py:180 models_finds.py:178 +#: forms.py:187 models_finds.py:177  msgid "Estimated error for Z"  msgstr "" -#: forms.py:181 models_finds.py:636 +#: forms.py:188 models_finds.py:654  msgid "Length (cm)"  msgstr "" -#: forms.py:182 models_finds.py:637 +#: forms.py:189 models_finds.py:655  msgid "Width (cm)"  msgstr "" -#: forms.py:183 models_finds.py:638 +#: forms.py:190 models_finds.py:656  msgid "Height (cm)"  msgstr "" -#: forms.py:184 models_finds.py:639 +#: forms.py:191 models_finds.py:657  msgid "Diameter (cm)"  msgstr "" -#: forms.py:185 models_finds.py:640 +#: forms.py:192 models_finds.py:658  msgid "Thickness (cm)"  msgstr "" -#: forms.py:186 forms.py:564 models_finds.py:607 +#: forms.py:193 forms.py:610 models_finds.py:624  msgid "Volume (l)"  msgstr "" -#: forms.py:187 forms.py:565 models_finds.py:608 +#: forms.py:194 forms.py:611 models_finds.py:625  msgid "Weight (g)"  msgstr "" -#: forms.py:189 models_finds.py:641 +#: forms.py:196 models_finds.py:659  msgid "Dimensions comment"  msgstr "" -#: forms.py:190 forms.py:566 models_finds.py:611 +#: forms.py:197 forms.py:612 models_finds.py:628  msgid "Find number"  msgstr "" -#: forms.py:192 models_finds.py:635 +#: forms.py:199 models_finds.py:653  msgid "Minimum number of individuals (MNI)"  msgstr "" -#: forms.py:193 models_finds.py:643 +#: forms.py:200 models_finds.py:661  msgid "Mark"  msgstr "" -#: forms.py:194 forms.py:365 models_finds.py:649 +#: forms.py:201 forms.py:371 models_finds.py:667  msgid "Check"  msgstr "" -#: forms.py:196 models_finds.py:651 +#: forms.py:203 models_finds.py:669  msgid "Check date"  msgstr "" -#: forms.py:197 forms_treatments.py:132 forms_treatments.py:434 -#: models_finds.py:156 models_finds.py:644 models_treatments.py:126 +#: forms.py:204 forms_treatments.py:132 forms_treatments.py:434 +#: models_finds.py:155 models_finds.py:662 models_treatments.py:126  #: models_treatments.py:494  msgid "Comment"  msgstr "" -#: forms.py:200 models_finds.py:645 +#: forms.py:207 models_finds.py:663  msgid "Comment on dating"  msgstr "" -#: forms.py:201 models_finds.py:653 +#: forms.py:208 models_finds.py:671  msgid "Estimated value"  msgstr "" -#: forms.py:203 forms_treatments.py:151 +#: forms.py:210 forms_treatments.py:151  msgid "Image"  msgstr "" -#: forms.py:204 forms_treatments.py:152 +#: forms.py:211 forms_treatments.py:152  #, python-format  msgid ""  "<p>Heavy images are resized to: %(width)dx%(height)d (ratio is preserved).</"  "p>"  msgstr "" -#: forms.py:278 +#: forms.py:285  msgid "You should at least provide X, Y and the spatial reference system used."  msgstr "" -#: forms.py:287 +#: forms.py:294  msgid "Coordinates are not relevant for the spatial reference system used: {}."  msgstr "" -#: forms.py:293 forms.py:324 models_finds.py:619 +#: forms.py:300 forms.py:331 models_finds.py:636  msgid "Dating"  msgstr "" -#: forms.py:298 forms.py:350 +#: forms.py:305 forms.py:357  msgid "Period"  msgstr "" -#: forms.py:299 forms_treatments.py:138 forms_treatments.py:436 -#: models_finds.py:1081 models_treatments.py:129 models_treatments.py:292 +#: forms.py:306 forms_treatments.py:138 forms_treatments.py:436 +#: models_finds.py:1139 models_treatments.py:129 models_treatments.py:292  #: templates/ishtar/sheet_find.html:91 templates/ishtar/sheet_find.html:133  msgid "Start date"  msgstr "" -#: forms.py:301 models_finds.py:1082 models_treatments.py:293 +#: forms.py:308 models_finds.py:1140 models_treatments.py:293  #: templates/ishtar/sheet_find.html:92 templates/ishtar/sheet_find.html:134  msgid "End date"  msgstr "" -#: forms.py:302 +#: forms.py:309  msgid "Quality"  msgstr "" -#: forms.py:304 +#: forms.py:311  msgid "Dating type"  msgstr "" -#: forms.py:306 +#: forms.py:313  msgid "Precise dating"  msgstr "" -#: forms.py:328 models_finds.py:188 +#: forms.py:335 models_finds.py:187  msgid "Short ID"  msgstr "" -#: forms.py:329 models_finds.py:191 +#: forms.py:336 models_finds.py:190  msgid "Complete ID"  msgstr "" -#: forms.py:333 forms_treatments.py:54 forms_treatments.py:96 +#: forms.py:340 forms_treatments.py:54 forms_treatments.py:96  #: forms_treatments.py:284 forms_treatments.py:356 forms_treatments.py:406  #: forms_treatments.py:489 models_treatments.py:102 models_treatments.py:466  msgid "Year"  msgstr "" -#: forms.py:335 +#: forms.py:342  msgid "Operation's number (index by year)"  msgstr "" -#: forms.py:338 +#: forms.py:345  msgid "Code PATRIARCHE"  msgstr "" -#: forms.py:342 +#: forms.py:349  msgid "Archaeological site"  msgstr "" -#: forms.py:348 +#: forms.py:355  msgid "Search within related operations"  msgstr "" -#: forms.py:353 models_finds.py:112 +#: forms.py:359 models_finds.py:111  msgid "Object type"  msgstr "" -#: forms.py:366 forms_treatments.py:57 +#: forms.py:372 forms_treatments.py:57  msgid "Has an image?"  msgstr "" -#: forms.py:414 forms.py:427 views.py:130 +#: forms.py:421 +msgid "Warehouse (location)" +msgstr "" + +#: forms.py:427 +msgid "Warehouse (responsible)" +msgstr "" + +#: forms.py:432 +msgid "Container ID" +msgstr "" + +#: forms.py:433 +msgid "Container ref." +msgstr "" + +#: forms.py:437 forms.py:460 views.py:149  msgid "Find search"  msgstr "" -#: forms.py:441 templates/ishtar/sheet_treatment.html:46 +#: forms.py:485 templates/ishtar/sheet_treatment.html:46  msgid "Upstream finds"  msgstr "" -#: forms.py:443 models_finds.py:665 +#: forms.py:487 models_finds.py:683  msgid "Finds"  msgstr "" -#: forms.py:453 +#: forms.py:499  msgid "You should at least select one archaeological find."  msgstr "" -#: forms.py:556 +#: forms.py:602  msgid "Resulting find"  msgstr "" -#: forms.py:561 +#: forms.py:607  msgid "Precise description"  msgstr "" -#: forms.py:576 +#: forms.py:622  msgid "Resulting finds"  msgstr "" -#: forms.py:581 +#: forms.py:627  msgid "Would you like to delete this find?"  msgstr "" -#: forms.py:585 models_treatments.py:90 +#: forms.py:631 models_treatments.py:90  msgid "Upstream find"  msgstr "" -#: forms.py:598 +#: forms.py:644  msgid "Archaeological find search"  msgstr "" -#: forms.py:600 +#: forms.py:646  msgid "You should select an archaeological find."  msgstr "" -#: forms.py:605 +#: forms.py:651  msgid "Year of the operation"  msgstr "" -#: forms.py:607 +#: forms.py:653  msgid "Numeric reference"  msgstr "" -#: forms.py:614 +#: forms.py:660  msgid "Period of the archaeological find"  msgstr "" -#: forms.py:616 +#: forms.py:662  msgid "Material type of the archaeological find"  msgstr "" -#: forms.py:618 +#: forms.py:664  msgid "Description of the archaeological find"  msgstr "" -#: forms.py:630 forms_treatments.py:590 forms_treatments.py:616 +#: forms.py:676 forms_treatments.py:590 forms_treatments.py:616  msgid "Documentation search"  msgstr "" -#: forms.py:632 forms_treatments.py:592 forms_treatments.py:618 +#: forms.py:678 forms_treatments.py:592 forms_treatments.py:618  msgid "You should select a document."  msgstr "" -#: forms.py:649 +#: forms.py:695  msgid "Another basket already exists with this name."  msgstr "" -#: forms.py:659 forms.py:663 forms_treatments.py:175 ishtar_menu.py:57 +#: forms.py:705 forms.py:709 forms_treatments.py:175 ishtar_menu.py:57  msgid "Basket"  msgstr "" @@ -356,7 +373,7 @@ msgstr ""  msgid "Treatment type"  msgstr "" -#: forms_treatments.py:68 forms_treatments.py:560 views.py:360 +#: forms_treatments.py:68 forms_treatments.py:560 views.py:398  msgid "Treatment search"  msgstr "" @@ -449,8 +466,8 @@ msgid "Associated request"  msgstr ""  #: forms_treatments.py:266 forms_treatments.py:397 ishtar_menu.py:108 -#: models_treatments.py:499 models_treatments.py:521 models_treatments.py:583 -#: wizards.py:183 templates/ishtar/sheet_treatmentfile.html:5 +#: models_treatments.py:499 models_treatments.py:527 models_treatments.py:602 +#: wizards.py:187 templates/ishtar/sheet_treatmentfile.html:5  msgid "Treatment request"  msgstr "" @@ -533,7 +550,7 @@ msgstr ""  msgid "Applicant organisation"  msgstr "" -#: forms_treatments.py:385 forms_treatments.py:565 views.py:464 +#: forms_treatments.py:385 forms_treatments.py:565 views.py:502  msgid "Treatment request search"  msgstr "" @@ -612,7 +629,7 @@ msgstr ""  msgid "Documentation"  msgstr "" -#: ishtar_menu.py:133 ishtar_menu.py:214 models_finds.py:1078 +#: ishtar_menu.py:133 ishtar_menu.py:214 models_finds.py:1136  msgid "Administrative act"  msgstr "" @@ -626,7 +643,8 @@ msgid "Source"  msgstr ""  #: ishtar_menu.py:185 models_treatments.py:147 models_treatments.py:283 -#: models_treatments.py:567 templates/ishtar/sheet_treatment.html:5 +#: models_treatments.py:573 models_treatments.py:576 +#: templates/ishtar/sheet_treatment.html:5  msgid "Treatment"  msgstr "" @@ -634,113 +652,113 @@ msgstr ""  msgid "Simple treatments"  msgstr "" -#: models_finds.py:44 +#: models_finds.py:43  msgid "Code"  msgstr "" -#: models_finds.py:45 +#: models_finds.py:44  msgid "Recommendation"  msgstr "" -#: models_finds.py:48 +#: models_finds.py:47  msgid "Parent material"  msgstr "" -#: models_finds.py:52 models_finds.py:525 models_finds.py:598 +#: models_finds.py:51 models_finds.py:538 models_finds.py:615  msgid "Material types"  msgstr "" -#: models_finds.py:60 +#: models_finds.py:59  msgid "Parent conservatory state"  msgstr "" -#: models_finds.py:64 +#: models_finds.py:63  msgid "Conservatory states"  msgstr "" -#: models_finds.py:73 +#: models_finds.py:72  msgid "Preservation types"  msgstr "" -#: models_finds.py:81 +#: models_finds.py:80  msgid "Integrity / interest type"  msgstr "" -#: models_finds.py:82 +#: models_finds.py:81  msgid "Integrity / interest types"  msgstr "" -#: models_finds.py:90 +#: models_finds.py:89  msgid "Remarkability type"  msgstr "" -#: models_finds.py:91 +#: models_finds.py:90  msgid "Remarkability types"  msgstr "" -#: models_finds.py:98 models_finds.py:594 models_treatments.py:40 +#: models_finds.py:97 models_finds.py:611 models_treatments.py:40  #: models_treatments.py:287  msgid "Order"  msgstr "" -#: models_finds.py:100 +#: models_finds.py:99  msgid "Batch type"  msgstr "" -#: models_finds.py:101 +#: models_finds.py:100  msgid "Batch types"  msgstr "" -#: models_finds.py:109 +#: models_finds.py:108  msgid "Parent"  msgstr "" -#: models_finds.py:152 models_finds.py:591 models_treatments.py:124 +#: models_finds.py:151 models_finds.py:608 models_treatments.py:124  #: models_treatments.py:471  msgid "External ID"  msgstr "" -#: models_finds.py:154 models_finds.py:593 +#: models_finds.py:153 models_finds.py:610  msgid "External ID is set automatically"  msgstr "" -#: models_finds.py:157 +#: models_finds.py:156  msgid "Special interest"  msgstr "" -#: models_finds.py:161 +#: models_finds.py:160  msgid "Context Record"  msgstr "" -#: models_finds.py:162 +#: models_finds.py:161  msgid "Discovery date"  msgstr "" -#: models_finds.py:167 +#: models_finds.py:166  msgid "Material index"  msgstr "" -#: models_finds.py:183 +#: models_finds.py:182  msgid "Point (2D)"  msgstr "" -#: models_finds.py:184 +#: models_finds.py:183  msgid "Point"  msgstr "" -#: models_finds.py:185 +#: models_finds.py:184  msgid "Line"  msgstr "" -#: models_finds.py:186 +#: models_finds.py:185  msgid "Polygon"  msgstr "" -#: models_finds.py:189 models_finds.py:192 +#: models_finds.py:188 models_finds.py:191  msgid "Cached value - do not edit"  msgstr "" -#: models_finds.py:197 models_finds.py:589 +#: models_finds.py:197 models_finds.py:606  msgid "Base find"  msgstr "" @@ -768,149 +786,169 @@ msgstr ""  msgid "Can delete own Base find"  msgstr "" -#: models_finds.py:430 +#: models_finds.py:443  msgid "g"  msgstr "" -#: models_finds.py:431 +#: models_finds.py:444  msgid "kg"  msgstr "" -#: models_finds.py:433 +#: models_finds.py:446  msgid "Not checked"  msgstr "" -#: models_finds.py:434 +#: models_finds.py:447  msgid "Checked but incorrect"  msgstr "" -#: models_finds.py:435 +#: models_finds.py:448  msgid "Checked and correct"  msgstr "" -#: models_finds.py:506 +#: models_finds.py:519  msgid "Base find - Short ID"  msgstr "" -#: models_finds.py:507 +#: models_finds.py:520  msgid "Base find - Complete ID"  msgstr "" -#: models_finds.py:509 +#: models_finds.py:522  msgid "Operation (code)"  msgstr "" -#: models_finds.py:511 +#: models_finds.py:524  msgid "Town"  msgstr "" -#: models_finds.py:513 +#: models_finds.py:526  msgid "Operation (name)"  msgstr "" -#: models_finds.py:515 +#: models_finds.py:528  msgid "Parcel"  msgstr "" -#: models_finds.py:516 +#: models_finds.py:529  msgid "Batch"  msgstr "" -#: models_finds.py:517 +#: models_finds.py:530  msgid "Base find - Comment"  msgstr "" -#: models_finds.py:518 +#: models_finds.py:531  msgid "Base find - Description"  msgstr "" -#: models_finds.py:519 +#: models_finds.py:532  msgid "Base find - Topographic localisation"  msgstr "" -#: models_finds.py:521 +#: models_finds.py:534  msgid "Base find - Special interest"  msgstr "" -#: models_finds.py:522 +#: models_finds.py:535  msgid "Base find - Discovery date"  msgstr "" -#: models_finds.py:523 models_finds.py:622 models_treatments.py:131 +#: models_finds.py:536 models_finds.py:639 models_treatments.py:131  #: models_treatments.py:295 templates/ishtar/sheet_find.html:90  #: templates/ishtar/sheet_find.html:132  msgid "Container"  msgstr "" -#: models_finds.py:524 +#: models_finds.py:537  msgid "Periods"  msgstr "" -#: models_finds.py:605 +#: models_finds.py:622  msgid "Type of preservation to consider"  msgstr "" -#: models_finds.py:609 +#: models_finds.py:626  msgid "Weight unit"  msgstr "" -#: models_finds.py:615 templates/ishtar/sheet_find.html:78 +#: models_finds.py:632 templates/ishtar/sheet_find.html:78  msgid "Upstream treatment"  msgstr "" -#: models_finds.py:618 templates/ishtar/sheet_find.html:120 +#: models_finds.py:635 templates/ishtar/sheet_find.html:120  msgid "Downstream treatment"  msgstr "" -#: models_finds.py:656 +#: models_finds.py:674  msgid "Collection"  msgstr "" -#: models_finds.py:658 models_treatments.py:143 models_treatments.py:495 +#: models_finds.py:676 models_treatments.py:143 models_treatments.py:495  msgid "Cached name"  msgstr "" -#: models_finds.py:667 +#: models_finds.py:685  msgid "Can view all Finds"  msgstr "" -#: models_finds.py:668 +#: models_finds.py:686  msgid "Can view own Find"  msgstr "" -#: models_finds.py:669 +#: models_finds.py:687  msgid "Can add own Find"  msgstr "" -#: models_finds.py:670 +#: models_finds.py:688  msgid "Can change own Find"  msgstr "" -#: models_finds.py:671 +#: models_finds.py:689  msgid "Can delete own Find"  msgstr "" -#: models_finds.py:677 +#: models_finds.py:695  msgid "FIND"  msgstr "" -#: models_finds.py:1065 +#: models_finds.py:1099  msgid "Find documentation"  msgstr "" -#: models_finds.py:1066 +#: models_finds.py:1100  msgid "Find documentations"  msgstr "" -#: models_finds.py:1079 +#: models_finds.py:1103 +msgid "Can view all Find sources" +msgstr "" + +#: models_finds.py:1105 +msgid "Can view own Find source" +msgstr "" + +#: models_finds.py:1107 +msgid "Can add own Find source" +msgstr "" + +#: models_finds.py:1109 +msgid "Can change own Find source" +msgstr "" + +#: models_finds.py:1111 +msgid "Can delete own Find source" +msgstr "" + +#: models_finds.py:1137  msgid "Person"  msgstr "" -#: models_finds.py:1085 +#: models_finds.py:1143  msgid "Property"  msgstr "" -#: models_finds.py:1086 +#: models_finds.py:1144  msgid "Properties"  msgstr "" @@ -979,7 +1017,7 @@ msgid "Target a basket"  msgstr ""  #: models_treatments.py:148 templates/ishtar/sheet_find.html:75 -#: templates/ishtar/sheet_treatmentfile.html:45 +#: templates/ishtar/sheet_treatmentfile.html:46  msgid "Treatments"  msgstr "" @@ -1045,158 +1083,226 @@ msgid "Can view all Treatment requests"  msgstr ""  #: models_treatments.py:506 -msgid "Can view own Treatment request" +msgid "Can add Treatment request"  msgstr ""  #: models_treatments.py:508 -msgid "Can add own Treatment request" +msgid "Can change Treatment request"  msgstr ""  #: models_treatments.py:510 -msgid "Can change own Treatment request" +msgid "Can delete Treatment request"  msgstr ""  #: models_treatments.py:512 +msgid "Can view own Treatment request" +msgstr "" + +#: models_treatments.py:514 +msgid "Can add own Treatment request" +msgstr "" + +#: models_treatments.py:516 +msgid "Can change own Treatment request" +msgstr "" + +#: models_treatments.py:518  msgid "Can delete own Treatment request"  msgstr "" -#: models_treatments.py:573 +#: models_treatments.py:580  msgid "Treatment documentation"  msgstr "" -#: models_treatments.py:574 +#: models_treatments.py:581  msgid "Treament documentations"  msgstr "" +#: models_treatments.py:584 +msgid "Can view all Treatment source" +msgstr "" + +#: models_treatments.py:586 +msgid "Can view own Treatment source" +msgstr "" + +#: models_treatments.py:588 +msgid "Can add own Treatment source" +msgstr "" +  #: models_treatments.py:590 +msgid "Can change own Treatment source" +msgstr "" + +#: models_treatments.py:592 +msgid "Can delete own Treatment source" +msgstr "" + +#: models_treatments.py:606 +msgid "Treatment file" +msgstr "" + +#: models_treatments.py:610  msgid "Treatment request documentation"  msgstr "" -#: models_treatments.py:591 +#: models_treatments.py:611  msgid "Treatment request documentations"  msgstr "" -#: views.py:125 +#: models_treatments.py:614 +msgid "Can view all Treatment request source" +msgstr "" + +#: models_treatments.py:616 +msgid "Can add Treatment request source" +msgstr "" + +#: models_treatments.py:618 +msgid "Can change Treatment request source" +msgstr "" + +#: models_treatments.py:620 +msgid "Can delete Treatment request source" +msgstr "" + +#: models_treatments.py:622 +msgid "Can view own Treatment request source" +msgstr "" + +#: models_treatments.py:624 +msgid "Can add own Treatment request source" +msgstr "" + +#: models_treatments.py:626 +msgid "Can change own Treatment request source" +msgstr "" + +#: models_treatments.py:628 +msgid "Can delete own Treatment request source" +msgstr "" + +#: views.py:138  msgid "New find"  msgstr "" -#: views.py:139 +#: views.py:167  msgid "Find modification"  msgstr "" -#: views.py:154 +#: views.py:189  msgid "Find deletion"  msgstr "" -#: views.py:159 +#: views.py:194  msgid "Find: source search"  msgstr "" -#: views.py:167 +#: views.py:202  msgid "Find: new source"  msgstr "" -#: views.py:175 +#: views.py:210  msgid "Find: source modification"  msgstr "" -#: views.py:190 +#: views.py:225  msgid "Find: source deletion"  msgstr "" -#: views.py:204 +#: views.py:239  msgid "New basket"  msgstr "" -#: views.py:223 +#: views.py:258  msgid "Manage items in basket"  msgstr "" -#: views.py:243 +#: views.py:278  msgid "Manage basket"  msgstr "" -#: views.py:331 +#: views.py:369  msgid "Delete basket"  msgstr "" -#: views.py:381 +#: views.py:419  msgid "New treatment"  msgstr "" -#: views.py:389 views.py:481 +#: views.py:427 views.py:519  msgid "Modify"  msgstr "" -#: views.py:406 +#: views.py:444  msgid "Treatment deletion"  msgstr "" -#: views.py:413 +#: views.py:451  msgid "Treatment: search administrative act"  msgstr "" -#: views.py:422 +#: views.py:460  msgid "Treatment: new administrative act"  msgstr "" -#: views.py:432 +#: views.py:470  msgid "Treatment: administrative act modification"  msgstr "" -#: views.py:441 +#: views.py:479  msgid "Treatment: administrative act deletion"  msgstr "" -#: views.py:474 +#: views.py:512  msgid "New treatment request"  msgstr "" -#: views.py:497 +#: views.py:535  msgid "Treatment request deletion"  msgstr "" -#: views.py:504 +#: views.py:542  msgid "Treatment request: search administrative act"  msgstr "" -#: views.py:514 +#: views.py:552  msgid "Treatment request: new administrative act"  msgstr "" -#: views.py:524 +#: views.py:562  msgid "Treatment request: administrative act modification"  msgstr "" -#: views.py:533 +#: views.py:571  msgid "Treatment request: administrative act deletion"  msgstr "" -#: views.py:559 +#: views.py:597  msgid "Treatment: source search"  msgstr "" -#: views.py:574 +#: views.py:612  msgid "Treatment: source modification"  msgstr "" -#: views.py:589 +#: views.py:627  msgid "Treatment: source deletion"  msgstr "" -#: views.py:602 +#: views.py:640  msgid "Treatment request: source search"  msgstr "" -#: views.py:618 +#: views.py:656  msgid "Treatment request: source modification"  msgstr "" -#: views.py:636 +#: views.py:674  msgid "Treatment request: source deletion"  msgstr "" -#: wizards.py:63 wizards.py:195 +#: wizards.py:63 wizards.py:199  msgid "Operation"  msgstr "" @@ -1294,6 +1400,16 @@ msgstr ""  msgid "Related operations"  msgstr "" +#: templates/ishtar/sheet_treatment.html:60 +#: templates/ishtar/sheet_treatmentfile.html:51 +msgid "Associated documents" +msgstr "" + +#: templates/ishtar/sheet_treatment.html:65 +#: templates/ishtar/sheet_treatmentfile.html:56 +msgid "Administrative acts" +msgstr "" +  #: templates/ishtar/sheet_treatmentfile.html:16  msgctxt "Treatment request"  msgid "Closed" diff --git a/archaeological_finds/models_finds.py b/archaeological_finds/models_finds.py index 4ece0b286..d33933264 100644 --- a/archaeological_finds/models_finds.py +++ b/archaeological_finds/models_finds.py @@ -31,13 +31,12 @@ from ishtar_common.utils import cached_label_changed, post_save_point  from ishtar_common.models import GeneralType, ImageModel, BaseHistorizedItem, \      ShortMenuItem, LightHistorizedItem, HistoricalRecords, OwnPerms, Source, \ -    Person, Basket, get_external_id, post_save_cache +    Person, Basket, get_external_id, post_save_cache, ValueGetter  from archaeological_operations.models import AdministrativeAct  from archaeological_context_records.models import ContextRecord, Dating  from ishtar_common.models import PRIVATE_FIELDS, SpatialReferenceSystem -from archaeological_warehouse.models import Container, Collection  class MaterialType(GeneralType): @@ -192,6 +191,7 @@ class BaseFind(BaseHistorizedItem, OwnPerms):          help_text=_(u"Cached value - do not edit"))      history = HistoricalRecords()      RELATED_POST_PROCESS = ['find'] +    CACHED_LABELS = ['cache_short_id', 'cache_complete_id']      class Meta:          verbose_name = _(u"Base find") @@ -254,6 +254,9 @@ class BaseFind(BaseHistorizedItem, OwnPerms):                       ).format(self.index))          return settings.JOINT.join(c_id) +    def _generate_cache_complete_id(self): +        return self.complete_id() +      def short_id(self):          # OPE|FIND_index          c_id = [self._ope_code()] @@ -261,6 +264,9 @@ class BaseFind(BaseHistorizedItem, OwnPerms):                       ).format(self.index))          return settings.JOINT.join(c_id) +    def _generate_cache_short_id(self): +        return self.short_id() +      def full_label(self):          return self._real_label() or self._temp_label() or u"" @@ -323,7 +329,8 @@ class BaseFind(BaseHistorizedItem, OwnPerms):          return returned      @classmethod -    def cached_label_bulk_update(cls, operation_id=None, parcel_id=None): +    def cached_label_bulk_update(cls, operation_id=None, parcel_id=None, +                                 context_record_id=None):          if operation_id:              filters = """              INNER JOIN archaeological_context_records_contextrecord acr @@ -338,6 +345,12 @@ class BaseFind(BaseHistorizedItem, OwnPerms):              """              args = [int(parcel_id)]              kwargs = {'parcel_id': parcel_id} +        elif context_record_id: +            filters = """ +            WHERE mybf.context_record_id = %s +            """ +            args = [int(context_record_id)] +            kwargs = {'context_record_id': context_record_id}          else:              return @@ -477,7 +490,8 @@ class FBulkView(object):      """ -class Find(BaseHistorizedItem, ImageModel, OwnPerms, ShortMenuItem): +class Find(ValueGetter, BaseHistorizedItem, ImageModel, OwnPerms, +           ShortMenuItem):      CHECK_DICT = dict(CHECK_CHOICES)      SHOW_URL = 'show-find'      SLUG = 'find' @@ -571,6 +585,10 @@ class Find(BaseHistorizedItem, ImageModel, OwnPerms, ShortMenuItem):          'basket': 'basket',          'cached_label': 'cached_label__icontains',          'image__isnull': 'image__isnull', +        'container__location': 'container__location__pk', +        'container__responsible': 'container__responsible__pk', +        'container__index': 'container__index', +        'container__reference': 'container__reference',      }      EXTRA_REQUEST_KEYS.update(          dict( @@ -619,7 +637,8 @@ class Find(BaseHistorizedItem, ImageModel, OwnPerms, ShortMenuItem):      datings = models.ManyToManyField(Dating, verbose_name=_(u"Dating"),                                       related_name='find')      container = models.ForeignKey( -        Container, verbose_name=_(u"Container"), blank=True, null=True, +        "archaeological_warehouse.Container", verbose_name=_(u"Container"), +        blank=True, null=True,          related_name='finds', on_delete=models.SET_NULL)      is_complete = models.NullBooleanField(_(u"Is complete?"), blank=True,                                            null=True) @@ -653,8 +672,8 @@ class Find(BaseHistorizedItem, ImageModel, OwnPerms, ShortMenuItem):      estimated_value = models.FloatField(_(u"Estimated value"), blank=True,                                          null=True)      collection = models.ForeignKey( -        Collection, verbose_name=_(u"Collection"), blank=True, null=True, -        related_name='finds', on_delete=models.SET_NULL) +        "archaeological_warehouse.Collection", verbose_name=_(u"Collection"), +        blank=True, null=True, related_name='finds', on_delete=models.SET_NULL)      cached_label = models.TextField(_(u"Cached name"), null=True, blank=True)      history = HistoricalRecords()      BASKET_MODEL = FindBasket @@ -843,16 +862,20 @@ class Find(BaseHistorizedItem, ImageModel, OwnPerms, ShortMenuItem):      def duplicate(self, user):          model = self.__class__ -        # base fields -        table_cols = [field.name for field in model._meta.fields -                      if field.name not in PRIVATE_FIELDS or -                      field.name == 'order'] -        dct = dict([(attr, getattr(self, attr)) for attr in -                    table_cols]) -        dct['order'] += 1 -        dct['history_modifier'] = user -        new = self.__class__(**dct) -        new.save() + +        new = model.objects.get(pk=self.pk) + +        for field in model._meta.fields: +            # pk is in PRIVATE_FIELDS so: new.pk = None and a new +            # item will be created on save +            if field.name in PRIVATE_FIELDS: +                setattr(new, field.name, None) +        new.order = self.order + 1 +        new.history_order = user +        new.image.name = self.image.name +        # force_copy is necessary to not regenerate a thumb and resize +        # again the image +        new.save(force_copy=True)          # m2m fields          m2m = [field.name for field in model._meta.many_to_many @@ -864,11 +887,14 @@ class Find(BaseHistorizedItem, ImageModel, OwnPerms, ShortMenuItem):      @classmethod      def get_query_owns(cls, user): -        return Q(base_finds__context_record__operation__scientist=user. -                 ishtaruser.person) | \ -            Q(base_finds__context_record__operation__in_charge=user. -              ishtaruser.person) | \ -            Q(history_creator=user) +        return (Q(base_finds__context_record__operation__scientist=user. +                 ishtaruser.person) | +                Q(base_finds__context_record__operation__in_charge=user. +                  ishtaruser.person) | +                Q(base_finds__context_record__operation__collaborators__pk=user. +                  ishtaruser.person.pk) | +                Q(history_creator=user)) \ +           & Q(base_finds__context_record__operation__end_date__isnull=True)      @classmethod      def get_owns(cls, user, menu_filtr=None, limit=None, @@ -887,7 +913,8 @@ class Find(BaseHistorizedItem, ImageModel, OwnPerms, ShortMenuItem):          return unicode(self)      @classmethod -    def cached_label_bulk_update(cls, operation_id=None, parcel_id=None): +    def cached_label_bulk_update(cls, operation_id=None, parcel_id=None, +                                 context_record_id=None):          if operation_id:              filters = """              INNER JOIN find_first_base_find myfbf @@ -908,6 +935,14 @@ class Find(BaseHistorizedItem, ImageModel, OwnPerms, ShortMenuItem):              ON acr.parcel_id = %s AND acr.id = mybf.context_record_id              """              args = [int(parcel_id)] +        elif context_record_id: +            filters = """ +            INNER JOIN find_first_base_find myfbf +                ON myfbf.find_id = myf.id +            INNER JOIN archaeological_finds_basefind mybf +                ON myfbf.basefind_id = mybf.id AND mybf.context_record_id = %s +            """ +            args = [int(context_record_id)]          else:              return @@ -1064,6 +1099,18 @@ class FindSource(Source):      class Meta:          verbose_name = _(u"Find documentation")          verbose_name_plural = _(u"Find documentations") +        permissions = ( +            ("view_findsource", +             ugettext(u"Can view all Find sources")), +            ("view_own_findsource", +             ugettext(u"Can view own Find source")), +            ("add_own_findsource", +             ugettext(u"Can add own Find source")), +            ("change_own_findsource", +             ugettext(u"Can change own Find source")), +            ("delete_own_findsource", +             ugettext(u"Can delete own Find source")), +        )      find = models.ForeignKey(Find, verbose_name=_(u"Find"),                               related_name="source") @@ -1071,6 +1118,18 @@ class FindSource(Source):      def owner(self):          return self.find +    @classmethod +    def get_query_owns(cls, user): +        return (Q(find__base_finds__context_record__operation__scientist=user. +                  ishtaruser.person) | +                Q(find__base_finds__context_record__operation__in_charge=user. +                  ishtaruser.person) | +                Q( +            find__base_finds__context_record__operation__collaborators__pk=user. +            ishtaruser.person.pk)) \ +               & Q( +            find__base_finds__context_record__operation__end_date__isnull=True) +  class Property(LightHistorizedItem):      find = models.ForeignKey(Find, verbose_name=_(u"Find")) diff --git a/archaeological_finds/models_treatments.py b/archaeological_finds/models_treatments.py index 2efedbc22..20e91155a 100644 --- a/archaeological_finds/models_treatments.py +++ b/archaeological_finds/models_treatments.py @@ -1,6 +1,6 @@  #!/usr/bin/env python  # -*- coding: utf-8 -*- -# Copyright (C) 2016 Étienne Loks  <etienne.loks_AT_peacefrogsDOTnet> +# Copyright (C) 2016-2017 Étienne Loks  <etienne.loks_AT_peacefrogsDOTnet>  # This program is free software: you can redistribute it and/or modify  # it under the terms of the GNU Affero General Public License as @@ -30,7 +30,7 @@ from django.utils.translation import ugettext_lazy as _, ugettext  from ishtar_common.utils import cached_label_changed  from ishtar_common.models import GeneralType, ImageModel, BaseHistorizedItem, \      OwnPerms, HistoricalRecords, Person, Organization, Source, \ -    ValueGetter, post_save_cache, ShortMenuItem +    ValueGetter, post_save_cache, ShortMenuItem, DashboardFormItem  from archaeological_warehouse.models import Warehouse, Container  from archaeological_finds.models_finds import Find, FindBasket  from archaeological_operations.models import ClosedItem, Operation @@ -69,7 +69,8 @@ post_save.connect(post_save_cache, sender=TreatmentState)  post_delete.connect(post_save_cache, sender=TreatmentState) -class Treatment(BaseHistorizedItem, ImageModel, OwnPerms, ShortMenuItem): +class Treatment(DashboardFormItem, ValueGetter, BaseHistorizedItem, +                ImageModel, OwnPerms, ShortMenuItem):      SHOW_URL = 'show-treatment'      TABLE_COLS = ('year', 'index', 'treatment_types__label',                    'treatment_state__label', @@ -179,7 +180,8 @@ class Treatment(BaseHistorizedItem, ImageModel, OwnPerms, ShortMenuItem):          if menu_filtr:              if 'treatmentfile' in menu_filtr:                  replace_query = Q(file=menu_filtr['treatmentfile']) -            if 'find' in menu_filtr and 'basket' not in str(menu_filtr['find']): +            if 'find' in menu_filtr and \ +                    'basket' not in str(menu_filtr['find']):                  q = Q(upstream=menu_filtr['find']) | Q(                      downstream=menu_filtr['find'])                  if replace_query: @@ -208,6 +210,21 @@ class Treatment(BaseHistorizedItem, ImageModel, OwnPerms, ShortMenuItem):          """          return u" ; ".join([unicode(t) for t in self.treatment_types.all()]) +    def get_values(self, prefix=''): +        values = super(Treatment, self).get_values(prefix=prefix) +        values[prefix + "upstream_finds"] = u" ; ".join( +            [unicode(up) for up in self.upstream.all()]) +        values[prefix + "downstream_finds"] = u" ; ".join( +            [unicode(down) for down in self.downstream.all()]) +        values[prefix + "operations"] = u" ; ".join( +            [unicode(ope) for ope in self.get_query_operations().all()]) +        if self.upstream.count(): +            find = self.upstream.all()[0] +            if 'associatedfind_' not in prefix: +                values.update( +                    find.get_values(prefix=prefix + 'associatedfind_')) +        return values +      def pre_save(self):          # is not new          if self.pk is not None: @@ -455,8 +472,8 @@ post_save.connect(post_save_cache, sender=TreatmentFileType)  post_delete.connect(post_save_cache, sender=TreatmentFileType) -class TreatmentFile(ClosedItem, BaseHistorizedItem, OwnPerms, ValueGetter, -                    ShortMenuItem): +class TreatmentFile(DashboardFormItem, ClosedItem, BaseHistorizedItem, +                    OwnPerms, ValueGetter, ShortMenuItem):      SLUG = 'treatmentfile'      SHOW_URL = 'show-treatmentfile'      TABLE_COLS = ['type', 'year', 'index', 'internal_reference', 'name'] @@ -502,6 +519,12 @@ class TreatmentFile(ClosedItem, BaseHistorizedItem, OwnPerms, ValueGetter,          permissions = (              ("view_filetreatment",               ugettext(u"Can view all Treatment requests")), +            ("add_filetreatment", +             ugettext(u"Can add Treatment request")), +            ("change_filetreatment", +             ugettext(u"Can change Treatment request")), +            ("delete_filetreatment", +             ugettext(u"Can delete Treatment request")),              ("view_own_filetreatment",               ugettext(u"Can view own Treatment request")),              ("add_own_filetreatment", @@ -567,11 +590,24 @@ class TreatmentSource(Source):          Treatment, verbose_name=_(u"Treatment"), related_name="source")      BOOL_FIELDS = ['duplicate']      TABLE_COLS = ['treatment__cached_label'] + Source.TABLE_COLS +    COL_LABELS = {'treatment__cached_label': _(u"Treatment")}      SHOW_URL = 'show-treatmentsource'      class Meta:          verbose_name = _(u"Treatment documentation")          verbose_name_plural = _(u"Treament documentations") +        permissions = ( +            ("view_treatmentsource", +             ugettext(u"Can view all Treatment source")), +            ("view_own_treatmentsource", +             ugettext(u"Can view own Treatment source")), +            ("add_own_treatmentsource", +             ugettext(u"Can add own Treatment source")), +            ("change_own_treatmentsource", +             ugettext(u"Can change own Treatment source")), +            ("delete_own_treatmentsource", +             ugettext(u"Can delete own Treatment source")), +        )      @property      def owner(self): @@ -584,11 +620,30 @@ class TreatmentFileSource(Source):          related_name="source")      BOOL_FIELDS = ['duplicate']      TABLE_COLS = ['treatment_file__cached_label'] + Source.TABLE_COLS +    COL_LABELS = {'treatment_file__cached_label': _(u"Treatment file")}      SHOW_URL = 'show-treatmentfilesource'      class Meta:          verbose_name = _(u"Treatment request documentation")          verbose_name_plural = _(u"Treatment request documentations") +        permissions = ( +            ("view_filetreatmentsource", +             ugettext(u"Can view all Treatment request source")), +            ("add_filetreatmentsource", +             ugettext(u"Can add Treatment request source")), +            ("change_filetreatmentsource", +             ugettext(u"Can change Treatment request source")), +            ("delete_filetreatmentsource", +             ugettext(u"Can delete Treatment request source")), +            ("view_own_filetreatmentsource", +             ugettext(u"Can view own Treatment request source")), +            ("add_own_filetreatmentsource", +             ugettext(u"Can add own Treatment request source")), +            ("change_own_filetreatmentsource", +             ugettext(u"Can change own Treatment request source")), +            ("delete_own_filetreatmentsource", +             ugettext(u"Can delete own Treatment request source")), +        )      @property      def owner(self): diff --git a/archaeological_finds/templates/ishtar/sheet_findbasket.html b/archaeological_finds/templates/ishtar/sheet_findbasket.html index 6f8b12e6d..b6d4ffd42 100644 --- a/archaeological_finds/templates/ishtar/sheet_findbasket.html +++ b/archaeological_finds/templates/ishtar/sheet_findbasket.html @@ -9,5 +9,5 @@  <p class="window-refs">{{ item.label|default:"" }}</p>  {% field "Owned by" item.user %}  {% field "Comment" item.comment %} -{% dynamic_table_document_large finds 'finds_for_ope' 'basket' item.pk 'TABLE_COLS_FOR_OPE' output %} +{% dynamic_table_document finds 'finds_for_ope' 'basket' item.pk 'TABLE_COLS_FOR_OPE' output %}  {% endblock %} diff --git a/archaeological_finds/templates/ishtar/sheet_treatment.html b/archaeological_finds/templates/ishtar/sheet_treatment.html index 633fa1829..9d6c75425 100644 --- a/archaeological_finds/templates/ishtar/sheet_treatment.html +++ b/archaeological_finds/templates/ishtar/sheet_treatment.html @@ -1,10 +1,10 @@  {% extends "ishtar/sheet.html" %} -{% load i18n window_field from_dict link_to_window window_tables window_header humanize %} +{% load i18n window_field from_dict link_to_window window_tables window_ope_tables window_header humanize %}  {% load url from future %}  {% block head_title %}{% trans "Treatment" %}{% endblock %}  {% block content %} -{% window_nav item window_id 'show-treatment' 'treatment_modify' %} +{% window_nav item window_id 'show-treatment' 'treatment_modify' 'show-historized-treatment' 'revert-treatment' previous next 1 %}  {% if item.image %}  <a href='{{item.image.url}}' rel="prettyPhoto" title="{{item.label}}" class='photo'><img src='{{item.thumbnail.url}}'/></a> @@ -56,5 +56,14 @@  {% trans "Related operations" as related_operations %}  {% dynamic_table_document related_operations 'operations' 'related_treatment' item.pk 'TABLE_COLS' output %} +{% if item.source.count %} +{% trans "Associated documents" as associated_docs %} +{% dynamic_table_document associated_docs 'treatments_docs' 'treatment' item.pk '' output %} +{% endif %} + +{% if item.administrative_act.count %} +{% trans "Administrative acts" as admact_lbl %} +{% table_administrativact admact_lbl item.administrative_act.all %} +{% endif %}  {% endblock %} diff --git a/archaeological_finds/templates/ishtar/sheet_treatmentfile.html b/archaeological_finds/templates/ishtar/sheet_treatmentfile.html index 097f5defd..b84f60883 100644 --- a/archaeological_finds/templates/ishtar/sheet_treatmentfile.html +++ b/archaeological_finds/templates/ishtar/sheet_treatmentfile.html @@ -1,10 +1,10 @@  {% extends "ishtar/sheet.html" %} -{% load i18n window_field from_dict link_to_window window_tables window_header humanize %} +{% load i18n window_field from_dict link_to_window window_tables window_ope_tables window_header humanize %}  {% load url from future %}  {% block head_title %}{% trans "Treatment request" %}{% endblock %}  {% block content %} -{% window_nav item window_id 'show-treatmentfile' 'treatmentfile_modify' %} +{% window_nav item window_id 'show-treatmentfile' 'treatmentfile_modify' 'show-historized-treatmentfile' 'revert-treatmentfile' previous next 1 %}  <p class="window-refs">{{ item.name|default:"" }}</p>  {% if item.internal_reference %} @@ -42,9 +42,19 @@  {% field "Contact" item.applicant.address_lbl %}  {% endif %} -{% trans "Treatments" as treatments %}  {% if item.treatments.count %} +{% trans "Treatments" as treatments %}  {% dynamic_table_document treatments 'treatments' 'file' item.pk '' output '' 'treatment' %}  {% endif %} +{% if item.source.count %} +{% trans "Associated documents" as associated_docs %} +{% dynamic_table_document associated_docs 'treatmentfiles_docs' 'treatment_file' item.pk '' output %} +{% endif %} + +{% if item.administrative_act.count %} +{% trans "Administrative acts" as admact_lbl %} +{% table_administrativact admact_lbl item.administrative_act.all %} +{% endif %} +  {% endblock %} diff --git a/archaeological_finds/tests.py b/archaeological_finds/tests.py index e274c757f..1268b4f03 100644 --- a/archaeological_finds/tests.py +++ b/archaeological_finds/tests.py @@ -21,6 +21,7 @@ import json  from django.conf import settings  from django.contrib.auth.models import User +from django.core.files import File  from django.core.files.uploadedfile import SimpleUploadedFile  from django.core.urlresolvers import reverse  from django.test.client import Client @@ -474,8 +475,14 @@ class PackagingTest(FindInit, TestCase):      model = models.Find      def setUp(self): +        img = settings.ROOT_PATH + \ +            '../ishtar_common/static/media/images/ishtar-bg.jpg' +          self.create_finds({"label": u"Find 1"}, force=True)          self.create_finds({"label": u"Find 2"}, force=True) +        self.finds[0].image.save('ishtar-bg.jpg', File(open(img))) +        self.finds[0].save() +          self.basket = models.FindBasket.objects.create(              label="My basket", user=IshtarUser.objects.get(                  pk=self.get_default_user().pk)) @@ -490,11 +497,26 @@ class PackagingTest(FindInit, TestCase):          treatment_type = models.TreatmentType.objects.get(txt_idx='packaging')          treatment = models.Treatment()          items_nb = models.Find.objects.count() + +        first_find = self.finds[0] +          treatment.save(user=self.get_default_user(), items=self.basket)          self.assertEqual(items_nb + self.basket.items.count(),                           models.Find.objects.count(),                           msg="Packaging doesn't generate enough new finds")          treatment.treatment_types.add(treatment_type) + +        resulting_find = models.Find.objects.get( +            upstream_treatment__upstream=first_find, +            base_finds__pk=first_find.base_finds.all()[0].pk +        ) + +        # image names used to be altered on save: check for this bug +        self.assertEqual( +            resulting_find.image.name, +            models.Find.objects.get(pk=first_find.pk).image.name +        ) +          # new version of the find is in the basket          for item in self.basket.items.all():              self.assertNotIn( diff --git a/archaeological_finds/urls.py b/archaeological_finds/urls.py index 9c554a124..9c331ccc9 100644 --- a/archaeological_finds/urls.py +++ b/archaeological_finds/urls.py @@ -24,7 +24,7 @@ import views  from archaeological_finds import models -# be carreful: each check_rights must be relevant with ishtar_menu +# be careful: each check_rights must be relevant with ishtar_menu  # forms  urlpatterns = patterns( @@ -33,7 +33,7 @@ urlpatterns = patterns(          check_rights(['view_find', 'view_own_find'])(              views.find_search_wizard), name='find_search'),      url(r'find_creation/(?P<step>.+)?$', -        check_rights(['add_find'])( +        check_rights(['add_find', 'add_own_find'])(              views.find_creation_wizard), name='find_creation'),      url(r'find_modification/(?P<step>.+)?$',          check_rights(['change_find', 'change_own_find'])( @@ -284,6 +284,10 @@ urlpatterns += patterns(          kwargs={'full': 'shortcut'}),      url(r'^show-treatment(?:/(?P<pk>.+))?/(?P<type>.+)?$', 'show_treatment',          name=models.Treatment.SHOW_URL), +    url(r'show-historized-treatment/(?P<pk>.+)?/(?P<date>.+)?$', +        'show_treatment', name='show-historized-treatment'), +    url(r'^revert-treatment/(?P<pk>.+)/(?P<date>.+)$', +        'revert_treatment', name='revert-treatment'),      url(r'get-treatmentfile/(?P<type>.+)?$',          'get_treatmentfile', name='get-treatmentfile'),      url(r'get-treatmentfile-shortcut/(?P<type>.+)?$', @@ -292,6 +296,10 @@ urlpatterns += patterns(      url(r'^show-treatmentfile(?:/(?P<pk>.+))?/(?P<type>.+)?$',          'show_treatmentfile',          name=models.TreatmentFile.SHOW_URL), +    url(r'show-historized-treatmentfile/(?P<pk>.+)?/(?P<date>.+)?$', +        'show_treatmentfile', name='show-historized-treatmentfile'), +    url(r'^revert-treatmentfile/(?P<pk>.+)/(?P<date>.+)$', +        'revert_treatmentfile', name='revert-treatmentfile'),      # url(r'show-treatmentfile(?:/(?P<pk>.+))?/(?P<type>.+)?$',      # 'show_treatmentfile',      #     name=models.TreatmentFile.SHOW_URL), diff --git a/archaeological_finds/views.py b/archaeological_finds/views.py index 341734ae7..680faf421 100644 --- a/archaeological_finds/views.py +++ b/archaeological_finds/views.py @@ -28,7 +28,7 @@ from django.utils.translation import ugettext_lazy as _  from django.views.generic import TemplateView  from django.views.generic.edit import CreateView, FormView -from ishtar_common.models import IshtarUser +from ishtar_common.models import IshtarUser, get_current_profile  from archaeological_operations.models import AdministrativeAct  from ishtar_common.forms import FinalForm @@ -58,6 +58,7 @@ get_find_for_treatment = get_item(      own_table_cols=models.Find.TABLE_COLS_FOR_OPE, base_request={})  show_treatment = show_item(models.Treatment, 'treatment') +revert_treatment = revert_item(models.Treatment)  get_treatment = get_item(models.Treatment, 'get_treatment', 'treatment')  get_administrativeacttreatment = get_item( @@ -66,6 +67,7 @@ get_administrativeacttreatment = get_item(      base_request={"treatment__pk__isnull": False})  show_treatmentfile = show_item(models.TreatmentFile, 'treatmentfile') +revert_treatmentfile = revert_item(models.TreatmentFile)  get_treatmentfile = get_item(models.TreatmentFile, 'get_treatmentfile',                               'treatmentfile') @@ -115,6 +117,15 @@ show_findbasket = show_item(models.FindBasket, 'findbasket')  display_findbasket = display_item(models.FindBasket,                                    show_url='show-find/basket-') + +def check_warehouse_module(self): +    return get_current_profile().warehouse + + +def check_not_warehouse_module(self): +    return not check_warehouse_module(self) + +  find_creation_steps = [      ('selecrecord-find_creation', RecordFormSelectionTable),      ('find-find_creation', FindForm), @@ -127,32 +138,54 @@ find_creation_wizard = FindWizard.as_view(      label=_(u"New find"),      url_name='find_creation',) +find_search_condition_dict = { +    'general-find_search': check_not_warehouse_module, +    'generalwarehouse-find_search': check_warehouse_module, +} +  find_search_wizard = SearchWizard.as_view([ -    ('general-find_search', FindFormSelection)], +    ('general-find_search', FindFormSelection), +    ('generalwarehouse-find_search', FindFormSelectionWarehouseModule)],      label=_(u"Find search"), -    url_name='find_search',) +    url_name='find_search', +    condition_dict=find_search_condition_dict +) + +find_modification_condition_dict = { +    'selec-find_modification': check_not_warehouse_module, +    'selecw-find_modification': check_warehouse_module, +}  find_modification_wizard = FindModificationWizard.as_view([      ('selec-find_modification', FindFormSelection), +    ('selecw-find_modification', FindFormSelectionWarehouseModule),      ('selecrecord-find_modification', RecordFormSelection),      ('find-find_modification', FindForm),      ('dating-find_modification', DatingFormSet),      ('final-find_modification', FinalForm)], +    condition_dict=find_modification_condition_dict,      label=_(u"Find modification"),      url_name='find_modification',)  def find_modify(request, pk): -    # view = find_modification_wizard(request) +    find_modification_wizard(request)      FindModificationWizard.session_set_value(          request, 'selec-find_modification', 'pk', pk, reset=True)      return redirect(          reverse('find_modification',                  kwargs={'step': 'selecrecord-find_modification'})) +find_deletion_condition_dict = { +    'selec-find_deletion': check_not_warehouse_module, +    'selecw-find_deletion': check_warehouse_module, +} +  find_deletion_wizard = FindDeletionWizard.as_view([      ('selec-find_deletion', FindFormSelection), +    ('selecw-find_deletion', FindFormSelectionWarehouseModule),      ('final-find_deletion', FindDeletionForm)], +    condition_dict=find_deletion_condition_dict,      label=_(u"Find deletion"),      url_name='find_deletion',) @@ -254,7 +287,10 @@ class SelectItemsInBasket(IshtarMixin, LoginRequiredMixin, TemplateView):          except models.FindBasket.DoesNotExist:              raise PermissionDenied          context['basket'] = self.basket -        context['form'] = MultipleFindFormSelection() +        if get_current_profile().warehouse: +            context['form'] = MultipleFindFormSelectionWarehouseModule() +        else: +            context['form'] = MultipleFindFormSelection()          context['add_url'] = reverse('add_iteminbasket')          context['list_url'] = reverse('list_iteminbasket',                                        kwargs={'pk': self.basket.pk}) diff --git a/archaeological_finds/wizards.py b/archaeological_finds/wizards.py index 96a83e582..43fe6262f 100644 --- a/archaeological_finds/wizards.py +++ b/archaeological_finds/wizards.py @@ -74,7 +74,11 @@ class FindWizard(Wizard):  class FindModificationWizard(FindWizard):      modification = True -    filter_owns = {'selec-find_modification': ['pk']} +    main_item_select_keys = ('selec-', 'selecw-') +    filter_owns = { +        'selec-find_modification': ['pk'], +        'selecw-find_modification': ['pk'], +    }  class FindDeletionWizard(DeletionWizard): diff --git a/archaeological_operations/forms.py b/archaeological_operations/forms.py index 27ab4670a..86bea4ed5 100644 --- a/archaeological_operations/forms.py +++ b/archaeological_operations/forms.py @@ -72,7 +72,7 @@ class ParcelForm(forms.Form):      town = forms.ChoiceField(label=_("Town"), choices=(), required=False,                               validators=[valid_id(models.Town)])      year = forms.IntegerField(label=_("Year"), required=False, -                              validators=[validators.MinValueValidator(1900), +                              validators=[validators.MinValueValidator(1600),                                            validators.MaxValueValidator(2100)])      section = forms.CharField(label=_(u"Section"), required=False,                                validators=[validators.MaxLengthValidator(4)]) @@ -387,6 +387,9 @@ class RecordRelationsForm(ManageOldType, forms.Form):          validators=[valid_id(models.Operation)], required=False)      def __init__(self, *args, **kwargs): +        self.left_record = None +        if 'left_record' in kwargs: +            self.left_record = kwargs.pop('left_record')          super(RecordRelationsForm, self).__init__(*args, **kwargs)          self.fields['relation_type'].choices = \              models.RelationType.get_types( @@ -413,6 +416,9 @@ class RecordRelationsForm(ManageOldType, forms.Form):                  cleaned_data.get('right_record', None)):              raise forms.ValidationError(                  _(u"You should select a relation type.")) +        if str(cleaned_data.get('right_record')) == str(self.left_record.pk): +            raise forms.ValidationError( +                _(u"An operation cannot be related to herself."))          return cleaned_data      @classmethod @@ -447,7 +453,27 @@ class RecordRelationsForm(ManageOldType, forms.Form):              result.append((_("Deleted relations"), u" ; ".join(deleted)))          return result -RecordRelationsFormSet = formset_factory(RecordRelationsForm, can_delete=True) + +class RecordRelationsFormSetBase(FormSet): +    # passing left_record should be nicely done with form_kwargs with Django 1.9 +    # with no need of all these complications + +    def __init__(self, *args, **kwargs): +        self.left_record = None +        if 'left_record' in kwargs: +            self.left_record = kwargs.pop('left_record') +        super(RecordRelationsFormSetBase, self).__init__(*args, **kwargs) + +    def _construct_forms(self): +        # instantiate all the forms and put them in self.forms +        self.forms = [] +        for i in xrange(self.total_form_count()): +            self.forms.append(self._construct_form( +                i, left_record=self.left_record)) + + +RecordRelationsFormSet = formset_factory( +    RecordRelationsForm, can_delete=True, formset=RecordRelationsFormSetBase)  RecordRelationsFormSet.form_label = _(u"Relations") @@ -733,10 +759,11 @@ class DashboardForm(forms.Form):  class OperationFormGeneral(ManageOldType, forms.Form):      form_label = _(u"General") -    base_model = 'archaeological_site' +    base_models = ['collaborator']      file_upload = True      associated_models = {'scientist': Person,                           'in_charge': Person, +                         'collaborator': Person,                           'cira_rapporteur': Person,                           'operator': Organization,                           'operation_type': models.OperationType, @@ -755,7 +782,7 @@ class OperationFormGeneral(ManageOldType, forms.Form):                                         choices=[])      year = forms.IntegerField(label=_(u"Year"),                                initial=lambda: datetime.datetime.now().year, -                              validators=[validators.MinValueValidator(1900), +                              validators=[validators.MinValueValidator(1600),                                            validators.MaxValueValidator(2100)])      old_code = forms.CharField(          label=_(u"Old code"), required=False, @@ -792,14 +819,13 @@ class OperationFormGeneral(ManageOldType, forms.Form):              limit={'person_types': [person_type_pk_lazy('sra_agent')]},              new=True),          validators=[valid_id(Person)], required=False) +    collaborator = widgets.Select2MultipleField( +        model=Person, label=_("Collaborators"), required=False, remote=True)      surface = forms.IntegerField(          required=False, widget=widgets.AreaWidget,          label=_(u"Total surface (m2)"),          validators=[validators.MinValueValidator(0),                      validators.MaxValueValidator(999999999)]) -    # archaeological_site = widgets.MultipleAutocompleteField( -    #     model=models.ArchaeologicalSite, -    #     label=_("Associated archaeological sites"), new=True, required=False)      start_date = forms.DateField(          label=_(u"Start date"), required=False, widget=widgets.JQueryDate)      excavation_end_date = forms.DateField( @@ -857,21 +883,29 @@ class OperationFormGeneral(ManageOldType, forms.Form):      def __init__(self, *args, **kwargs):          super(OperationFormGeneral, self).__init__(*args, **kwargs) -        if not get_current_profile().warehouse: -            self.fields.pop('documentation_deadline') -            self.fields.pop('documentation_received') -            self.fields.pop('finds_deadline') -            self.fields.pop('finds_received') +        profile = get_current_profile() +        if not profile.files: +            self.fields.pop('report_delivery_date') +            self.fields.pop('report_processing') +            self.fields.pop('cira_rapporteur') +            self.fields.pop('cira_date') +            self.fields.pop('negative_result') +            if not profile.warehouse: +                self.fields.pop('documentation_deadline') +                self.fields.pop('documentation_received') +                self.fields.pop('finds_deadline') +                self.fields.pop('finds_received')          self.fields['operation_type'].choices = \              models.OperationType.get_types(                  initial=self.init_data.get('operation_type'))          self.fields['operation_type'].help_text = \              models.OperationType.get_help() -        self.fields['report_processing'].choices = \ -            models.ReportState.get_types( -                initial=self.init_data.get('report_processing')) -        self.fields['report_processing'].help_text = \ -            models.ReportState.get_help() +        if 'report_processing' in self.fields: +            self.fields['report_processing'].choices = \ +                models.ReportState.get_types( +                    initial=self.init_data.get('report_processing')) +            self.fields['report_processing'].help_text = \ +                models.ReportState.get_help()          self.fields['record_quality'].choices = \              [('', '--')] + list(models.QUALITY)          if 'operation_code' in self.fields: diff --git a/archaeological_operations/locale/django.pot b/archaeological_operations/locale/django.pot index 3c8b1c7e5..f875f6b9a 100644 --- a/archaeological_operations/locale/django.pot +++ b/archaeological_operations/locale/django.pot @@ -6,16 +6,17 @@  # Valérie-Emma Leroux <emma@iggdrasil.net>, 2016. #zanata  # Étienne Loks <etienne.loks@iggdrasil.net>, 2016. #zanata  # Valérie-Emma Leroux <emma@iggdrasil.net>, 2017. #zanata +# Étienne Loks <etienne.loks@iggdrasil.net>, 2017. #zanata  msgid ""  msgstr "" -#: forms.py:69 forms.py:371 forms.py:1013 forms.py:1035 forms.py:1039 -#: models.py:1247 templates/ishtar/sheet_operation.html:151 +#: forms.py:69 forms.py:371 forms.py:1047 forms.py:1069 forms.py:1073 +#: models.py:1252 templates/ishtar/sheet_operation.html:153  #: templates/ishtar/blocks/window_tables/parcels.html:10  msgid "Parcels"  msgstr "" -#: forms.py:72 forms.py:205 forms.py:989 models.py:1233 +#: forms.py:72 forms.py:205 forms.py:1023 models.py:1238  #: templates/ishtar/blocks/window_tables/parcels.html:7  #: templates/ishtar/dashboards/dashboard_operation.html:432  #: templates/ishtar/dashboards/dashboard_operation.html:446 @@ -24,22 +25,22 @@ msgstr ""  msgid "Town"  msgstr "" -#: forms.py:74 forms.py:455 forms.py:756 forms.py:1259 models.py:272 -#: models.py:1039 models.py:1231 +#: forms.py:74 forms.py:481 forms.py:783 forms.py:1293 models.py:276 +#: models.py:1044 models.py:1236  #: templates/ishtar/blocks/window_tables/parcels.html:8  msgid "Year"  msgstr "" -#: forms.py:77 models.py:1234 +#: forms.py:77 models.py:1239  #: templates/ishtar/blocks/window_tables/parcels.html:9  msgid "Section"  msgstr "" -#: forms.py:80 models.py:1236 +#: forms.py:80 models.py:1241  msgid "Parcel number"  msgstr "" -#: forms.py:82 models.py:1238 models.py:1255 models.py:1304 +#: forms.py:82 models.py:1243 models.py:1260 models.py:1309  msgid "Public domain"  msgstr "" @@ -75,45 +76,49 @@ msgstr ""  msgid "Relation type"  msgstr "" -#: forms.py:383 ishtar_menu.py:30 models.py:368 models.py:849 models.py:884 -#: models.py:917 models.py:1021 models.py:1230 wizards.py:344 wizards.py:355 +#: forms.py:383 ishtar_menu.py:30 models.py:372 models.py:847 models.py:882 +#: models.py:922 models.py:1026 models.py:1235 wizards.py:353 wizards.py:364  #: templates/ishtar/sheet_operation.html:4  msgid "Operation"  msgstr "" -#: forms.py:403 +#: forms.py:406  msgid ":"  msgstr "" -#: forms.py:411 forms.py:607 forms.py:1224 +#: forms.py:414 forms.py:633 forms.py:1258  msgid "You should select an operation."  msgstr "" -#: forms.py:415 +#: forms.py:418  msgid "You should select a relation type."  msgstr "" -#: forms.py:445 +#: forms.py:421 +msgid "An operation cannot be related to herself." +msgstr "" + +#: forms.py:451  msgid "Current relations"  msgstr "" -#: forms.py:447 +#: forms.py:453  msgid "Deleted relations"  msgstr "" -#: forms.py:451 templates/ishtar/sheet_operation.html:85 +#: forms.py:477 templates/ishtar/sheet_operation.html:86  msgid "Relations"  msgstr "" -#: forms.py:456 forms.py:1230 models.py:273 +#: forms.py:482 forms.py:1264 models.py:277  msgid "Numeric reference"  msgstr "" -#: forms.py:462 forms.py:1270 +#: forms.py:488 forms.py:1304  msgid "Parcel (section/number/public domain)"  msgstr "" -#: forms.py:465 forms.py:1273 models.py:850 +#: forms.py:491 forms.py:1307 models.py:848  #: templates/ishtar/dashboards/dashboard_operation.html:390  #: templates/ishtar/dashboards/dashboard_operation.html:411  #: templates/ishtar/dashboards/dashboard_operation.html:643 @@ -122,454 +127,458 @@ msgstr ""  msgid "Department"  msgstr "" -#: forms.py:466 forms.py:1101 models.py:86 +#: forms.py:492 forms.py:1135 models.py:86  #: templates/ishtar/sheet_operation.html:22  #: templates/ishtar/blocks/window_tables/archaeologicalsites.html:8  msgid "Name"  msgstr "" -#: forms.py:468 forms.py:752 models.py:334 +#: forms.py:494 forms.py:779 models.py:338  msgid "Address / Locality"  msgstr "" -#: forms.py:470 forms.py:674 forms.py:754 forms.py:1236 models.py:280 +#: forms.py:496 forms.py:700 forms.py:781 forms.py:1270 models.py:284  msgid "Operation type"  msgstr "" -#: forms.py:472 +#: forms.py:498  msgid "Is open?"  msgstr "" -#: forms.py:480 forms.py:786 models.py:269 +#: forms.py:506 forms.py:813 models.py:269  msgid "In charge"  msgstr "" -#: forms.py:487 models.py:1015 +#: forms.py:513 models.py:1020  msgid "Scientist in charge"  msgstr "" -#: forms.py:489 forms.py:676 forms.py:776 models.py:267 +#: forms.py:515 forms.py:702 forms.py:803 models.py:267  msgid "Operator"  msgstr "" -#: forms.py:498 forms.py:1106 models.py:90 models.py:282 +#: forms.py:524 forms.py:1140 models.py:90 models.py:286  #: templates/ishtar/blocks/window_tables/archaeologicalsites.html:10  msgid "Remains"  msgstr "" -#: forms.py:499 forms.py:1084 forms.py:1103 models.py:88 models.py:288 +#: forms.py:525 forms.py:1118 forms.py:1137 models.py:88 models.py:292  #: templates/ishtar/blocks/window_tables/archaeologicalsites.html:9  msgid "Periods"  msgstr "" -#: forms.py:500 +#: forms.py:526  msgid "Started before"  msgstr "" -#: forms.py:502 +#: forms.py:528  msgid "Started after"  msgstr "" -#: forms.py:504 +#: forms.py:530  msgid "Ended before"  msgstr "" -#: forms.py:506 +#: forms.py:532  msgid "Ended after"  msgstr "" -#: forms.py:509 +#: forms.py:535  msgid "Search within relations"  msgstr "" -#: forms.py:511 forms.py:841 +#: forms.py:537 forms.py:867  msgid "Comment"  msgstr "" -#: forms.py:512 +#: forms.py:538  msgid "Abstract (full text search)"  msgstr "" -#: forms.py:514 forms.py:844 models.py:337 +#: forms.py:540 forms.py:870 models.py:341  msgid "Comment about scientific documentation"  msgstr "" -#: forms.py:515 forms.py:846 models.py:349 +#: forms.py:541 forms.py:872 models.py:353  msgid "Record quality"  msgstr "" -#: forms.py:516 forms.py:811 models.py:300 +#: forms.py:542 forms.py:837 models.py:304  msgid "Report processing"  msgstr "" -#: forms.py:518 forms.py:849 models.py:344 +#: forms.py:544 forms.py:875 models.py:348  msgid "Virtual operation"  msgstr "" -#: forms.py:520 forms.py:1146 forms.py:1150 models.py:94 +#: forms.py:546 forms.py:1180 forms.py:1184 models.py:94  msgid "Archaeological site"  msgstr "" -#: forms.py:526 forms.py:1277 +#: forms.py:552 forms.py:1311  msgid "Created by"  msgstr "" -#: forms.py:532 forms.py:1283 +#: forms.py:558 forms.py:1317  msgid "Modified by"  msgstr "" -#: forms.py:539 +#: forms.py:565  msgid "Documentation deadline before"  msgstr "" -#: forms.py:541 +#: forms.py:567  msgid "Documentation deadline after"  msgstr "" -#: forms.py:543 forms.py:834 models.py:356 +#: forms.py:569 forms.py:860 models.py:360  msgid "Documentation received"  msgstr "" -#: forms.py:545 +#: forms.py:571  msgid "Finds deadline before"  msgstr "" -#: forms.py:547 +#: forms.py:573  msgid "Finds deadline after"  msgstr "" -#: forms.py:549 forms.py:839 models.py:360 +#: forms.py:575 forms.py:865 models.py:364  msgid "Finds received"  msgstr "" -#: forms.py:594 forms.py:1222 views.py:168 +#: forms.py:620 forms.py:1256 views.py:168  msgid "Operation search"  msgstr "" -#: forms.py:638 +#: forms.py:664  msgid "Associated file"  msgstr "" -#: forms.py:642 forms.py:937 models.py:516 models.py:916 models.py:1026 +#: forms.py:668 forms.py:971 models.py:520 models.py:921 models.py:1031  #: wizards.py:80  msgid "Archaeological file"  msgstr "" -#: forms.py:649 forms.py:651 models.py:351 +#: forms.py:675 forms.py:677 models.py:355  msgid "Abstract"  msgstr "" -#: forms.py:654 +#: forms.py:680  msgid "months"  msgstr "" -#: forms.py:654 +#: forms.py:680  msgid "years"  msgstr "" -#: forms.py:656 models.py:253 +#: forms.py:682 models.py:253  msgid "Creation date"  msgstr "" -#: forms.py:657 +#: forms.py:683  msgid "Start of field work"  msgstr "" -#: forms.py:659 +#: forms.py:685  msgid "All"  msgstr "" -#: forms.py:660 +#: forms.py:686  msgid "Preventive"  msgstr "" -#: forms.py:661 +#: forms.py:687  msgid "Research"  msgstr "" -#: forms.py:665 +#: forms.py:691  msgid "Slicing"  msgstr "" -#: forms.py:668 +#: forms.py:694  msgid "Department detail"  msgstr "" -#: forms.py:670 +#: forms.py:696  msgid "Date get from"  msgstr "" -#: forms.py:672 +#: forms.py:698  msgid "Preventive/Research"  msgstr "" -#: forms.py:678 +#: forms.py:704  msgid "Date after"  msgstr "" -#: forms.py:680 +#: forms.py:706  msgid "Date before"  msgstr "" -#: forms.py:682 +#: forms.py:708  msgid "With reports"  msgstr "" -#: forms.py:683 +#: forms.py:709  msgid "With finds"  msgstr "" -#: forms.py:735 forms.py:1331 templates/ishtar/sheet_administrativeact.html:20 +#: forms.py:761 forms.py:1365 templates/ishtar/sheet_administrativeact.html:20  #: templates/ishtar/sheet_operation.html:26  msgid "General"  msgstr "" -#: forms.py:750 models.py:333 +#: forms.py:777 models.py:337  msgid "Generic name"  msgstr "" -#: forms.py:761 models.py:302 +#: forms.py:788 models.py:306  msgid "Old code"  msgstr "" -#: forms.py:764 +#: forms.py:791  msgid "Head scientist"  msgstr "" -#: forms.py:783 models.py:332 +#: forms.py:810 models.py:336  msgid "Operator reference"  msgstr "" -#: forms.py:797 +#: forms.py:823 models.py:273 +msgid "Collaborators" +msgstr "" + +#: forms.py:826  msgid "Total surface (m2)"  msgstr "" -#: forms.py:804 models.py:54 models.py:256 models.py:1443 +#: forms.py:830 models.py:54 models.py:256 models.py:1448  msgid "Start date"  msgstr "" -#: forms.py:806 models.py:258 +#: forms.py:832 models.py:258  msgid "Excavation end date"  msgstr "" -#: forms.py:809 models.py:259 +#: forms.py:835 models.py:259  msgid "Report delivery date"  msgstr "" -#: forms.py:831 models.py:353 +#: forms.py:857 models.py:357  msgid "Deadline for submission of the documentation"  msgstr "" -#: forms.py:836 models.py:358 +#: forms.py:862 models.py:362  msgid "Deadline for submission of the finds"  msgstr "" -#: forms.py:851 +#: forms.py:877  msgid "Image"  msgstr "" -#: forms.py:852 +#: forms.py:878  #, python-format  msgid ""  "<p>Heavy images are resized to: %(width)dx%(height)d (ratio is preserved).</"  "p>"  msgstr "" -#: forms.py:890 +#: forms.py:924  msgid ""  "If you want to set an excavation end date you have to provide a start date."  msgstr "" -#: forms.py:895 +#: forms.py:929  msgid "The excavation end date cannot be before the start date."  msgstr "" -#: forms.py:923 +#: forms.py:957  #, python-format  msgid ""  "Operation code already exists for year: %(year)d - use a value bigger than "  "%(last_val)d"  msgstr "" -#: forms.py:927 +#: forms.py:961  msgid "Bad operation code"  msgstr "" -#: forms.py:933 models.py:531 models.py:879 +#: forms.py:967 models.py:535 models.py:877  msgid "Operation code"  msgstr "" -#: forms.py:959 +#: forms.py:993  msgid "Preventive informations - excavation"  msgstr "" -#: forms.py:960 models.py:286 +#: forms.py:994 models.py:290  #: templates/ishtar/dashboards/dashboard_operation.html:701  msgid "Cost (euros)"  msgstr "" -#: forms.py:961 models.py:291 +#: forms.py:995 models.py:295  msgid "Scheduled man-days"  msgstr "" -#: forms.py:963 models.py:294 +#: forms.py:997 models.py:298  msgid "Optional man-days"  msgstr "" -#: forms.py:965 models.py:297 +#: forms.py:999 models.py:301  msgid "Effective man-days"  msgstr "" -#: forms.py:975 +#: forms.py:1009  msgid "Preventive informations - diagnostic"  msgstr "" -#: forms.py:978 models.py:316 +#: forms.py:1012 models.py:320  msgid "Prescription on zoning"  msgstr "" -#: forms.py:980 models.py:319 +#: forms.py:1014 models.py:323  msgid "Prescription on large area"  msgstr "" -#: forms.py:983 models.py:321 +#: forms.py:1017 models.py:325  msgid "Prescription on geoarchaeological context"  msgstr "" -#: forms.py:987 forms.py:1009 models.py:284 models.py:1049 +#: forms.py:1021 forms.py:1043 models.py:288 models.py:1054  msgid "Towns"  msgstr "" -#: forms.py:1016 models.py:1246 models.py:1441 +#: forms.py:1050 models.py:1251 models.py:1446  msgid "Parcel"  msgstr "" -#: forms.py:1068 models.py:46 +#: forms.py:1102 models.py:46  msgid "Remain types"  msgstr "" -#: forms.py:1072 models.py:45 +#: forms.py:1106 models.py:45  msgid "Remain type"  msgstr "" -#: forms.py:1088 templates/ishtar/sheet_operation.html:171 -#: templates/ishtar/sheet_operation.html:202 +#: forms.py:1122 templates/ishtar/sheet_operation.html:173 +#: templates/ishtar/sheet_operation.html:204  msgid "Period"  msgstr "" -#: forms.py:1100 models.py:85 +#: forms.py:1134 models.py:85  msgid "Reference"  msgstr "" -#: forms.py:1129 +#: forms.py:1163  msgid "This reference already exists."  msgstr "" -#: forms.py:1161 models.py:95 models.py:341 -#: templates/ishtar/sheet_operation.html:96 +#: forms.py:1195 models.py:95 models.py:345 +#: templates/ishtar/sheet_operation.html:97  msgid "Archaeological sites"  msgstr "" -#: forms.py:1165 +#: forms.py:1199  msgid "Associated archaeological sites"  msgstr "" -#: forms.py:1171 ishtar_menu.py:34 ishtar_menu.py:64 ishtar_menu.py:93 +#: forms.py:1205 ishtar_menu.py:34 ishtar_menu.py:64 ishtar_menu.py:93  msgid "Search"  msgstr "" -#: forms.py:1176 +#: forms.py:1210  msgid "Would you like to close this operation?"  msgstr "" -#: forms.py:1181 +#: forms.py:1215  msgid "Would you like to delete this operation?"  msgstr "" -#: forms.py:1190 forms.py:1260 forms.py:1396 models.py:886 models.py:1006 +#: forms.py:1224 forms.py:1294 forms.py:1430 models.py:884 models.py:1011  msgid "Index"  msgstr "" -#: forms.py:1216 +#: forms.py:1250  #, python-format  msgid ""  "Index already exists for operation: %(operation)s - use a value bigger than "  "%(last_val)d"  msgstr "" -#: forms.py:1228 +#: forms.py:1262  msgid "Operation's year"  msgstr "" -#: forms.py:1235 +#: forms.py:1269  msgid "Operation's town"  msgstr "" -#: forms.py:1248 +#: forms.py:1282  msgid "Documentation search"  msgstr "" -#: forms.py:1250 +#: forms.py:1284  msgid "You should select a document."  msgstr "" -#: forms.py:1267 forms.py:1334 models.py:930 models.py:1000 +#: forms.py:1301 forms.py:1368 models.py:935 models.py:1005  msgid "Act type"  msgstr "" -#: forms.py:1268 forms.py:1466 +#: forms.py:1302 forms.py:1500  msgid "Indexed?"  msgstr "" -#: forms.py:1274 forms.py:1339 models.py:1040 +#: forms.py:1308 forms.py:1373 models.py:1045  #: templates/ishtar/blocks/window_tables/administrativacts.html:10  msgid "Object"  msgstr "" -#: forms.py:1311 views.py:333 +#: forms.py:1345 views.py:348  msgid "Administrative act search"  msgstr "" -#: forms.py:1326 forms.py:1424 forms.py:1491 +#: forms.py:1360 forms.py:1458 forms.py:1525  msgid "You should select an administrative act."  msgstr "" -#: forms.py:1342 models.py:1037 +#: forms.py:1376 models.py:1042  msgid "Signature date"  msgstr "" -#: forms.py:1384 +#: forms.py:1418  #, python-format  msgid ""  "This index already exists for year: %(year)d - use a value bigger than "  "%(last_val)d"  msgstr "" -#: forms.py:1388 +#: forms.py:1422  msgid "Bad index"  msgstr "" -#: forms.py:1401 +#: forms.py:1435  msgid "Would you like to delete this administrative act?"  msgstr "" -#: forms.py:1406 +#: forms.py:1440  msgid "Template"  msgstr "" -#: forms.py:1430 forms.py:1434 +#: forms.py:1464 forms.py:1468  msgid "This document is not intended for this type of act."  msgstr "" -#: forms.py:1452 +#: forms.py:1486  msgid "Doc generation"  msgstr "" -#: forms.py:1454 +#: forms.py:1488  msgid "Generate the associated doc?"  msgstr "" -#: forms.py:1475 ishtar_menu.py:123 views.py:386 +#: forms.py:1509 ishtar_menu.py:123 views.py:401  msgctxt "admin act register"  msgid "Register"  msgstr "" @@ -590,7 +599,7 @@ msgstr ""  msgid "Deletion"  msgstr "" -#: ishtar_menu.py:59 models.py:1056 +#: ishtar_menu.py:59 models.py:1061  #: templates/ishtar/sheet_administrativeact.html:4  msgid "Administrative act"  msgstr "" @@ -615,16 +624,16 @@ msgstr ""  msgid "General informations"  msgstr "" -#: ishtar_menu.py:139 models.py:369 +#: ishtar_menu.py:139 models.py:373  #: templates/ishtar/dashboards/dashboard_operation.html:8  msgid "Operations"  msgstr "" -#: models.py:53 models.py:71 models.py:1913 +#: models.py:53 models.py:71 models.py:1918  msgid "Order"  msgstr "" -#: models.py:55 models.py:1444 +#: models.py:55 models.py:1449  msgid "End date"  msgstr "" @@ -740,357 +749,357 @@ msgstr ""  msgid "In charge scientist"  msgstr "" -#: models.py:277 models.py:1226 +#: models.py:281 models.py:1231  msgid "File"  msgstr "" -#: models.py:281 +#: models.py:285  msgid "Surface (m2)"  msgstr "" -#: models.py:335 +#: models.py:339  msgid "General comment"  msgstr "" -#: models.py:338 +#: models.py:342  msgid "Cached name"  msgstr "" -#: models.py:346 +#: models.py:350  msgid ""  "If checked, it means that this operation have not been officialy registered."  msgstr "" -#: models.py:362 +#: models.py:366  msgid "Point"  msgstr "" -#: models.py:363 +#: models.py:367  msgid "Multi polygon"  msgstr "" -#: models.py:371 +#: models.py:375  msgid "Can view all Operations"  msgstr "" -#: models.py:372 +#: models.py:376  msgid "Can view own Operation"  msgstr "" -#: models.py:373 +#: models.py:377  msgid "Can add own Operation"  msgstr "" -#: models.py:374 +#: models.py:378  msgid "Can change own Operation"  msgstr "" -#: models.py:375 +#: models.py:379  msgid "Can delete own Operation"  msgstr "" -#: models.py:376 +#: models.py:380  msgid "Can close Operation"  msgstr "" -#: models.py:405 +#: models.py:409  msgid "OPE"  msgstr "" -#: models.py:479 +#: models.py:483  msgid "Intercommunal"  msgstr "" -#: models.py:517 +#: models.py:521  msgid "Code patriarche"  msgstr "" -#: models.py:557 +#: models.py:561  msgid "This operation code already exists for this year"  msgstr "" -#: models.py:582 +#: models.py:588  msgid "Number of parcels"  msgstr "" -#: models.py:600 +#: models.py:598  msgid "Number of administrative acts"  msgstr "" -#: models.py:608 +#: models.py:606  msgid "Number of indexed administrative acts"  msgstr "" -#: models.py:616 +#: models.py:614  msgid "Number of context records"  msgstr "" -#: models.py:652 +#: models.py:650  msgid "Number of finds"  msgstr "" -#: models.py:697 +#: models.py:695  msgid "No type"  msgstr "" -#: models.py:728 +#: models.py:726  msgid "Number of sources"  msgstr "" -#: models.py:770 templates/ishtar/dashboards/dashboard_operation.html:309 +#: models.py:768 templates/ishtar/dashboards/dashboard_operation.html:309  #: templates/ishtar/dashboards/dashboard_operation.html:575  #: templates/ishtar/dashboards/dashboard_operation.html:611  msgid "Mean"  msgstr "" -#: models.py:820 +#: models.py:818  msgid "Inverse relation"  msgstr "" -#: models.py:824 +#: models.py:822  msgid "Operation relation type"  msgstr "" -#: models.py:825 +#: models.py:823  msgid "Operation relation types"  msgstr "" -#: models.py:838 +#: models.py:836  msgid "Operation record relation"  msgstr "" -#: models.py:839 +#: models.py:837  msgid "Operation record relations"  msgstr "" -#: models.py:878 +#: models.py:876  msgid "Operation year"  msgstr "" -#: models.py:880 +#: models.py:878  msgid "Document code"  msgstr "" -#: models.py:890 +#: models.py:888  msgid "Operation documentation"  msgstr "" -#: models.py:891 +#: models.py:889  msgid "Operation documentations"  msgstr "" -#: models.py:894 +#: models.py:892  msgid "Can view all Operation sources"  msgstr "" -#: models.py:896 +#: models.py:894  msgid "Can view own Operation source"  msgstr "" -#: models.py:898 +#: models.py:896  msgid "Can add own Operation source"  msgstr "" -#: models.py:900 +#: models.py:898  msgid "Can change own Operation source"  msgstr "" -#: models.py:902 +#: models.py:900  msgid "Can delete own Operation source"  msgstr "" -#: models.py:918 models.py:1031 +#: models.py:923 models.py:1036  msgid "Treatment request"  msgstr "" -#: models.py:919 models.py:1036 +#: models.py:924 models.py:1041  msgid "Treatment"  msgstr "" -#: models.py:921 +#: models.py:926  msgid "Intended to"  msgstr "" -#: models.py:923 +#: models.py:928  msgid "Code"  msgstr "" -#: models.py:926 +#: models.py:931  msgid "Associated template"  msgstr "" -#: models.py:927 +#: models.py:932  msgid "Indexed"  msgstr "" -#: models.py:931 +#: models.py:936  msgid "Act types"  msgstr "" -#: models.py:997 models.py:1077 +#: models.py:1002 models.py:1082  #: templates/ishtar/blocks/window_tables/administrativacts.html:7  #: templates/ishtar/blocks/window_tables/archaeologicalsites.html:7  msgid "Ref."  msgstr "" -#: models.py:1004 +#: models.py:1009  msgid "Person in charge of the operation"  msgstr "" -#: models.py:1010 +#: models.py:1015  msgid "Archaeological preventive operator"  msgstr "" -#: models.py:1018 +#: models.py:1023  msgid "Signatory"  msgstr "" -#: models.py:1046 +#: models.py:1051  msgid "Departments"  msgstr "" -#: models.py:1047 +#: models.py:1052  msgid "Cached values get from associated departments"  msgstr "" -#: models.py:1050 +#: models.py:1055  msgid "Cached values get from associated towns"  msgstr "" -#: models.py:1057 templates/ishtar/sheet_operation.html:104 -#: templates/ishtar/sheet_operation.html:145 +#: models.py:1062 templates/ishtar/sheet_operation.html:105 +#: templates/ishtar/sheet_operation.html:147  msgid "Administrative acts"  msgstr "" -#: models.py:1060 +#: models.py:1065  msgid "Can view all Administrative acts"  msgstr "" -#: models.py:1062 +#: models.py:1067  msgid "Can view own Administrative act"  msgstr "" -#: models.py:1064 +#: models.py:1069  msgid "Can add own Administrative act"  msgstr "" -#: models.py:1066 +#: models.py:1071  msgid "Can change own Administrative act"  msgstr "" -#: models.py:1068 +#: models.py:1073  msgid "Can delete own Administrative act"  msgstr "" -#: models.py:1171 +#: models.py:1176  msgid "This index already exists for this year"  msgstr "" -#: models.py:1239 +#: models.py:1244  msgid "External ID"  msgstr "" -#: models.py:1242 +#: models.py:1247  msgid "External ID is set automatically"  msgstr "" -#: models.py:1243 +#: models.py:1248  msgid "Address - Locality"  msgstr "" -#: models.py:1439 +#: models.py:1444  msgid "Owner"  msgstr "" -#: models.py:1447 +#: models.py:1452  msgid "Parcel owner"  msgstr "" -#: models.py:1448 +#: models.py:1453  msgid "Parcel owners"  msgstr "" -#: models.py:1474 +#: models.py:1479  msgid "Recorded"  msgstr "" -#: models.py:1475 +#: models.py:1480  msgid "Effective"  msgstr "" -#: models.py:1476 +#: models.py:1481  msgid "Active"  msgstr "" -#: models.py:1477 +#: models.py:1482  msgid "Field completed"  msgstr "" -#: models.py:1478 +#: models.py:1483  msgid "Associated report"  msgstr "" -#: models.py:1479 +#: models.py:1484  msgid "Closed"  msgstr "" -#: models.py:1480 +#: models.py:1485  msgid "Documented and closed"  msgstr "" -#: models.py:1914 +#: models.py:1919  msgid "Is preventive"  msgstr "" -#: models.py:1917 +#: models.py:1922  msgid "Operation type old"  msgstr "" -#: models.py:1918 +#: models.py:1923  msgid "Operation types old"  msgstr "" -#: views.py:214 +#: views.py:223  msgid "New operation"  msgstr "" -#: views.py:237 +#: views.py:267  msgid "Operation modification"  msgstr "" -#: views.py:280 +#: views.py:295  msgid "Operation closing"  msgstr "" -#: views.py:291 +#: views.py:306  msgid "Operation deletion"  msgstr "" -#: views.py:296 +#: views.py:311  msgid "Operation: source search"  msgstr "" -#: views.py:304 +#: views.py:319  msgid "Operation: source creation"  msgstr "" -#: views.py:312 +#: views.py:327  msgid "Operation: source modification"  msgstr "" -#: views.py:327 +#: views.py:342  msgid "Operation: source deletion"  msgstr "" -#: views.py:346 +#: views.py:361  msgid "Operation: new administrative act"  msgstr "" -#: views.py:356 +#: views.py:371  msgid "Operation: administrative act modification"  msgstr "" -#: views.py:380 +#: views.py:395  msgid "Operation: administrative act deletion"  msgstr "" @@ -1105,7 +1114,7 @@ msgid ""  msgstr ""  #: templates/ishtar/sheet_administrativeact.html:36 -#: templates/ishtar/sheet_operation.html:40 +#: templates/ishtar/sheet_operation.html:41  msgid "Surface:"  msgstr "" @@ -1125,92 +1134,96 @@ msgstr ""  msgid "Begining date"  msgstr "" -#: templates/ishtar/sheet_operation.html:36 +#: templates/ishtar/sheet_operation.html:37  msgid "State:"  msgstr "" -#: templates/ishtar/sheet_operation.html:36 +#: templates/ishtar/sheet_operation.html:37  msgid "Active file"  msgstr "" -#: templates/ishtar/sheet_operation.html:37 +#: templates/ishtar/sheet_operation.html:38  msgid "Closed operation"  msgstr "" -#: templates/ishtar/sheet_operation.html:38 +#: templates/ishtar/sheet_operation.html:39  msgid "Closing date:"  msgstr "" -#: templates/ishtar/sheet_operation.html:38 +#: templates/ishtar/sheet_operation.html:39  msgid "by"  msgstr "" -#: templates/ishtar/sheet_operation.html:41 +#: templates/ishtar/sheet_operation.html:42  msgid "Cost:"  msgstr "" -#: templates/ishtar/sheet_operation.html:42 +#: templates/ishtar/sheet_operation.html:43  msgid "Duration:"  msgstr "" -#: templates/ishtar/sheet_operation.html:42 +#: templates/ishtar/sheet_operation.html:43  msgid "Day"  msgstr "" -#: templates/ishtar/sheet_operation.html:75 +#: templates/ishtar/sheet_operation.html:76  msgid "Localisation"  msgstr "" -#: templates/ishtar/sheet_operation.html:100 +#: templates/ishtar/sheet_operation.html:101  msgid "Associated parcels"  msgstr "" -#: templates/ishtar/sheet_operation.html:108 +#: templates/ishtar/sheet_operation.html:109  msgid "Document from this operation"  msgstr "" -#: templates/ishtar/sheet_operation.html:114 -#: templates/ishtar/sheet_operation.html:156 +#: templates/ishtar/sheet_operation.html:115 +#: templates/ishtar/sheet_operation.html:158  msgid "Context records"  msgstr "" -#: templates/ishtar/sheet_operation.html:119 +#: templates/ishtar/sheet_operation.html:120  msgid "Context record relations"  msgstr "" -#: templates/ishtar/sheet_operation.html:124 +#: templates/ishtar/sheet_operation.html:125  msgid "Documents from associated context records"  msgstr "" -#: templates/ishtar/sheet_operation.html:129 -#: templates/ishtar/sheet_operation.html:179 +#: templates/ishtar/sheet_operation.html:130 +#: templates/ishtar/sheet_operation.html:181  msgid "Finds"  msgstr "" -#: templates/ishtar/sheet_operation.html:134 +#: templates/ishtar/sheet_operation.html:135  msgid "Documents from associated finds"  msgstr "" -#: templates/ishtar/sheet_operation.html:139 +#: templates/ishtar/sheet_operation.html:140  msgid "Associated containers"  msgstr "" -#: templates/ishtar/sheet_operation.html:143 +#: templates/ishtar/sheet_operation.html:144  msgid "Statistics"  msgstr "" -#: templates/ishtar/sheet_operation.html:163 -#: templates/ishtar/sheet_operation.html:217 +#: templates/ishtar/sheet_operation.html:145 +msgid "Theses number are updated hourly" +msgstr "" + +#: templates/ishtar/sheet_operation.html:165 +#: templates/ishtar/sheet_operation.html:219  #: templates/ishtar/blocks/window_tables/administrativacts.html:8  msgid "Type"  msgstr "" -#: templates/ishtar/sheet_operation.html:163 -#: templates/ishtar/sheet_operation.html:171 -#: templates/ishtar/sheet_operation.html:186 -#: templates/ishtar/sheet_operation.html:194 -#: templates/ishtar/sheet_operation.html:202 -#: templates/ishtar/sheet_operation.html:217 +#: templates/ishtar/sheet_operation.html:165 +#: templates/ishtar/sheet_operation.html:173 +#: templates/ishtar/sheet_operation.html:188 +#: templates/ishtar/sheet_operation.html:196 +#: templates/ishtar/sheet_operation.html:204 +#: templates/ishtar/sheet_operation.html:219  #: templates/ishtar/dashboards/dashboard_operation.html:18  #: templates/ishtar/dashboards/dashboard_operation.html:164  #: templates/ishtar/dashboards/dashboard_operation.html:432 @@ -1219,19 +1232,19 @@ msgstr ""  msgid "Number"  msgstr "" -#: templates/ishtar/sheet_operation.html:186 +#: templates/ishtar/sheet_operation.html:188  msgid "Material type"  msgstr "" -#: templates/ishtar/sheet_operation.html:194 +#: templates/ishtar/sheet_operation.html:196  msgid "Object type"  msgstr "" -#: templates/ishtar/sheet_operation.html:210 +#: templates/ishtar/sheet_operation.html:212  msgid "Sources"  msgstr "" -#: templates/ishtar/sheet_operation.html:226 +#: templates/ishtar/sheet_operation.html:228  msgid "Finds by context records"  msgstr "" diff --git a/archaeological_operations/migrations/0067_auto.py b/archaeological_operations/migrations/0067_auto.py new file mode 100644 index 000000000..f09437198 --- /dev/null +++ b/archaeological_operations/migrations/0067_auto.py @@ -0,0 +1,851 @@ +# -*- coding: utf-8 -*- +import datetime +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + + +class Migration(SchemaMigration): + +    def forwards(self, orm): +        # Adding M2M table for field collaborators on 'Operation' +        db.create_table('archaeological_operations_operation_collaborators', ( +            ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), +            ('operation', models.ForeignKey(orm['archaeological_operations.operation'], null=False)), +            ('person', models.ForeignKey(orm['ishtar_common.person'], null=False)) +        )) +        db.create_unique('archaeological_operations_operation_collaborators', ['operation_id', 'person_id']) + + +    def backwards(self, orm): +        # Removing M2M table for field collaborators on 'Operation' +        db.delete_table('archaeological_operations_operation_collaborators') + + +    models = { +        'archaeological_files.file': { +            'Meta': {'ordering': "('cached_label',)", 'object_name': 'File'}, +            'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'auto_external_id': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'cached_label': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'cira_advised': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'classified_area': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'corporation_general_contractor': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'general_contractor_files'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), +            'creation_date': ('django.db.models.fields.DateField', [], {'default': 'datetime.date.today', 'null': 'True', 'blank': 'True'}), +            'departments': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['ishtar_common.Department']", 'null': 'True', 'blank': 'True'}), +            'end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'external_id': ('django.db.models.fields.CharField', [], {'max_length': '120', 'null': 'True', 'blank': 'True'}), +            'file_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.FileType']"}), +            'general_contractor': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'general_contractor_files'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), +            'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'imported_line': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_archaeological_files_file'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), +            'in_charge': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'file_responsability'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), +            'instruction_deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'internal_reference': ('django.db.models.fields.CharField', [], {'max_length': '60', 'null': 'True', 'blank': 'True'}), +            'locality': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), +            'main_town': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'file_main'", 'null': 'True', 'to': "orm['ishtar_common.Town']"}), +            'mh_listing': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'mh_register': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'name': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'numeric_reference': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'organization': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'files'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), +            'permit_reference': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'permit_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.PermitType']", 'null': 'True', 'blank': 'True'}), +            'planning_service': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'planning_service_files'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), +            'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), +            'protected_area': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'raw_general_contractor': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), +            'raw_town_planning_service': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), +            'reception_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'related_file': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.File']", 'null': 'True', 'blank': 'True'}), +            'requested_operation_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.OperationType']"}), +            'research_comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'responsible_town_planning_service': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'responsible_town_planning_service_files'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), +            'saisine_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.SaisineType']", 'null': 'True', 'blank': 'True'}), +            'scientist': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'scientist'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), +            'total_developed_surface': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), +            'total_surface': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), +            'towns': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'file'", 'symmetrical': 'False', 'to': "orm['ishtar_common.Town']"}), +            'year': ('django.db.models.fields.IntegerField', [], {'default': '2017'}) +        }, +        'archaeological_files.filetype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'FileType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_files.permittype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'PermitType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_files.saisinetype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'SaisineType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'delay': ('django.db.models.fields.IntegerField', [], {'default': '30'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_finds.treatment': { +            'Meta': {'unique_together': "(('year', 'index'),)", 'object_name': 'Treatment'}, +            'cached_label': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'container': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_warehouse.Container']", 'null': 'True', 'blank': 'True'}), +            'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'estimated_cost': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), +            'external_id': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), +            'file': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'treatments'", 'null': 'True', 'to': "orm['archaeological_finds.TreatmentFile']"}), +            'goal': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), +            'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_archaeological_finds_treatment'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), +            'index': ('django.db.models.fields.IntegerField', [], {'default': '1'}), +            'insurance_cost': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), +            'location': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_warehouse.Warehouse']", 'null': 'True', 'blank': 'True'}), +            'organization': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'treatments'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), +            'other_reference': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), +            'person': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'treatments'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), +            'quoted_cost': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), +            'realized_cost': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), +            'start_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'target_is_basket': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'thumbnail': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), +            'treatment_state': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_finds.TreatmentState']", 'null': 'True', 'blank': 'True'}), +            'treatment_types': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['archaeological_finds.TreatmentType']", 'symmetrical': 'False'}), +            'year': ('django.db.models.fields.IntegerField', [], {'default': '2017'}) +        }, +        'archaeological_finds.treatmentfile': { +            'Meta': {'ordering': "('cached_label',)", 'unique_together': "(('year', 'index'),)", 'object_name': 'TreatmentFile'}, +            'applicant': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'treatmentfile_applicant'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), +            'applicant_organisation': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'treatmentfile_applicant'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), +            'cached_label': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'creation_date': ('django.db.models.fields.DateField', [], {'default': 'datetime.date.today', 'null': 'True', 'blank': 'True'}), +            'end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'external_id': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), +            'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_archaeological_finds_treatmentfile'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), +            'in_charge': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'treatmentfile_responsability'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), +            'index': ('django.db.models.fields.IntegerField', [], {'default': '1'}), +            'internal_reference': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), +            'name': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'reception_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_finds.TreatmentFileType']"}), +            'year': ('django.db.models.fields.IntegerField', [], {'default': '2017'}) +        }, +        'archaeological_finds.treatmentfiletype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'TreatmentFileType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_finds.treatmentstate': { +            'Meta': {'ordering': "('label',)", 'object_name': 'TreatmentState'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_finds.treatmenttype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'TreatmentType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'downstream_is_many': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'order': ('django.db.models.fields.IntegerField', [], {'default': '10'}), +            'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_finds.TreatmentType']", 'null': 'True', 'blank': 'True'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}), +            'upstream_is_many': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'virtual': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) +        }, +        'archaeological_operations.acttype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'ActType'}, +            'associated_template': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'acttypes'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.DocumentTemplate']"}), +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'indexed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'intented_to': ('django.db.models.fields.CharField', [], {'max_length': '2'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_operations.administrativeact': { +            'Meta': {'ordering': "('year', 'signature_date', 'index', 'act_type')", 'object_name': 'AdministrativeAct'}, +            'act_object': ('django.db.models.fields.TextField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'act_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.ActType']"}), +            'associated_file': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'administrative_act'", 'null': 'True', 'to': "orm['archaeological_files.File']"}), +            'departments_label': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_archaeological_operations_administrativeact'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), +            'in_charge': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'adminact_operation_in_charge'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), +            'index': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'operation': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'administrative_act'", 'null': 'True', 'to': "orm['archaeological_operations.Operation']"}), +            'operator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'adminact_operator'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), +            'ref_sra': ('django.db.models.fields.CharField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}), +            'scientist': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'adminact_scientist'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), +            'signatory': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'signatory'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), +            'signature_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'towns_label': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'treatment': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'administrative_act'", 'null': 'True', 'to': "orm['archaeological_finds.Treatment']"}), +            'treatment_file': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'administrative_act'", 'null': 'True', 'to': "orm['archaeological_finds.TreatmentFile']"}), +            'year': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) +        }, +        'archaeological_operations.archaeologicalsite': { +            'Meta': {'object_name': 'ArchaeologicalSite'}, +            'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_archaeological_operations_archaeologicalsite'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), +            'periods': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_operations.Period']", 'null': 'True', 'blank': 'True'}), +            'reference': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '20'}), +            'remains': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_operations.RemainType']", 'null': 'True', 'blank': 'True'}) +        }, +        'archaeological_operations.historicaladministrativeact': { +            'Meta': {'ordering': "('-history_date', '-history_id')", 'object_name': 'HistoricalAdministrativeAct'}, +            'act_object': ('django.db.models.fields.TextField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'act_type_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'associated_file_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'departments_label': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'history_creator_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'history_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), +            'history_id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'history_modifier_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'history_type': ('django.db.models.fields.CharField', [], {'max_length': '1'}), +            'history_user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}), +            'id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}), +            'in_charge_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'index': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'operation_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'operator_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'ref_sra': ('django.db.models.fields.CharField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}), +            'scientist_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'signatory_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'signature_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'towns_label': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'treatment_file_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'treatment_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'year': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) +        }, +        'archaeological_operations.historicaloperation': { +            'Meta': {'ordering': "('-history_date', '-history_id')", 'object_name': 'HistoricalOperation'}, +            'abstract': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'associated_file_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'cached_label': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}), +            'cira_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'cira_rapporteur_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'code_patriarche': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'common_name': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'cost': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'creation_date': ('django.db.models.fields.DateField', [], {'default': 'datetime.date.today'}), +            'documentation_deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'documentation_received': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'eas_number': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}), +            'effective_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'excavation_end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'finds_deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'finds_received': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'fnap_cost': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'fnap_financing': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), +            'geoarchaeological_context_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'history_creator_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'history_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), +            'history_id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'history_modifier_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'history_type': ('django.db.models.fields.CharField', [], {'max_length': '1'}), +            'history_user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}), +            'id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}), +            'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), +            'in_charge_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'large_area_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'multi_polygon': ('django.contrib.gis.db.models.fields.MultiPolygonField', [], {'null': 'True', 'blank': 'True'}), +            'negative_result': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'old_code': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), +            'operation_code': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'operation_type_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'operator_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'operator_reference': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}), +            'optional_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'point': ('django.contrib.gis.db.models.fields.PointField', [], {'null': 'True', 'blank': 'True'}), +            'record_quality': ('django.db.models.fields.CharField', [], {'max_length': '2', 'null': 'True', 'blank': 'True'}), +            'report_delivery_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'report_processing_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'scheduled_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'scientific_documentation_comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'scientist_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'start_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'thumbnail': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), +            'virtual_operation': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'year': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'zoning_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}) +        }, +        'archaeological_operations.operation': { +            'Meta': {'ordering': "('cached_label',)", 'object_name': 'Operation'}, +            'abstract': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'archaeological_sites': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_operations.ArchaeologicalSite']", 'null': 'True', 'blank': 'True'}), +            'associated_file': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'operations'", 'null': 'True', 'to': "orm['archaeological_files.File']"}), +            'cached_label': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}), +            'cira_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'cira_rapporteur': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'cira_rapporteur'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), +            'code_patriarche': ('django.db.models.fields.IntegerField', [], {'unique': 'True', 'null': 'True', 'blank': 'True'}), +            'collaborators': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['ishtar_common.Person']", 'null': 'True', 'blank': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'common_name': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'cost': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'creation_date': ('django.db.models.fields.DateField', [], {'default': 'datetime.date.today'}), +            'documentation_deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'documentation_received': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'eas_number': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}), +            'effective_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'excavation_end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'finds_deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'finds_received': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'fnap_cost': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'fnap_financing': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), +            'geoarchaeological_context_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), +            'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_archaeological_operations_operation'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), +            'in_charge': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'operation_responsability'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), +            'large_area_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'multi_polygon': ('django.contrib.gis.db.models.fields.MultiPolygonField', [], {'null': 'True', 'blank': 'True'}), +            'negative_result': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'old_code': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), +            'operation_code': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'operation_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['ishtar_common.OperationType']"}), +            'operator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'operator'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), +            'operator_reference': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}), +            'optional_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'periods': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_operations.Period']", 'null': 'True', 'blank': 'True'}), +            'point': ('django.contrib.gis.db.models.fields.PointField', [], {'null': 'True', 'blank': 'True'}), +            'record_quality': ('django.db.models.fields.CharField', [], {'max_length': '2', 'null': 'True', 'blank': 'True'}), +            'remains': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_operations.RemainType']", 'null': 'True', 'blank': 'True'}), +            'report_delivery_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'report_processing': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.ReportState']", 'null': 'True', 'blank': 'True'}), +            'scheduled_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'scientific_documentation_comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'scientist': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'operation_scientist_responsability'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), +            'start_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'thumbnail': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), +            'towns': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'operations'", 'symmetrical': 'False', 'to': "orm['ishtar_common.Town']"}), +            'virtual_operation': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'year': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'zoning_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}) +        }, +        'archaeological_operations.operationbydepartment': { +            'Meta': {'object_name': 'OperationByDepartment', 'db_table': "'operation_department'", 'managed': 'False'}, +            'department': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Department']", 'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'operation': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.Operation']"}) +        }, +        'archaeological_operations.operationsource': { +            'Meta': {'object_name': 'OperationSource'}, +            'additional_information': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'associated_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), +            'authors': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'operationsource_related'", 'symmetrical': 'False', 'to': "orm['ishtar_common.Author']"}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'creation_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'duplicate': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'external_id': ('django.db.models.fields.CharField', [], {'max_length': '12', 'null': 'True', 'blank': 'True'}), +            'format_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Format']", 'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), +            'index': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'internal_reference': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), +            'item_number': ('django.db.models.fields.IntegerField', [], {'default': '1'}), +            'operation': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'source'", 'to': "orm['archaeological_operations.Operation']"}), +            'receipt_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'receipt_date_in_documentation': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'reference': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), +            'scale': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), +            'source_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.SourceType']"}), +            'support_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.SupportType']", 'null': 'True', 'blank': 'True'}), +            'thumbnail': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), +            'title': ('django.db.models.fields.CharField', [], {'max_length': '300'}) +        }, +        'archaeological_operations.operationtypeold': { +            'Meta': {'ordering': "['-preventive', 'order', 'label']", 'object_name': 'OperationTypeOld'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'order': ('django.db.models.fields.IntegerField', [], {'default': '1'}), +            'preventive': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_operations.parcel': { +            'Meta': {'ordering': "('year', 'section', 'parcel_number')", 'object_name': 'Parcel'}, +            'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'associated_file': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'parcels'", 'null': 'True', 'to': "orm['archaeological_files.File']"}), +            'auto_external_id': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'external_id': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), +            'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'history_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), +            'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_archaeological_operations_parcel'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), +            'operation': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'parcels'", 'null': 'True', 'to': "orm['archaeological_operations.Operation']"}), +            'parcel_number': ('django.db.models.fields.CharField', [], {'max_length': '6', 'null': 'True', 'blank': 'True'}), +            'public_domain': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'section': ('django.db.models.fields.CharField', [], {'max_length': '4', 'null': 'True', 'blank': 'True'}), +            'town': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'parcels'", 'to': "orm['ishtar_common.Town']"}), +            'year': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) +        }, +        'archaeological_operations.parcelowner': { +            'Meta': {'object_name': 'ParcelOwner'}, +            'end_date': ('django.db.models.fields.DateField', [], {}), +            'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'history_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), +            'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_archaeological_operations_parcelowner'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), +            'owner': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'parcel_owner'", 'to': "orm['ishtar_common.Person']"}), +            'parcel': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'owners'", 'to': "orm['archaeological_operations.Parcel']"}), +            'start_date': ('django.db.models.fields.DateField', [], {}) +        }, +        'archaeological_operations.period': { +            'Meta': {'ordering': "('order',)", 'object_name': 'Period'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'end_date': ('django.db.models.fields.IntegerField', [], {}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'order': ('django.db.models.fields.IntegerField', [], {}), +            'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.Period']", 'null': 'True', 'blank': 'True'}), +            'start_date': ('django.db.models.fields.IntegerField', [], {}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_operations.recordrelations': { +            'Meta': {'ordering': "('left_record', 'relation_type')", 'object_name': 'RecordRelations'}, +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'left_record': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'right_relations'", 'to': "orm['archaeological_operations.Operation']"}), +            'relation_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.RelationType']"}), +            'right_record': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'left_relations'", 'to': "orm['archaeological_operations.Operation']"}) +        }, +        'archaeological_operations.relationtype': { +            'Meta': {'ordering': "('order', 'label')", 'object_name': 'RelationType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'inverse_relation': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.RelationType']", 'null': 'True', 'blank': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'order': ('django.db.models.fields.IntegerField', [], {'default': '1'}), +            'symmetrical': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'tiny_label': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_operations.remaintype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'RemainType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_operations.reportstate': { +            'Meta': {'ordering': "('order',)", 'object_name': 'ReportState'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'order': ('django.db.models.fields.IntegerField', [], {}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_warehouse.container': { +            'Meta': {'ordering': "('cached_label',)", 'unique_together': "(('index', 'location'),)", 'object_name': 'Container'}, +            'auto_external_id': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'cached_label': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}), +            'cached_location': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'container_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_warehouse.ContainerType']"}), +            'external_id': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'history_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), +            'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), +            'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_archaeological_warehouse_container'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), +            'index': ('django.db.models.fields.IntegerField', [], {'default': '0'}), +            'location': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'containers'", 'to': "orm['archaeological_warehouse.Warehouse']"}), +            'reference': ('django.db.models.fields.CharField', [], {'max_length': '40'}), +            'responsible': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'owned_containers'", 'to': "orm['archaeological_warehouse.Warehouse']"}), +            'thumbnail': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}) +        }, +        'archaeological_warehouse.containertype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'ContainerType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'height': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'length': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'reference': ('django.db.models.fields.CharField', [], {'max_length': '30'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}), +            'volume': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), +            'width': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) +        }, +        'archaeological_warehouse.warehouse': { +            'Meta': {'object_name': 'Warehouse'}, +            'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'alt_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'alt_address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'alt_address_is_prefered': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'alt_country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), +            'alt_postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), +            'alt_town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}), +            'associated_divisions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['archaeological_warehouse.WarehouseDivision']", 'symmetrical': 'False', 'through': "orm['archaeological_warehouse.WarehouseDivisionLink']", 'blank': 'True'}), +            'auto_external_id': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), +            'email': ('django.db.models.fields.EmailField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'external_id': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_archaeological_warehouse_warehouse'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), +            'mobile_phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '200'}), +            'person_in_charge': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'warehouse_in_charge'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), +            'phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'phone2': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'phone3': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'phone_desc': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'phone_desc2': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'phone_desc3': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), +            'raw_phone': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}), +            'warehouse_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_warehouse.WarehouseType']"}) +        }, +        'archaeological_warehouse.warehousedivision': { +            'Meta': {'object_name': 'WarehouseDivision'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_warehouse.warehousedivisionlink': { +            'Meta': {'ordering': "('warehouse', 'order')", 'unique_together': "(('warehouse', 'division'),)", 'object_name': 'WarehouseDivisionLink'}, +            'division': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_warehouse.WarehouseDivision']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'order': ('django.db.models.fields.IntegerField', [], {'default': '10'}), +            'warehouse': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_warehouse.Warehouse']"}) +        }, +        'archaeological_warehouse.warehousetype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'WarehouseType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'auth.group': { +            'Meta': {'object_name': 'Group'}, +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), +            'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) +        }, +        'auth.permission': { +            'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, +            'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) +        }, +        'auth.user': { +            'Meta': {'object_name': 'User'}, +            'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), +            'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), +            'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), +            'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), +            'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), +            'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), +            'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), +            'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) +        }, +        'contenttypes.contenttype': { +            'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, +            'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) +        }, +        'ishtar_common.arrondissement': { +            'Meta': {'object_name': 'Arrondissement'}, +            'department': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Department']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '30'}) +        }, +        'ishtar_common.author': { +            'Meta': {'ordering': "('author_type__order', 'person__name')", 'object_name': 'Author'}, +            'author_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.AuthorType']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'person': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'author'", 'to': "orm['ishtar_common.Person']"}) +        }, +        'ishtar_common.authortype': { +            'Meta': {'ordering': "['order', 'label']", 'object_name': 'AuthorType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'order': ('django.db.models.fields.IntegerField', [], {'default': '1'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'ishtar_common.canton': { +            'Meta': {'object_name': 'Canton'}, +            'arrondissement': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Arrondissement']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '30'}) +        }, +        'ishtar_common.department': { +            'Meta': {'ordering': "['number']", 'object_name': 'Department'}, +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '30'}), +            'number': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '3'}), +            'state': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.State']", 'null': 'True', 'blank': 'True'}) +        }, +        'ishtar_common.documenttemplate': { +            'Meta': {'ordering': "['associated_object_name', 'name']", 'object_name': 'DocumentTemplate'}, +            'associated_object_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'template': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}) +        }, +        'ishtar_common.format': { +            'Meta': {'ordering': "['label']", 'object_name': 'Format'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'ishtar_common.import': { +            'Meta': {'object_name': 'Import'}, +            'conservative_import': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'creation_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}), +            'encoding': ('django.db.models.fields.CharField', [], {'default': "'utf-8'", 'max_length': '15'}), +            'end_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), +            'error_file': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'imported_file': ('django.db.models.fields.files.FileField', [], {'max_length': '220'}), +            'imported_images': ('django.db.models.fields.files.FileField', [], {'max_length': '220', 'null': 'True', 'blank': 'True'}), +            'importer_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.ImporterType']"}), +            'match_file': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}), +            'result_file': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), +            'seconds_remaining': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'skip_lines': ('django.db.models.fields.IntegerField', [], {'default': '1'}), +            'state': ('django.db.models.fields.CharField', [], {'default': "'C'", 'max_length': '2'}), +            'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.IshtarUser']"}) +        }, +        'ishtar_common.importermodel': { +            'Meta': {'ordering': "('name',)", 'object_name': 'ImporterModel'}, +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'klass': ('django.db.models.fields.CharField', [], {'max_length': '200'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '200'}) +        }, +        'ishtar_common.importertype': { +            'Meta': {'ordering': "('name',)", 'object_name': 'ImporterType'}, +            'associated_models': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.ImporterModel']"}), +            'created_models': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.ImporterModel']"}), +            'description': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'is_template': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), +            'slug': ('django.db.models.fields.SlugField', [], {'max_length': '100', 'unique': 'True', 'null': 'True', 'blank': 'True'}), +            'unicity_keys': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}), +            'users': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['ishtar_common.IshtarUser']", 'null': 'True', 'blank': 'True'}) +        }, +        'ishtar_common.ishtaruser': { +            'Meta': {'object_name': 'IshtarUser', '_ormbases': ['auth.User']}, +            'advanced_shortcut_menu': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'person': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'ishtaruser'", 'unique': 'True', 'to': "orm['ishtar_common.Person']"}), +            'user_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True', 'primary_key': 'True'}) +        }, +        'ishtar_common.operationtype': { +            'Meta': {'ordering': "['-preventive', 'order', 'label']", 'object_name': 'OperationType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'order': ('django.db.models.fields.IntegerField', [], {'default': '1'}), +            'preventive': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'ishtar_common.organization': { +            'Meta': {'object_name': 'Organization'}, +            'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'alt_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'alt_address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'alt_address_is_prefered': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'alt_country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), +            'alt_postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), +            'alt_town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}), +            'archived': ('django.db.models.fields.NullBooleanField', [], {'default': 'False', 'null': 'True', 'blank': 'True'}), +            'country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), +            'email': ('django.db.models.fields.EmailField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_ishtar_common_organization'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), +            'merge_candidate': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'merge_candidate_rel_+'", 'null': 'True', 'to': "orm['ishtar_common.Organization']"}), +            'merge_exclusion': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'merge_exclusion_rel_+'", 'null': 'True', 'to': "orm['ishtar_common.Organization']"}), +            'merge_key': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'mobile_phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '500'}), +            'organization_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.OrganizationType']"}), +            'phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'phone2': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'phone3': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'phone_desc': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'phone_desc2': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'phone_desc3': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), +            'raw_phone': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}) +        }, +        'ishtar_common.organizationtype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'OrganizationType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'ishtar_common.person': { +            'Meta': {'object_name': 'Person'}, +            'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'alt_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'alt_address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'alt_address_is_prefered': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'alt_country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), +            'alt_postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), +            'alt_town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}), +            'archived': ('django.db.models.fields.NullBooleanField', [], {'default': 'False', 'null': 'True', 'blank': 'True'}), +            'attached_to': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'members'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'contact_type': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), +            'email': ('django.db.models.fields.EmailField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_ishtar_common_person'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), +            'merge_candidate': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'merge_candidate_rel_+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), +            'merge_exclusion': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'merge_exclusion_rel_+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), +            'merge_key': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'mobile_phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), +            'old_title': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), +            'person_types': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['ishtar_common.PersonType']", 'symmetrical': 'False'}), +            'phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'phone2': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'phone3': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'phone_desc': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'phone_desc2': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'phone_desc3': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), +            'raw_name': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'raw_phone': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'salutation': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), +            'surname': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}), +            'title': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.TitleType']", 'null': 'True', 'blank': 'True'}), +            'town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}) +        }, +        'ishtar_common.persontype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'PersonType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['auth.Group']", 'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'ishtar_common.sourcetype': { +            'Meta': {'ordering': "['label']", 'object_name': 'SourceType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'ishtar_common.state': { +            'Meta': {'ordering': "['number']", 'object_name': 'State'}, +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '30'}), +            'number': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '3'}) +        }, +        'ishtar_common.supporttype': { +            'Meta': {'object_name': 'SupportType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'ishtar_common.titletype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'TitleType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'ishtar_common.town': { +            'Meta': {'ordering': "['numero_insee']", 'object_name': 'Town'}, +            'canton': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Canton']", 'null': 'True', 'blank': 'True'}), +            'center': ('django.contrib.gis.db.models.fields.PointField', [], {'srid': '27572', 'null': 'True', 'blank': 'True'}), +            'departement': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Department']", 'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_ishtar_common_town'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'numero_insee': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '6'}), +            'surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) +        } +    } + +    complete_apps = ['archaeological_operations']
\ No newline at end of file diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py index e741f5644..3826678c3 100644 --- a/archaeological_operations/models.py +++ b/archaeological_operations/models.py @@ -269,6 +269,10 @@ class Operation(ClosedItem, BaseHistorizedItem, ImageModel, OwnPerms,                                    verbose_name=_(u"In charge"),                                    on_delete=models.SET_NULL,                                    related_name='operation_responsability') +    collaborators = models.ManyToManyField( +        Person, blank=True, null=True, verbose_name=_(u"Collaborators"), +        related_name='operation_collaborator' +    )      year = models.IntegerField(_(u"Year"), null=True, blank=True)      operation_code = models.IntegerField(_(u"Numeric reference"), null=True,                                           blank=True) @@ -570,8 +574,10 @@ class Operation(ClosedItem, BaseHistorizedItem, ImageModel, OwnPerms,      @classmethod      def get_query_owns(cls, user): -        return (Q(in_charge=user.ishtaruser.person) |\ -            Q(scientist=user.ishtaruser.person) |\ +        return ( +            Q(in_charge=user.ishtaruser.person) | +            Q(scientist=user.ishtaruser.person) | +            Q(collaborators__pk=user.ishtaruser.person.pk) |              Q(history_creator=user)) & Q(end_date__isnull=True)      def is_active(self): @@ -587,14 +593,6 @@ class Operation(ClosedItem, BaseHistorizedItem, ImageModel, OwnPerms,              nb = self.parcels.count()          return nb -    def _get_or_set_stats(self, funcname, update): -        key, val = get_cache(self.__class__, [funcname, self.pk]) -        if not update and val is not None: -            return val -        val = getattr(self, funcname)() -        cache.set(key, val, settings.CACHE_TIMEOUT) -        return val -      @property      def nb_acts(self, update=False):          _(u"Number of administrative acts") @@ -911,6 +909,13 @@ class OperationSource(Source):          return u"{}-{:04d}".format(self.operation.code_patriarche or '',                                     self.index) +    @classmethod +    def get_query_owns(cls, user): +        return (Q(operation__in_charge=user.ishtaruser.person) | +                Q(operation__scientist=user.ishtaruser.person) | +                Q(operation__collaborators__pk=user.ishtaruser.person.pk)) \ +               & Q(operation__end_date__isnull=True) +  class ActType(GeneralType):      TYPE = (('F', _(u'Archaeological file')), diff --git a/archaeological_operations/templates/ishtar/sheet_operation.html b/archaeological_operations/templates/ishtar/sheet_operation.html index 1e6d71c44..e711def8c 100644 --- a/archaeological_operations/templates/ishtar/sheet_operation.html +++ b/archaeological_operations/templates/ishtar/sheet_operation.html @@ -29,11 +29,12 @@    {% include "ishtar/blocks/sheet_creation_section.html" %}    {% trans "Begining date" as begining_date_label %}    {% field_li begining_date_label item.start_date %} -{% field_li "Excavation end date" item.excavation_end_date|default:"-" %} -{% field_li_detail "Head scientist" item.scientist %} -{% field_li_detail "In charge" item.in_charge %} -{% field_li_detail "Operator" item.operator %} -<li><label>{%trans "State"%}</label> <span class='value'>{% if item.is_active %}{%trans "Active file"%}</span></p> +  {% field_li "Excavation end date" item.excavation_end_date|default:"-" %} +  {% field_li_detail "Head scientist" item.scientist %} +  {% field_li_detail "In charge" item.in_charge %} +  {% field_li_multiple "Collaborators" item.collaborators %} +  {% field_li_detail "Operator" item.operator %} +<li><label>{%trans "State:"%}</label> <span class='value'>{% if item.is_active %}{%trans "Active file"%}</span></p>  {% else %}{%trans "Closed operation"%}</span></li> {% endif %}  {% if item.closing.date %}<li><label>{%trans "Closing date"%}</label> <span class='value'>{{ item.closing.date }} <strong>{%trans "by" %}</strong> {{ item.closing.user }}</span></li>{% endif %}  {% field_li "Type" item.operation_type %} @@ -141,6 +142,7 @@  {% endif %}  <h3>{% trans "Statistics" %}</h3> +<small class="centered"><em>{% trans "Theses number are updated hourly" %}</em></small>  <h4>{% trans "Administrative acts" %}</h4>  <ul class='form-flex'> diff --git a/archaeological_operations/tests.py b/archaeological_operations/tests.py index 9d5b9c616..67f9454fa 100644 --- a/archaeological_operations/tests.py +++ b/archaeological_operations/tests.py @@ -1,6 +1,6 @@  #!/usr/bin/env python  # -*- coding: utf-8 -*- -# Copyright (C) 2012-2016 Étienne Loks  <etienne.loks_AT_peacefrogsDOTnet> +# Copyright (C) 2012-2017 Étienne Loks  <etienne.loks_AT_peacefrogsDOTnet>  # This program is free software: you can redistribute it and/or modify  # it under the terms of the GNU Affero General Public License as @@ -699,7 +699,8 @@ class OperationTest(TestCase, OperationInitTest):                  '../archaeological_operations/fixtures/initial_data-fr.json']      def setUp(self): -        IshtarSiteProfile.objects.create() +        IshtarSiteProfile.objects.get_or_create( +            slug='default', active=True)          self.username, self.password, self.user = create_superuser()          self.alt_username, self.alt_password, self.alt_user = create_user()          self.alt_user.user_permissions.add(Permission.objects.get( @@ -886,7 +887,8 @@ class OperationSearchTest(TestCase, OperationInitTest):                  '../archaeological_operations/fixtures/initial_data-fr.json']      def setUp(self): -        IshtarSiteProfile.objects.create() +        IshtarSiteProfile.objects.get_or_create( +            slug='default', active=True)          self.username, self.password, self.user = create_superuser()          self.alt_username, self.alt_password, self.alt_user = create_user()          self.alt_user.user_permissions.add(Permission.objects.get( @@ -1012,7 +1014,7 @@ class RegisterTest(TestCase, OperationInitTest):      def testSearch(self):          c = Client()          response = c.get(reverse('get-administrativeact'), {'year': '2014'}) -        # no result when no authentification +        # no result when no authentication          self.assertTrue(not json.loads(response.content))          c.login(username=self.username, password=self.password)          response = c.get(reverse('get-administrativeact'), {'year': '2014'}) @@ -1037,34 +1039,39 @@ class OperationWizardCreationTest(WizardTest, OperationInitTest, TestCase):          FormData(              "Create a preventive diag",              form_datas={ +                'filechoice-operation_creation': {},                  'general-operation_creation': {                      'operation_type': 1,  # preventive diag                      'year': 2016},                  'townsgeneral-operation_creation': [],                  'parcelsgeneral-operation_creation': [],              }, -            ignored=('filechoice-operation_creation', -                     'towns-operation_creation', +            ignored=('towns-operation_creation',                       'parcels-operation_creation',                       'preventive-operation_creation',)          ),          FormData(              "Create another preventive diag with same parcel name",              form_datas={ +                'filechoice-operation_creation': {},                  'general-operation_creation': {                      'operation_type': 1,  # preventive diag                      'year': 2016},                  'townsgeneral-operation_creation': [],                  'parcelsgeneral-operation_creation': [],              }, -            ignored=('filechoice-operation_creation', -                     'towns-operation_creation', +            ignored=('towns-operation_creation',                       'parcels-operation_creation',                       'preventive-operation_creation',)          )      ]      def pre_wizard(self): +        profile, created = IshtarSiteProfile.objects.get_or_create( +            slug='default', active=True) +        profile.files = True +        profile.save() +          if 'townsgeneral-operation_creation' not in \                  self.form_datas[0].form_datas:              return super(OperationWizardCreationTest, self).pre_wizard() diff --git a/archaeological_operations/urls.py b/archaeological_operations/urls.py index e98ddc93f..bc6bc4bee 100644 --- a/archaeological_operations/urls.py +++ b/archaeological_operations/urls.py @@ -69,7 +69,8 @@ urlpatterns = patterns(          check_rights(['view_operation', 'view_own_operation'])(              views.operation_search_wizard), name='operation_search'),      url(r'operation_creation/(?P<step>.+)?$', -        check_rights(['add_operation'])(views.operation_creation_wizard), +        check_rights(['add_operation', 'add_own_operation'])( +            views.operation_creation_wizard),          name='operation_creation'),      url(r'operation_add/(?P<file_id>\d+)$',          views.operation_add, name='operation_add'), diff --git a/archaeological_operations/utils.py b/archaeological_operations/utils.py index a84ff44ae..40ca71c05 100644 --- a/archaeological_operations/utils.py +++ b/archaeological_operations/utils.py @@ -254,9 +254,9 @@ def parse_year(value):      value = parse_string(value)      try:          yr = int(value) -    except: +    except ValueError:          return None -    if yr < 1900 or yr > 2100: +    if yr < 1600 or yr > 2100:          return None      return yr diff --git a/archaeological_operations/views.py b/archaeological_operations/views.py index c4e4acb5e..9b420f594 100644 --- a/archaeological_operations/views.py +++ b/archaeological_operations/views.py @@ -1,6 +1,6 @@  #!/usr/bin/env python  # -*- coding: utf-8 -*- -# Copyright (C) 2010-2016  Étienne Loks  <etienne.loks_AT_peacefrogsDOTnet> +# Copyright (C) 2010-2017  Étienne Loks  <etienne.loks_AT_peacefrogsDOTnet>  # This program is free software: you can redistribute it and/or modify  # it under the terms of the GNU Affero General Public License as @@ -185,20 +185,29 @@ wizard_steps = [      ('final-operation_creation', FinalForm)] -def check_files_for_operation(self): -    if not check_rights_condition(['view_file'])(self): -        return False -    return get_current_profile().files +def get_check_files_for_operation(other_check=None): +    def func(self): +        if not get_current_profile().files or \ +                not check_rights_condition(['view_file'])(self): +            return False +        if not other_check: +            return True +        return other_check(self) +    return func + +check_files_for_operation = get_check_files_for_operation() +  ope_crea_condition_dict = { -    'filechoice-operation_creation': -    check_files_for_operation, +    'filechoice-operation_creation': check_files_for_operation,      'preventive-operation_creation': -    is_preventive('general-operation_creation', models.OperationType, -                  'operation_type', 'prev_excavation'), +    get_check_files_for_operation( +        is_preventive('general-operation_creation', models.OperationType, +                      'operation_type', 'prev_excavation')),      'preventivediag-operation_creation': -    is_preventive('general-operation_creation', models.OperationType, -                  'operation_type', 'arch_diagnostic'), +    get_check_files_for_operation( +        is_preventive('general-operation_creation', models.OperationType, +                      'operation_type', 'arch_diagnostic')),      'townsgeneral-operation_creation': has_associated_file(          'filechoice-operation_creation', negate=True),      'towns-operation_creation': has_associated_file( @@ -232,25 +241,31 @@ operation_modif_wizard_steps = [      ('final-operation_modification', FinalForm)  ] + +ope_modif_condition_dict = { +    'preventive-operation_modification': +    get_check_files_for_operation( +        is_preventive('general-operation_modification', models.OperationType, +                      'operation_type', 'prev_excavation')), +    'preventivediag-operation_modification': +    get_check_files_for_operation( +        is_preventive('general-operation_modification', models.OperationType, +                      'operation_type', 'arch_diagnostic')), +    'townsgeneral-operation_modification': has_associated_file( +        'general-operation_modification', negate=True), +    'towns-operation_modification': has_associated_file( +        'general-operation_modification'), +    'parcelsgeneral-operation_modification': has_associated_file( +        'general-operation_modification', negate=True), +    'parcels-operation_modification': has_associated_file( +        'general-operation_modification'), + +} +  operation_modification_wizard = OperationModificationWizard.as_view(      operation_modif_wizard_steps,      label=_(u"Operation modification"), -    condition_dict={ -        'preventive-operation_modification': is_preventive( -            'general-operation_modification', models.OperationType, -            'operation_type', 'prev_excavation'), -        'preventivediag-operation_modification': is_preventive( -            'general-operation_modification', models.OperationType, -            'operation_type', 'arch_diagnostic'), -        'townsgeneral-operation_modification': has_associated_file( -            'general-operation_modification', negate=True), -        'towns-operation_modification': has_associated_file( -            'general-operation_modification'), -        'parcelsgeneral-operation_modification': has_associated_file( -            'general-operation_modification', negate=True), -        'parcels-operation_modification': has_associated_file( -            'general-operation_modification'), -}, +    condition_dict=ope_modif_condition_dict,      url_name='operation_modification',) diff --git a/archaeological_operations/wizards.py b/archaeological_operations/wizards.py index 94aafb87c..c132c24be 100644 --- a/archaeological_operations/wizards.py +++ b/archaeological_operations/wizards.py @@ -1,6 +1,6 @@  #!/usr/bin/env python  # -*- coding: utf-8 -*- -# Copyright (C) 2012-2016  Étienne Loks  <etienne.loks_AT_peacefrogsDOTnet> +# Copyright (C) 2012-2017  Étienne Loks  <etienne.loks_AT_peacefrogsDOTnet>  # This program is free software: you can redistribute it and/or modify  # it under the terms of the GNU Affero General Public License as @@ -43,7 +43,7 @@ class OperationWizard(Wizard):      object_parcel_type = 'operation'      parcel_step_key = 'parcels'      relations_step_key = 'relations' -    # step contening the current(s) town(s) +    # step including the current(s) town(s)      town_step_keys = ['towns-', 'townsgeneral-']      town_input_id = 'town'  # input id of the current(s) town(s)      multi_towns = False  # true if current town are multi valued @@ -275,6 +275,15 @@ class OperationModificationWizard(OperationWizard):      modification = True      filter_owns = {'selec-operation_modification': ['pk']} +    def get_form_kwargs(self, step, **kwargs): +        kwargs = super(OperationModificationWizard, self).get_form_kwargs( +            step, **kwargs) +        print(step) +        if step != "relations-operation_modification": +            return kwargs +        kwargs["left_record"] = self.get_current_object() +        return kwargs +  class OperationClosingWizard(ClosingWizard):      model = models.Operation diff --git a/archaeological_warehouse/forms.py b/archaeological_warehouse/forms.py index 553a01ce5..94e31b759 100644 --- a/archaeological_warehouse/forms.py +++ b/archaeological_warehouse/forms.py @@ -20,6 +20,7 @@  from django import forms  from django.conf import settings  from django.forms.formsets import formset_factory +from django.utils.safestring import mark_safe  from django.utils.translation import ugettext_lazy as _  from ishtar_common.models import Person, valid_id @@ -27,7 +28,7 @@ from archaeological_finds.models import TreatmentType, FindBasket  import models  from ishtar_common import widgets  from ishtar_common.forms import name_validator, reverse_lazy, \ -    get_form_selection, TableSelect, ManageOldType, FinalForm +    get_form_selection, TableSelect, ManageOldType, FinalForm, FormSet  from archaeological_finds.forms import FindMultipleFormSelection, \      SelectFindBasketForm @@ -57,8 +58,15 @@ class SelectedDivisionForm(ManageOldType, forms.Form):              initial=self.init_data.get('division')          ) + +class DivisionFormSet(FormSet): +    def clean(self): +        """Checks that no divisions are duplicated.""" +        return self.check_duplicate(('division',), +                                    _("There are identical divisions.")) +  SelectedDivisionFormset = formset_factory( -    SelectedDivisionForm, can_delete=True) +    SelectedDivisionForm, can_delete=True, formset=DivisionFormSet)  SelectedDivisionFormset.form_label = _(u"Divisions") @@ -92,7 +100,7 @@ class WarehouseForm(ManageOldType, forms.Form):      associated_models = {'warehouse_type': models.WarehouseType,                           'person_in_charge': Person} -    name = forms.CharField(label=_(u"Name"), max_length=40, +    name = forms.CharField(label=_(u"Name"), max_length=200,                             validators=[name_validator])      warehouse_type = forms.ChoiceField(label=_(u"Warehouse type"),                                         choices=[]) @@ -100,7 +108,7 @@ class WarehouseForm(ManageOldType, forms.Form):          label=_(u"Person in charge"),          widget=widgets.JQueryAutoComplete(              reverse_lazy('autocomplete-person'), -            associated_model=Person), +            associated_model=Person, new=True),          validators=[valid_id(Person)],          required=False)      comment = forms.CharField(label=_(u"Comment"), widget=forms.Textarea, @@ -148,6 +156,7 @@ class WarehouseDeletionForm(FinalForm):  class ContainerForm(ManageOldType, forms.Form):      form_label = _(u"Container") +    file_upload = True      associated_models = {'container_type': models.ContainerType,                           'location': models.Warehouse,                           'responsible': models.Warehouse} @@ -165,6 +174,13 @@ class ContainerForm(ManageOldType, forms.Form):              reverse_lazy('autocomplete-warehouse'),              associated_model=models.Warehouse, new=True),          validators=[valid_id(models.Warehouse)]) +    image = forms.ImageField( +        label=_(u"Image"), help_text=mark_safe( +            _(u"<p>Heavy images are resized to: %(width)dx%(height)d " +              u"(ratio is preserved).</p>") % { +                'width': settings.IMAGE_MAX_SIZE[0], +                'height': settings.IMAGE_MAX_SIZE[1]}), +        max_length=255, required=False, widget=widgets.ImageFileInput())      comment = forms.CharField(label=_(u"Comment"),                                widget=forms.Textarea, required=False) @@ -192,7 +208,7 @@ class ContainerForm(ManageOldType, forms.Form):  class ContainerModifyForm(ContainerForm):      pk = forms.IntegerField(required=False, widget=forms.HiddenInput) -    index = forms.IntegerField(_(u"Index")) +    index = forms.IntegerField(label=_(u"ID"))      def __init__(self, *args, **kwargs):          super(ContainerModifyForm, self).__init__(*args, **kwargs) @@ -264,20 +280,20 @@ class LocalisationForm(forms.Form):      form_label = _(u"Localisation")      def __init__(self, *args, **kwargs): -        container, warehouse = None, None +        self.container, self.warehouse = None, None          if 'warehouse' in kwargs: -            warehouse = kwargs.pop('warehouse') +            self.warehouse = kwargs.pop('warehouse')          if 'container' in kwargs: -            container = kwargs.pop('container') +            self.container = kwargs.pop('container')          super(LocalisationForm, self).__init__(*args, **kwargs) -        if not warehouse: +        if not self.warehouse:              return -        for divlink in warehouse.warehousedivisionlink_set.order_by( +        for divlink in self.warehouse.warehousedivisionlink_set.order_by(                  'order').all():              initial = u"-" -            if container: +            if self.container:                  q = models.ContainerLocalisation.objects.filter( -                    division=divlink, container=container) +                    division=divlink, container=self.container)                  if q.count():                      initial = q.all()[0].reference              self.fields['division_{}'.format(divlink.pk)] = forms.CharField( diff --git a/archaeological_warehouse/locale/django.pot b/archaeological_warehouse/locale/django.pot index 60b35a633..f5893af41 100644 --- a/archaeological_warehouse/locale/django.pot +++ b/archaeological_warehouse/locale/django.pot @@ -4,140 +4,156 @@  # Étienne Loks <etienne.loks at peacefrogs net>, 2010-2011.  # Valérie-Emma Leroux <emma@iggdrasil.net>, 2016. #zanata  # Valérie-Emma Leroux <emma@iggdrasil.net>, 2017. #zanata +# Étienne Loks <etienne.loks@iggdrasil.net>, 2017. #zanata  msgid ""  msgstr "" -#: forms.py:35 forms.py:91 ishtar_menu.py:40 models.py:63 models.py:103 +#: forms.py:36 forms.py:99 ishtar_menu.py:40 models.py:66 models.py:202  #: templates/ishtar/sheet_warehouse.html:4  msgid "Warehouse"  msgstr "" -#: forms.py:44 forms.py:49 models.py:280 +#: forms.py:45 forms.py:50 models.py:387  msgid "Division"  msgstr "" -#: forms.py:51 models.py:127 +#: forms.py:52 models.py:226  msgid "Order"  msgstr "" -#: forms.py:62 models.py:53 +#: forms.py:66 +msgid "There are identical divisions." +msgstr "" + +#: forms.py:70 models.py:56  msgid "Divisions"  msgstr "" -#: forms.py:66 forms.py:95 models.py:45 models.py:100 +#: forms.py:74 forms.py:103 models.py:48 models.py:199  msgid "Name"  msgstr "" -#: forms.py:67 forms.py:97 models.py:36 models.py:47 +#: forms.py:75 forms.py:105 models.py:39 models.py:50  msgid "Warehouse type"  msgstr "" -#: forms.py:68 forms.py:114 +#: forms.py:76 forms.py:122  msgid "Town"  msgstr "" -#: forms.py:79 views.py:100 +#: forms.py:87 views.py:100  msgid "Warehouse search"  msgstr "" -#: forms.py:100 models.py:50 +#: forms.py:108 models.py:53  msgid "Person in charge"  msgstr "" -#: forms.py:106 forms.py:168 models.py:51 models.py:180 +#: forms.py:114 forms.py:184 models.py:54 models.py:280  msgid "Comment"  msgstr "" -#: forms.py:108 +#: forms.py:116  msgid "Address"  msgstr "" -#: forms.py:110 +#: forms.py:118  msgid "Address complement"  msgstr "" -#: forms.py:112 +#: forms.py:120  msgid "Postal code"  msgstr "" -#: forms.py:115 +#: forms.py:123  msgid "Country"  msgstr "" -#: forms.py:117 +#: forms.py:125  msgid "Phone"  msgstr "" -#: forms.py:118 +#: forms.py:126  msgid "Mobile phone"  msgstr "" -#: forms.py:145 forms.py:146 +#: forms.py:153 forms.py:154  msgid "Would you like to delete this warehouse?"  msgstr "" -#: forms.py:150 models.py:191 models.py:278 +#: forms.py:158 models.py:291 models.py:384  #: templates/ishtar/sheet_container.html:4  msgid "Container"  msgstr "" -#: forms.py:154 forms.py:221 models.py:142 +#: forms.py:163 forms.py:237 models.py:241  msgid "Ref."  msgstr "" -#: forms.py:155 forms.py:220 models.py:145 models.py:178 +#: forms.py:164 forms.py:236 models.py:244 models.py:278  msgid "Container type"  msgstr "" -#: forms.py:157 +#: forms.py:166  msgid "Current location (warehouse)"  msgstr "" -#: forms.py:163 models.py:175 +#: forms.py:172 models.py:275  msgid "Responsible warehouse"  msgstr "" -#: forms.py:195 -msgid "Index" +#: forms.py:178 +msgid "Image"  msgstr "" -#: forms.py:213 +#: forms.py:179 +#, python-format +msgid "" +"<p>Heavy images are resized to: %(width)dx%(height)d (ratio is preserved).</" +"p>" +msgstr "" + +#: forms.py:211 +msgid "ID" +msgstr "" + +#: forms.py:229  msgid "This ID already exists for this warehouse."  msgstr "" -#: forms.py:231 forms.py:237 views.py:142 +#: forms.py:247 forms.py:253 views.py:142  msgid "Container search"  msgstr "" -#: forms.py:233 forms.py:239 +#: forms.py:249 forms.py:255  msgid "You should select a container."  msgstr "" -#: forms.py:234 +#: forms.py:250  msgid "Add a new container"  msgstr "" -#: forms.py:244 ishtar_menu.py:36 views.py:95 +#: forms.py:260 ishtar_menu.py:36 views.py:95  msgid "Packaging"  msgstr "" -#: forms.py:250 +#: forms.py:266  msgid "Packager"  msgstr "" -#: forms.py:256 +#: forms.py:272  msgid "Date"  msgstr "" -#: forms.py:260 +#: forms.py:276  msgid "Packaged finds"  msgstr "" -#: forms.py:264 models.py:181 +#: forms.py:280 models.py:281  msgid "Localisation"  msgstr "" -#: forms.py:289 forms.py:290 +#: forms.py:305 forms.py:306  msgid "Would you like to delete this container?"  msgstr "" @@ -161,115 +177,116 @@ msgstr ""  msgid "Deletion"  msgstr "" -#: ishtar_menu.py:57 models.py:192 templates/ishtar/sheet_warehouse.html:20 +#: ishtar_menu.py:57 models.py:292 templates/ishtar/sheet_warehouse.html:20 +#: templates/ishtar/sheet_warehouse.html:53  msgid "Containers"  msgstr "" -#: models.py:37 +#: models.py:40  msgid "Warehouse types"  msgstr "" -#: models.py:56 models.py:186 +#: models.py:59 models.py:286  msgid "External ID"  msgstr "" -#: models.py:58 models.py:188 +#: models.py:61 models.py:288  msgid "External ID is set automatically"  msgstr "" -#: models.py:64 +#: models.py:67  msgid "Warehouses"  msgstr "" -#: models.py:66 +#: models.py:69  msgid "Can view all Warehouses"  msgstr "" -#: models.py:67 +#: models.py:70  msgid "Can view own Warehouse"  msgstr "" -#: models.py:68 +#: models.py:71  msgid "Can add own Warehouse"  msgstr "" -#: models.py:69 +#: models.py:72  msgid "Can change own Warehouse"  msgstr "" -#: models.py:70 +#: models.py:73  msgid "Can delete own Warehouse"  msgstr "" -#: models.py:102 +#: models.py:201  msgid "Description"  msgstr "" -#: models.py:107 models.py:108 +#: models.py:206 models.py:207  msgid "Collection"  msgstr "" -#: models.py:117 +#: models.py:216  msgid "Warehouse division type"  msgstr "" -#: models.py:118 +#: models.py:217  msgid "Warehouse division types"  msgstr "" -#: models.py:138 +#: models.py:237  msgid "Length (mm)"  msgstr "" -#: models.py:139 +#: models.py:238  msgid "Width (mm)"  msgstr "" -#: models.py:140 +#: models.py:239  msgid "Height (mm)"  msgstr "" -#: models.py:141 +#: models.py:240  msgid "Volume (l)"  msgstr "" -#: models.py:146 +#: models.py:245  msgid "Container types"  msgstr "" -#: models.py:164 +#: models.py:264  msgid "Location - index"  msgstr "" -#: models.py:165 +#: models.py:265  msgid "Precise localisation"  msgstr "" -#: models.py:166 +#: models.py:266  msgid "Type"  msgstr "" -#: models.py:172 +#: models.py:272  msgid "Location (warehouse)"  msgstr "" -#: models.py:179 +#: models.py:279  msgid "Container ref."  msgstr "" -#: models.py:183 +#: models.py:283  msgid "Cached location"  msgstr "" -#: models.py:281 +#: models.py:388  msgid "Reference"  msgstr "" -#: models.py:284 +#: models.py:391  msgid "Container localisation"  msgstr "" -#: models.py:285 +#: models.py:392  msgid "Container localisations"  msgstr "" @@ -297,7 +314,7 @@ msgstr ""  msgid "Container deletion"  msgstr "" -#: templates/ishtar/sheet_container.html:22 +#: templates/ishtar/sheet_container.html:27  msgid "Content"  msgstr "" @@ -305,8 +322,34 @@ msgstr ""  msgid "Attached containers"  msgstr "" -#: templates/ishtar/wizard/wizard_containerlocalisation.html:5 +#: templates/ishtar/sheet_warehouse.html:29 +msgid "Statistics" +msgstr "" + +#: templates/ishtar/sheet_warehouse.html:30 +msgid "Theses number are updated hourly" +msgstr "" + +#: templates/ishtar/sheet_warehouse.html:32 +msgid "Finds" +msgstr "" + +#: templates/ishtar/sheet_warehouse.html:39 +msgid "Finds by location in the warehouse" +msgstr "" + +#: templates/ishtar/sheet_warehouse.html:59 +msgid "Containers by location in the warehouse" +msgstr "" + +#: templates/ishtar/wizard/wizard_containerlocalisation.html:8 +msgid "" +"No division set for this warehouse. Define at least one division to localise " +"containers in this warehouse." +msgstr "" + +#: templates/ishtar/wizard/wizard_warehouse_divisions.html:8  msgid "" -"No division set for this warehouse. Define it to localise container in this " -"warehouse." +"Containers with localisation are associated to this warehouse. You cannot " +"change divisions."  msgstr "" diff --git a/archaeological_warehouse/migrations/0024_generate_cache_lbl_for_containers.py b/archaeological_warehouse/migrations/0024_generate_cache_lbl_for_containers.py index c0e97cca2..51449c167 100644 --- a/archaeological_warehouse/migrations/0024_generate_cache_lbl_for_containers.py +++ b/archaeological_warehouse/migrations/0024_generate_cache_lbl_for_containers.py @@ -3,15 +3,12 @@ import datetime  from south.db import db  from south.v2 import SchemaMigration  from django.db import models -from archaeological_warehouse.models import Container  class Migration(SchemaMigration):      def forwards(self, orm): -        for obj in Container.objects.all(): -            obj.skip_history_when_saving = True -            obj.save() +        pass      def backwards(self, orm):          pass @@ -295,4 +292,4 @@ class Migration(SchemaMigration):          }      } -    complete_apps = ['archaeological_warehouse']
\ No newline at end of file +    complete_apps = ['archaeological_warehouse'] diff --git a/archaeological_warehouse/migrations/0025_auto__add_field_container_image__add_field_container_thumbnail.py b/archaeological_warehouse/migrations/0025_auto__add_field_container_image__add_field_container_thumbnail.py new file mode 100644 index 000000000..cc1f02807 --- /dev/null +++ b/archaeological_warehouse/migrations/0025_auto__add_field_container_image__add_field_container_thumbnail.py @@ -0,0 +1,319 @@ +# -*- coding: utf-8 -*- +import datetime +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + + +class Migration(SchemaMigration): + +    def forwards(self, orm): +        # Adding field 'Container.image' +        db.add_column('archaeological_warehouse_container', 'image', +                      self.gf('django.db.models.fields.files.ImageField')(max_length=255, null=True, blank=True), +                      keep_default=False) + +        # Adding field 'Container.thumbnail' +        db.add_column('archaeological_warehouse_container', 'thumbnail', +                      self.gf('django.db.models.fields.files.ImageField')(max_length=255, null=True, blank=True), +                      keep_default=False) + + +    def backwards(self, orm): +        # Deleting field 'Container.image' +        db.delete_column('archaeological_warehouse_container', 'image') + +        # Deleting field 'Container.thumbnail' +        db.delete_column('archaeological_warehouse_container', 'thumbnail') + + +    models = { +        'archaeological_warehouse.collection': { +            'Meta': {'ordering': "('name',)", 'object_name': 'Collection'}, +            'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'history_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), +            'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_archaeological_warehouse_collection'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), +            'warehouse': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'collections'", 'to': "orm['archaeological_warehouse.Warehouse']"}) +        }, +        'archaeological_warehouse.container': { +            'Meta': {'ordering': "('cached_label',)", 'unique_together': "(('index', 'location'),)", 'object_name': 'Container'}, +            'auto_external_id': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'cached_label': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}), +            'cached_location': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'container_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_warehouse.ContainerType']"}), +            'external_id': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'history_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), +            'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), +            'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_archaeological_warehouse_container'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), +            'index': ('django.db.models.fields.IntegerField', [], {'default': '0'}), +            'location': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'containers'", 'to': "orm['archaeological_warehouse.Warehouse']"}), +            'reference': ('django.db.models.fields.CharField', [], {'max_length': '40'}), +            'responsible': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'owned_containers'", 'to': "orm['archaeological_warehouse.Warehouse']"}), +            'thumbnail': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}) +        }, +        'archaeological_warehouse.containerlocalisation': { +            'Meta': {'ordering': "('container', 'division__order')", 'unique_together': "(('container', 'division'),)", 'object_name': 'ContainerLocalisation'}, +            'container': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_warehouse.Container']"}), +            'division': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_warehouse.WarehouseDivisionLink']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'reference': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '200'}) +        }, +        'archaeological_warehouse.containertype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'ContainerType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'height': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'length': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'reference': ('django.db.models.fields.CharField', [], {'max_length': '30'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}), +            'volume': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), +            'width': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) +        }, +        'archaeological_warehouse.warehouse': { +            'Meta': {'object_name': 'Warehouse'}, +            'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'alt_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'alt_address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'alt_address_is_prefered': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'alt_country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), +            'alt_postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), +            'alt_town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}), +            'associated_divisions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['archaeological_warehouse.WarehouseDivision']", 'symmetrical': 'False', 'through': "orm['archaeological_warehouse.WarehouseDivisionLink']", 'blank': 'True'}), +            'auto_external_id': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), +            'email': ('django.db.models.fields.EmailField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'external_id': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_archaeological_warehouse_warehouse'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), +            'mobile_phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '200'}), +            'person_in_charge': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'warehouse_in_charge'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), +            'phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'phone2': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'phone3': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'phone_desc': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'phone_desc2': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'phone_desc3': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), +            'raw_phone': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}), +            'warehouse_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_warehouse.WarehouseType']"}) +        }, +        'archaeological_warehouse.warehousedivision': { +            'Meta': {'object_name': 'WarehouseDivision'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_warehouse.warehousedivisionlink': { +            'Meta': {'ordering': "('warehouse', 'order')", 'unique_together': "(('warehouse', 'division'),)", 'object_name': 'WarehouseDivisionLink'}, +            'division': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_warehouse.WarehouseDivision']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'order': ('django.db.models.fields.IntegerField', [], {'default': '10'}), +            'warehouse': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_warehouse.Warehouse']"}) +        }, +        'archaeological_warehouse.warehousetype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'WarehouseType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'auth.group': { +            'Meta': {'object_name': 'Group'}, +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), +            'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) +        }, +        'auth.permission': { +            'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, +            'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) +        }, +        'auth.user': { +            'Meta': {'object_name': 'User'}, +            'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), +            'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), +            'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), +            'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), +            'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), +            'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), +            'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), +            'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) +        }, +        'contenttypes.contenttype': { +            'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, +            'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) +        }, +        'ishtar_common.import': { +            'Meta': {'object_name': 'Import'}, +            'conservative_import': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'creation_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}), +            'encoding': ('django.db.models.fields.CharField', [], {'default': "'utf-8'", 'max_length': '15'}), +            'end_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), +            'error_file': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'imported_file': ('django.db.models.fields.files.FileField', [], {'max_length': '220'}), +            'imported_images': ('django.db.models.fields.files.FileField', [], {'max_length': '220', 'null': 'True', 'blank': 'True'}), +            'importer_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.ImporterType']"}), +            'match_file': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}), +            'result_file': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), +            'seconds_remaining': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'skip_lines': ('django.db.models.fields.IntegerField', [], {'default': '1'}), +            'state': ('django.db.models.fields.CharField', [], {'default': "'C'", 'max_length': '2'}), +            'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.IshtarUser']"}) +        }, +        'ishtar_common.importermodel': { +            'Meta': {'ordering': "('name',)", 'object_name': 'ImporterModel'}, +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'klass': ('django.db.models.fields.CharField', [], {'max_length': '200'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '200'}) +        }, +        'ishtar_common.importertype': { +            'Meta': {'ordering': "('name',)", 'object_name': 'ImporterType'}, +            'associated_models': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.ImporterModel']"}), +            'created_models': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.ImporterModel']"}), +            'description': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'is_template': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), +            'slug': ('django.db.models.fields.SlugField', [], {'max_length': '100', 'unique': 'True', 'null': 'True', 'blank': 'True'}), +            'unicity_keys': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}), +            'users': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['ishtar_common.IshtarUser']", 'null': 'True', 'blank': 'True'}) +        }, +        'ishtar_common.ishtaruser': { +            'Meta': {'object_name': 'IshtarUser', '_ormbases': ['auth.User']}, +            'advanced_shortcut_menu': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'person': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'ishtaruser'", 'unique': 'True', 'to': "orm['ishtar_common.Person']"}), +            'user_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True', 'primary_key': 'True'}) +        }, +        'ishtar_common.organization': { +            'Meta': {'object_name': 'Organization'}, +            'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'alt_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'alt_address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'alt_address_is_prefered': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'alt_country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), +            'alt_postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), +            'alt_town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}), +            'archived': ('django.db.models.fields.NullBooleanField', [], {'default': 'False', 'null': 'True', 'blank': 'True'}), +            'country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), +            'email': ('django.db.models.fields.EmailField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_ishtar_common_organization'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), +            'merge_candidate': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'merge_candidate_rel_+'", 'null': 'True', 'to': "orm['ishtar_common.Organization']"}), +            'merge_exclusion': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'merge_exclusion_rel_+'", 'null': 'True', 'to': "orm['ishtar_common.Organization']"}), +            'merge_key': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'mobile_phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '500'}), +            'organization_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.OrganizationType']"}), +            'phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'phone2': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'phone3': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'phone_desc': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'phone_desc2': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'phone_desc3': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), +            'raw_phone': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}) +        }, +        'ishtar_common.organizationtype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'OrganizationType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'ishtar_common.person': { +            'Meta': {'object_name': 'Person'}, +            'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'alt_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'alt_address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'alt_address_is_prefered': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'alt_country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), +            'alt_postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), +            'alt_town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}), +            'archived': ('django.db.models.fields.NullBooleanField', [], {'default': 'False', 'null': 'True', 'blank': 'True'}), +            'attached_to': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'members'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'contact_type': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), +            'email': ('django.db.models.fields.EmailField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_ishtar_common_person'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), +            'merge_candidate': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'merge_candidate_rel_+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), +            'merge_exclusion': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'merge_exclusion_rel_+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), +            'merge_key': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'mobile_phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), +            'old_title': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), +            'person_types': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['ishtar_common.PersonType']", 'symmetrical': 'False'}), +            'phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'phone2': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'phone3': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'phone_desc': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'phone_desc2': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'phone_desc3': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), +            'raw_name': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'raw_phone': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'salutation': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), +            'surname': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}), +            'title': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.TitleType']", 'null': 'True', 'blank': 'True'}), +            'town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}) +        }, +        'ishtar_common.persontype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'PersonType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['auth.Group']", 'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'ishtar_common.titletype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'TitleType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        } +    } + +    complete_apps = ['archaeological_warehouse']
\ No newline at end of file diff --git a/archaeological_warehouse/migrations/0026_generate_cache_lbl_for_containers.py b/archaeological_warehouse/migrations/0026_generate_cache_lbl_for_containers.py new file mode 100644 index 000000000..85df1bf21 --- /dev/null +++ b/archaeological_warehouse/migrations/0026_generate_cache_lbl_for_containers.py @@ -0,0 +1,308 @@ +# -*- coding: utf-8 -*- +import datetime +from south.db import db +from south.v2 import SchemaMigration +from django.db import models +from archaeological_warehouse.models import Container + + +class Migration(SchemaMigration): + +    def forwards(self, orm): +        for obj in Container.objects.all(): +            obj.skip_history_when_saving = True +            obj.save() + +    def backwards(self, orm): +        pass + +    models = { +        'archaeological_warehouse.collection': { +            'Meta': {'ordering': "('name',)", 'object_name': 'Collection'}, +            'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'history_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), +            'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_archaeological_warehouse_collection'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), +            'warehouse': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'collections'", 'to': "orm['archaeological_warehouse.Warehouse']"}) +        }, +        'archaeological_warehouse.container': { +            'Meta': {'ordering': "('cached_label',)", 'unique_together': "(('index', 'location'),)", 'object_name': 'Container'}, +            'auto_external_id': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'cached_label': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}), +            'cached_location': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'container_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_warehouse.ContainerType']"}), +            'external_id': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'history_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), +            'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), +            'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_archaeological_warehouse_container'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), +            'index': ('django.db.models.fields.IntegerField', [], {'default': '0'}), +            'location': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'containers'", 'to': "orm['archaeological_warehouse.Warehouse']"}), +            'reference': ('django.db.models.fields.CharField', [], {'max_length': '40'}), +            'responsible': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'owned_containers'", 'to': "orm['archaeological_warehouse.Warehouse']"}), +            'thumbnail': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}) +        }, +        'archaeological_warehouse.containerlocalisation': { +            'Meta': {'ordering': "('container', 'division__order')", 'unique_together': "(('container', 'division'),)", 'object_name': 'ContainerLocalisation'}, +            'container': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_warehouse.Container']"}), +            'division': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_warehouse.WarehouseDivisionLink']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'reference': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '200'}) +        }, +        'archaeological_warehouse.containertype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'ContainerType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'height': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'length': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'reference': ('django.db.models.fields.CharField', [], {'max_length': '30'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}), +            'volume': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), +            'width': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) +        }, +        'archaeological_warehouse.warehouse': { +            'Meta': {'object_name': 'Warehouse'}, +            'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'alt_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'alt_address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'alt_address_is_prefered': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'alt_country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), +            'alt_postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), +            'alt_town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}), +            'associated_divisions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['archaeological_warehouse.WarehouseDivision']", 'symmetrical': 'False', 'through': "orm['archaeological_warehouse.WarehouseDivisionLink']", 'blank': 'True'}), +            'auto_external_id': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), +            'email': ('django.db.models.fields.EmailField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'external_id': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_archaeological_warehouse_warehouse'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), +            'mobile_phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '200'}), +            'person_in_charge': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'warehouse_in_charge'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), +            'phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'phone2': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'phone3': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'phone_desc': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'phone_desc2': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'phone_desc3': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), +            'raw_phone': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}), +            'warehouse_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_warehouse.WarehouseType']"}) +        }, +        'archaeological_warehouse.warehousedivision': { +            'Meta': {'object_name': 'WarehouseDivision'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_warehouse.warehousedivisionlink': { +            'Meta': {'ordering': "('warehouse', 'order')", 'unique_together': "(('warehouse', 'division'),)", 'object_name': 'WarehouseDivisionLink'}, +            'division': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_warehouse.WarehouseDivision']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'order': ('django.db.models.fields.IntegerField', [], {'default': '10'}), +            'warehouse': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_warehouse.Warehouse']"}) +        }, +        'archaeological_warehouse.warehousetype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'WarehouseType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'auth.group': { +            'Meta': {'object_name': 'Group'}, +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), +            'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) +        }, +        'auth.permission': { +            'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, +            'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) +        }, +        'auth.user': { +            'Meta': {'object_name': 'User'}, +            'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), +            'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), +            'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), +            'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), +            'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), +            'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), +            'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), +            'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) +        }, +        'contenttypes.contenttype': { +            'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, +            'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) +        }, +        'ishtar_common.import': { +            'Meta': {'object_name': 'Import'}, +            'conservative_import': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'creation_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}), +            'encoding': ('django.db.models.fields.CharField', [], {'default': "'utf-8'", 'max_length': '15'}), +            'end_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), +            'error_file': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'imported_file': ('django.db.models.fields.files.FileField', [], {'max_length': '220'}), +            'imported_images': ('django.db.models.fields.files.FileField', [], {'max_length': '220', 'null': 'True', 'blank': 'True'}), +            'importer_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.ImporterType']"}), +            'match_file': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}), +            'result_file': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), +            'seconds_remaining': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'skip_lines': ('django.db.models.fields.IntegerField', [], {'default': '1'}), +            'state': ('django.db.models.fields.CharField', [], {'default': "'C'", 'max_length': '2'}), +            'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.IshtarUser']"}) +        }, +        'ishtar_common.importermodel': { +            'Meta': {'ordering': "('name',)", 'object_name': 'ImporterModel'}, +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'klass': ('django.db.models.fields.CharField', [], {'max_length': '200'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '200'}) +        }, +        'ishtar_common.importertype': { +            'Meta': {'ordering': "('name',)", 'object_name': 'ImporterType'}, +            'associated_models': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.ImporterModel']"}), +            'created_models': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.ImporterModel']"}), +            'description': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'is_template': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), +            'slug': ('django.db.models.fields.SlugField', [], {'max_length': '100', 'unique': 'True', 'null': 'True', 'blank': 'True'}), +            'unicity_keys': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}), +            'users': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['ishtar_common.IshtarUser']", 'null': 'True', 'blank': 'True'}) +        }, +        'ishtar_common.ishtaruser': { +            'Meta': {'object_name': 'IshtarUser', '_ormbases': ['auth.User']}, +            'advanced_shortcut_menu': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'person': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'ishtaruser'", 'unique': 'True', 'to': "orm['ishtar_common.Person']"}), +            'user_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True', 'primary_key': 'True'}) +        }, +        'ishtar_common.organization': { +            'Meta': {'object_name': 'Organization'}, +            'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'alt_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'alt_address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'alt_address_is_prefered': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'alt_country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), +            'alt_postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), +            'alt_town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}), +            'archived': ('django.db.models.fields.NullBooleanField', [], {'default': 'False', 'null': 'True', 'blank': 'True'}), +            'country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), +            'email': ('django.db.models.fields.EmailField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_ishtar_common_organization'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), +            'merge_candidate': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'merge_candidate_rel_+'", 'null': 'True', 'to': "orm['ishtar_common.Organization']"}), +            'merge_exclusion': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'merge_exclusion_rel_+'", 'null': 'True', 'to': "orm['ishtar_common.Organization']"}), +            'merge_key': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'mobile_phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '500'}), +            'organization_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.OrganizationType']"}), +            'phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'phone2': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'phone3': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'phone_desc': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'phone_desc2': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'phone_desc3': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), +            'raw_phone': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}) +        }, +        'ishtar_common.organizationtype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'OrganizationType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'ishtar_common.person': { +            'Meta': {'object_name': 'Person'}, +            'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'alt_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'alt_address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'alt_address_is_prefered': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'alt_country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), +            'alt_postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), +            'alt_town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}), +            'archived': ('django.db.models.fields.NullBooleanField', [], {'default': 'False', 'null': 'True', 'blank': 'True'}), +            'attached_to': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'members'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'contact_type': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), +            'email': ('django.db.models.fields.EmailField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_ishtar_common_person'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), +            'merge_candidate': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'merge_candidate_rel_+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), +            'merge_exclusion': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'merge_exclusion_rel_+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), +            'merge_key': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'mobile_phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), +            'old_title': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), +            'person_types': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['ishtar_common.PersonType']", 'symmetrical': 'False'}), +            'phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'phone2': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'phone3': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'phone_desc': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'phone_desc2': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'phone_desc3': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), +            'raw_name': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'raw_phone': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'salutation': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), +            'surname': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}), +            'title': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.TitleType']", 'null': 'True', 'blank': 'True'}), +            'town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}) +        }, +        'ishtar_common.persontype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'PersonType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['auth.Group']", 'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'ishtar_common.titletype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'TitleType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        } +    } + +    complete_apps = ['archaeological_warehouse']
\ No newline at end of file diff --git a/archaeological_warehouse/models.py b/archaeological_warehouse/models.py index 91184c907..96814339c 100644 --- a/archaeological_warehouse/models.py +++ b/archaeological_warehouse/models.py @@ -1,6 +1,6 @@  #!/usr/bin/env python  # -*- coding: utf-8 -*- -# Copyright (C) 2012 Étienne Loks  <etienne.loks_AT_peacefrogsDOTnet> +# Copyright (C) 2012-2017 Étienne Loks  <etienne.loks_AT_peacefrogsDOTnet>  # This program is free software: you can redistribute it and/or modify  # it under the terms of the GNU Affero General Public License as @@ -21,6 +21,7 @@ import datetime  from django.conf import settings  from django.contrib.gis.db import models +from django.db.models import Q, Count  from django.db.models.signals import post_save, post_delete  from django.template.defaultfilters import slugify  from django.utils.translation import ugettext_lazy as _, ugettext @@ -28,7 +29,8 @@ from django.utils.translation import ugettext_lazy as _, ugettext  from ishtar_common.utils import cached_label_changed  from ishtar_common.models import GeneralType, get_external_id, \ -    LightHistorizedItem, OwnPerms, Address, Person, post_save_cache +    LightHistorizedItem, OwnPerms, Address, Person, post_save_cache, \ +    ImageModel, DashboardFormItem  class WarehouseType(GeneralType): @@ -40,7 +42,7 @@ post_save.connect(post_save_cache, sender=WarehouseType)  post_delete.connect(post_save_cache, sender=WarehouseType) -class Warehouse(Address, OwnPerms): +class Warehouse(Address, DashboardFormItem, OwnPerms):      SHOW_URL = 'show-warehouse'      name = models.CharField(_(u"Name"), max_length=200)      warehouse_type = models.ForeignKey(WarehouseType, @@ -78,6 +80,105 @@ class Warehouse(Address, OwnPerms):          return datetime.date.today().strftime('%Y-%m-%d') + '-' + \                 slugify(unicode(self)) +    @classmethod +    def get_query_owns(cls, user): +        return Q(person_in_charge__ishtaruser=user.ishtaruser) + +    @property +    def number_of_finds(self): +        from archaeological_finds.models import Find +        return Find.objects.filter(container__responsible=self).count() + +    @property +    def number_of_finds_hosted(self): +        from archaeological_finds.models import Find +        return Find.objects.filter(container__location=self).count() + +    @property +    def number_of_containers(self): +        return Container.objects.filter(location=self).count() + +    def _get_divisions(self, current_path, remaining_division, depth=0): +        if not remaining_division: +            return [current_path] +        current_division = remaining_division.pop(0) +        q = ContainerLocalisation.objects.filter( +            division=current_division, +        ) +        for div, ref in current_path: +            q = q.filter( +                container__division__division=div, +                container__division__reference=ref +            ) +        res = [] +        old_ref = None +        for ref in q.values('reference').order_by('reference').all(): +            if ref['reference'] == old_ref: +                continue +            old_ref = ref['reference'] +            cpath = current_path[:] +            cpath.append((current_division, ref['reference'])) +            for r in self._get_divisions(cpath, remaining_division[:], +                                         depth + 1): +                res.append(r) +        return res + +    @property +    def available_division_tuples(self): +        """ +        :return: ordered list of available paths. Each path is a list of +        tuple with the WarehouseDivisionLink and the reference. +        """ +        divisions = list( +            WarehouseDivisionLink.objects.filter(warehouse=self +                                                 ).order_by('order').all()) +        return self._get_divisions([], divisions) + +    def _number_of_items_by_place(self, model, division_key='division'): +        res = {} +        paths = self.available_division_tuples[:] +        for path in paths: +            q = model.objects +            cpath = [] +            for division, ref in path: +                lbl = u"{} {}".format(division.division, ref) +                cpath.append(lbl) +                attrs = { +                    division_key + "__division": division, +                    division_key + "__reference": ref +                } +                q = q.filter(**attrs) +                if tuple(cpath) not in res: +                    res[tuple(cpath)] = q.count() +        res = [(k, res[k]) for k in res] +        final_res, current_res, depth = [], [], 1 +        for path, nb in sorted(res, key=lambda x: (len(x[0]), x[0])): +            if depth != len(path): +                final_res.append(current_res[:]) +                current_res = [] +                depth = len(path) +            current_res.append((u" | ".join(path), nb)) +        final_res.append(current_res[:]) +        return final_res + +    def _number_of_finds_by_place(self): +        from archaeological_finds.models import Find +        return self._number_of_items_by_place( +            Find, division_key='container__division') + +    @property +    def number_of_finds_by_place(self, update=False): +        return self._get_or_set_stats('_number_of_finds_by_place', update, +                                      settings.CACHE_SMALLTIMEOUT) + +    def _number_of_containers_by_place(self): +        return self._number_of_items_by_place(Container) + +    @property +    def number_of_containers_by_place(self, update=False): +        return self._get_or_set_stats('_number_of_containers_by_place', update, +                                      settings.CACHE_SMALLTIMEOUT) +      def save(self, *args, **kwargs):          super(Warehouse, self).save(*args, **kwargs)          for container in self.containers.all(): @@ -149,9 +250,10 @@ post_save.connect(post_save_cache, sender=ContainerType)  post_delete.connect(post_save_cache, sender=ContainerType) -class Container(LightHistorizedItem): +class Container(LightHistorizedItem, ImageModel):      TABLE_COLS = ['reference', 'container_type__label', 'cached_location',                    'divisions_lbl'] +    IMAGE_PREFIX = 'containers/'      # search parameters      EXTRA_REQUEST_KEYS = { @@ -182,7 +284,7 @@ class Container(LightHistorizedItem):                                      null=True, blank=True)      cached_location = models.CharField(_(u"Cached location"), max_length=500,                                         null=True, blank=True) -    index = models.IntegerField(u"Index", default=0) +    index = models.IntegerField(u"ID", default=0)      external_id = models.TextField(_(u"External ID"), blank=True, null=True)      auto_external_id = models.BooleanField(          _(u"External ID is set automatically"), default=False) @@ -207,6 +309,12 @@ class Container(LightHistorizedItem):          cached_label = u" - ".join(items)          return cached_label +    @classmethod +    def get_query_owns(cls, user): +        return Q(history_creator=user) | \ +            Q(location__person_in_charge__ishtaruser=user.ishtaruser) | \ +            Q(responsible__person_in_charge__ishtaruser=user.ishtaruser) +      @property      def associated_filename(self):          filename = datetime.date.today().strftime('%Y-%m-%d') @@ -275,7 +383,8 @@ post_save.connect(cached_label_changed, sender=Container)  class ContainerLocalisation(models.Model): -    container = models.ForeignKey(Container, verbose_name=_(u"Container")) +    container = models.ForeignKey(Container, verbose_name=_(u"Container"), +                                  related_name='division')      division = models.ForeignKey(WarehouseDivisionLink,                                   verbose_name=_(u"Division"))      reference = models.CharField(_(u"Reference"), max_length=200, default='') diff --git a/archaeological_warehouse/templates/ishtar/sheet_container.html b/archaeological_warehouse/templates/ishtar/sheet_container.html index 172719604..7845da2c1 100644 --- a/archaeological_warehouse/templates/ishtar/sheet_container.html +++ b/archaeological_warehouse/templates/ishtar/sheet_container.html @@ -6,14 +6,19 @@  {% block content %}  {% window_nav item window_id 'show-container' 'container_modify' '' '' previous next 1 %} +{% if item.image %} +<a href='{{item.image.url}}' rel="prettyPhoto" title="{{item.label}}" class='photo'><img src='{{item.thumbnail.url}}'/></a> +{% endif%} +  <p class="window-refs">{{ item.reference|default:"" }}</p>  <p class="window-refs">{{ item.container_type|default:"" }}</p> +<p class="window-refs">{{ item.responsible.name }} - {{ item.index }}</p>  {% include "ishtar/blocks/sheet_external_id.html" %}  <ul class='form-flex'>      {% field_li_detail "Responsible warehouse" item.responsible %} -    {% include "ishtar/blocks/sheet_creation_section.html" %}      {% field_li_detail "Location (warehouse)" item.location %} +    {% include "ishtar/blocks/sheet_creation_section.html" %}  </ul>  {% field "Location" item.precise_location %}  {% field "Comment" item.comment "<pre>" "</pre>" %} diff --git a/archaeological_warehouse/templates/ishtar/sheet_warehouse.html b/archaeological_warehouse/templates/ishtar/sheet_warehouse.html index c31fc93b4..17a2c6c2b 100644 --- a/archaeological_warehouse/templates/ishtar/sheet_warehouse.html +++ b/archaeological_warehouse/templates/ishtar/sheet_warehouse.html @@ -26,4 +26,48 @@  {% dynamic_table_document '' 'containers' 'responsible' item.pk 'TABLE_COLS' output %}  {% endif %} +<h3>{% trans "Statistics" %}</h3> +<small class="centered"><em>{% trans "Theses number are updated hourly" %}</em></small> + +<h4>{% trans "Finds" %}</h4> +<ul class='form-flex'> +    {% field_li "Number of attached finds" item.number_of_finds %} +    {% field_li "Number of hosted finds" item.number_of_finds_hosted %} +</ul> + +{% if item.number_of_finds_by_place %} +<h4>{% trans "Finds by location in the warehouse" %}</h4> +<ul class='form-flex'> +    {% for items in item.number_of_finds_by_place %} +    <li> +        <table class='clean-table small'> +            {% for item in items %} +                <tr><th>{{item.0}}</th><td>{{item.1}}</td></tr> +            {% endfor %} +        </table> +    </li> +    {% endfor %} +</ul> +{% endif %} + +<h4>{% trans "Containers" %}</h4> +<ul class='form-flex'> +    {% field_li "Number of containers" item.number_of_containers %} +</ul> + +{% if item.number_of_containers_by_place %} +<h4>{% trans "Containers by location in the warehouse" %}</h4> +<ul class='form-flex'> +    {% for items in item.number_of_containers_by_place %} +    <li> +        <table class='clean-table small'> +            {% for item in items %} +            <tr><th>{{item.0}}</th><td>{{item.1}}</td></tr> +            {% endfor %} +        </table> +    </li> +    {% endfor %} +</ul> +{% endif %} +  {% endblock %} diff --git a/archaeological_warehouse/templates/ishtar/wizard/wizard_containerlocalisation.html b/archaeological_warehouse/templates/ishtar/wizard/wizard_containerlocalisation.html index 4a21368ae..41be02748 100644 --- a/archaeological_warehouse/templates/ishtar/wizard/wizard_containerlocalisation.html +++ b/archaeological_warehouse/templates/ishtar/wizard/wizard_containerlocalisation.html @@ -1,7 +1,18 @@  {% extends "ishtar/wizard/default_wizard.html" %}  {% load i18n %} +{% load url from future %}  {% block form_head %}  {% if not wizard.form.fields %} -<p class='warning'>{% trans "No division set for this warehouse. Define it to localise container in this warehouse." %}</p> +<p class="alert"> +    <i class="fa fa-exclamation-triangle"></i> +    {% trans "No division set for this warehouse. Define at least one division to localise containers in this warehouse." %}<br/> +    {{wizard.form.warehouse}} +    <a href="{% url 'warehouse_modify' wizard.form.warehouse.pk  %}"> +        <span class="fa-stack fa-lg"> +            <i class="fa fa-circle fa-stack-2x"></i> +            <i class="fa fa-pencil fa-stack-1x fa-inverse"></i> +        </span> +    </a> +</p>  {% endif %}  {% endblock %} diff --git a/archaeological_warehouse/templates/ishtar/wizard/wizard_warehouse_divisions.html b/archaeological_warehouse/templates/ishtar/wizard/wizard_warehouse_divisions.html new file mode 100644 index 000000000..83dbfc0fe --- /dev/null +++ b/archaeological_warehouse/templates/ishtar/wizard/wizard_warehouse_divisions.html @@ -0,0 +1,11 @@ +{% extends "ishtar/wizard/default_wizard.html" %} +{% load i18n %} +{% load url from future %} +{% block form_head %} +{% if wizard.form.readonly %} +<p class="alert"> +    <i class="fa fa-exclamation-triangle"></i> +    {% trans "Containers with localisation are associated to this warehouse. You cannot change divisions." %}<br/> +</p> +{% endif %} +{% endblock %} diff --git a/archaeological_warehouse/wizards.py b/archaeological_warehouse/wizards.py index 0adb06f75..571e56b1b 100644 --- a/archaeological_warehouse/wizards.py +++ b/archaeological_warehouse/wizards.py @@ -64,6 +64,20 @@ class WarehouseModificationWizard(Wizard):      model = models.Warehouse      modification = True      wizard_done_window = reverse_lazy('show-warehouse') +    wizard_templates = { +        'divisions-warehouse_modification': +            'ishtar/wizard/wizard_warehouse_divisions.html', +    } + +    def get_form_kwargs(self, step=None): +        kwargs = super(WarehouseModificationWizard, self).get_form_kwargs(step) +        if step == "divisions-warehouse_modification": +            current_warehouse = self.get_current_object() +            q = models.ContainerLocalisation.objects.filter( +                    division__warehouse=current_warehouse) +            if q.count(): +                kwargs['readonly'] = True +        return kwargs  class WarehouseDeletionWizard(DeletionWizard): @@ -73,10 +87,13 @@ class WarehouseDeletionWizard(DeletionWizard):  class ContainerWizard(Wizard):      model = models.Container      wizard_templates = { -        'localisation-container_localisation': +        'localisation-container_creation': +            'ishtar/wizard/wizard_containerlocalisation.html', +        'localisation-container_modification':              'ishtar/wizard/wizard_containerlocalisation.html',      }      ignore_init_steps = ['localisation'] +    wizard_done_window = reverse_lazy('show-container')      def get_form_kwargs(self, step=None):          kwargs = super(ContainerWizard, self).get_form_kwargs(step) @@ -98,6 +115,7 @@ class ContainerWizard(Wizard):          Save the localisation          """          super(ContainerWizard, self).done(form_list) +        dct = {}          for idx, form in enumerate(form_list):              if not form.is_valid():                  return self.render(form) @@ -119,8 +137,12 @@ class ContainerWizard(Wizard):                          )                      localisation.reference = form.cleaned_data[div_name]                      localisation.save() +            dct = {'item': container} +            self.current_object = container +            # force evaluation of lazy urls +            dct['wizard_done_window'] = unicode(self.wizard_done_window)          return render_to_response( -            self.wizard_done_template, {}, +            self.wizard_done_template, dct,              context_instance=RequestContext(self.request)) diff --git a/example_project/settings.py b/example_project/settings.py index efbf0297a..78d97f0ae 100644 --- a/example_project/settings.py +++ b/example_project/settings.py @@ -18,7 +18,7 @@ if "test" in sys.argv:  IMAGE_MAX_SIZE = (1024, 768)  THUMB_MAX_SIZE = (300, 300) -CACHE_SMALLTIMEOUT = 120 +CACHE_SMALLTIMEOUT = 60  CACHE_TIMEOUT = 3600  CACHE_BACKEND = 'memcached://127.0.0.1:11211/' diff --git a/ishtar_common/context_processors.py b/ishtar_common/context_processors.py index 8e14d8506..5050d667e 100644 --- a/ishtar_common/context_processors.py +++ b/ishtar_common/context_processors.py @@ -1,6 +1,6 @@  #!/usr/bin/env python  # -*- coding: utf-8 -*- -# Copyright (C) 2010-2013 Étienne Loks  <etienne.loks_AT_peacefrogsDOTnet> +# Copyright (C) 2010-2017 Étienne Loks  <etienne.loks_AT_peacefrogsDOTnet>  # This program is free software: you can redistribute it and/or modify  # it under the terms of the GNU Affero General Public License as @@ -44,6 +44,7 @@ def get_base_context(request):      if 'CURRENT_ACTION' in request.session:          dct['CURRENT_ACTION'] = request.session['CURRENT_ACTION']          current_action = dct['CURRENT_ACTION'] +    dct['CURRENT_PATH'] = request.path      menu = Menu(request.user, current_action=current_action,                  session=request.session)      menu.init() diff --git a/ishtar_common/forms.py b/ishtar_common/forms.py index 42d74f9ef..ecae18c5e 100644 --- a/ishtar_common/forms.py +++ b/ishtar_common/forms.py @@ -22,6 +22,7 @@ Forms definition  """  import datetime  import re +import types  from django import forms  from django.core.urlresolvers import reverse @@ -94,7 +95,32 @@ class FinalDeleteForm(FinalForm):      confirm_end_msg = _(u"Are you sure you want to delete?") +def get_readonly_clean(key): +    def func(self): +        instance = getattr(self, 'instance', None) +        if instance and getattr(instance, key): +            return getattr(instance, key) +        else: +            return self.cleaned_data[key] +    return func + +  class FormSet(BaseFormSet): +    def __init__(self, *args, **kwargs): +        self.readonly = False +        if 'readonly' in kwargs: +            self.readonly = kwargs.pop('readonly') +            self.can_delete = False +            # no extra fields +            if 'data' in kwargs: +                prefix = "" +                if "prefix" in kwargs: +                    prefix = kwargs['prefix'] +                if prefix + '-INITIAL_FORMS' in kwargs['data']: +                    kwargs['data'][prefix + '-TOTAL_FORMS'] = \ +                        kwargs["data"][prefix + '-INITIAL_FORMS'] +        super(FormSet, self).__init__(*args, **kwargs) +      def check_duplicate(self, key_names, error_msg=""):          """Check for duplicate items in the formset"""          if any(self.errors): @@ -117,8 +143,17 @@ class FormSet(BaseFormSet):      def add_fields(self, form, index):          super(FormSet, self).add_fields(form, index) -        form.fields[DELETION_FIELD_NAME].label = '' -        form.fields[DELETION_FIELD_NAME].widget = widgets.DeleteWidget() +        if self.readonly: +            for k in form.fields: +                # django 1.9: use disabled +                form.fields[k].widget.attrs['readonly'] = True +                clean = get_readonly_clean(k) +                clean.__name__ = 'clean_' + k +                clean.__doc__ = 'autogenerated: clean_' + k +                setattr(form, clean.__name__, types.MethodType(clean, form)) +        if self.can_delete: +            form.fields[DELETION_FIELD_NAME].label = '' +            form.fields[DELETION_FIELD_NAME].widget = widgets.DeleteWidget()  class TableSelect(forms.Form): diff --git a/ishtar_common/forms_common.py b/ishtar_common/forms_common.py index 078ccfb15..b317f77e3 100644 --- a/ishtar_common/forms_common.py +++ b/ishtar_common/forms_common.py @@ -529,11 +529,11 @@ class PersonForm(SimplePersonForm):                      pk=dct['attached_to'])              except models.Organization.DoesNotExist:                  dct.pop('attached_to') -        if 'title' in dct and dct['title']: +        if 'title' in dct:              try:                  dct['title'] = models.TitleType.objects.get(                      pk=dct['title']) -            except models.TitleType.DoesNotExist: +            except (models.TitleType.DoesNotExist, ValueError):                  dct.pop('title')          person_types = dct.pop('person_types')          new_item = models.Person.objects.create(**dct) diff --git a/ishtar_common/locale/django.pot b/ishtar_common/locale/django.pot index d95ccd2f8..bf9b6bca0 100644 --- a/ishtar_common/locale/django.pot +++ b/ishtar_common/locale/django.pot @@ -148,40 +148,40 @@ msgstr ""  msgid "\"%(value)s\" not in %(values)s"  msgstr "" -#: forms.py:73 +#: forms.py:74  msgid "Enter a valid name consisting of letters, spaces and hyphens."  msgstr "" -#: forms.py:89 forms_common.py:626 +#: forms.py:90 forms_common.py:626  msgid "Confirm"  msgstr "" -#: forms.py:94 +#: forms.py:95  msgid "Are you sure you want to delete?"  msgstr "" -#: forms.py:103 +#: forms.py:129  msgid "There are identical items."  msgstr "" -#: forms.py:141 forms.py:142 +#: forms.py:176 forms.py:177  msgid "Closing date"  msgstr "" -#: forms.py:155 +#: forms.py:190  msgid "You should select an item."  msgstr "" -#: forms.py:156 +#: forms.py:191  msgid "Add a new item"  msgstr "" -#: forms.py:262 models.py:1482 +#: forms.py:297 models.py:1501  msgid "Template"  msgstr ""  #: forms_common.py:41 forms_common.py:59 forms_common.py:184 -#: forms_common.py:408 models.py:1548 models.py:2989 +#: forms_common.py:408 models.py:1567 models.py:3033  #: templates/blocks/JQueryAdvancedTown.html:19  #: templates/ishtar/sheet_organization.html:13  msgid "Town" @@ -197,8 +197,8 @@ msgid ""  "french town Saint-Denis in the Seine-Saint-Denis department.</p>"  msgstr "" -#: forms_common.py:68 forms_common.py:863 ishtar_menu.py:47 models.py:2610 -#: models.py:2791 models.py:2856 templates/ishtar/sheet_person.html:4 +#: forms_common.py:68 forms_common.py:863 ishtar_menu.py:47 models.py:2629 +#: models.py:2822 models.py:2888 templates/ishtar/sheet_person.html:4  msgid "Person"  msgstr "" @@ -209,64 +209,64 @@ msgid ""  msgstr ""  #: forms_common.py:172 forms_common.py:329 forms_common.py:453 -#: ishtar_menu.py:75 models.py:2493 models.py:2584 +#: ishtar_menu.py:75 models.py:2512 models.py:2603  #: templates/ishtar/sheet_organization.html:4  msgid "Organization"  msgstr ""  #: forms_common.py:175 forms_common.py:212 forms_common.py:324 -#: forms_common.py:378 forms_common.py:448 models.py:1103 models.py:1481 -#: models.py:1750 models.py:1766 models.py:2003 models.py:2279 models.py:2487 -#: models.py:2596 models.py:2975 templates/ishtar/import_list.html:13 +#: forms_common.py:378 forms_common.py:448 models.py:1109 models.py:1500 +#: models.py:1769 models.py:1785 models.py:2022 models.py:2298 models.py:2506 +#: models.py:2615 models.py:3019 templates/ishtar/import_list.html:13  #: templates/ishtar/sheet_organization.html:8  #: templates/ishtar/sheet_organization.html:21  msgid "Name"  msgstr "" -#: forms_common.py:176 models.py:1703 models.py:2134 +#: forms_common.py:176 models.py:1722 models.py:2153  msgid "Organization type"  msgstr "" -#: forms_common.py:178 forms_common.py:402 models.py:1543 +#: forms_common.py:178 forms_common.py:402 models.py:1562  #: templates/ishtar/sheet_organization.html:10  msgid "Address"  msgstr "" -#: forms_common.py:180 forms_common.py:405 models.py:1544 +#: forms_common.py:180 forms_common.py:405 models.py:1563  #: templates/ishtar/sheet_organization.html:11  msgid "Address complement"  msgstr "" -#: forms_common.py:182 forms_common.py:406 models.py:1546 +#: forms_common.py:182 forms_common.py:406 models.py:1565  #: templates/ishtar/sheet_organization.html:12  msgid "Postal code"  msgstr "" -#: forms_common.py:185 forms_common.py:409 models.py:1549 +#: forms_common.py:185 forms_common.py:409 models.py:1568  msgid "Country"  msgstr ""  #: forms_common.py:187 forms_common.py:326 forms_common.py:382 -#: forms_common.py:450 forms_common.py:574 models.py:1576 +#: forms_common.py:450 forms_common.py:574 models.py:1595  msgid "Email"  msgstr "" -#: forms_common.py:188 forms_common.py:385 models.py:1561 +#: forms_common.py:188 forms_common.py:385 models.py:1580  #: templates/ishtar/sheet_organization.html:14  #: templates/ishtar/sheet_person.html:21  #: templates/ishtar/wizard/wizard_person.html:17  msgid "Phone"  msgstr "" -#: forms_common.py:189 forms_common.py:394 models.py:1573 +#: forms_common.py:189 forms_common.py:394 models.py:1592  #: templates/ishtar/sheet_organization.html:15  #: templates/ishtar/sheet_person.html:39  #: templates/ishtar/wizard/wizard_person.html:35  msgid "Mobile phone"  msgstr "" -#: forms_common.py:213 forms_common.py:327 forms_common.py:451 models.py:2170 -#: models.py:2489 models.py:2910 templates/sheet_ope.html:85 +#: forms_common.py:213 forms_common.py:327 forms_common.py:451 models.py:2189 +#: models.py:2508 models.py:2954 templates/sheet_ope.html:85  #: templates/sheet_ope.html.py:105 templates/sheet_ope.html:126  #: templates/ishtar/import_list.html:14  #: templates/ishtar/sheet_organization.html:23 @@ -290,7 +290,7 @@ msgstr ""  msgid "Organization to merge"  msgstr "" -#: forms_common.py:325 forms_common.py:376 forms_common.py:449 models.py:2594 +#: forms_common.py:325 forms_common.py:376 forms_common.py:449 models.py:2613  #: templates/ishtar/sheet_organization.html:22  msgid "Surname"  msgstr "" @@ -308,25 +308,25 @@ msgstr ""  msgid "Identity"  msgstr "" -#: forms_common.py:373 forms_common.py:781 forms_common.py:830 models.py:2135 -#: models.py:2588 models.py:2590 models.py:2907 templates/sheet_ope.html:104 +#: forms_common.py:373 forms_common.py:781 forms_common.py:830 models.py:2154 +#: models.py:2607 models.py:2609 models.py:2951 templates/sheet_ope.html:104  #: templates/ishtar/blocks/window_tables/documents.html:7  msgid "Title"  msgstr "" -#: forms_common.py:374 models.py:2592 +#: forms_common.py:374 models.py:2611  msgid "Salutation"  msgstr "" -#: forms_common.py:380 models.py:2598 +#: forms_common.py:380 models.py:2617  msgid "Raw name"  msgstr "" -#: forms_common.py:383 models.py:1562 +#: forms_common.py:383 models.py:1581  msgid "Phone description"  msgstr "" -#: forms_common.py:386 models.py:1564 models.py:1566 +#: forms_common.py:386 models.py:1583 models.py:1585  msgid "Phone description 2"  msgstr "" @@ -334,11 +334,11 @@ msgstr ""  msgid "Phone 2"  msgstr "" -#: forms_common.py:390 models.py:1570 +#: forms_common.py:390 models.py:1589  msgid "Phone description 3"  msgstr "" -#: forms_common.py:392 models.py:1568 +#: forms_common.py:392 models.py:1587  msgid "Phone 3"  msgstr "" @@ -346,23 +346,23 @@ msgstr ""  msgid "Current organization"  msgstr "" -#: forms_common.py:411 models.py:1551 +#: forms_common.py:411 models.py:1570  msgid "Other address: address"  msgstr "" -#: forms_common.py:414 models.py:1554 +#: forms_common.py:414 models.py:1573  msgid "Other address: address complement"  msgstr "" -#: forms_common.py:416 models.py:1555 +#: forms_common.py:416 models.py:1574  msgid "Other address: postal code"  msgstr "" -#: forms_common.py:418 models.py:1557 +#: forms_common.py:418 models.py:1576  msgid "Other address: town"  msgstr "" -#: forms_common.py:420 models.py:1559 +#: forms_common.py:420 models.py:1578  msgid "Other address: country"  msgstr "" @@ -378,7 +378,7 @@ msgstr ""  msgid "Account search"  msgstr "" -#: forms_common.py:512 forms_common.py:552 forms_common.py:556 models.py:2541 +#: forms_common.py:512 forms_common.py:552 forms_common.py:556 models.py:2560  msgid "Person type"  msgstr "" @@ -386,7 +386,7 @@ msgstr ""  msgid "Account"  msgstr "" -#: forms_common.py:577 wizards.py:1333 +#: forms_common.py:577 wizards.py:1347  msgid "New password"  msgstr "" @@ -410,7 +410,7 @@ msgstr ""  msgid "Send the new password by email?"  msgstr "" -#: forms_common.py:636 forms_common.py:649 models.py:2990 +#: forms_common.py:636 forms_common.py:649 models.py:3034  msgid "Towns"  msgstr "" @@ -426,7 +426,7 @@ msgstr ""  msgid "Documentation informations"  msgstr "" -#: forms_common.py:783 forms_common.py:831 models.py:2136 models.py:2882 +#: forms_common.py:783 forms_common.py:831 models.py:2155 models.py:2926  msgid "Source type"  msgstr "" @@ -438,37 +438,37 @@ msgstr ""  msgid "Internal reference"  msgstr "" -#: forms_common.py:791 models.py:2921 +#: forms_common.py:791 models.py:2965  msgid "Numerical ressource (web address)"  msgstr "" -#: forms_common.py:792 models.py:2923 +#: forms_common.py:792 models.py:2967  msgid "Receipt date"  msgstr "" -#: forms_common.py:794 models.py:2304 models.py:2925 +#: forms_common.py:794 models.py:2323 models.py:2969  msgid "Creation date"  msgstr "" -#: forms_common.py:797 models.py:2928 +#: forms_common.py:797 models.py:2972  msgid "Receipt date in documentation"  msgstr "" -#: forms_common.py:799 forms_common.py:835 models.py:379 models.py:696 -#: models.py:2030 models.py:2602 models.py:2935 +#: forms_common.py:799 forms_common.py:835 models.py:381 models.py:698 +#: models.py:2049 models.py:2621 models.py:2979  msgid "Comment"  msgstr "" -#: forms_common.py:801 forms_common.py:834 models.py:1105 models.py:1770 -#: models.py:1957 models.py:2004 models.py:2934 templates/sheet_ope.html:128 +#: forms_common.py:801 forms_common.py:834 models.py:1111 models.py:1789 +#: models.py:1976 models.py:2023 models.py:2978 templates/sheet_ope.html:128  msgid "Description"  msgstr "" -#: forms_common.py:804 models.py:2936 +#: forms_common.py:804 models.py:2980  msgid "Additional information"  msgstr "" -#: forms_common.py:806 forms_common.py:838 models.py:2938 +#: forms_common.py:806 forms_common.py:838 models.py:2982  msgid "Has a duplicate"  msgstr "" @@ -483,7 +483,7 @@ msgid ""  "p>"  msgstr "" -#: forms_common.py:827 forms_common.py:856 forms_common.py:890 models.py:2861 +#: forms_common.py:827 forms_common.py:856 forms_common.py:890 models.py:2893  #: templates/ishtar/wizard/wizard_person_deletion.html:124  msgid "Author"  msgstr "" @@ -496,7 +496,7 @@ msgstr ""  msgid "Would you like to delete this documentation?"  msgstr "" -#: forms_common.py:864 models.py:2137 models.py:2848 models.py:2858 +#: forms_common.py:864 models.py:2156 models.py:2880 models.py:2890  msgid "Author type"  msgstr "" @@ -508,7 +508,7 @@ msgstr ""  msgid "There are identical authors."  msgstr "" -#: forms_common.py:901 models.py:2862 models.py:2917 +#: forms_common.py:901 models.py:2894 models.py:2961  #: templates/sheet_ope.html:106  #: templates/ishtar/blocks/window_tables/documents.html:9  msgid "Authors" @@ -526,7 +526,7 @@ msgstr ""  msgid "Deletion"  msgstr "" -#: ishtar_menu.py:39 models.py:1277 views.py:1606 +#: ishtar_menu.py:39 models.py:1283 views.py:1632  msgid "Global variables"  msgstr "" @@ -554,19 +554,19 @@ msgstr ""  msgid "Manual merge"  msgstr "" -#: ishtar_menu.py:109 models.py:2315 +#: ishtar_menu.py:109 models.py:2334  msgid "Imports"  msgstr "" -#: ishtar_menu.py:112 views.py:1614 +#: ishtar_menu.py:112 views.py:1640  msgid "New import"  msgstr "" -#: ishtar_menu.py:116 views.py:1628 +#: ishtar_menu.py:116 views.py:1654  msgid "Current imports"  msgstr "" -#: ishtar_menu.py:120 views.py:1667 +#: ishtar_menu.py:120 views.py:1693  msgid "Old imports"  msgstr "" @@ -574,258 +574,258 @@ msgstr ""  msgid "Not a valid item."  msgstr "" -#: models.py:199 +#: models.py:201  msgid "A selected item is not a valid item."  msgstr "" -#: models.py:210 +#: models.py:212  msgid "This item already exists."  msgstr "" -#: models.py:375 models.py:695 models.py:1516 models.py:1528 models.py:1954 +#: models.py:377 models.py:697 models.py:1535 models.py:1547 models.py:1973  msgid "Label"  msgstr "" -#: models.py:377 +#: models.py:379  msgid "Textual ID"  msgstr "" -#: models.py:380 models.py:698 models.py:1485 +#: models.py:382 models.py:700 models.py:1504  msgid "Available"  msgstr "" -#: models.py:722 models.py:2076 +#: models.py:724 models.py:2095  msgid "Key"  msgstr "" -#: models.py:728 +#: models.py:730  msgid "Specific key to an import"  msgstr "" -#: models.py:820 +#: models.py:826  msgid "Last editor"  msgstr "" -#: models.py:823 +#: models.py:829  msgid "Creator"  msgstr "" -#: models.py:965 models.py:2846 models.py:3001 models.py:3057 +#: models.py:971 models.py:2877 models.py:3045 models.py:3101  msgid "Order"  msgstr "" -#: models.py:966 +#: models.py:972  msgid "Symmetrical"  msgstr "" -#: models.py:967 +#: models.py:973  msgid "Tiny label"  msgstr "" -#: models.py:981 +#: models.py:987  msgid "Cannot have symmetrical and an inverse_relation"  msgstr "" -#: models.py:1097 +#: models.py:1103  msgid "Euro"  msgstr "" -#: models.py:1098 +#: models.py:1104  msgid "US dollar"  msgstr "" -#: models.py:1104 models.py:1768 +#: models.py:1110 models.py:1787  msgid "Slug"  msgstr "" -#: models.py:1107 +#: models.py:1113  msgid "CSS color code for base module"  msgstr "" -#: models.py:1109 +#: models.py:1115  msgid "Files module"  msgstr "" -#: models.py:1111 +#: models.py:1117  msgid "CSS color code for files module"  msgstr "" -#: models.py:1113 +#: models.py:1119  msgid "Context records module"  msgstr "" -#: models.py:1116 +#: models.py:1122  msgid "CSS color code for context record module"  msgstr "" -#: models.py:1118 +#: models.py:1124  msgid "Finds module"  msgstr "" -#: models.py:1119 +#: models.py:1125  msgid "Need context records module"  msgstr "" -#: models.py:1121 +#: models.py:1127  msgid "CSS color code for find module"  msgstr "" -#: models.py:1124 +#: models.py:1130  msgid "Warehouses module"  msgstr "" -#: models.py:1125 +#: models.py:1131  msgid "Need finds module"  msgstr "" -#: models.py:1127 +#: models.py:1133  msgid "CSS code for warehouse module"  msgstr "" -#: models.py:1129 +#: models.py:1135  msgid "Mapping module"  msgstr "" -#: models.py:1131 +#: models.py:1137  msgid "CSS code for mapping module"  msgstr "" -#: models.py:1134 +#: models.py:1140  msgid "Home page"  msgstr "" -#: models.py:1135 +#: models.py:1141  #, python-brace-format  msgid ""  "Homepage of Ishtar - if not defined a default homepage will appear. Use the "  "markdown syntax. {random_image} can be used to display a random image."  msgstr "" -#: models.py:1139 +#: models.py:1145  msgid "File external id"  msgstr "" -#: models.py:1141 +#: models.py:1147  msgid ""  "Formula to manage file external ID. Change this with care. With incorrect "  "formula, the application might be unusable and import of external data can "  "be destructive."  msgstr "" -#: models.py:1146 +#: models.py:1152  msgid "Parcel external id"  msgstr "" -#: models.py:1149 +#: models.py:1155  msgid ""  "Formula to manage parcel external ID. Change this with care. With incorrect "  "formula, the application might be unusable and import of external data can "  "be destructive."  msgstr "" -#: models.py:1154 +#: models.py:1160  msgid "Context record external id"  msgstr "" -#: models.py:1156 +#: models.py:1162  msgid ""  "Formula to manage context record external ID. Change this with care. With "  "incorrect formula, the application might be unusable and import of external "  "data can be destructive."  msgstr "" -#: models.py:1161 +#: models.py:1167  msgid "Base find external id"  msgstr "" -#: models.py:1163 +#: models.py:1169  msgid ""  "Formula to manage base find external ID. Change this with care. With "  "incorrect formula, the application might be unusable and import of external "  "data can be destructive."  msgstr "" -#: models.py:1168 +#: models.py:1174  msgid "Find external id"  msgstr "" -#: models.py:1170 +#: models.py:1176  msgid ""  "Formula to manage find external ID. Change this with care. With incorrect "  "formula, the application might be unusable and import of external data can "  "be destructive."  msgstr "" -#: models.py:1175 +#: models.py:1181  msgid "Container external id"  msgstr "" -#: models.py:1177 +#: models.py:1183  msgid ""  "Formula to manage container external ID. Change this with care. With "  "incorrect formula, the application might be unusable and import of external "  "data can be destructive."  msgstr "" -#: models.py:1182 +#: models.py:1188  msgid "Warehouse external id"  msgstr "" -#: models.py:1184 +#: models.py:1190  msgid ""  "Formula to manage warehouse external ID. Change this with care. With "  "incorrect formula, the application might be unusable and import of external "  "data can be destructive."  msgstr "" -#: models.py:1189 +#: models.py:1195  msgid "Raw name for person"  msgstr "" -#: models.py:1191 +#: models.py:1197  msgid ""  "Formula to manage person raw_name. Change this with care. With incorrect "  "formula, the application might be unusable and import of external data can "  "be destructive."  msgstr "" -#: models.py:1195 +#: models.py:1201  msgid "Current active"  msgstr "" -#: models.py:1196 +#: models.py:1202  msgid "Currency"  msgstr "" -#: models.py:1200 +#: models.py:1206  msgid "Ishtar site profile"  msgstr "" -#: models.py:1201 +#: models.py:1207  msgid "Ishtar site profiles"  msgstr "" -#: models.py:1270 +#: models.py:1276  msgid "Variable name"  msgstr "" -#: models.py:1271 +#: models.py:1277  msgid "Description of the variable"  msgstr "" -#: models.py:1273 models.py:2077 +#: models.py:1279 models.py:2096  msgid "Value"  msgstr "" -#: models.py:1276 +#: models.py:1282  msgid "Global variable"  msgstr "" -#: models.py:1386 models.py:1416 +#: models.py:1405 models.py:1435  msgid "Total"  msgstr "" -#: models.py:1393 models.py:1517 models.py:1529 +#: models.py:1412 models.py:1536 models.py:1548  #: templates/ishtar/sheet_person.html:24  #: templates/ishtar/dashboards/dashboard_main_detail.html:141  #: templates/ishtar/dashboards/dashboard_main_detail_users.html:26 @@ -833,643 +833,663 @@ msgstr ""  msgid "Number"  msgstr "" -#: models.py:1480 +#: models.py:1499  msgid "Administrative Act"  msgstr "" -#: models.py:1484 +#: models.py:1503  msgid "Associated object"  msgstr "" -#: models.py:1488 +#: models.py:1507  msgid "Document template"  msgstr "" -#: models.py:1489 +#: models.py:1508  msgid "Document templates"  msgstr "" -#: models.py:1520 models.py:1530 models.py:2299 +#: models.py:1539 models.py:1549 models.py:2318  msgid "State"  msgstr "" -#: models.py:1534 templates/blocks/JQueryAdvancedTown.html:12 +#: models.py:1553 templates/blocks/JQueryAdvancedTown.html:12  msgid "Department"  msgstr "" -#: models.py:1535 +#: models.py:1554  msgid "Departments"  msgstr "" -#: models.py:1572 +#: models.py:1591  msgid "Raw phone"  msgstr "" -#: models.py:1578 +#: models.py:1597  msgid "Alternative address is prefered"  msgstr "" -#: models.py:1617 +#: models.py:1636  msgid "Tel: "  msgstr "" -#: models.py:1621 +#: models.py:1640  msgid "Mobile: "  msgstr "" -#: models.py:1625 +#: models.py:1644  msgid "Email: "  msgstr "" -#: models.py:1630 +#: models.py:1649  msgid "Merge key"  msgstr "" -#: models.py:1704 +#: models.py:1723  msgid "Organization types"  msgstr "" -#: models.py:1751 +#: models.py:1770  msgid "Class name"  msgstr "" -#: models.py:1754 +#: models.py:1773  msgid "Importer - Model"  msgstr "" -#: models.py:1755 +#: models.py:1774  msgid "Importer - Models"  msgstr "" -#: models.py:1772 templates/ishtar/dashboards/dashboard_main.html:25 +#: models.py:1791 templates/ishtar/dashboards/dashboard_main.html:25  msgid "Users"  msgstr "" -#: models.py:1775 +#: models.py:1794  msgid "Associated model"  msgstr "" -#: models.py:1778 +#: models.py:1797  msgid "Models that can accept new items"  msgstr "" -#: models.py:1779 +#: models.py:1798  msgid "Leave blank for no restrictions"  msgstr "" -#: models.py:1781 +#: models.py:1800  msgid "Is template"  msgstr "" -#: models.py:1782 +#: models.py:1801  msgid "Unicity keys (separator \";\")"  msgstr "" -#: models.py:1786 +#: models.py:1805  msgid "Importer - Type"  msgstr "" -#: models.py:1787 +#: models.py:1806  msgid "Importer - Types"  msgstr "" -#: models.py:1886 +#: models.py:1905  msgid "Importer - Default"  msgstr "" -#: models.py:1887 +#: models.py:1906  msgid "Importer - Defaults"  msgstr "" -#: models.py:1922 +#: models.py:1941  msgid "Importer - Default value"  msgstr "" -#: models.py:1923 +#: models.py:1942  msgid "Importer - Default values"  msgstr "" -#: models.py:1956 +#: models.py:1975  msgid "Column number"  msgstr "" -#: models.py:1959 +#: models.py:1978  msgid "Required"  msgstr "" -#: models.py:1961 +#: models.py:1980  msgid "Export field name"  msgstr "" -#: models.py:1962 +#: models.py:1981  msgid ""  "Fill this field if the field name is ambiguous for export. For instance: "  "concatenated fields."  msgstr "" -#: models.py:1967 +#: models.py:1986  msgid "Importer - Column"  msgstr "" -#: models.py:1968 +#: models.py:1987  msgid "Importer - Columns"  msgstr "" -#: models.py:1988 +#: models.py:2007  msgid "Field name"  msgstr "" -#: models.py:1990 models.py:2024 +#: models.py:2009 models.py:2043  msgid "Force creation of new items"  msgstr "" -#: models.py:1992 models.py:2026 +#: models.py:2011 models.py:2045  msgid "Concatenate with existing"  msgstr "" -#: models.py:1994 models.py:2028 +#: models.py:2013 models.py:2047  msgid "Concatenate character"  msgstr "" -#: models.py:1998 +#: models.py:2017  msgid "Importer - Duplicate field"  msgstr "" -#: models.py:1999 +#: models.py:2018  msgid "Importer - Duplicate fields"  msgstr "" -#: models.py:2006 +#: models.py:2025  msgid "Regular expression"  msgstr "" -#: models.py:2009 +#: models.py:2028  msgid "Importer - Regular expression"  msgstr "" -#: models.py:2010 +#: models.py:2029  msgid "Importer - Regular expressions"  msgstr "" -#: models.py:2033 +#: models.py:2052  msgid "Importer - Target"  msgstr "" -#: models.py:2034 +#: models.py:2053  msgid "Importer - Targets"  msgstr "" -#: models.py:2058 views.py:549 +#: models.py:2077 views.py:568  msgid "True"  msgstr "" -#: models.py:2059 views.py:551 +#: models.py:2078 views.py:570  msgid "False"  msgstr "" -#: models.py:2078 +#: models.py:2097  msgid "Is set"  msgstr "" -#: models.py:2085 +#: models.py:2104  msgid "Importer - Target key"  msgstr "" -#: models.py:2086 +#: models.py:2105  msgid "Importer - Targets keys"  msgstr "" -#: models.py:2138 models.py:2913 +#: models.py:2157 models.py:2957  msgid "Format"  msgstr "" -#: models.py:2139 models.py:3005 +#: models.py:2158 models.py:3049  msgid "Operation type"  msgstr "" -#: models.py:2140 +#: models.py:2159  msgid "Period"  msgstr "" -#: models.py:2141 +#: models.py:2160  msgid "Report state"  msgstr "" -#: models.py:2142 +#: models.py:2161  msgid "Remain type"  msgstr "" -#: models.py:2143 +#: models.py:2162  msgid "Unit"  msgstr "" -#: models.py:2144 +#: models.py:2163  msgid "Activity type"  msgstr "" -#: models.py:2145 +#: models.py:2164  msgid "Material"  msgstr "" -#: models.py:2147 +#: models.py:2166  msgid "Conservatory state"  msgstr "" -#: models.py:2148 +#: models.py:2167  msgid "Container type"  msgstr "" -#: models.py:2149 +#: models.py:2168  msgid "Preservation type"  msgstr "" -#: models.py:2150 +#: models.py:2169  msgid "Object type"  msgstr "" -#: models.py:2151 +#: models.py:2170  msgid "Integrity type"  msgstr "" -#: models.py:2152 +#: models.py:2171  msgid "Remarkability type"  msgstr "" -#: models.py:2153 +#: models.py:2172  msgid "Batch type"  msgstr "" -#: models.py:2155 +#: models.py:2174  msgid "Identification type"  msgstr "" -#: models.py:2157 +#: models.py:2176  msgid "Context record relation type"  msgstr "" -#: models.py:2158 models.py:3063 +#: models.py:2177 models.py:3107  msgid "Spatial reference system"  msgstr "" -#: models.py:2159 models.py:2891 +#: models.py:2178 models.py:2935  msgid "Support type"  msgstr "" -#: models.py:2160 models.py:2553 +#: models.py:2179 models.py:2572  msgid "Title type"  msgstr "" -#: models.py:2166 +#: models.py:2185  msgid "Integer"  msgstr "" -#: models.py:2167 +#: models.py:2186  msgid "Float"  msgstr "" -#: models.py:2168 +#: models.py:2187  msgid "String"  msgstr "" -#: models.py:2169 templates/sheet_ope.html:86 +#: models.py:2188 templates/sheet_ope.html:86  msgid "Date"  msgstr "" -#: models.py:2171 templates/sheet_ope.html:61 templates/sheet_ope.html.py:83 +#: models.py:2190 templates/sheet_ope.html:61 templates/sheet_ope.html.py:83  #: templates/ishtar/dashboards/dashboard_main_detail.html:126  msgid "Year"  msgstr "" -#: models.py:2172 +#: models.py:2191  msgid "String to boolean"  msgstr "" -#: models.py:2173 +#: models.py:2192  msgctxt "filesystem"  msgid "File"  msgstr "" -#: models.py:2174 +#: models.py:2193  msgid "Unknow type"  msgstr "" -#: models.py:2190 +#: models.py:2209  msgid "4 digit year. e.g.: \"2015\""  msgstr "" -#: models.py:2191 +#: models.py:2210  msgid "4 digit year/month/day. e.g.: \"2015/02/04\""  msgstr "" -#: models.py:2192 +#: models.py:2211  msgid "Day/month/4 digit year. e.g.: \"04/02/2015\""  msgstr "" -#: models.py:2202 +#: models.py:2221  msgid "Options"  msgstr "" -#: models.py:2204 +#: models.py:2223  msgid "Split character(s)"  msgstr "" -#: models.py:2208 +#: models.py:2227  msgid "Importer - Formater type"  msgstr "" -#: models.py:2209 +#: models.py:2228  msgid "Importer - Formater types"  msgstr "" -#: models.py:2261 templates/ishtar/dashboards/dashboard_main_detail.html:63 +#: models.py:2280 templates/ishtar/dashboards/dashboard_main_detail.html:63  msgid "Created"  msgstr "" -#: models.py:2262 +#: models.py:2281  msgid "Analyse in progress"  msgstr "" -#: models.py:2263 +#: models.py:2282  msgid "Analysed"  msgstr "" -#: models.py:2264 +#: models.py:2283  msgid "Import pending"  msgstr "" -#: models.py:2265 +#: models.py:2284  msgid "Import in progress"  msgstr "" -#: models.py:2266 +#: models.py:2285  msgid "Finished with errors"  msgstr "" -#: models.py:2267 +#: models.py:2286  msgid "Finished"  msgstr "" -#: models.py:2268 +#: models.py:2287  msgid "Archived"  msgstr "" -#: models.py:2283 +#: models.py:2302  msgid "Imported file"  msgstr "" -#: models.py:2285 +#: models.py:2304  msgid "Associated images (zip file)"  msgstr "" -#: models.py:2287 +#: models.py:2306  msgid "Encoding"  msgstr "" -#: models.py:2289 +#: models.py:2308  msgid "Skip lines"  msgstr "" -#: models.py:2290 templates/ishtar/import_list.html:51 +#: models.py:2309 templates/ishtar/import_list.html:51  msgid "Error file"  msgstr "" -#: models.py:2293 +#: models.py:2312  msgid "Result file"  msgstr "" -#: models.py:2296 templates/ishtar/import_list.html:57 +#: models.py:2315 templates/ishtar/import_list.html:57  msgid "Match file"  msgstr "" -#: models.py:2302 +#: models.py:2321  msgid "Conservative import"  msgstr "" -#: models.py:2307 +#: models.py:2326  msgid "End date"  msgstr "" -#: models.py:2309 +#: models.py:2328  msgid "Remaining seconds"  msgstr "" -#: models.py:2314 +#: models.py:2333  msgid "Import"  msgstr "" -#: models.py:2343 +#: models.py:2362  msgid "Analyse"  msgstr "" -#: models.py:2345 models.py:2348 +#: models.py:2364 models.py:2367  msgid "Re-analyse"  msgstr "" -#: models.py:2346 +#: models.py:2365  msgid "Launch import"  msgstr "" -#: models.py:2349 +#: models.py:2368  msgid "Re-import"  msgstr "" -#: models.py:2350 +#: models.py:2369  msgid "Archive"  msgstr "" -#: models.py:2352 +#: models.py:2371  msgid "Unarchive"  msgstr "" -#: models.py:2353 widgets.py:130 templates/ishtar/form_delete.html:11 +#: models.py:2372 widgets.py:184 templates/ishtar/form_delete.html:11  msgid "Delete"  msgstr "" -#: models.py:2494 +#: models.py:2513  msgid "Organizations"  msgstr "" -#: models.py:2496 +#: models.py:2515  msgid "Can view all Organizations"  msgstr "" -#: models.py:2497 +#: models.py:2516  msgid "Can view own Organization"  msgstr "" -#: models.py:2498 +#: models.py:2517  msgid "Can add own Organization"  msgstr "" -#: models.py:2500 +#: models.py:2519  msgid "Can change own Organization"  msgstr "" -#: models.py:2502 +#: models.py:2521  msgid "Can delete own Organization"  msgstr "" -#: models.py:2537 +#: models.py:2556  msgid "Groups"  msgstr "" -#: models.py:2542 +#: models.py:2561  msgid "Person types"  msgstr "" -#: models.py:2554 +#: models.py:2573  msgid "Title types"  msgstr "" -#: models.py:2563 +#: models.py:2582  msgid "Mr"  msgstr "" -#: models.py:2564 +#: models.py:2583  msgid "Miss"  msgstr "" -#: models.py:2565 +#: models.py:2584  msgid "Mr and Mrs"  msgstr "" -#: models.py:2566 +#: models.py:2585  msgid "Mrs"  msgstr "" -#: models.py:2567 +#: models.py:2586  msgid "Doctor"  msgstr "" -#: models.py:2600 +#: models.py:2619  msgid "Contact type"  msgstr "" -#: models.py:2603 models.py:2667 +#: models.py:2622 models.py:2686  msgid "Types"  msgstr "" -#: models.py:2606 +#: models.py:2625  msgid "Is attached to"  msgstr "" -#: models.py:2611 +#: models.py:2630  msgid "Persons"  msgstr "" -#: models.py:2613 +#: models.py:2632  msgid "Can view all Persons"  msgstr "" -#: models.py:2614 +#: models.py:2633  msgid "Can view own Person"  msgstr "" -#: models.py:2615 +#: models.py:2634  msgid "Can add own Person"  msgstr "" -#: models.py:2616 +#: models.py:2635  msgid "Can change own Person"  msgstr "" -#: models.py:2617 +#: models.py:2636  msgid "Can delete own Person"  msgstr "" -#: models.py:2794 +#: models.py:2825  msgid "Advanced shortcut menu"  msgstr "" -#: models.py:2797 +#: models.py:2828  msgid "Ishtar user"  msgstr "" -#: models.py:2798 +#: models.py:2829  msgid "Ishtar users"  msgstr "" -#: models.py:2842 +#: models.py:2873  msgid "To modify the password use the form in Auth > User"  msgstr "" -#: models.py:2849 +#: models.py:2881  msgid "Author types"  msgstr "" -#: models.py:2883 +#: models.py:2898 +msgid "Can view all Authors" +msgstr "" + +#: models.py:2900 +msgid "Can view own Author" +msgstr "" + +#: models.py:2902 +msgid "Can add own Author" +msgstr "" + +#: models.py:2904 +msgid "Can change own Author" +msgstr "" + +#: models.py:2906 +msgid "Can delete own Author" +msgstr "" + +#: models.py:2927  msgid "Source types"  msgstr "" -#: models.py:2892 +#: models.py:2936  msgid "Support types"  msgstr "" -#: models.py:2899 +#: models.py:2943  msgid "Format type"  msgstr "" -#: models.py:2900 +#: models.py:2944  msgid "Format types"  msgstr "" -#: models.py:2908 +#: models.py:2952  msgid "External ID"  msgstr "" -#: models.py:2911 +#: models.py:2955  msgid "Support"  msgstr "" -#: models.py:2915 +#: models.py:2959  msgid "Scale"  msgstr "" -#: models.py:2929 +#: models.py:2973  msgid "Item number"  msgstr "" -#: models.py:2930 +#: models.py:2974  msgid "Ref."  msgstr "" -#: models.py:2933 +#: models.py:2977  msgid "Internal ref."  msgstr "" -#: models.py:2976 +#: models.py:3020  msgid "Surface (m2)"  msgstr "" -#: models.py:2977 templates/sheet_ope.html:46 templates/sheet_ope.html.py:107 +#: models.py:3021 templates/sheet_ope.html:46 templates/sheet_ope.html.py:107  msgid "Localisation"  msgstr "" -#: models.py:3002 +#: models.py:3046  msgid "Is preventive"  msgstr "" -#: models.py:3006 +#: models.py:3050  msgid "Operation types"  msgstr "" -#: models.py:3035 +#: models.py:3079  msgid "Preventive"  msgstr "" -#: models.py:3036 +#: models.py:3080  msgid "Research"  msgstr "" -#: models.py:3059 +#: models.py:3103  msgid "Authority name"  msgstr "" -#: models.py:3060 +#: models.py:3104  msgid "Authority SRID"  msgstr "" -#: models.py:3064 +#: models.py:3108  msgid "Spatial reference systems"  msgstr "" @@ -1513,108 +1533,108 @@ msgstr ""  msgid "Account deletion"  msgstr "" -#: views.py:241 +#: views.py:251  msgid "Archaeological file"  msgstr "" -#: views.py:242 +#: views.py:252  msgid "Operation"  msgstr "" -#: views.py:244 +#: views.py:254  msgid "Context record"  msgstr "" -#: views.py:246 +#: views.py:256  msgid "Find"  msgstr "" -#: views.py:248 +#: views.py:258  msgid "Treatment request"  msgstr "" -#: views.py:249 +#: views.py:259  msgid "Treatment"  msgstr "" -#: views.py:1361 views.py:1404 +#: views.py:1387 views.py:1430  msgid "Operation not permitted."  msgstr "" -#: views.py:1363 +#: views.py:1389  #, python-format  msgid "New %s"  msgstr "" -#: views.py:1422 views.py:1472 +#: views.py:1448 views.py:1498  msgid "Archaeological files"  msgstr "" -#: views.py:1423 views.py:1476 +#: views.py:1449 views.py:1502  msgid "Operations"  msgstr "" -#: views.py:1425 views.py:1480 +#: views.py:1451 views.py:1506  msgid "Context records"  msgstr "" -#: views.py:1427 views.py:1483 +#: views.py:1453 views.py:1509  msgid "Finds"  msgstr "" -#: views.py:1681 templates/ishtar/import_list.html:47 +#: views.py:1707 templates/ishtar/import_list.html:47  msgid "Link unmatched items"  msgstr "" -#: views.py:1696 +#: views.py:1722  msgid "Delete import"  msgstr "" -#: views.py:1735 +#: views.py:1761  msgid "Merge persons"  msgstr "" -#: views.py:1759 +#: views.py:1785  msgid "Select the main person"  msgstr "" -#: views.py:1768 +#: views.py:1794  msgid "Merge organization"  msgstr "" -#: views.py:1778 +#: views.py:1804  msgid "Select the main organization"  msgstr "" -#: views.py:1818 views.py:1834 +#: views.py:1844 views.py:1860  msgid "Corporation manager"  msgstr "" -#: widgets.py:259 widgets.py:366 widgets.py:481 +#: widgets.py:313 widgets.py:420 widgets.py:535  msgid "Search..."  msgstr "" -#: widgets.py:670 templatetags/window_tables.py:91 +#: widgets.py:724 templatetags/window_tables.py:96  msgid "No results"  msgstr "" -#: widgets.py:671 templatetags/window_tables.py:92 +#: widgets.py:725 templatetags/window_tables.py:97  msgid "Loading..."  msgstr "" -#: widgets.py:672 +#: widgets.py:726  msgid "Remove"  msgstr "" -#: wizards.py:372 templates/ishtar/import_delete.html:21 +#: wizards.py:380 templates/ishtar/import_delete.html:21  msgid "Yes"  msgstr "" -#: wizards.py:374 +#: wizards.py:382  msgid "No"  msgstr "" -#: wizards.py:1390 +#: wizards.py:1404  #, python-format  msgid "[%(app_name)s] Account creation/modification"  msgstr "" @@ -1685,27 +1705,23 @@ msgstr ""  #: templates/base.html:84 templates/welcome.html:8 templates/welcome.html.py:9  #: templates/welcome.html:10 templates/welcome.html.py:11 -#: templates/ishtar/manage_basket.html:4 -#: templates/ishtar/blocks/window_field.html:1 -#: templates/ishtar/blocks/window_field_detail.html:1 -#: templates/ishtar/blocks/window_field_multiple.html:1 -#: templates/ishtar/blocks/window_field_url.html:1 +#: templates/ishtar/manage_basket.html:5  msgid ":"  msgstr "" -#: templates/base.html:120 +#: templates/base.html:123  msgid "Processing..."  msgstr "" -#: templates/base.html:121 +#: templates/base.html:124  msgid "This can be long."  msgstr "" -#: templates/base.html:122 +#: templates/base.html:125  msgid "Time to take a coffee?"  msgstr "" -#: templates/base.html:123 +#: templates/base.html:126  msgid "Time to take another coffee?"  msgstr "" @@ -1978,7 +1994,7 @@ msgid "where the magic happens."  msgstr ""  #: templates/window.html:40 templates/blocks/JQueryJqGrid.html:34 -#: templates/ishtar/manage_basket.html:12 +#: templates/ishtar/manage_basket.html:13  msgid "Add"  msgstr "" @@ -2108,14 +2124,18 @@ msgstr ""  msgid "Control file"  msgstr "" -#: templates/ishtar/manage_basket.html:9 +#: templates/ishtar/manage_basket.html:10  msgid "Checking \"Select all\" only selects the current page."  msgstr "" -#: templates/ishtar/manage_basket.html:13 +#: templates/ishtar/manage_basket.html:14  msgid "Basket content"  msgstr "" +#: templates/ishtar/manage_basket.html:22 templates/ishtar/sheet.html:28 +msgid "Close" +msgstr "" +  #: templates/ishtar/merge.html:5  msgid "Merge"  msgstr "" @@ -2184,10 +2204,6 @@ msgstr ""  msgid "Contact informations"  msgstr "" -#: templates/ishtar/sheet.html:28 -msgid "Close" -msgstr "" -  #: templates/ishtar/sheet.html:34  msgid "Close all windows"  msgstr "" @@ -2325,11 +2341,13 @@ msgid ""  msgstr ""  #: templates/ishtar/blocks/sheet_creation_section.html:3 -msgid "Creation:" +msgctxt "Sheet" +msgid "Creation"  msgstr ""  #: templates/ishtar/blocks/sheet_creation_section.html:12 -msgid "Modification:" +msgctxt "Sheet" +msgid "Modification"  msgstr ""  #: templates/ishtar/blocks/sheet_external_id.html:3 diff --git a/ishtar_common/management/commands/regenerate_permissions.py b/ishtar_common/management/commands/regenerate_permissions.py index c2af8b353..599e64d64 100644 --- a/ishtar_common/management/commands/regenerate_permissions.py +++ b/ishtar_common/management/commands/regenerate_permissions.py @@ -1,6 +1,6 @@  #!/usr/bin/env python  # -*- coding: utf-8 -*- -# Copyright (C) 2013 Étienne Loks  <etienne.loks_AT_peacefrogsDOTnet> +# Copyright (C) 2013-2017 Étienne Loks  <etienne.loks_AT_peacefrogsDOTnet>  # This program is free software: you can redistribute it and/or modify  # it under the terms of the GNU Affero General Public License as @@ -17,14 +17,13 @@  # See the file COPYING for details. -import sys -from django.db import models -from django.core.management.base import BaseCommand, CommandError +from django.core.management.base import BaseCommand  from django.contrib.contenttypes.models import ContentType  from django.contrib.auth.models import Permission +  class Command(BaseCommand):      args = ''      help = 'Regenerate permissions' @@ -35,6 +34,8 @@ class Command(BaseCommand):              if not model:                  continue              for perm_slug, perm_label in model._meta.permissions: -                Permission.objects.get_or_create(content_type=ct, -                                    codename=perm_slug, -                                    defaults={'name':perm_label}) +                perm, c = Permission.objects.get_or_create( +                    content_type=ct, codename=perm_slug, +                    defaults={'name': perm_label}) +                if c: +                    print('Permission {} created.'.format(perm_label)) diff --git a/ishtar_common/menu_base.py b/ishtar_common/menu_base.py index 0117b375d..c6d02daa5 100644 --- a/ishtar_common/menu_base.py +++ b/ishtar_common/menu_base.py @@ -87,18 +87,22 @@ class MenuItem:              return False          if not self.access_controls:              return True +        if not hasattr(user, 'ishtaruser'): +            return False +        # manage by specific idx - person type +        if user.ishtaruser.has_right(self.idx, session=session): +            return True          prefix = (self.model._meta.app_label + '.') if self.model else ''          for access_control in self.access_controls: +            # check by person type +            if user.ishtaruser.has_right(access_control, session=session): +                return True              access_control = prefix + access_control -            if hasattr(user, 'ishtaruser') and \ -                user.ishtaruser.has_perm(access_control, self.model, -                                         session=session) or \ +            # check by specific access control +            if user.ishtaruser.has_perm(access_control, self.model, +                                        session=session) or \                 access_control in user.get_group_permissions():                  return True -        # manage by person type -        if hasattr(user, 'ishtaruser'): -            if user.ishtaruser.has_right(self.idx, session=session): -                return True          return False      def is_available(self, user, obj=None, session=None): diff --git a/ishtar_common/models.py b/ishtar_common/models.py index 35608abdf..988254359 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -191,6 +191,8 @@ def valid_ids(cls):      def func(value):          if "," in value:              value = value.split(",") +        if type(value) not in (list, tuple): +            value = [value]          for v in value:              try:                  cls.objects.get(pk=v) @@ -411,7 +413,7 @@ class GeneralType(Cached, models.Model):          if item:              return item          item, created = cls.objects.get_or_create( -                txt_idx=slug, defaults={'label': label}) +            txt_idx=slug, defaults={'label': label})          return item      @classmethod @@ -769,6 +771,10 @@ class ImageModel(models.Model):          return SimpleUploadedFile('temp', temp.read())      def save(self, *args, **kwargs): +        if 'force_copy' in kwargs: +            kwargs.pop('force_copy') +            super(ImageModel, self).save(*args, **kwargs) +            return          # manage images          if self.has_changed('image') and self.image:              # convert to jpg @@ -1300,6 +1306,19 @@ class UserDashboard:  class DashboardFormItem(object): +    """ +    Provide methods to manage statistics +    """ + +    def _get_or_set_stats(self, funcname, update, +                          timeout=settings.CACHE_TIMEOUT): +        key, val = get_cache(self.__class__, [funcname, self.pk]) +        if not update and val is not None: +            return val +        val = getattr(self, funcname)() +        cache.set(key, val, timeout) +        return val +      @classmethod      def get_periods(cls, slice='month', fltr={}, date_source='creation'):          date_var = date_source + '_date' @@ -1951,7 +1970,8 @@ class ImporterColumn(models.Model):      """      Import file column description      """ -    label = models.CharField(_(u"Label"), blank=True, null=True, max_length=200) +    label = models.CharField(_(u"Label"), blank=True, null=True, +                             max_length=200)      importer_type = models.ForeignKey(ImporterType, related_name='columns')      col_number = models.IntegerField(_(u"Column number"), default=1)      description = models.TextField(_("Description"), blank=True, null=True) @@ -2141,7 +2161,8 @@ TARGET_MODELS = [      ('archaeological_operations.models.ReportState', _(u"Report state")),      ('archaeological_operations.models.RemainType', _(u"Remain type")),      ('archaeological_context_records.models.Unit', _(u"Unit")), -    ('archaeological_context_records.models.ActivityType', _(u"Activity type")), +    ('archaeological_context_records.models.ActivityType', +     _(u"Activity type")),      ('archaeological_finds.models.MaterialType', _(u"Material")),      ('archaeological_finds.models.ConservatoryState',       _(u"Conservatory state")), @@ -2149,7 +2170,8 @@ TARGET_MODELS = [      ('archaeological_finds.models.PreservationType', _(u"Preservation type")),      ('archaeological_finds.models.ObjectType', _(u"Object type")),      ('archaeological_finds.models.IntegrityType', _(u"Integrity type")), -    ('archaeological_finds.models.RemarkabilityType', _(u"Remarkability type")), +    ('archaeological_finds.models.RemarkabilityType', +     _(u"Remarkability type")),      ('archaeological_finds.models.BatchType', _(u"Batch type")),      ('archaeological_context_records.models.IdentificationType',       _("Identification type")), @@ -2301,14 +2323,12 @@ class Import(models.Model):      conservative_import = models.BooleanField(          _(u"Conservative import"), default=False,          help_text='If set to true, do not overload existing values') -    creation_date = models.DateTimeField(_(u"Creation date"), -                                         auto_now_add=True, blank=True, -                                         null=True) +    creation_date = models.DateTimeField( +        _(u"Creation date"), auto_now_add=True, blank=True, null=True)      end_date = models.DateTimeField(_(u"End date"), blank=True,                                      null=True, editable=False) -    seconds_remaining = models.IntegerField(_(u"Remaining seconds"), -                                            blank=True, null=True, -                                            editable=False) +    seconds_remaining = models.IntegerField( +        _(u"Remaining seconds"), blank=True, null=True, editable=False)      class Meta:          verbose_name = _(u"Import") @@ -2770,6 +2790,18 @@ class Person(Address, Merge, OwnPerms, ValueGetter):              for fle in self.general_contractor.all():                  fle.save()  # force update of raw_general_contractor +    @classmethod +    def get_query_owns(cls, user): +        return \ +            Q(operation_scientist_responsability__collaborators__ishtaruser +              =user.ishtaruser) | \ +            Q(operation_scientist_responsability__scientist__ishtaruser +              =user.ishtaruser) | \ +            Q(operation_collaborator__collaborators__ishtaruser +              =user.ishtaruser) | \ +            Q(operation_collaborator__scientist__ishtaruser +              =user.ishtaruser) +  class IshtarUser(User):      TABLE_COLS = ('username', 'person__name', 'person__surname', @@ -2803,17 +2835,13 @@ class IshtarUser(User):          surname = user.first_name or default          name = user.last_name or default          email = user.email -        if user.is_superuser: -            ADMINISTRATOR, created = PersonType.objects.get_or_create( -                txt_idx='administrator') -            person_type = ADMINISTRATOR -        else: -            person_type, created = PersonType.objects.get_or_create( -                txt_idx='public_access')          person = Person.objects.create(surname=surname,                                         name=name, email=email,                                         history_modifier=user) -        person.person_types.add(person_type) +        if user.is_superuser: +            person_type, created = PersonType.objects.get_or_create( +                txt_idx='administrator') +            person.person_types.add(person_type)          password = user.password          isht_user = IshtarUser.objects.create(              user_ptr=user, username=default, person=person, password=password) @@ -2844,6 +2872,7 @@ IshtarUser._meta.get_field('password').help_text = _(  class AuthorType(GeneralType):      order = models.IntegerField(_(u"Order"), default=1) +      class Meta:          verbose_name = _(u"Author type")          verbose_name_plural = _(u"Author types") @@ -2861,6 +2890,18 @@ class Author(models.Model):          verbose_name = _(u"Author")          verbose_name_plural = _(u"Authors")          ordering = ('author_type__order', 'person__name') +        permissions = ( +            ("view_author", +             ugettext(u"Can view all Authors")), +            ("view_own_author", +             ugettext(u"Can view own Author")), +            ("add_own_author", +             ugettext(u"Can add own Author")), +            ("change_own_author", +             ugettext(u"Can change own Author")), +            ("delete_own_author", +             ugettext(u"Can delete own Author")), +        )      def __unicode__(self):          return unicode(self.person) + settings.JOINT + \ @@ -2903,7 +2944,7 @@ post_save.connect(post_save_cache, sender=Format)  post_delete.connect(post_save_cache, sender=Format) -class Source(ImageModel, models.Model): +class Source(OwnPerms, ImageModel, models.Model):      title = models.CharField(_(u"Title"), max_length=300)      external_id = models.CharField(_(u"External ID"), max_length=12, null=True,                                     blank=True) diff --git a/ishtar_common/static/js/ishtar.js b/ishtar_common/static/js/ishtar.js index b5f4f1a79..318c17315 100644 --- a/ishtar_common/static/js/ishtar.js +++ b/ishtar_common/static/js/ishtar.js @@ -38,11 +38,13 @@ function get_previous_table_id(){}  var shortcut_url = '';  var advanced_menu = false; +var shortcut_menu_hide = false;  var activate_all_search_url = '/activate-all-search/';  var activate_own_search_url = '/activate-own-search/';  var activate_advanced_url = '/activate-advanced-menu/';  var activate_simple_url = '/activate-simple-menu/'; - +var shortcut_menu_hide_url = '/hide-shortcut-menu/' +var shortcut_menu_show_url = '/show-shortcut-menu/'  function init_shortcut_menu(html){      $("#progress").hide(); @@ -68,13 +70,21 @@ function init_shortcut_menu(html){          $('#shortcut-menu table').hide();          $(".short-menu-close").hide();          $(".short-menu-open").show(); +        $.get(shortcut_menu_hide_url);      });      $(".short-menu-open").click(function(){          $('#shortcut-menu div').show();          $('#shortcut-menu table').show();          $(".short-menu-open").hide();          $(".short-menu-close").show(); +        $.get(shortcut_menu_show_url);      }); +    if (shortcut_menu_hide){ +        $('#shortcut-menu div').hide(); +        $('#shortcut-menu table').hide(); +        $(".short-menu-close").hide(); +        $(".short-menu-open").show(); +    }  }  function init_shortcut_fields(){ @@ -213,9 +223,8 @@ $(document).on("click", '.check-all', function(){          ).attr('checked', $(this).is(':checked'));  }); -$(document).on("click", '#main_menu ul li', function(){ +$(document).on("click", '#main_menu > ul > li', function(){      var current_id = $(this).attr('id'); -    console.log(current_id);      $("#main_menu ul ul").not($(this).parents('ul')).not($(this).find('ul')                          ).hide('slow');      $(this).find('ul').show('slow'); diff --git a/ishtar_common/static/media/style.css b/ishtar_common/static/media/style.css index adaf94200..011db3652 100644 --- a/ishtar_common/static/media/style.css +++ b/ishtar_common/static/media/style.css @@ -92,6 +92,15 @@ div.form {      border-bottom:1px solid #D14;  } +.form .select2-container--default .select2-selection--multiple { +    border: 1px solid #FFF; +} + +.form .select2-container--default.select2-container--focus +.select2-selection--multiple { +    border:1px solid #D14; +} +  hr.spacer{      clear:both;      border:0; @@ -315,6 +324,12 @@ ul.list{      line-height:16px;  } +.centered{ +    text-align: center; +    width: 100%; +    display: inline-block; +} +  div.nav-button{      cursor:pointer;      width:15px; diff --git a/ishtar_common/static/select2/LICENSE b/ishtar_common/static/select2/LICENSE deleted file mode 100644 index 0247cc762..000000000 --- a/ishtar_common/static/select2/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -Copyright 2014 Igor Vaynberg - -Version: @@ver@@ Timestamp: @@timestamp@@ - -This software is licensed under the Apache License, Version 2.0 (the "Apache License") or the GNU -General Public License version 2 (the "GPL License"). You may choose either license to govern your -use of this software only upon the condition that you accept all of the terms of either the Apache -License or the GPL License. - -You may obtain a copy of the Apache License and the GPL License at: - -http://www.apache.org/licenses/LICENSE-2.0 -http://www.gnu.org/licenses/gpl-2.0.html - -Unless required by applicable law or agreed to in writing, software distributed under the Apache License -or the GPL Licesnse is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, -either express or implied. See the Apache License and the GPL License for the specific language governing -permissions and limitations under the Apache License and the GPL License. diff --git a/ishtar_common/static/select2/LICENSE.md b/ishtar_common/static/select2/LICENSE.md new file mode 100644 index 000000000..86c7c291a --- /dev/null +++ b/ishtar_common/static/select2/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2012-2015 Kevin Brown, Igor Vaynberg, and Select2 contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/ishtar_common/static/select2/css/select2-bootstrap.css b/ishtar_common/static/select2/css/select2-bootstrap.css deleted file mode 100644 index 3b83f0a22..000000000 --- a/ishtar_common/static/select2/css/select2-bootstrap.css +++ /dev/null @@ -1,87 +0,0 @@ -.form-control .select2-choice { -    border: 0; -    border-radius: 2px; -} - -.form-control .select2-choice .select2-arrow { -    border-radius: 0 2px 2px 0;    -} - -.form-control.select2-container { -    height: auto !important; -    padding: 0; -} - -.form-control.select2-container.select2-dropdown-open { -    border-color: #5897FB; -    border-radius: 3px 3px 0 0; -} - -.form-control .select2-container.select2-dropdown-open .select2-choices { -    border-radius: 3px 3px 0 0; -} - -.form-control.select2-container .select2-choices { -    border: 0 !important; -    border-radius: 3px; -} - -.control-group.warning .select2-container .select2-choice, -.control-group.warning .select2-container .select2-choices, -.control-group.warning .select2-container-active .select2-choice, -.control-group.warning .select2-container-active .select2-choices, -.control-group.warning .select2-dropdown-open.select2-drop-above .select2-choice, -.control-group.warning .select2-dropdown-open.select2-drop-above .select2-choices, -.control-group.warning .select2-container-multi.select2-container-active .select2-choices { -    border: 1px solid #C09853 !important; -} - -.control-group.warning .select2-container .select2-choice div { -    border-left: 1px solid #C09853 !important; -    background: #FCF8E3 !important; -} - -.control-group.error .select2-container .select2-choice, -.control-group.error .select2-container .select2-choices, -.control-group.error .select2-container-active .select2-choice, -.control-group.error .select2-container-active .select2-choices, -.control-group.error .select2-dropdown-open.select2-drop-above .select2-choice, -.control-group.error .select2-dropdown-open.select2-drop-above .select2-choices, -.control-group.error .select2-container-multi.select2-container-active .select2-choices { -    border: 1px solid #B94A48 !important; -} - -.control-group.error .select2-container .select2-choice div { -    border-left: 1px solid #B94A48 !important; -    background: #F2DEDE !important; -} - -.control-group.info .select2-container .select2-choice, -.control-group.info .select2-container .select2-choices, -.control-group.info .select2-container-active .select2-choice, -.control-group.info .select2-container-active .select2-choices, -.control-group.info .select2-dropdown-open.select2-drop-above .select2-choice, -.control-group.info .select2-dropdown-open.select2-drop-above .select2-choices, -.control-group.info .select2-container-multi.select2-container-active .select2-choices { -    border: 1px solid #3A87AD !important; -} - -.control-group.info .select2-container .select2-choice div { -    border-left: 1px solid #3A87AD !important; -    background: #D9EDF7 !important; -} - -.control-group.success .select2-container .select2-choice, -.control-group.success .select2-container .select2-choices, -.control-group.success .select2-container-active .select2-choice, -.control-group.success .select2-container-active .select2-choices, -.control-group.success .select2-dropdown-open.select2-drop-above .select2-choice, -.control-group.success .select2-dropdown-open.select2-drop-above .select2-choices, -.control-group.success .select2-container-multi.select2-container-active .select2-choices { -    border: 1px solid #468847 !important; -} - -.control-group.success .select2-container .select2-choice div { -    border-left: 1px solid #468847 !important; -    background: #DFF0D8 !important; -} diff --git a/ishtar_common/static/select2/css/select2-spinner.gif b/ishtar_common/static/select2/css/select2-spinner.gif Binary files differdeleted file mode 100644 index 5b33f7e54..000000000 --- a/ishtar_common/static/select2/css/select2-spinner.gif +++ /dev/null diff --git a/ishtar_common/static/select2/css/select2.css b/ishtar_common/static/select2/css/select2.css index 2d07a0343..447b2b86c 100644 --- a/ishtar_common/static/select2/css/select2.css +++ b/ishtar_common/static/select2/css/select2.css @@ -1,704 +1,484 @@ -/* -Version: 3.5.2 Timestamp: Sat Nov  1 14:43:36 EDT 2014 -*/  .select2-container { -    margin: 0; -    position: relative; -    display: inline-block; -    /* inline-block for ie7 */ -    zoom: 1; -    *display: inline; -    vertical-align: middle; -} - -.select2-container, -.select2-drop, -.select2-search, -.select2-search input { -  /* -    Force border-box so that % widths fit the parent -    container without overlap because of margin/padding. -    More Info : http://www.quirksmode.org/css/box.html -  */ -  -webkit-box-sizing: border-box; /* webkit */ -     -moz-box-sizing: border-box; /* firefox */ -          box-sizing: border-box; /* css3 */ -} - -.select2-container .select2-choice { -    display: block; -    height: 26px; -    padding: 0 0 0 8px; -    overflow: hidden; -    position: relative; - -    border: 1px solid #aaa; -    white-space: nowrap; -    line-height: 26px; -    color: #444; -    text-decoration: none; - -    border-radius: 4px; - -    background-clip: padding-box; - -    -webkit-touch-callout: none; -      -webkit-user-select: none; -         -moz-user-select: none; -          -ms-user-select: none; -              user-select: none; - -    background-color: #fff; -    background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eee), color-stop(0.5, #fff)); -    background-image: -webkit-linear-gradient(center bottom, #eee 0%, #fff 50%); -    background-image: -moz-linear-gradient(center bottom, #eee 0%, #fff 50%); -    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#ffffff', endColorstr = '#eeeeee', GradientType = 0); -    background-image: linear-gradient(to top, #eee 0%, #fff 50%); -} - -html[dir="rtl"] .select2-container .select2-choice { -    padding: 0 8px 0 0; -} - -.select2-container.select2-drop-above .select2-choice { -    border-bottom-color: #aaa; - -    border-radius: 0 0 4px 4px; - -    background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eee), color-stop(0.9, #fff)); -    background-image: -webkit-linear-gradient(center bottom, #eee 0%, #fff 90%); -    background-image: -moz-linear-gradient(center bottom, #eee 0%, #fff 90%); -    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0); -    background-image: linear-gradient(to bottom, #eee 0%, #fff 90%); -} - -.select2-container.select2-allowclear .select2-choice .select2-chosen { -    margin-right: 42px; -} - -.select2-container .select2-choice > .select2-chosen { -    margin-right: 26px; -    display: block; -    overflow: hidden; - -    white-space: nowrap; - -    text-overflow: ellipsis; -    float: none; -    width: auto; -} - -html[dir="rtl"] .select2-container .select2-choice > .select2-chosen { -    margin-left: 26px; -    margin-right: 0; -} - -.select2-container .select2-choice abbr { -    display: none; -    width: 12px; -    height: 12px; -    position: absolute; -    right: 24px; -    top: 8px; - -    font-size: 1px; -    text-decoration: none; - -    border: 0; -    background: url('select2.png') right top no-repeat; +  box-sizing: border-box; +  display: inline-block; +  margin: 0; +  position: relative; +  vertical-align: middle; } +  .select2-container .select2-selection--single { +    box-sizing: border-box;      cursor: pointer; -    outline: 0; -} - -.select2-container.select2-allowclear .select2-choice abbr { -    display: inline-block; -} - -.select2-container .select2-choice abbr:hover { -    background-position: right -11px; +    display: block; +    height: 28px; +    user-select: none; +    -webkit-user-select: none; } +    .select2-container .select2-selection--single .select2-selection__rendered { +      display: block; +      padding-left: 8px; +      padding-right: 20px; +      overflow: hidden; +      text-overflow: ellipsis; +      white-space: nowrap; } +    .select2-container .select2-selection--single .select2-selection__clear { +      position: relative; } +  .select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered { +    padding-right: 8px; +    padding-left: 20px; } +  .select2-container .select2-selection--multiple { +    box-sizing: border-box;      cursor: pointer; -} - -.select2-drop-mask { -    border: 0; -    margin: 0; -    padding: 0; -    position: fixed; -    left: 0; -    top: 0; -    min-height: 100%; -    min-width: 100%; -    height: auto; -    width: auto; -    opacity: 0; -    z-index: 9998; -    /* styles required for IE to work */ -    background-color: #fff; -    filter: alpha(opacity=0); -} - -.select2-drop { -    width: 100%; -    margin-top: -1px; -    position: absolute; -    z-index: 9999; -    top: 100%; - -    background: #fff; -    color: #000; -    border: 1px solid #aaa; -    border-top: 0; - -    border-radius: 0 0 4px 4px; - -    -webkit-box-shadow: 0 4px 5px rgba(0, 0, 0, .15); -            box-shadow: 0 4px 5px rgba(0, 0, 0, .15); -} - -.select2-drop.select2-drop-above { -    margin-top: 1px; -    border-top: 1px solid #aaa; -    border-bottom: 0; - -    border-radius: 4px 4px 0 0; - -    -webkit-box-shadow: 0 -4px 5px rgba(0, 0, 0, .15); -            box-shadow: 0 -4px 5px rgba(0, 0, 0, .15); -} - -.select2-drop-active { -    border: 1px solid #5897fb; -    border-top: none; -} - -.select2-drop.select2-drop-above.select2-drop-active { -    border-top: 1px solid #5897fb; -} - -.select2-drop-auto-width { -    border-top: 1px solid #aaa; -    width: auto; -} - -.select2-drop-auto-width .select2-search { -    padding-top: 4px; -} - -.select2-container .select2-choice .select2-arrow { -    display: inline-block; -    width: 18px; -    height: 100%; -    position: absolute; -    right: 0; -    top: 0; - -    border-left: 1px solid #aaa; -    border-radius: 0 4px 4px 0; - -    background-clip: padding-box; - -    background: #ccc; -    background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #ccc), color-stop(0.6, #eee)); -    background-image: -webkit-linear-gradient(center bottom, #ccc 0%, #eee 60%); -    background-image: -moz-linear-gradient(center bottom, #ccc 0%, #eee 60%); -    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#eeeeee', endColorstr = '#cccccc', GradientType = 0); -    background-image: linear-gradient(to top, #ccc 0%, #eee 60%); -} - -html[dir="rtl"] .select2-container .select2-choice .select2-arrow { -    left: 0; -    right: auto; - -    border-left: none; -    border-right: 1px solid #aaa; -    border-radius: 4px 0 0 4px; -} - -.select2-container .select2-choice .select2-arrow b {      display: block; -    width: 100%; -    height: 100%; -    background: url('select2.png') no-repeat 0 1px; -} +    min-height: 32px; +    user-select: none; +    -webkit-user-select: none; } +    .select2-container .select2-selection--multiple .select2-selection__rendered { +      display: inline-block; +      overflow: hidden; +      padding-left: 8px; +      text-overflow: ellipsis; +      white-space: nowrap; } +  .select2-container .select2-search--inline { +    float: left; } +    .select2-container .select2-search--inline .select2-search__field { +      box-sizing: border-box; +      border: none; +      font-size: 100%; +      margin-top: 5px; +      padding: 0; } +      .select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button { +        -webkit-appearance: none; } + +.select2-dropdown { +  background-color: white; +  border: 1px solid #aaa; +  border-radius: 4px; +  box-sizing: border-box; +  display: block; +  position: absolute; +  left: -100000px; +  width: 100%; +  z-index: 1051; } -html[dir="rtl"] .select2-container .select2-choice .select2-arrow b { -    background-position: 2px 1px; -} - -.select2-search { -    display: inline-block; +.select2-results { +  display: block; } + +.select2-results__options { +  list-style: none; +  margin: 0; +  padding: 0; } + +.select2-results__option { +  padding: 6px; +  user-select: none; +  -webkit-user-select: none; } +  .select2-results__option[aria-selected] { +    cursor: pointer; } + +.select2-container--open .select2-dropdown { +  left: 0; } + +.select2-container--open .select2-dropdown--above { +  border-bottom: none; +  border-bottom-left-radius: 0; +  border-bottom-right-radius: 0; } + +.select2-container--open .select2-dropdown--below { +  border-top: none; +  border-top-left-radius: 0; +  border-top-right-radius: 0; } + +.select2-search--dropdown { +  display: block; +  padding: 4px; } +  .select2-search--dropdown .select2-search__field { +    padding: 4px;      width: 100%; -    min-height: 26px; -    margin: 0; -    padding-left: 4px; -    padding-right: 4px; - -    position: relative; -    z-index: 10000; - -    white-space: nowrap; -} - -.select2-search input { -    width: 100%; -    height: auto !important; -    min-height: 26px; -    padding: 4px 20px 4px 5px; -    margin: 0; - -    outline: 0; -    font-family: sans-serif; -    font-size: 1em; - -    border: 1px solid #aaa; -    border-radius: 0; - -    -webkit-box-shadow: none; -            box-shadow: none; - -    background: #fff url('select2.png') no-repeat 100% -22px; -    background: url('select2.png') no-repeat 100% -22px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, #fff), color-stop(0.99, #eee)); -    background: url('select2.png') no-repeat 100% -22px, -webkit-linear-gradient(center bottom, #fff 85%, #eee 99%); -    background: url('select2.png') no-repeat 100% -22px, -moz-linear-gradient(center bottom, #fff 85%, #eee 99%); -    background: url('select2.png') no-repeat 100% -22px, linear-gradient(to bottom, #fff 85%, #eee 99%) 0 0; -} - -html[dir="rtl"] .select2-search input { -    padding: 4px 5px 4px 20px; - -    background: #fff url('select2.png') no-repeat -37px -22px; -    background: url('select2.png') no-repeat -37px -22px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, #fff), color-stop(0.99, #eee)); -    background: url('select2.png') no-repeat -37px -22px, -webkit-linear-gradient(center bottom, #fff 85%, #eee 99%); -    background: url('select2.png') no-repeat -37px -22px, -moz-linear-gradient(center bottom, #fff 85%, #eee 99%); -    background: url('select2.png') no-repeat -37px -22px, linear-gradient(to bottom, #fff 85%, #eee 99%) 0 0; -} - -.select2-drop.select2-drop-above .select2-search input { -    margin-top: 4px; -} - -.select2-search input.select2-active { -    background: #fff url('select2-spinner.gif') no-repeat 100%; -    background: url('select2-spinner.gif') no-repeat 100%, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, #fff), color-stop(0.99, #eee)); -    background: url('select2-spinner.gif') no-repeat 100%, -webkit-linear-gradient(center bottom, #fff 85%, #eee 99%); -    background: url('select2-spinner.gif') no-repeat 100%, -moz-linear-gradient(center bottom, #fff 85%, #eee 99%); -    background: url('select2-spinner.gif') no-repeat 100%, linear-gradient(to bottom, #fff 85%, #eee 99%) 0 0; -} - -.select2-container-active .select2-choice, -.select2-container-active .select2-choices { -    border: 1px solid #5897fb; -    outline: none; - -    -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, .3); -            box-shadow: 0 0 5px rgba(0, 0, 0, .3); -} - -.select2-dropdown-open .select2-choice { -    border-bottom-color: transparent; -    -webkit-box-shadow: 0 1px 0 #fff inset; -            box-shadow: 0 1px 0 #fff inset; - -    border-bottom-left-radius: 0; -    border-bottom-right-radius: 0; - -    background-color: #eee; -    background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #fff), color-stop(0.5, #eee)); -    background-image: -webkit-linear-gradient(center bottom, #fff 0%, #eee 50%); -    background-image: -moz-linear-gradient(center bottom, #fff 0%, #eee 50%); -    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#ffffff', GradientType=0); -    background-image: linear-gradient(to top, #fff 0%, #eee 50%); -} - -.select2-dropdown-open.select2-drop-above .select2-choice, -.select2-dropdown-open.select2-drop-above .select2-choices { -    border: 1px solid #5897fb; -    border-top-color: transparent; - -    background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #fff), color-stop(0.5, #eee)); -    background-image: -webkit-linear-gradient(center top, #fff 0%, #eee 50%); -    background-image: -moz-linear-gradient(center top, #fff 0%, #eee 50%); -    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#ffffff', GradientType=0); -    background-image: linear-gradient(to bottom, #fff 0%, #eee 50%); -} - -.select2-dropdown-open .select2-choice .select2-arrow { -    background: transparent; -    border-left: none; -    filter: none; -} -html[dir="rtl"] .select2-dropdown-open .select2-choice .select2-arrow { -    border-right: none; -} - -.select2-dropdown-open .select2-choice .select2-arrow b { -    background-position: -18px 1px; -} - -html[dir="rtl"] .select2-dropdown-open .select2-choice .select2-arrow b { -    background-position: -16px 1px; -} +    box-sizing: border-box; } +    .select2-search--dropdown .select2-search__field::-webkit-search-cancel-button { +      -webkit-appearance: none; } +  .select2-search--dropdown.select2-search--hide { +    display: none; } + +.select2-close-mask { +  border: 0; +  margin: 0; +  padding: 0; +  display: block; +  position: fixed; +  left: 0; +  top: 0; +  min-height: 100%; +  min-width: 100%; +  height: auto; +  width: auto; +  opacity: 0; +  z-index: 99; +  background-color: #fff; +  filter: alpha(opacity=0); }  .select2-hidden-accessible { -    border: 0; -    clip: rect(0 0 0 0); -    height: 1px; -    margin: -1px; -    overflow: hidden; -    padding: 0; +  border: 0 !important; +  clip: rect(0 0 0 0) !important; +  height: 1px !important; +  margin: -1px !important; +  overflow: hidden !important; +  padding: 0 !important; +  position: absolute !important; +  width: 1px !important; } + +.select2-container--default .select2-selection--single { +  background-color: #fff; +  border: 1px solid #aaa; +  border-radius: 4px; } +  .select2-container--default .select2-selection--single .select2-selection__rendered { +    color: #444; +    line-height: 28px; } +  .select2-container--default .select2-selection--single .select2-selection__clear { +    cursor: pointer; +    float: right; +    font-weight: bold; } +  .select2-container--default .select2-selection--single .select2-selection__placeholder { +    color: #999; } +  .select2-container--default .select2-selection--single .select2-selection__arrow { +    height: 26px;      position: absolute; -    width: 1px; -} - -/* results */ -.select2-results { -    max-height: 200px; -    padding: 0 0 0 4px; -    margin: 4px 4px 4px 0; -    position: relative; -    overflow-x: hidden; -    overflow-y: auto; -    -webkit-tap-highlight-color: rgba(0, 0, 0, 0); -} - -html[dir="rtl"] .select2-results { -    padding: 0 4px 0 0; -    margin: 4px 0 4px 4px; -} - -.select2-results ul.select2-result-sub { -    margin: 0; -    padding-left: 0; -} - -.select2-results li { +    top: 1px; +    right: 1px; +    width: 20px; } +    .select2-container--default .select2-selection--single .select2-selection__arrow b { +      border-color: #888 transparent transparent transparent; +      border-style: solid; +      border-width: 5px 4px 0 4px; +      height: 0; +      left: 50%; +      margin-left: -4px; +      margin-top: -2px; +      position: absolute; +      top: 50%; +      width: 0; } + +.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear { +  float: left; } + +.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow { +  left: 1px; +  right: auto; } + +.select2-container--default.select2-container--disabled .select2-selection--single { +  background-color: #eee; +  cursor: default; } +  .select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear { +    display: none; } + +.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b { +  border-color: transparent transparent #888 transparent; +  border-width: 0 4px 5px 4px; } + +.select2-container--default .select2-selection--multiple { +  background-color: white; +  border: 1px solid #aaa; +  border-radius: 4px; +  cursor: text; } +  .select2-container--default .select2-selection--multiple .select2-selection__rendered { +    box-sizing: border-box;      list-style: none; -    display: list-item; -    background-image: none; -} - -.select2-results li.select2-result-with-children > .select2-result-label { -    font-weight: bold; -} - -.select2-results .select2-result-label { -    padding: 3px 7px 4px;      margin: 0; +    padding: 0 5px; +    width: 100%; } +    .select2-container--default .select2-selection--multiple .select2-selection__rendered li { +      list-style: none; } +  .select2-container--default .select2-selection--multiple .select2-selection__placeholder { +    color: #999; +    margin-top: 5px; +    float: left; } +  .select2-container--default .select2-selection--multiple .select2-selection__clear {      cursor: pointer; - -    min-height: 1em; - -    -webkit-touch-callout: none; -      -webkit-user-select: none; -         -moz-user-select: none; -          -ms-user-select: none; -              user-select: none; -} - -.select2-results-dept-1 .select2-result-label { padding-left: 20px } -.select2-results-dept-2 .select2-result-label { padding-left: 40px } -.select2-results-dept-3 .select2-result-label { padding-left: 60px } -.select2-results-dept-4 .select2-result-label { padding-left: 80px } -.select2-results-dept-5 .select2-result-label { padding-left: 100px } -.select2-results-dept-6 .select2-result-label { padding-left: 110px } -.select2-results-dept-7 .select2-result-label { padding-left: 120px } - -.select2-results .select2-highlighted { -    background: #3875d7; -    color: #fff; -} - -.select2-results li em { -    background: #feffde; -    font-style: normal; -} - -.select2-results .select2-highlighted em { -    background: transparent; -} - -.select2-results .select2-highlighted ul { -    background: #fff; -    color: #000; -} - -.select2-results .select2-no-results, -.select2-results .select2-searching, -.select2-results .select2-ajax-error, -.select2-results .select2-selection-limit { -    background: #f4f4f4; -    display: list-item; -    padding-left: 5px; -} - -/* -disabled look for disabled choices in the results dropdown -*/ -.select2-results .select2-disabled.select2-highlighted { -    color: #666; -    background: #f4f4f4; -    display: list-item; +    float: right; +    font-weight: bold; +    margin-top: 5px; +    margin-right: 10px; } +  .select2-container--default .select2-selection--multiple .select2-selection__choice { +    background-color: #e4e4e4; +    border: 1px solid #aaa; +    border-radius: 4px;      cursor: default; -} -.select2-results .select2-disabled { -  background: #f4f4f4; -  display: list-item; +    float: left; +    margin-right: 5px; +    margin-top: 5px; +    padding: 0 5px; } +  .select2-container--default .select2-selection--multiple .select2-selection__choice__remove { +    color: #999; +    cursor: pointer; +    display: inline-block; +    font-weight: bold; +    margin-right: 2px; } +    .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover { +      color: #333; } + +.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline { +  float: right; } + +.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice { +  margin-left: 5px; +  margin-right: auto; } + +.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove { +  margin-left: 2px; +  margin-right: auto; } + +.select2-container--default.select2-container--focus .select2-selection--multiple { +  border: solid black 1px; +  outline: 0; } + +.select2-container--default.select2-container--disabled .select2-selection--multiple { +  background-color: #eee; +  cursor: default; } + +.select2-container--default.select2-container--disabled .select2-selection__choice__remove { +  display: none; } + +.select2-container--default.select2-container--open.select2-container--above .select2-selection--single, .select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple { +  border-top-left-radius: 0; +  border-top-right-radius: 0; } + +.select2-container--default.select2-container--open.select2-container--below .select2-selection--single, .select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple { +  border-bottom-left-radius: 0; +  border-bottom-right-radius: 0; } + +.select2-container--default .select2-search--dropdown .select2-search__field { +  border: 1px solid #aaa; } + +.select2-container--default .select2-search--inline .select2-search__field { +  background: transparent; +  border: none; +  outline: 0; +  box-shadow: none; +  -webkit-appearance: textfield; } + +.select2-container--default .select2-results > .select2-results__options { +  max-height: 200px; +  overflow-y: auto; } + +.select2-container--default .select2-results__option[role=group] { +  padding: 0; } + +.select2-container--default .select2-results__option[aria-disabled=true] { +  color: #999; } + +.select2-container--default .select2-results__option[aria-selected=true] { +  background-color: #ddd; } + +.select2-container--default .select2-results__option .select2-results__option { +  padding-left: 1em; } +  .select2-container--default .select2-results__option .select2-results__option .select2-results__group { +    padding-left: 0; } +  .select2-container--default .select2-results__option .select2-results__option .select2-results__option { +    margin-left: -1em; +    padding-left: 2em; } +    .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option { +      margin-left: -2em; +      padding-left: 3em; } +      .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option { +        margin-left: -3em; +        padding-left: 4em; } +        .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option { +          margin-left: -4em; +          padding-left: 5em; } +          .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option { +            margin-left: -5em; +            padding-left: 6em; } + +.select2-container--default .select2-results__option--highlighted[aria-selected] { +  background-color: #5897fb; +  color: white; } + +.select2-container--default .select2-results__group {    cursor: default; -} - -.select2-results .select2-selected { -    display: none; -} +  display: block; +  padding: 6px; } + +.select2-container--classic .select2-selection--single { +  background-color: #f7f7f7; +  border: 1px solid #aaa; +  border-radius: 4px; +  outline: 0; +  background-image: -webkit-linear-gradient(top, white 50%, #eeeeee 100%); +  background-image: -o-linear-gradient(top, white 50%, #eeeeee 100%); +  background-image: linear-gradient(to bottom, white 50%, #eeeeee 100%); +  background-repeat: repeat-x; +  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); } +  .select2-container--classic .select2-selection--single:focus { +    border: 1px solid #5897fb; } +  .select2-container--classic .select2-selection--single .select2-selection__rendered { +    color: #444; +    line-height: 28px; } +  .select2-container--classic .select2-selection--single .select2-selection__clear { +    cursor: pointer; +    float: right; +    font-weight: bold; +    margin-right: 10px; } +  .select2-container--classic .select2-selection--single .select2-selection__placeholder { +    color: #999; } +  .select2-container--classic .select2-selection--single .select2-selection__arrow { +    background-color: #ddd; +    border: none; +    border-left: 1px solid #aaa; +    border-top-right-radius: 4px; +    border-bottom-right-radius: 4px; +    height: 26px; +    position: absolute; +    top: 1px; +    right: 1px; +    width: 20px; +    background-image: -webkit-linear-gradient(top, #eeeeee 50%, #cccccc 100%); +    background-image: -o-linear-gradient(top, #eeeeee 50%, #cccccc 100%); +    background-image: linear-gradient(to bottom, #eeeeee 50%, #cccccc 100%); +    background-repeat: repeat-x; +    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0); } +    .select2-container--classic .select2-selection--single .select2-selection__arrow b { +      border-color: #888 transparent transparent transparent; +      border-style: solid; +      border-width: 5px 4px 0 4px; +      height: 0; +      left: 50%; +      margin-left: -4px; +      margin-top: -2px; +      position: absolute; +      top: 50%; +      width: 0; } + +.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear { +  float: left; } + +.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow { +  border: none; +  border-right: 1px solid #aaa; +  border-radius: 0; +  border-top-left-radius: 4px; +  border-bottom-left-radius: 4px; +  left: 1px; +  right: auto; } + +.select2-container--classic.select2-container--open .select2-selection--single { +  border: 1px solid #5897fb; } +  .select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow { +    background: transparent; +    border: none; } +    .select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b { +      border-color: transparent transparent #888 transparent; +      border-width: 0 4px 5px 4px; } + +.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single { +  border-top: none; +  border-top-left-radius: 0; +  border-top-right-radius: 0; +  background-image: -webkit-linear-gradient(top, white 0%, #eeeeee 50%); +  background-image: -o-linear-gradient(top, white 0%, #eeeeee 50%); +  background-image: linear-gradient(to bottom, white 0%, #eeeeee 50%); +  background-repeat: repeat-x; +  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); } + +.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single { +  border-bottom: none; +  border-bottom-left-radius: 0; +  border-bottom-right-radius: 0; +  background-image: -webkit-linear-gradient(top, #eeeeee 50%, white 100%); +  background-image: -o-linear-gradient(top, #eeeeee 50%, white 100%); +  background-image: linear-gradient(to bottom, #eeeeee 50%, white 100%); +  background-repeat: repeat-x; +  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0); } + +.select2-container--classic .select2-selection--multiple { +  background-color: white; +  border: 1px solid #aaa; +  border-radius: 4px; +  cursor: text; +  outline: 0; } +  .select2-container--classic .select2-selection--multiple:focus { +    border: 1px solid #5897fb; } +  .select2-container--classic .select2-selection--multiple .select2-selection__rendered { +    list-style: none; +    margin: 0; +    padding: 0 5px; } +  .select2-container--classic .select2-selection--multiple .select2-selection__clear { +    display: none; } +  .select2-container--classic .select2-selection--multiple .select2-selection__choice { +    background-color: #e4e4e4; +    border: 1px solid #aaa; +    border-radius: 4px; +    cursor: default; +    float: left; +    margin-right: 5px; +    margin-top: 5px; +    padding: 0 5px; } +  .select2-container--classic .select2-selection--multiple .select2-selection__choice__remove { +    color: #888; +    cursor: pointer; +    display: inline-block; +    font-weight: bold; +    margin-right: 2px; } +    .select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover { +      color: #555; } -.select2-more-results.select2-active { -    background: #f4f4f4 url('select2-spinner.gif') no-repeat 100%; -} +.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice { +  float: right; } -.select2-results .select2-ajax-error { -    background: rgba(255, 50, 50, .2); -} +.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice { +  margin-left: 5px; +  margin-right: auto; } -.select2-more-results { -    background: #f4f4f4; -    display: list-item; -} +.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove { +  margin-left: 2px; +  margin-right: auto; } -/* disabled styles */ +.select2-container--classic.select2-container--open .select2-selection--multiple { +  border: 1px solid #5897fb; } -.select2-container.select2-container-disabled .select2-choice { -    background-color: #f4f4f4; -    background-image: none; -    border: 1px solid #ddd; -    cursor: default; -} +.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple { +  border-top: none; +  border-top-left-radius: 0; +  border-top-right-radius: 0; } -.select2-container.select2-container-disabled .select2-choice .select2-arrow { -    background-color: #f4f4f4; -    background-image: none; -    border-left: 0; -} +.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple { +  border-bottom: none; +  border-bottom-left-radius: 0; +  border-bottom-right-radius: 0; } -.select2-container.select2-container-disabled .select2-choice abbr { -    display: none; -} +.select2-container--classic .select2-search--dropdown .select2-search__field { +  border: 1px solid #aaa; +  outline: 0; } +.select2-container--classic .select2-search--inline .select2-search__field { +  outline: 0; +  box-shadow: none; } -/* multiselect */ +.select2-container--classic .select2-dropdown { +  background-color: white; +  border: 1px solid transparent; } -.select2-container-multi .select2-choices { -    height: auto !important; -    height: 1%; -    margin: 0; -    padding: 0 5px 0 0; -    position: relative; +.select2-container--classic .select2-dropdown--above { +  border-bottom: none; } -    border: 1px solid #aaa; -    cursor: text; -    overflow: hidden; - -    background-color: #fff; -    background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(1%, #eee), color-stop(15%, #fff)); -    background-image: -webkit-linear-gradient(top, #eee 1%, #fff 15%); -    background-image: -moz-linear-gradient(top, #eee 1%, #fff 15%); -    background-image: linear-gradient(to bottom, #eee 1%, #fff 15%); -} - -html[dir="rtl"] .select2-container-multi .select2-choices { -    padding: 0 0 0 5px; -} - -.select2-locked { -  padding: 3px 5px 3px 5px !important; -} - -.select2-container-multi .select2-choices { -    min-height: 26px; -} - -.select2-container-multi.select2-container-active .select2-choices { -    border: 1px solid #5897fb; -    outline: none; - -    -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, .3); -            box-shadow: 0 0 5px rgba(0, 0, 0, .3); -} -.select2-container-multi .select2-choices li { -    float: left; -    list-style: none; -} -html[dir="rtl"] .select2-container-multi .select2-choices li -{ -    float: right; -} -.select2-container-multi .select2-choices .select2-search-field { -    margin: 0; -    padding: 0; -    white-space: nowrap; -} - -.select2-container-multi .select2-choices .select2-search-field input { -    padding: 5px; -    margin: 1px 0; - -    font-family: sans-serif; -    font-size: 100%; -    color: #666; -    outline: 0; -    border: 0; -    -webkit-box-shadow: none; -            box-shadow: none; -    background: transparent !important; -} - -.select2-container-multi .select2-choices .select2-search-field input.select2-active { -    background: #fff url('select2-spinner.gif') no-repeat 100% !important; -} - -.select2-default { -    color: #999 !important; -} - -.select2-container-multi .select2-choices .select2-search-choice { -    padding: 3px 5px 3px 18px; -    margin: 3px 0 3px 5px; -    position: relative; - -    line-height: 13px; -    color: #333; -    cursor: default; -    border: 1px solid #aaaaaa; +.select2-container--classic .select2-dropdown--below { +  border-top: none; } -    border-radius: 3px; +.select2-container--classic .select2-results > .select2-results__options { +  max-height: 200px; +  overflow-y: auto; } -    -webkit-box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, 0.05); -            box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, 0.05); +.select2-container--classic .select2-results__option[role=group] { +  padding: 0; } -    background-clip: padding-box; +.select2-container--classic .select2-results__option[aria-disabled=true] { +  color: grey; } -    -webkit-touch-callout: none; -      -webkit-user-select: none; -         -moz-user-select: none; -          -ms-user-select: none; -              user-select: none; +.select2-container--classic .select2-results__option--highlighted[aria-selected] { +  background-color: #3875d7; +  color: white; } -    background-color: #e4e4e4; -    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#f4f4f4', GradientType=0); -    background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eee)); -    background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%); -    background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%); -    background-image: linear-gradient(to bottom, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%); -} -html[dir="rtl"] .select2-container-multi .select2-choices .select2-search-choice -{ -    margin: 3px 5px 3px 0; -    padding: 3px 18px 3px 5px; -} -.select2-container-multi .select2-choices .select2-search-choice .select2-chosen { -    cursor: default; -} -.select2-container-multi .select2-choices .select2-search-choice-focus { -    background: #d4d4d4; -} +.select2-container--classic .select2-results__group { +  cursor: default; +  display: block; +  padding: 6px; } -.select2-search-choice-close { -    display: block; -    width: 12px; -    height: 13px; -    position: absolute; -    right: 3px; -    top: 4px; - -    font-size: 1px; -    outline: none; -    background: url('select2.png') right top no-repeat; -} -html[dir="rtl"] .select2-search-choice-close { -    right: auto; -    left: 3px; -} - -.select2-container-multi .select2-search-choice-close { -    left: 3px; -} - -html[dir="rtl"] .select2-container-multi .select2-search-choice-close { -    left: auto; -    right: 2px; -} - -.select2-container-multi .select2-choices .select2-search-choice .select2-search-choice-close:hover { -  background-position: right -11px; -} -.select2-container-multi .select2-choices .select2-search-choice-focus .select2-search-choice-close { -    background-position: right -11px; -} - -/* disabled styles */ -.select2-container-multi.select2-container-disabled .select2-choices { -    background-color: #f4f4f4; -    background-image: none; -    border: 1px solid #ddd; -    cursor: default; -} - -.select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice { -    padding: 3px 5px 3px 5px; -    border: 1px solid #ddd; -    background-image: none; -    background-color: #f4f4f4; -} - -.select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice .select2-search-choice-close {    display: none; -    background: none; -} -/* end multiselect */ - - -.select2-result-selectable .select2-match, -.select2-result-unselectable .select2-match { -    text-decoration: underline; -} - -.select2-offscreen, .select2-offscreen:focus { -    clip: rect(0 0 0 0) !important; -    width: 1px !important; -    height: 1px !important; -    border: 0 !important; -    margin: 0 !important; -    padding: 0 !important; -    overflow: hidden !important; -    position: absolute !important; -    outline: 0 !important; -    left: 0px !important; -    top: 0px !important; -} - -.select2-display-none { -    display: none; -} - -.select2-measure-scrollbar { -    position: absolute; -    top: -10000px; -    left: -10000px; -    width: 100px; -    height: 100px; -    overflow: scroll; -} - -/* Retina-ize icons */ - -@media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-resolution: 2dppx)  { -    .select2-search input, -    .select2-search-choice-close, -    .select2-container .select2-choice abbr, -    .select2-container .select2-choice .select2-arrow b { -        background-image: url('select2x2.png') !important; -        background-repeat: no-repeat !important; -        background-size: 60px 40px !important; -    } - -    .select2-search input { -        background-position: 100% -21px !important; -    } -} +.select2-container--classic.select2-container--open .select2-dropdown { +  border-color: #5897fb; } diff --git a/ishtar_common/static/select2/css/select2.min.css b/ishtar_common/static/select2/css/select2.min.css new file mode 100644 index 000000000..76de04d92 --- /dev/null +++ b/ishtar_common/static/select2/css/select2.min.css @@ -0,0 +1 @@ +.select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle}.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:28px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding-left:8px;padding-right:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered{padding-right:8px;padding-left:20px}.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:32px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-block;overflow:hidden;padding-left:8px;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-search--inline{float:left}.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;padding:0}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{background-color:white;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;display:block;position:absolute;left:-100000px;width:100%;z-index:1051}.select2-results{display:block}.select2-results__options{list-style:none;margin:0;padding:0}.select2-results__option{padding:6px;user-select:none;-webkit-user-select:none}.select2-results__option[aria-selected]{cursor:pointer}.select2-container--open .select2-dropdown{left:0}.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background-color:#fff;filter:alpha(opacity=0)}.select2-hidden-accessible{border:0 !important;clip:rect(0 0 0 0) !important;height:1px !important;margin:-1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important}.select2-container--default .select2-selection--single{background-color:#fff;border:1px solid #aaa;border-radius:4px}.select2-container--default .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--default .select2-selection--single .select2-selection__arrow{height:26px;position:absolute;top:1px;right:1px;width:20px}.select2-container--default .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow{left:1px;right:auto}.select2-container--default.select2-container--disabled .select2-selection--single{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--default .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text}.select2-container--default .select2-selection--multiple .select2-selection__rendered{box-sizing:border-box;list-style:none;margin:0;padding:0 5px;width:100%}.select2-container--default .select2-selection--multiple .select2-selection__rendered li{list-style:none}.select2-container--default .select2-selection--multiple .select2-selection__placeholder{color:#999;margin-top:5px;float:left}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-top:5px;margin-right:10px}.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{color:#999;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:#333}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline{float:right}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--default.select2-container--focus .select2-selection--multiple{border:solid black 1px;outline:0}.select2-container--default.select2-container--disabled .select2-selection--multiple{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection__choice__remove{display:none}.select2-container--default.select2-container--open.select2-container--above .select2-selection--single,.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple{border-top-left-radius:0;border-top-right-radius:0}.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid #aaa}.select2-container--default .select2-search--inline .select2-search__field{background:transparent;border:none;outline:0;box-shadow:none;-webkit-appearance:textfield}.select2-container--default .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--default .select2-results__option[role=group]{padding:0}.select2-container--default .select2-results__option[aria-disabled=true]{color:#999}.select2-container--default .select2-results__option[aria-selected=true]{background-color:#ddd}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--default .select2-results__option--highlighted[aria-selected]{background-color:#5897fb;color:white}.select2-container--default .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic .select2-selection--single{background-color:#f7f7f7;border:1px solid #aaa;border-radius:4px;outline:0;background-image:-webkit-linear-gradient(top, #fff 50%, #eee 100%);background-image:-o-linear-gradient(top, #fff 50%, #eee 100%);background-image:linear-gradient(to bottom, #fff 50%, #eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic .select2-selection--single:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--classic .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-right:10px}.select2-container--classic .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--classic .select2-selection--single .select2-selection__arrow{background-color:#ddd;border:none;border-left:1px solid #aaa;border-top-right-radius:4px;border-bottom-right-radius:4px;height:26px;position:absolute;top:1px;right:1px;width:20px;background-image:-webkit-linear-gradient(top, #eee 50%, #ccc 100%);background-image:-o-linear-gradient(top, #eee 50%, #ccc 100%);background-image:linear-gradient(to bottom, #eee 50%, #ccc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0)}.select2-container--classic .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow{border:none;border-right:1px solid #aaa;border-radius:0;border-top-left-radius:4px;border-bottom-left-radius:4px;left:1px;right:auto}.select2-container--classic.select2-container--open .select2-selection--single{border:1px solid #5897fb}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow{background:transparent;border:none}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single{border-top:none;border-top-left-radius:0;border-top-right-radius:0;background-image:-webkit-linear-gradient(top, #fff 0%, #eee 50%);background-image:-o-linear-gradient(top, #fff 0%, #eee 50%);background-image:linear-gradient(to bottom, #fff 0%, #eee 50%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;background-image:-webkit-linear-gradient(top, #eee 50%, #fff 100%);background-image:-o-linear-gradient(top, #eee 50%, #fff 100%);background-image:linear-gradient(to bottom, #eee 50%, #fff 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0)}.select2-container--classic .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text;outline:0}.select2-container--classic .select2-selection--multiple:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--multiple .select2-selection__rendered{list-style:none;margin:0;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__clear{display:none}.select2-container--classic .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove{color:#888;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover{color:#555}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{float:right}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--classic.select2-container--open .select2-selection--multiple{border:1px solid #5897fb}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--classic .select2-search--dropdown .select2-search__field{border:1px solid #aaa;outline:0}.select2-container--classic .select2-search--inline .select2-search__field{outline:0;box-shadow:none}.select2-container--classic .select2-dropdown{background-color:#fff;border:1px solid transparent}.select2-container--classic .select2-dropdown--above{border-bottom:none}.select2-container--classic .select2-dropdown--below{border-top:none}.select2-container--classic .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--classic .select2-results__option[role=group]{padding:0}.select2-container--classic .select2-results__option[aria-disabled=true]{color:grey}.select2-container--classic .select2-results__option--highlighted[aria-selected]{background-color:#3875d7;color:#fff}.select2-container--classic .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic.select2-container--open .select2-dropdown{border-color:#5897fb} diff --git a/ishtar_common/static/select2/css/select2.png b/ishtar_common/static/select2/css/select2.png Binary files differdeleted file mode 100644 index 1d804ffb9..000000000 --- a/ishtar_common/static/select2/css/select2.png +++ /dev/null diff --git a/ishtar_common/static/select2/css/select2x2.png b/ishtar_common/static/select2/css/select2x2.png Binary files differdeleted file mode 100644 index 4bdd5c961..000000000 --- a/ishtar_common/static/select2/css/select2x2.png +++ /dev/null diff --git a/ishtar_common/static/select2/js/i18n/ar.js b/ishtar_common/static/select2/js/i18n/ar.js new file mode 100644 index 000000000..01a688294 --- /dev/null +++ b/ishtar_common/static/select2/js/i18n/ar.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ar",[],function(){return{errorLoading:function(){return"لا يمكن تحميل النتائج"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="الرجاء حذف "+t+" عناصر";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="الرجاء إضافة "+t+" عناصر";return n},loadingMore:function(){return"جاري تحميل نتائج إضافية..."},maximumSelected:function(e){var t="تستطيع إختيار "+e.maximum+" بنود فقط";return t},noResults:function(){return"لم يتم العثور على أي نتائج"},searching:function(){return"جاري البحث…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file diff --git a/ishtar_common/static/select2/js/i18n/az.js b/ishtar_common/static/select2/js/i18n/az.js new file mode 100644 index 000000000..2accb973f --- /dev/null +++ b/ishtar_common/static/select2/js/i18n/az.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/az",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return t+" simvol silin"},inputTooShort:function(e){var t=e.minimum-e.input.length;return t+" simvol daxil edin"},loadingMore:function(){return"Daha çox nəticə yüklənir…"},maximumSelected:function(e){return"Sadəcə "+e.maximum+" element seçə bilərsiniz"},noResults:function(){return"Nəticə tapılmadı"},searching:function(){return"Axtarılır…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file diff --git a/ishtar_common/static/select2/js/i18n/bg.js b/ishtar_common/static/select2/js/i18n/bg.js new file mode 100644 index 000000000..35ae98944 --- /dev/null +++ b/ishtar_common/static/select2/js/i18n/bg.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/bg",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Моля въведете с "+t+" по-малко символ";return t>1&&(n+="a"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Моля въведете още "+t+" символ";return t>1&&(n+="a"),n},loadingMore:function(){return"Зареждат се още…"},maximumSelected:function(e){var t="Можете да направите до "+e.maximum+" ";return e.maximum>1?t+="избора":t+="избор",t},noResults:function(){return"Няма намерени съвпадения"},searching:function(){return"Търсене…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file diff --git a/ishtar_common/static/select2/js/i18n/ca.js b/ishtar_common/static/select2/js/i18n/ca.js new file mode 100644 index 000000000..fdb5f3d2a --- /dev/null +++ b/ishtar_common/static/select2/js/i18n/ca.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ca",[],function(){return{errorLoading:function(){return"La càrrega ha fallat"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Si us plau, elimina "+t+" car";return t==1?n+="àcter":n+="àcters",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Si us plau, introdueix "+t+" car";return t==1?n+="àcter":n+="àcters",n},loadingMore:function(){return"Carregant més resultats…"},maximumSelected:function(e){var t="Només es pot seleccionar "+e.maximum+" element";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"No s'han trobat resultats"},searching:function(){return"Cercant…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file diff --git a/ishtar_common/static/select2/js/i18n/cs.js b/ishtar_common/static/select2/js/i18n/cs.js new file mode 100644 index 000000000..9651378a6 --- /dev/null +++ b/ishtar_common/static/select2/js/i18n/cs.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/cs",[],function(){function e(e,t){switch(e){case 2:return t?"dva":"dvě";case 3:return"tři";case 4:return"čtyři"}return""}return{errorLoading:function(){return"Výsledky nemohly být načteny."},inputTooLong:function(t){var n=t.input.length-t.maximum;return n==1?"Prosím zadejte o jeden znak méně":n<=4?"Prosím zadejte o "+e(n,!0)+" znaky méně":"Prosím zadejte o "+n+" znaků méně"},inputTooShort:function(t){var n=t.minimum-t.input.length;return n==1?"Prosím zadejte ještě jeden znak":n<=4?"Prosím zadejte ještě další "+e(n,!0)+" znaky":"Prosím zadejte ještě dalších "+n+" znaků"},loadingMore:function(){return"Načítají se další výsledky…"},maximumSelected:function(t){var n=t.maximum;return n==1?"Můžete zvolit jen jednu položku":n<=4?"Můžete zvolit maximálně "+e(n,!1)+" položky":"Můžete zvolit maximálně "+n+" položek"},noResults:function(){return"Nenalezeny žádné položky"},searching:function(){return"Vyhledávání…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file diff --git a/ishtar_common/static/select2/js/i18n/da.js b/ishtar_common/static/select2/js/i18n/da.js new file mode 100644 index 000000000..501c51e93 --- /dev/null +++ b/ishtar_common/static/select2/js/i18n/da.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/da",[],function(){return{errorLoading:function(){return"Resultaterne kunne ikke indlæses."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Angiv venligst "+t+" tegn mindre";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Angiv venligst "+t+" tegn mere";return n},loadingMore:function(){return"Indlæser flere resultater…"},maximumSelected:function(e){var t="Du kan kun vælge "+e.maximum+" emne";return e.maximum!=1&&(t+="r"),t},noResults:function(){return"Ingen resultater fundet"},searching:function(){return"Søger…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file diff --git a/ishtar_common/static/select2/js/i18n/de.js b/ishtar_common/static/select2/js/i18n/de.js new file mode 100644 index 000000000..9a6d55366 --- /dev/null +++ b/ishtar_common/static/select2/js/i18n/de.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/de",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return"Bitte "+t+" Zeichen weniger eingeben"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Bitte "+t+" Zeichen mehr eingeben"},loadingMore:function(){return"Lade mehr Ergebnisse…"},maximumSelected:function(e){var t="Sie können nur "+e.maximum+" Eintr";return e.maximum===1?t+="ag":t+="äge",t+=" auswählen",t},noResults:function(){return"Keine Übereinstimmungen gefunden"},searching:function(){return"Suche…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file diff --git a/ishtar_common/static/select2/js/i18n/el.js b/ishtar_common/static/select2/js/i18n/el.js new file mode 100644 index 000000000..4735d1405 --- /dev/null +++ b/ishtar_common/static/select2/js/i18n/el.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/el",[],function(){return{errorLoading:function(){return"Τα αποτελέσματα δεν μπόρεσαν να φορτώσουν."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Παρακαλώ διαγράψτε "+t+" χαρακτήρ";return t==1&&(n+="α"),t!=1&&(n+="ες"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Παρακαλώ συμπληρώστε "+t+" ή περισσότερους χαρακτήρες";return n},loadingMore:function(){return"Φόρτωση περισσότερων αποτελεσμάτων…"},maximumSelected:function(e){var t="Μπορείτε να επιλέξετε μόνο "+e.maximum+" επιλογ";return e.maximum==1&&(t+="ή"),e.maximum!=1&&(t+="ές"),t},noResults:function(){return"Δεν βρέθηκαν αποτελέσματα"},searching:function(){return"Αναζήτηση…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file diff --git a/ishtar_common/static/select2/js/i18n/en.js b/ishtar_common/static/select2/js/i18n/en.js new file mode 100644 index 000000000..8e80ede8d --- /dev/null +++ b/ishtar_common/static/select2/js/i18n/en.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Please delete "+t+" character";return t!=1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Please enter "+t+" or more characters";return n},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file diff --git a/ishtar_common/static/select2/js/i18n/es.js b/ishtar_common/static/select2/js/i18n/es.js new file mode 100644 index 000000000..0a096502d --- /dev/null +++ b/ishtar_common/static/select2/js/i18n/es.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/es",[],function(){return{errorLoading:function(){return"La carga falló"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Por favor, elimine "+t+" car";return t==1?n+="ácter":n+="acteres",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Por favor, introduzca "+t+" car";return t==1?n+="ácter":n+="acteres",n},loadingMore:function(){return"Cargando más resultados…"},maximumSelected:function(e){var t="Sólo puede seleccionar "+e.maximum+" elemento";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"No se encontraron resultados"},searching:function(){return"Buscando…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file diff --git a/ishtar_common/static/select2/js/i18n/et.js b/ishtar_common/static/select2/js/i18n/et.js new file mode 100644 index 000000000..c70f4a5b3 --- /dev/null +++ b/ishtar_common/static/select2/js/i18n/et.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/et",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Sisesta "+t+" täht";return t!=1&&(n+="e"),n+=" vähem",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Sisesta "+t+" täht";return t!=1&&(n+="e"),n+=" rohkem",n},loadingMore:function(){return"Laen tulemusi…"},maximumSelected:function(e){var t="Saad vaid "+e.maximum+" tulemus";return e.maximum==1?t+="e":t+="t",t+=" valida",t},noResults:function(){return"Tulemused puuduvad"},searching:function(){return"Otsin…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file diff --git a/ishtar_common/static/select2/js/i18n/eu.js b/ishtar_common/static/select2/js/i18n/eu.js new file mode 100644 index 000000000..9336053a7 --- /dev/null +++ b/ishtar_common/static/select2/js/i18n/eu.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/eu",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Idatzi ";return t==1?n+="karaktere bat":n+=t+" karaktere",n+=" gutxiago",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Idatzi ";return t==1?n+="karaktere bat":n+=t+" karaktere",n+=" gehiago",n},loadingMore:function(){return"Emaitza gehiago kargatzen…"},maximumSelected:function(e){return e.maximum===1?"Elementu bakarra hauta dezakezu":e.maximum+" elementu hauta ditzakezu soilik"},noResults:function(){return"Ez da bat datorrenik aurkitu"},searching:function(){return"Bilatzen…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file diff --git a/ishtar_common/static/select2/js/i18n/fa.js b/ishtar_common/static/select2/js/i18n/fa.js new file mode 100644 index 000000000..5118cd28f --- /dev/null +++ b/ishtar_common/static/select2/js/i18n/fa.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/fa",[],function(){return{errorLoading:function(){return"امکان بارگذاری نتایج وجود ندارد."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="لطفاً "+t+" کاراکتر را حذف نمایید";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="لطفاً تعداد "+t+" کاراکتر یا بیشتر وارد نمایید";return n},loadingMore:function(){return"در حال بارگذاری نتایج بیشتر..."},maximumSelected:function(e){var t="شما تنها میتوانید "+e.maximum+" آیتم را انتخاب نمایید";return t},noResults:function(){return"هیچ نتیجهای یافت نشد"},searching:function(){return"در حال جستجو..."}}}),{define:e.define,require:e.require}})();
\ No newline at end of file diff --git a/ishtar_common/static/select2/js/i18n/fi.js b/ishtar_common/static/select2/js/i18n/fi.js new file mode 100644 index 000000000..9e60f26a0 --- /dev/null +++ b/ishtar_common/static/select2/js/i18n/fi.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/fi",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return"Ole hyvä ja anna "+t+" merkkiä vähemmän"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Ole hyvä ja anna "+t+" merkkiä lisää"},loadingMore:function(){return"Ladataan lisää tuloksia…"},maximumSelected:function(e){return"Voit valita ainoastaan "+e.maximum+" kpl"},noResults:function(){return"Ei tuloksia"},searching:function(){}}}),{define:e.define,require:e.require}})();
\ No newline at end of file diff --git a/ishtar_common/static/select2/js/i18n/fr.js b/ishtar_common/static/select2/js/i18n/fr.js new file mode 100644 index 000000000..e4a665009 --- /dev/null +++ b/ishtar_common/static/select2/js/i18n/fr.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/fr",[],function(){return{errorLoading:function(){return"Les résultats ne peuvent pas être chargés."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Supprimez "+t+" caractère";return t!==1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Saisissez "+t+" caractère";return t!==1&&(n+="s"),n},loadingMore:function(){return"Chargement de résultats supplémentaires…"},maximumSelected:function(e){var t="Vous pouvez seulement sélectionner "+e.maximum+" élément";return e.maximum!==1&&(t+="s"),t},noResults:function(){return"Aucun résultat trouvé"},searching:function(){return"Recherche en cours…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file diff --git a/ishtar_common/static/select2/js/i18n/gl.js b/ishtar_common/static/select2/js/i18n/gl.js new file mode 100644 index 000000000..02f258f92 --- /dev/null +++ b/ishtar_common/static/select2/js/i18n/gl.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/gl",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Elimine ";return t===1?n+="un carácter":n+=t+" caracteres",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Engada ";return t===1?n+="un carácter":n+=t+" caracteres",n},loadingMore:function(){return"Cargando máis resultados…"},maximumSelected:function(e){var t="Só pode ";return e.maximum===1?t+="un elemento":t+=e.maximum+" elementos",t},noResults:function(){return"Non se atoparon resultados"},searching:function(){return"Buscando…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file diff --git a/ishtar_common/static/select2/js/i18n/he.js b/ishtar_common/static/select2/js/i18n/he.js new file mode 100644 index 000000000..881f8d389 --- /dev/null +++ b/ishtar_common/static/select2/js/i18n/he.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/he",[],function(){return{errorLoading:function(){return"שגיאה בטעינת התוצאות"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="נא למחוק ";return t===1?n+="תו אחד":n+=t+" תווים",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="נא להכניס ";return t===1?n+="תו אחד":n+=t+" תווים",n+=" או יותר",n},loadingMore:function(){return"טוען תוצאות נוספות…"},maximumSelected:function(e){var t="באפשרותך לבחור עד ";return e.maximum===1?t+="פריט אחד":t+=e.maximum+" פריטים",t},noResults:function(){return"לא נמצאו תוצאות"},searching:function(){return"מחפש…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file diff --git a/ishtar_common/static/select2/js/i18n/hi.js b/ishtar_common/static/select2/js/i18n/hi.js new file mode 100644 index 000000000..e82968426 --- /dev/null +++ b/ishtar_common/static/select2/js/i18n/hi.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hi",[],function(){return{errorLoading:function(){return"परिणामों को लोड नहीं किया जा सका।"},inputTooLong:function(e){var t=e.input.length-e.maximum,n=t+" अक्षर को हटा दें";return t>1&&(n=t+" अक्षरों को हटा दें "),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="कृपया "+t+" या अधिक अक्षर दर्ज करें";return n},loadingMore:function(){return"अधिक परिणाम लोड हो रहे है..."},maximumSelected:function(e){var t="आप केवल "+e.maximum+" आइटम का चयन कर सकते हैं";return t},noResults:function(){return"कोई परिणाम नहीं मिला"},searching:function(){return"खोज रहा है..."}}}),{define:e.define,require:e.require}})();
\ No newline at end of file diff --git a/ishtar_common/static/select2/js/i18n/hr.js b/ishtar_common/static/select2/js/i18n/hr.js new file mode 100644 index 000000000..89f7b12bf --- /dev/null +++ b/ishtar_common/static/select2/js/i18n/hr.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hr",[],function(){function e(e){var t=" "+e+" znak";return e%10<5&&e%10>0&&(e%100<5||e%100>19)?e%10>1&&(t+="a"):t+="ova",t}return{errorLoading:function(){return"Preuzimanje nije uspjelo."},inputTooLong:function(t){var n=t.input.length-t.maximum;return"Unesite "+e(n)},inputTooShort:function(t){var n=t.minimum-t.input.length;return"Unesite još "+e(n)},loadingMore:function(){return"Učitavanje rezultata…"},maximumSelected:function(e){return"Maksimalan broj odabranih stavki je "+e.maximum},noResults:function(){return"Nema rezultata"},searching:function(){return"Pretraga…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file diff --git a/ishtar_common/static/select2/js/i18n/hu.js b/ishtar_common/static/select2/js/i18n/hu.js new file mode 100644 index 000000000..74c8a90de --- /dev/null +++ b/ishtar_common/static/select2/js/i18n/hu.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hu",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return"Túl hosszú. "+t+" karakterrel több, mint kellene."},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Túl rövid. Még "+t+" karakter hiányzik."},loadingMore:function(){return"Töltés…"},maximumSelected:function(e){return"Csak "+e.maximum+" elemet lehet kiválasztani."},noResults:function(){return"Nincs találat."},searching:function(){return"Keresés…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file diff --git a/ishtar_common/static/select2/js/i18n/id.js b/ishtar_common/static/select2/js/i18n/id.js new file mode 100644 index 000000000..958678261 --- /dev/null +++ b/ishtar_common/static/select2/js/i18n/id.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/id",[],function(){return{errorLoading:function(){return"Data tidak boleh diambil."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Hapuskan "+t+" huruf"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Masukkan "+t+" huruf lagi"},loadingMore:function(){return"Mengambil data…"},maximumSelected:function(e){return"Anda hanya dapat memilih "+e.maximum+" pilihan"},noResults:function(){return"Tidak ada data yang sesuai"},searching:function(){return"Mencari…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file diff --git a/ishtar_common/static/select2/js/i18n/is.js b/ishtar_common/static/select2/js/i18n/is.js new file mode 100644 index 000000000..ab97a14d1 --- /dev/null +++ b/ishtar_common/static/select2/js/i18n/is.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/is",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vinsamlegast styttið texta um "+t+" staf";return t<=1?n:n+"i"},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vinsamlegast skrifið "+t+" staf";return t>1&&(n+="i"),n+=" í viðbót",n},loadingMore:function(){return"Sæki fleiri niðurstöður…"},maximumSelected:function(e){return"Þú getur aðeins valið "+e.maximum+" atriði"},noResults:function(){return"Ekkert fannst"},searching:function(){return"Leita…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file diff --git a/ishtar_common/static/select2/js/i18n/it.js b/ishtar_common/static/select2/js/i18n/it.js new file mode 100644 index 000000000..7796b9f76 --- /dev/null +++ b/ishtar_common/static/select2/js/i18n/it.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/it",[],function(){return{errorLoading:function(){return"I risultati non possono essere caricati."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Per favore cancella "+t+" caratter";return t!==1?n+="i":n+="e",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Per favore inserisci "+t+" o più caratteri";return n},loadingMore:function(){return"Caricando più risultati…"},maximumSelected:function(e){var t="Puoi selezionare solo "+e.maximum+" element";return e.maximum!==1?t+="i":t+="o",t},noResults:function(){return"Nessun risultato trovato"},searching:function(){return"Sto cercando…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file diff --git a/ishtar_common/static/select2/js/i18n/ja.js b/ishtar_common/static/select2/js/i18n/ja.js new file mode 100644 index 000000000..9f4fff6cb --- /dev/null +++ b/ishtar_common/static/select2/js/i18n/ja.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ja",[],function(){return{errorLoading:function(){return"結果が読み込まれませんでした"},inputTooLong:function(e){var t=e.input.length-e.maximum,n=t+" 文字を削除してください";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="少なくとも "+t+" 文字を入力してください";return n},loadingMore:function(){return"読み込み中…"},maximumSelected:function(e){var t=e.maximum+" 件しか選択できません";return t},noResults:function(){return"対象が見つかりません"},searching:function(){return"検索しています…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file diff --git a/ishtar_common/static/select2/js/i18n/km.js b/ishtar_common/static/select2/js/i18n/km.js new file mode 100644 index 000000000..8e94adcf3 --- /dev/null +++ b/ishtar_common/static/select2/js/i18n/km.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/km",[],function(){return{errorLoading:function(){return"មិនអាចទាញយកទិន្នន័យ"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="សូមលុបចេញ  "+t+" អក្សរ";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="សូមបញ្ចូល"+t+" អក្សរ រឺ ច្រើនជាងនេះ";return n},loadingMore:function(){return"កំពុងទាញយកទិន្នន័យបន្ថែម..."},maximumSelected:function(e){var t="អ្នកអាចជ្រើសរើសបានតែ "+e.maximum+" ជម្រើសប៉ុណ្ណោះ";return t},noResults:function(){return"មិនមានលទ្ធផល"},searching:function(){return"កំពុងស្វែងរក..."}}}),{define:e.define,require:e.require}})();
\ No newline at end of file diff --git a/ishtar_common/static/select2/js/i18n/ko.js b/ishtar_common/static/select2/js/i18n/ko.js new file mode 100644 index 000000000..4ed03215f --- /dev/null +++ b/ishtar_common/static/select2/js/i18n/ko.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ko",[],function(){return{errorLoading:function(){return"결과를 불러올 수 없습니다."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="너무 깁니다. "+t+" 글자 지워주세요.";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="너무 짧습니다. "+t+" 글자 더 입력해주세요.";return n},loadingMore:function(){return"불러오는 중…"},maximumSelected:function(e){var t="최대 "+e.maximum+"개까지만 선택 가능합니다.";return t},noResults:function(){return"결과가 없습니다."},searching:function(){return"검색 중…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file diff --git a/ishtar_common/static/select2/js/i18n/lt.js b/ishtar_common/static/select2/js/i18n/lt.js new file mode 100644 index 000000000..05f3a6e5e --- /dev/null +++ b/ishtar_common/static/select2/js/i18n/lt.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/lt",[],function(){function e(e,t,n,r){return e%10===1&&(e%100<11||e%100>19)?t:e%10>=2&&e%10<=9&&(e%100<11||e%100>19)?n:r}return{inputTooLong:function(t){var n=t.input.length-t.maximum,r="Pašalinkite "+n+" simbol";return r+=e(n,"į","ius","ių"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Įrašykite dar "+n+" simbol";return r+=e(n,"į","ius","ių"),r},loadingMore:function(){return"Kraunama daugiau rezultatų…"},maximumSelected:function(t){var n="Jūs galite pasirinkti tik "+t.maximum+" element";return n+=e(t.maximum,"ą","us","ų"),n},noResults:function(){return"Atitikmenų nerasta"},searching:function(){return"Ieškoma…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file diff --git a/ishtar_common/static/select2/js/i18n/lv.js b/ishtar_common/static/select2/js/i18n/lv.js new file mode 100644 index 000000000..df8ee9423 --- /dev/null +++ b/ishtar_common/static/select2/js/i18n/lv.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/lv",[],function(){function e(e,t,n,r){return e===11?t:e%10===1?n:r}return{inputTooLong:function(t){var n=t.input.length-t.maximum,r="Lūdzu ievadiet par  "+n;return r+=" simbol"+e(n,"iem","u","iem"),r+" mazāk"},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Lūdzu ievadiet vēl "+n;return r+=" simbol"+e(n,"us","u","us"),r},loadingMore:function(){return"Datu ielāde…"},maximumSelected:function(t){var n="Jūs varat izvēlēties ne vairāk kā "+t.maximum;return n+=" element"+e(t.maximum,"us","u","us"),n},noResults:function(){return"Sakritību nav"},searching:function(){return"Meklēšana…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file diff --git a/ishtar_common/static/select2/js/i18n/mk.js b/ishtar_common/static/select2/js/i18n/mk.js new file mode 100644 index 000000000..319ecca14 --- /dev/null +++ b/ishtar_common/static/select2/js/i18n/mk.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/mk",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Ве молиме внесете "+e.maximum+" помалку карактер";return e.maximum!==1&&(n+="и"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Ве молиме внесете уште "+e.maximum+" карактер";return e.maximum!==1&&(n+="и"),n},loadingMore:function(){return"Вчитување резултати…"},maximumSelected:function(e){var t="Можете да изберете само "+e.maximum+" ставк";return e.maximum===1?t+="а":t+="и",t},noResults:function(){return"Нема пронајдено совпаѓања"},searching:function(){return"Пребарување…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file diff --git a/ishtar_common/static/select2/js/i18n/ms.js b/ishtar_common/static/select2/js/i18n/ms.js new file mode 100644 index 000000000..4258f125b --- /dev/null +++ b/ishtar_common/static/select2/js/i18n/ms.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ms",[],function(){return{errorLoading:function(){return"Keputusan tidak berjaya dimuatkan."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Sila hapuskan "+t+" aksara"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Sila masukkan "+t+" atau lebih aksara"},loadingMore:function(){return"Sedang memuatkan keputusan…"},maximumSelected:function(e){return"Anda hanya boleh memilih "+e.maximum+" pilihan"},noResults:function(){return"Tiada padanan yang ditemui"},searching:function(){return"Mencari…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file diff --git a/ishtar_common/static/select2/js/i18n/nb.js b/ishtar_common/static/select2/js/i18n/nb.js new file mode 100644 index 000000000..6770087ce --- /dev/null +++ b/ishtar_common/static/select2/js/i18n/nb.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/nb",[],function(){return{errorLoading:function(){return"Kunne ikke hente resultater."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Vennligst fjern "+t+" tegn"},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vennligst skriv inn ";return t>1?n+=" flere tegn":n+=" tegn til",n},loadingMore:function(){return"Laster flere resultater…"},maximumSelected:function(e){return"Du kan velge maks "+e.maximum+" elementer"},noResults:function(){return"Ingen treff"},searching:function(){return"Søker…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file diff --git a/ishtar_common/static/select2/js/i18n/nl.js b/ishtar_common/static/select2/js/i18n/nl.js new file mode 100644 index 000000000..8bd5e3cf4 --- /dev/null +++ b/ishtar_common/static/select2/js/i18n/nl.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/nl",[],function(){return{errorLoading:function(){return"De resultaten konden niet worden geladen."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Gelieve "+t+" karakters te verwijderen";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Gelieve "+t+" of meer karakters in te voeren";return n},loadingMore:function(){return"Meer resultaten laden…"},maximumSelected:function(e){var t=e.maximum==1?"kan":"kunnen",n="Er "+t+" maar "+e.maximum+" item";return e.maximum!=1&&(n+="s"),n+=" worden geselecteerd",n},noResults:function(){return"Geen resultaten gevonden…"},searching:function(){return"Zoeken…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file diff --git a/ishtar_common/static/select2/js/i18n/pl.js b/ishtar_common/static/select2/js/i18n/pl.js new file mode 100644 index 000000000..54ba28e9b --- /dev/null +++ b/ishtar_common/static/select2/js/i18n/pl.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/pl",[],function(){var e=["znak","znaki","znaków"],t=["element","elementy","elementów"],n=function(t,n){if(t===1)return n[0];if(t>1&&t<=4)return n[1];if(t>=5)return n[2]};return{errorLoading:function(){return"Nie można załadować wyników."},inputTooLong:function(t){var r=t.input.length-t.maximum;return"Usuń "+r+" "+n(r,e)},inputTooShort:function(t){var r=t.minimum-t.input.length;return"Podaj przynajmniej "+r+" "+n(r,e)},loadingMore:function(){return"Trwa ładowanie…"},maximumSelected:function(e){return"Możesz zaznaczyć tylko "+e.maximum+" "+n(e.maximum,t)},noResults:function(){return"Brak wyników"},searching:function(){return"Trwa wyszukiwanie…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file diff --git a/ishtar_common/static/select2/js/i18n/pt-BR.js b/ishtar_common/static/select2/js/i18n/pt-BR.js new file mode 100644 index 000000000..a6629c8ae --- /dev/null +++ b/ishtar_common/static/select2/js/i18n/pt-BR.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/pt-BR",[],function(){return{errorLoading:function(){return"Os resultados não puderam ser carregados."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Apague "+t+" caracter";return t!=1&&(n+="es"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Digite "+t+" ou mais caracteres";return n},loadingMore:function(){return"Carregando mais resultados…"},maximumSelected:function(e){var t="Você só pode selecionar "+e.maximum+" ite";return e.maximum==1?t+="m":t+="ns",t},noResults:function(){return"Nenhum resultado encontrado"},searching:function(){return"Buscando…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file diff --git a/ishtar_common/static/select2/js/i18n/pt.js b/ishtar_common/static/select2/js/i18n/pt.js new file mode 100644 index 000000000..0cbda561b --- /dev/null +++ b/ishtar_common/static/select2/js/i18n/pt.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/pt",[],function(){return{errorLoading:function(){return"Os resultados não puderam ser carregados."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Por favor apague "+t+" ";return n+=t!=1?"caracteres":"carácter",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Introduza "+t+" ou mais caracteres";return n},loadingMore:function(){return"A carregar mais resultados…"},maximumSelected:function(e){var t="Apenas pode seleccionar "+e.maximum+" ";return t+=e.maximum!=1?"itens":"item",t},noResults:function(){return"Sem resultados"},searching:function(){return"A procurar…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file diff --git a/ishtar_common/static/select2/js/i18n/ro.js b/ishtar_common/static/select2/js/i18n/ro.js new file mode 100644 index 000000000..788a26376 --- /dev/null +++ b/ishtar_common/static/select2/js/i18n/ro.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ro",[],function(){return{errorLoading:function(){return"Rezultatele nu au putut fi incărcate."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vă rugăm să ștergeți"+t+" caracter";return t!==1&&(n+="e"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vă rugăm să introduceți "+t+"sau mai multe caractere";return n},loadingMore:function(){return"Se încarcă mai multe rezultate…"},maximumSelected:function(e){var t="Aveți voie să selectați cel mult "+e.maximum;return t+=" element",e.maximum!==1&&(t+="e"),t},noResults:function(){return"Nu au fost găsite rezultate"},searching:function(){return"Căutare…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file diff --git a/ishtar_common/static/select2/js/i18n/ru.js b/ishtar_common/static/select2/js/i18n/ru.js new file mode 100644 index 000000000..9ecab8091 --- /dev/null +++ b/ishtar_common/static/select2/js/i18n/ru.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ru",[],function(){function e(e,t,n,r){return e%10<5&&e%10>0&&e%100<5||e%100>20?e%10>1?n:t:r}return{errorLoading:function(){return"Невозможно загрузить результаты"},inputTooLong:function(t){var n=t.input.length-t.maximum,r="Пожалуйста, введите на "+n+" символ";return r+=e(n,"","a","ов"),r+=" меньше",r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Пожалуйста, введите еще хотя бы "+n+" символ";return r+=e(n,"","a","ов"),r},loadingMore:function(){return"Загрузка данных…"},maximumSelected:function(t){var n="Вы можете выбрать не более "+t.maximum+" элемент";return n+=e(t.maximum,"","a","ов"),n},noResults:function(){return"Совпадений не найдено"},searching:function(){return"Поиск…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file diff --git a/ishtar_common/static/select2/js/i18n/sk.js b/ishtar_common/static/select2/js/i18n/sk.js new file mode 100644 index 000000000..82f294138 --- /dev/null +++ b/ishtar_common/static/select2/js/i18n/sk.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sk",[],function(){var e={2:function(e){return e?"dva":"dve"},3:function(){return"tri"},4:function(){return"štyri"}};return{inputTooLong:function(t){var n=t.input.length-t.maximum;return n==1?"Prosím, zadajte o jeden znak menej":n>=2&&n<=4?"Prosím, zadajte o "+e[n](!0)+" znaky menej":"Prosím, zadajte o "+n+" znakov menej"},inputTooShort:function(t){var n=t.minimum-t.input.length;return n==1?"Prosím, zadajte ešte jeden znak":n<=4?"Prosím, zadajte ešte ďalšie "+e[n](!0)+" znaky":"Prosím, zadajte ešte ďalších "+n+" znakov"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(t){return t.maximum==1?"Môžete zvoliť len jednu položku":t.maximum>=2&&t.maximum<=4?"Môžete zvoliť najviac "+e[t.maximum](!1)+" položky":"Môžete zvoliť najviac "+t.maximum+" položiek"},noResults:function(){return"Nenašli sa žiadne položky"},searching:function(){return"Vyhľadávanie…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file diff --git a/ishtar_common/static/select2/js/i18n/sr-Cyrl.js b/ishtar_common/static/select2/js/i18n/sr-Cyrl.js new file mode 100644 index 000000000..e9453940c --- /dev/null +++ b/ishtar_common/static/select2/js/i18n/sr-Cyrl.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sr-Cyrl",[],function(){function e(e,t,n,r){return e%10==1&&e%100!=11?t:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?n:r}return{errorLoading:function(){return"Преузимање није успело."},inputTooLong:function(t){var n=t.input.length-t.maximum,r="Обришите "+n+" симбол";return r+=e(n,"","а","а"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Укуцајте бар још "+n+" симбол";return r+=e(n,"","а","а"),r},loadingMore:function(){return"Преузимање још резултата…"},maximumSelected:function(t){var n="Можете изабрати само "+t.maximum+" ставк";return n+=e(t.maximum,"у","е","и"),n},noResults:function(){return"Ништа није пронађено"},searching:function(){return"Претрага…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file diff --git a/ishtar_common/static/select2/js/i18n/sr.js b/ishtar_common/static/select2/js/i18n/sr.js new file mode 100644 index 000000000..ac0cc721f --- /dev/null +++ b/ishtar_common/static/select2/js/i18n/sr.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sr",[],function(){function e(e,t,n,r){return e%10==1&&e%100!=11?t:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?n:r}return{errorLoading:function(){return"Preuzimanje nije uspelo."},inputTooLong:function(t){var n=t.input.length-t.maximum,r="Obrišite "+n+" simbol";return r+=e(n,"","a","a"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Ukucajte bar još "+n+" simbol";return r+=e(n,"","a","a"),r},loadingMore:function(){return"Preuzimanje još rezultata…"},maximumSelected:function(t){var n="Možete izabrati samo "+t.maximum+" stavk";return n+=e(t.maximum,"u","e","i"),n},noResults:function(){return"Ništa nije pronađeno"},searching:function(){return"Pretraga…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file diff --git a/ishtar_common/static/select2/js/i18n/sv.js b/ishtar_common/static/select2/js/i18n/sv.js new file mode 100644 index 000000000..bedac08c4 --- /dev/null +++ b/ishtar_common/static/select2/js/i18n/sv.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sv",[],function(){return{errorLoading:function(){return"Resultat kunde inte laddas."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vänligen sudda ut "+t+" tecken";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vänligen skriv in "+t+" eller fler tecken";return n},loadingMore:function(){return"Laddar fler resultat…"},maximumSelected:function(e){var t="Du kan max välja "+e.maximum+" element";return t},noResults:function(){return"Inga träffar"},searching:function(){return"Söker…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file diff --git a/ishtar_common/static/select2/js/i18n/th.js b/ishtar_common/static/select2/js/i18n/th.js new file mode 100644 index 000000000..097a86c69 --- /dev/null +++ b/ishtar_common/static/select2/js/i18n/th.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/th",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="โปรดลบออก "+t+" ตัวอักษร";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="โปรดพิมพ์เพิ่มอีก "+t+" ตัวอักษร";return n},loadingMore:function(){return"กำลังค้นข้อมูลเพิ่ม…"},maximumSelected:function(e){var t="คุณสามารถเลือกได้ไม่เกิน "+e.maximum+" รายการ";return t},noResults:function(){return"ไม่พบข้อมูล"},searching:function(){return"กำลังค้นข้อมูล…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file diff --git a/ishtar_common/static/select2/js/i18n/tr.js b/ishtar_common/static/select2/js/i18n/tr.js new file mode 100644 index 000000000..25d27a877 --- /dev/null +++ b/ishtar_common/static/select2/js/i18n/tr.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/tr",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n=t+" karakter daha girmelisiniz";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="En az "+t+" karakter daha girmelisiniz";return n},loadingMore:function(){return"Daha fazla…"},maximumSelected:function(e){var t="Sadece "+e.maximum+" seçim yapabilirsiniz";return t},noResults:function(){return"Sonuç bulunamadı"},searching:function(){return"Aranıyor…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file diff --git a/ishtar_common/static/select2/js/i18n/uk.js b/ishtar_common/static/select2/js/i18n/uk.js new file mode 100644 index 000000000..eb3ca8903 --- /dev/null +++ b/ishtar_common/static/select2/js/i18n/uk.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/uk",[],function(){function e(e,t,n,r){return e%100>10&&e%100<15?r:e%10===1?t:e%10>1&&e%10<5?n:r}return{errorLoading:function(){return"Неможливо завантажити результати"},inputTooLong:function(t){var n=t.input.length-t.maximum;return"Будь ласка, видаліть "+n+" "+e(t.maximum,"літеру","літери","літер")},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Будь ласка, введіть "+t+" або більше літер"},loadingMore:function(){return"Завантаження інших результатів…"},maximumSelected:function(t){return"Ви можете вибрати лише "+t.maximum+" "+e(t.maximum,"пункт","пункти","пунктів")},noResults:function(){return"Нічого не знайдено"},searching:function(){return"Пошук…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file diff --git a/ishtar_common/static/select2/js/i18n/vi.js b/ishtar_common/static/select2/js/i18n/vi.js new file mode 100644 index 000000000..8975b8ac6 --- /dev/null +++ b/ishtar_common/static/select2/js/i18n/vi.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/vi",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vui lòng nhập ít hơn "+t+" ký tự";return t!=1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vui lòng nhập nhiều hơn "+t+' ký tự"';return n},loadingMore:function(){return"Đang lấy thêm kết quả…"},maximumSelected:function(e){var t="Chỉ có thể chọn được "+e.maximum+" lựa chọn";return t},noResults:function(){return"Không tìm thấy kết quả"},searching:function(){return"Đang tìm…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file diff --git a/ishtar_common/static/select2/js/i18n/zh-CN.js b/ishtar_common/static/select2/js/i18n/zh-CN.js new file mode 100644 index 000000000..2ed959723 --- /dev/null +++ b/ishtar_common/static/select2/js/i18n/zh-CN.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/zh-CN",[],function(){return{errorLoading:function(){return"无法载入结果。"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="请删除"+t+"个字符";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="请再输入至少"+t+"个字符";return n},loadingMore:function(){return"载入更多结果…"},maximumSelected:function(e){var t="最多只能选择"+e.maximum+"个项目";return t},noResults:function(){return"未找到结果"},searching:function(){return"搜索中…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file diff --git a/ishtar_common/static/select2/js/i18n/zh-TW.js b/ishtar_common/static/select2/js/i18n/zh-TW.js new file mode 100644 index 000000000..ea0812ee0 --- /dev/null +++ b/ishtar_common/static/select2/js/i18n/zh-TW.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/zh-TW",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="請刪掉"+t+"個字元";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="請再輸入"+t+"個字元";return n},loadingMore:function(){return"載入中…"},maximumSelected:function(e){var t="你只能選擇最多"+e.maximum+"項";return t},noResults:function(){return"沒有找到相符的項目"},searching:function(){return"搜尋中…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file diff --git a/ishtar_common/static/select2/js/init.js b/ishtar_common/static/select2/js/init.js deleted file mode 100644 index c62ee3325..000000000 --- a/ishtar_common/static/select2/js/init.js +++ /dev/null @@ -1,3 +0,0 @@ -$(document).ready(function() { -    $(".js-select2").select2(); -}); diff --git a/ishtar_common/static/select2/js/select2.full.js b/ishtar_common/static/select2/js/select2.full.js new file mode 100644 index 000000000..e750834ef --- /dev/null +++ b/ishtar_common/static/select2/js/select2.full.js @@ -0,0 +1,6436 @@ +/*! + * Select2 4.0.3 + * https://select2.github.io + * + * Released under the MIT license + * https://github.com/select2/select2/blob/master/LICENSE.md + */ +(function (factory) { +  if (typeof define === 'function' && define.amd) { +    // AMD. Register as an anonymous module. +    define(['jquery'], factory); +  } else if (typeof exports === 'object') { +    // Node/CommonJS +    factory(require('jquery')); +  } else { +    // Browser globals +    factory(jQuery); +  } +}(function (jQuery) { +  // This is needed so we can catch the AMD loader configuration and use it +  // The inner file should be wrapped (by `banner.start.js`) in a function that +  // returns the AMD loader references. +  var S2 = +(function () { +  // Restore the Select2 AMD loader so it can be used +  // Needed mostly in the language files, where the loader is not inserted +  if (jQuery && jQuery.fn && jQuery.fn.select2 && jQuery.fn.select2.amd) { +    var S2 = jQuery.fn.select2.amd; +  } +var S2;(function () { if (!S2 || !S2.requirejs) { +if (!S2) { S2 = {}; } else { require = S2; } +/** + * @license almond 0.3.1 Copyright (c) 2011-2014, The Dojo Foundation All Rights Reserved. + * Available via the MIT or new BSD license. + * see: http://github.com/jrburke/almond for details + */ +//Going sloppy to avoid 'use strict' string cost, but strict practices should +//be followed. +/*jslint sloppy: true */ +/*global setTimeout: false */ + +var requirejs, require, define; +(function (undef) { +    var main, req, makeMap, handlers, +        defined = {}, +        waiting = {}, +        config = {}, +        defining = {}, +        hasOwn = Object.prototype.hasOwnProperty, +        aps = [].slice, +        jsSuffixRegExp = /\.js$/; + +    function hasProp(obj, prop) { +        return hasOwn.call(obj, prop); +    } + +    /** +     * Given a relative module name, like ./something, normalize it to +     * a real name that can be mapped to a path. +     * @param {String} name the relative name +     * @param {String} baseName a real name that the name arg is relative +     * to. +     * @returns {String} normalized name +     */ +    function normalize(name, baseName) { +        var nameParts, nameSegment, mapValue, foundMap, lastIndex, +            foundI, foundStarMap, starI, i, j, part, +            baseParts = baseName && baseName.split("/"), +            map = config.map, +            starMap = (map && map['*']) || {}; + +        //Adjust any relative paths. +        if (name && name.charAt(0) === ".") { +            //If have a base name, try to normalize against it, +            //otherwise, assume it is a top-level require that will +            //be relative to baseUrl in the end. +            if (baseName) { +                name = name.split('/'); +                lastIndex = name.length - 1; + +                // Node .js allowance: +                if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) { +                    name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, ''); +                } + +                //Lop off the last part of baseParts, so that . matches the +                //"directory" and not name of the baseName's module. For instance, +                //baseName of "one/two/three", maps to "one/two/three.js", but we +                //want the directory, "one/two" for this normalization. +                name = baseParts.slice(0, baseParts.length - 1).concat(name); + +                //start trimDots +                for (i = 0; i < name.length; i += 1) { +                    part = name[i]; +                    if (part === ".") { +                        name.splice(i, 1); +                        i -= 1; +                    } else if (part === "..") { +                        if (i === 1 && (name[2] === '..' || name[0] === '..')) { +                            //End of the line. Keep at least one non-dot +                            //path segment at the front so it can be mapped +                            //correctly to disk. Otherwise, there is likely +                            //no path mapping for a path starting with '..'. +                            //This can still fail, but catches the most reasonable +                            //uses of .. +                            break; +                        } else if (i > 0) { +                            name.splice(i - 1, 2); +                            i -= 2; +                        } +                    } +                } +                //end trimDots + +                name = name.join("/"); +            } else if (name.indexOf('./') === 0) { +                // No baseName, so this is ID is resolved relative +                // to baseUrl, pull off the leading dot. +                name = name.substring(2); +            } +        } + +        //Apply map config if available. +        if ((baseParts || starMap) && map) { +            nameParts = name.split('/'); + +            for (i = nameParts.length; i > 0; i -= 1) { +                nameSegment = nameParts.slice(0, i).join("/"); + +                if (baseParts) { +                    //Find the longest baseName segment match in the config. +                    //So, do joins on the biggest to smallest lengths of baseParts. +                    for (j = baseParts.length; j > 0; j -= 1) { +                        mapValue = map[baseParts.slice(0, j).join('/')]; + +                        //baseName segment has  config, find if it has one for +                        //this name. +                        if (mapValue) { +                            mapValue = mapValue[nameSegment]; +                            if (mapValue) { +                                //Match, update name to the new value. +                                foundMap = mapValue; +                                foundI = i; +                                break; +                            } +                        } +                    } +                } + +                if (foundMap) { +                    break; +                } + +                //Check for a star map match, but just hold on to it, +                //if there is a shorter segment match later in a matching +                //config, then favor over this star map. +                if (!foundStarMap && starMap && starMap[nameSegment]) { +                    foundStarMap = starMap[nameSegment]; +                    starI = i; +                } +            } + +            if (!foundMap && foundStarMap) { +                foundMap = foundStarMap; +                foundI = starI; +            } + +            if (foundMap) { +                nameParts.splice(0, foundI, foundMap); +                name = nameParts.join('/'); +            } +        } + +        return name; +    } + +    function makeRequire(relName, forceSync) { +        return function () { +            //A version of a require function that passes a moduleName +            //value for items that may need to +            //look up paths relative to the moduleName +            var args = aps.call(arguments, 0); + +            //If first arg is not require('string'), and there is only +            //one arg, it is the array form without a callback. Insert +            //a null so that the following concat is correct. +            if (typeof args[0] !== 'string' && args.length === 1) { +                args.push(null); +            } +            return req.apply(undef, args.concat([relName, forceSync])); +        }; +    } + +    function makeNormalize(relName) { +        return function (name) { +            return normalize(name, relName); +        }; +    } + +    function makeLoad(depName) { +        return function (value) { +            defined[depName] = value; +        }; +    } + +    function callDep(name) { +        if (hasProp(waiting, name)) { +            var args = waiting[name]; +            delete waiting[name]; +            defining[name] = true; +            main.apply(undef, args); +        } + +        if (!hasProp(defined, name) && !hasProp(defining, name)) { +            throw new Error('No ' + name); +        } +        return defined[name]; +    } + +    //Turns a plugin!resource to [plugin, resource] +    //with the plugin being undefined if the name +    //did not have a plugin prefix. +    function splitPrefix(name) { +        var prefix, +            index = name ? name.indexOf('!') : -1; +        if (index > -1) { +            prefix = name.substring(0, index); +            name = name.substring(index + 1, name.length); +        } +        return [prefix, name]; +    } + +    /** +     * Makes a name map, normalizing the name, and using a plugin +     * for normalization if necessary. Grabs a ref to plugin +     * too, as an optimization. +     */ +    makeMap = function (name, relName) { +        var plugin, +            parts = splitPrefix(name), +            prefix = parts[0]; + +        name = parts[1]; + +        if (prefix) { +            prefix = normalize(prefix, relName); +            plugin = callDep(prefix); +        } + +        //Normalize according +        if (prefix) { +            if (plugin && plugin.normalize) { +                name = plugin.normalize(name, makeNormalize(relName)); +            } else { +                name = normalize(name, relName); +            } +        } else { +            name = normalize(name, relName); +            parts = splitPrefix(name); +            prefix = parts[0]; +            name = parts[1]; +            if (prefix) { +                plugin = callDep(prefix); +            } +        } + +        //Using ridiculous property names for space reasons +        return { +            f: prefix ? prefix + '!' + name : name, //fullName +            n: name, +            pr: prefix, +            p: plugin +        }; +    }; + +    function makeConfig(name) { +        return function () { +            return (config && config.config && config.config[name]) || {}; +        }; +    } + +    handlers = { +        require: function (name) { +            return makeRequire(name); +        }, +        exports: function (name) { +            var e = defined[name]; +            if (typeof e !== 'undefined') { +                return e; +            } else { +                return (defined[name] = {}); +            } +        }, +        module: function (name) { +            return { +                id: name, +                uri: '', +                exports: defined[name], +                config: makeConfig(name) +            }; +        } +    }; + +    main = function (name, deps, callback, relName) { +        var cjsModule, depName, ret, map, i, +            args = [], +            callbackType = typeof callback, +            usingExports; + +        //Use name if no relName +        relName = relName || name; + +        //Call the callback to define the module, if necessary. +        if (callbackType === 'undefined' || callbackType === 'function') { +            //Pull out the defined dependencies and pass the ordered +            //values to the callback. +            //Default to [require, exports, module] if no deps +            deps = !deps.length && callback.length ? ['require', 'exports', 'module'] : deps; +            for (i = 0; i < deps.length; i += 1) { +                map = makeMap(deps[i], relName); +                depName = map.f; + +                //Fast path CommonJS standard dependencies. +                if (depName === "require") { +                    args[i] = handlers.require(name); +                } else if (depName === "exports") { +                    //CommonJS module spec 1.1 +                    args[i] = handlers.exports(name); +                    usingExports = true; +                } else if (depName === "module") { +                    //CommonJS module spec 1.1 +                    cjsModule = args[i] = handlers.module(name); +                } else if (hasProp(defined, depName) || +                           hasProp(waiting, depName) || +                           hasProp(defining, depName)) { +                    args[i] = callDep(depName); +                } else if (map.p) { +                    map.p.load(map.n, makeRequire(relName, true), makeLoad(depName), {}); +                    args[i] = defined[depName]; +                } else { +                    throw new Error(name + ' missing ' + depName); +                } +            } + +            ret = callback ? callback.apply(defined[name], args) : undefined; + +            if (name) { +                //If setting exports via "module" is in play, +                //favor that over return value and exports. After that, +                //favor a non-undefined return value over exports use. +                if (cjsModule && cjsModule.exports !== undef && +                        cjsModule.exports !== defined[name]) { +                    defined[name] = cjsModule.exports; +                } else if (ret !== undef || !usingExports) { +                    //Use the return value from the function. +                    defined[name] = ret; +                } +            } +        } else if (name) { +            //May just be an object definition for the module. Only +            //worry about defining if have a module name. +            defined[name] = callback; +        } +    }; + +    requirejs = require = req = function (deps, callback, relName, forceSync, alt) { +        if (typeof deps === "string") { +            if (handlers[deps]) { +                //callback in this case is really relName +                return handlers[deps](callback); +            } +            //Just return the module wanted. In this scenario, the +            //deps arg is the module name, and second arg (if passed) +            //is just the relName. +            //Normalize module name, if it contains . or .. +            return callDep(makeMap(deps, callback).f); +        } else if (!deps.splice) { +            //deps is a config object, not an array. +            config = deps; +            if (config.deps) { +                req(config.deps, config.callback); +            } +            if (!callback) { +                return; +            } + +            if (callback.splice) { +                //callback is an array, which means it is a dependency list. +                //Adjust args if there are dependencies +                deps = callback; +                callback = relName; +                relName = null; +            } else { +                deps = undef; +            } +        } + +        //Support require(['a']) +        callback = callback || function () {}; + +        //If relName is a function, it is an errback handler, +        //so remove it. +        if (typeof relName === 'function') { +            relName = forceSync; +            forceSync = alt; +        } + +        //Simulate async callback; +        if (forceSync) { +            main(undef, deps, callback, relName); +        } else { +            //Using a non-zero value because of concern for what old browsers +            //do, and latest browsers "upgrade" to 4 if lower value is used: +            //http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#dom-windowtimers-settimeout: +            //If want a value immediately, use require('id') instead -- something +            //that works in almond on the global level, but not guaranteed and +            //unlikely to work in other AMD implementations. +            setTimeout(function () { +                main(undef, deps, callback, relName); +            }, 4); +        } + +        return req; +    }; + +    /** +     * Just drops the config on the floor, but returns req in case +     * the config return value is used. +     */ +    req.config = function (cfg) { +        return req(cfg); +    }; + +    /** +     * Expose module registry for debugging and tooling +     */ +    requirejs._defined = defined; + +    define = function (name, deps, callback) { +        if (typeof name !== 'string') { +            throw new Error('See almond README: incorrect module build, no module name'); +        } + +        //This module may not have dependencies +        if (!deps.splice) { +            //deps is not an array, so probably means +            //an object literal or factory function for +            //the value. Adjust args. +            callback = deps; +            deps = []; +        } + +        if (!hasProp(defined, name) && !hasProp(waiting, name)) { +            waiting[name] = [name, deps, callback]; +        } +    }; + +    define.amd = { +        jQuery: true +    }; +}()); + +S2.requirejs = requirejs;S2.require = require;S2.define = define; +} +}()); +S2.define("almond", function(){}); + +/* global jQuery:false, $:false */ +S2.define('jquery',[],function () { +  var _$ = jQuery || $; + +  if (_$ == null && console && console.error) { +    console.error( +      'Select2: An instance of jQuery or a jQuery-compatible library was not ' + +      'found. Make sure that you are including jQuery before Select2 on your ' + +      'web page.' +    ); +  } + +  return _$; +}); + +S2.define('select2/utils',[ +  'jquery' +], function ($) { +  var Utils = {}; + +  Utils.Extend = function (ChildClass, SuperClass) { +    var __hasProp = {}.hasOwnProperty; + +    function BaseConstructor () { +      this.constructor = ChildClass; +    } + +    for (var key in SuperClass) { +      if (__hasProp.call(SuperClass, key)) { +        ChildClass[key] = SuperClass[key]; +      } +    } + +    BaseConstructor.prototype = SuperClass.prototype; +    ChildClass.prototype = new BaseConstructor(); +    ChildClass.__super__ = SuperClass.prototype; + +    return ChildClass; +  }; + +  function getMethods (theClass) { +    var proto = theClass.prototype; + +    var methods = []; + +    for (var methodName in proto) { +      var m = proto[methodName]; + +      if (typeof m !== 'function') { +        continue; +      } + +      if (methodName === 'constructor') { +        continue; +      } + +      methods.push(methodName); +    } + +    return methods; +  } + +  Utils.Decorate = function (SuperClass, DecoratorClass) { +    var decoratedMethods = getMethods(DecoratorClass); +    var superMethods = getMethods(SuperClass); + +    function DecoratedClass () { +      var unshift = Array.prototype.unshift; + +      var argCount = DecoratorClass.prototype.constructor.length; + +      var calledConstructor = SuperClass.prototype.constructor; + +      if (argCount > 0) { +        unshift.call(arguments, SuperClass.prototype.constructor); + +        calledConstructor = DecoratorClass.prototype.constructor; +      } + +      calledConstructor.apply(this, arguments); +    } + +    DecoratorClass.displayName = SuperClass.displayName; + +    function ctr () { +      this.constructor = DecoratedClass; +    } + +    DecoratedClass.prototype = new ctr(); + +    for (var m = 0; m < superMethods.length; m++) { +        var superMethod = superMethods[m]; + +        DecoratedClass.prototype[superMethod] = +          SuperClass.prototype[superMethod]; +    } + +    var calledMethod = function (methodName) { +      // Stub out the original method if it's not decorating an actual method +      var originalMethod = function () {}; + +      if (methodName in DecoratedClass.prototype) { +        originalMethod = DecoratedClass.prototype[methodName]; +      } + +      var decoratedMethod = DecoratorClass.prototype[methodName]; + +      return function () { +        var unshift = Array.prototype.unshift; + +        unshift.call(arguments, originalMethod); + +        return decoratedMethod.apply(this, arguments); +      }; +    }; + +    for (var d = 0; d < decoratedMethods.length; d++) { +      var decoratedMethod = decoratedMethods[d]; + +      DecoratedClass.prototype[decoratedMethod] = calledMethod(decoratedMethod); +    } + +    return DecoratedClass; +  }; + +  var Observable = function () { +    this.listeners = {}; +  }; + +  Observable.prototype.on = function (event, callback) { +    this.listeners = this.listeners || {}; + +    if (event in this.listeners) { +      this.listeners[event].push(callback); +    } else { +      this.listeners[event] = [callback]; +    } +  }; + +  Observable.prototype.trigger = function (event) { +    var slice = Array.prototype.slice; +    var params = slice.call(arguments, 1); + +    this.listeners = this.listeners || {}; + +    // Params should always come in as an array +    if (params == null) { +      params = []; +    } + +    // If there are no arguments to the event, use a temporary object +    if (params.length === 0) { +      params.push({}); +    } + +    // Set the `_type` of the first object to the event +    params[0]._type = event; + +    if (event in this.listeners) { +      this.invoke(this.listeners[event], slice.call(arguments, 1)); +    } + +    if ('*' in this.listeners) { +      this.invoke(this.listeners['*'], arguments); +    } +  }; + +  Observable.prototype.invoke = function (listeners, params) { +    for (var i = 0, len = listeners.length; i < len; i++) { +      listeners[i].apply(this, params); +    } +  }; + +  Utils.Observable = Observable; + +  Utils.generateChars = function (length) { +    var chars = ''; + +    for (var i = 0; i < length; i++) { +      var randomChar = Math.floor(Math.random() * 36); +      chars += randomChar.toString(36); +    } + +    return chars; +  }; + +  Utils.bind = function (func, context) { +    return function () { +      func.apply(context, arguments); +    }; +  }; + +  Utils._convertData = function (data) { +    for (var originalKey in data) { +      var keys = originalKey.split('-'); + +      var dataLevel = data; + +      if (keys.length === 1) { +        continue; +      } + +      for (var k = 0; k < keys.length; k++) { +        var key = keys[k]; + +        // Lowercase the first letter +        // By default, dash-separated becomes camelCase +        key = key.substring(0, 1).toLowerCase() + key.substring(1); + +        if (!(key in dataLevel)) { +          dataLevel[key] = {}; +        } + +        if (k == keys.length - 1) { +          dataLevel[key] = data[originalKey]; +        } + +        dataLevel = dataLevel[key]; +      } + +      delete data[originalKey]; +    } + +    return data; +  }; + +  Utils.hasScroll = function (index, el) { +    // Adapted from the function created by @ShadowScripter +    // and adapted by @BillBarry on the Stack Exchange Code Review website. +    // The original code can be found at +    // http://codereview.stackexchange.com/q/13338 +    // and was designed to be used with the Sizzle selector engine. + +    var $el = $(el); +    var overflowX = el.style.overflowX; +    var overflowY = el.style.overflowY; + +    //Check both x and y declarations +    if (overflowX === overflowY && +        (overflowY === 'hidden' || overflowY === 'visible')) { +      return false; +    } + +    if (overflowX === 'scroll' || overflowY === 'scroll') { +      return true; +    } + +    return ($el.innerHeight() < el.scrollHeight || +      $el.innerWidth() < el.scrollWidth); +  }; + +  Utils.escapeMarkup = function (markup) { +    var replaceMap = { +      '\\': '\', +      '&': '&', +      '<': '<', +      '>': '>', +      '"': '"', +      '\'': ''', +      '/': '/' +    }; + +    // Do not try to escape the markup if it's not a string +    if (typeof markup !== 'string') { +      return markup; +    } + +    return String(markup).replace(/[&<>"'\/\\]/g, function (match) { +      return replaceMap[match]; +    }); +  }; + +  // Append an array of jQuery nodes to a given element. +  Utils.appendMany = function ($element, $nodes) { +    // jQuery 1.7.x does not support $.fn.append() with an array +    // Fall back to a jQuery object collection using $.fn.add() +    if ($.fn.jquery.substr(0, 3) === '1.7') { +      var $jqNodes = $(); + +      $.map($nodes, function (node) { +        $jqNodes = $jqNodes.add(node); +      }); + +      $nodes = $jqNodes; +    } + +    $element.append($nodes); +  }; + +  return Utils; +}); + +S2.define('select2/results',[ +  'jquery', +  './utils' +], function ($, Utils) { +  function Results ($element, options, dataAdapter) { +    this.$element = $element; +    this.data = dataAdapter; +    this.options = options; + +    Results.__super__.constructor.call(this); +  } + +  Utils.Extend(Results, Utils.Observable); + +  Results.prototype.render = function () { +    var $results = $( +      '<ul class="select2-results__options" role="tree"></ul>' +    ); + +    if (this.options.get('multiple')) { +      $results.attr('aria-multiselectable', 'true'); +    } + +    this.$results = $results; + +    return $results; +  }; + +  Results.prototype.clear = function () { +    this.$results.empty(); +  }; + +  Results.prototype.displayMessage = function (params) { +    var escapeMarkup = this.options.get('escapeMarkup'); + +    this.clear(); +    this.hideLoading(); + +    var $message = $( +      '<li role="treeitem" aria-live="assertive"' + +      ' class="select2-results__option"></li>' +    ); + +    var message = this.options.get('translations').get(params.message); + +    $message.append( +      escapeMarkup( +        message(params.args) +      ) +    ); + +    $message[0].className += ' select2-results__message'; + +    this.$results.append($message); +  }; + +  Results.prototype.hideMessages = function () { +    this.$results.find('.select2-results__message').remove(); +  }; + +  Results.prototype.append = function (data) { +    this.hideLoading(); + +    var $options = []; + +    if (data.results == null || data.results.length === 0) { +      if (this.$results.children().length === 0) { +        this.trigger('results:message', { +          message: 'noResults' +        }); +      } + +      return; +    } + +    data.results = this.sort(data.results); + +    for (var d = 0; d < data.results.length; d++) { +      var item = data.results[d]; + +      var $option = this.option(item); + +      $options.push($option); +    } + +    this.$results.append($options); +  }; + +  Results.prototype.position = function ($results, $dropdown) { +    var $resultsContainer = $dropdown.find('.select2-results'); +    $resultsContainer.append($results); +  }; + +  Results.prototype.sort = function (data) { +    var sorter = this.options.get('sorter'); + +    return sorter(data); +  }; + +  Results.prototype.highlightFirstItem = function () { +    var $options = this.$results +      .find('.select2-results__option[aria-selected]'); + +    var $selected = $options.filter('[aria-selected=true]'); + +    // Check if there are any selected options +    if ($selected.length > 0) { +      // If there are selected options, highlight the first +      $selected.first().trigger('mouseenter'); +    } else { +      // If there are no selected options, highlight the first option +      // in the dropdown +      $options.first().trigger('mouseenter'); +    } + +    this.ensureHighlightVisible(); +  }; + +  Results.prototype.setClasses = function () { +    var self = this; + +    this.data.current(function (selected) { +      var selectedIds = $.map(selected, function (s) { +        return s.id.toString(); +      }); + +      var $options = self.$results +        .find('.select2-results__option[aria-selected]'); + +      $options.each(function () { +        var $option = $(this); + +        var item = $.data(this, 'data'); + +        // id needs to be converted to a string when comparing +        var id = '' + item.id; + +        if ((item.element != null && item.element.selected) || +            (item.element == null && $.inArray(id, selectedIds) > -1)) { +          $option.attr('aria-selected', 'true'); +        } else { +          $option.attr('aria-selected', 'false'); +        } +      }); + +    }); +  }; + +  Results.prototype.showLoading = function (params) { +    this.hideLoading(); + +    var loadingMore = this.options.get('translations').get('searching'); + +    var loading = { +      disabled: true, +      loading: true, +      text: loadingMore(params) +    }; +    var $loading = this.option(loading); +    $loading.className += ' loading-results'; + +    this.$results.prepend($loading); +  }; + +  Results.prototype.hideLoading = function () { +    this.$results.find('.loading-results').remove(); +  }; + +  Results.prototype.option = function (data) { +    var option = document.createElement('li'); +    option.className = 'select2-results__option'; + +    var attrs = { +      'role': 'treeitem', +      'aria-selected': 'false' +    }; + +    if (data.disabled) { +      delete attrs['aria-selected']; +      attrs['aria-disabled'] = 'true'; +    } + +    if (data.id == null) { +      delete attrs['aria-selected']; +    } + +    if (data._resultId != null) { +      option.id = data._resultId; +    } + +    if (data.title) { +      option.title = data.title; +    } + +    if (data.children) { +      attrs.role = 'group'; +      attrs['aria-label'] = data.text; +      delete attrs['aria-selected']; +    } + +    for (var attr in attrs) { +      var val = attrs[attr]; + +      option.setAttribute(attr, val); +    } + +    if (data.children) { +      var $option = $(option); + +      var label = document.createElement('strong'); +      label.className = 'select2-results__group'; + +      var $label = $(label); +      this.template(data, label); + +      var $children = []; + +      for (var c = 0; c < data.children.length; c++) { +        var child = data.children[c]; + +        var $child = this.option(child); + +        $children.push($child); +      } + +      var $childrenContainer = $('<ul></ul>', { +        'class': 'select2-results__options select2-results__options--nested' +      }); + +      $childrenContainer.append($children); + +      $option.append(label); +      $option.append($childrenContainer); +    } else { +      this.template(data, option); +    } + +    $.data(option, 'data', data); + +    return option; +  }; + +  Results.prototype.bind = function (container, $container) { +    var self = this; + +    var id = container.id + '-results'; + +    this.$results.attr('id', id); + +    container.on('results:all', function (params) { +      self.clear(); +      self.append(params.data); + +      if (container.isOpen()) { +        self.setClasses(); +        self.highlightFirstItem(); +      } +    }); + +    container.on('results:append', function (params) { +      self.append(params.data); + +      if (container.isOpen()) { +        self.setClasses(); +      } +    }); + +    container.on('query', function (params) { +      self.hideMessages(); +      self.showLoading(params); +    }); + +    container.on('select', function () { +      if (!container.isOpen()) { +        return; +      } + +      self.setClasses(); +      self.highlightFirstItem(); +    }); + +    container.on('unselect', function () { +      if (!container.isOpen()) { +        return; +      } + +      self.setClasses(); +      self.highlightFirstItem(); +    }); + +    container.on('open', function () { +      // When the dropdown is open, aria-expended="true" +      self.$results.attr('aria-expanded', 'true'); +      self.$results.attr('aria-hidden', 'false'); + +      self.setClasses(); +      self.ensureHighlightVisible(); +    }); + +    container.on('close', function () { +      // When the dropdown is closed, aria-expended="false" +      self.$results.attr('aria-expanded', 'false'); +      self.$results.attr('aria-hidden', 'true'); +      self.$results.removeAttr('aria-activedescendant'); +    }); + +    container.on('results:toggle', function () { +      var $highlighted = self.getHighlightedResults(); + +      if ($highlighted.length === 0) { +        return; +      } + +      $highlighted.trigger('mouseup'); +    }); + +    container.on('results:select', function () { +      var $highlighted = self.getHighlightedResults(); + +      if ($highlighted.length === 0) { +        return; +      } + +      var data = $highlighted.data('data'); + +      if ($highlighted.attr('aria-selected') == 'true') { +        self.trigger('close', {}); +      } else { +        self.trigger('select', { +          data: data +        }); +      } +    }); + +    container.on('results:previous', function () { +      var $highlighted = self.getHighlightedResults(); + +      var $options = self.$results.find('[aria-selected]'); + +      var currentIndex = $options.index($highlighted); + +      // If we are already at te top, don't move further +      if (currentIndex === 0) { +        return; +      } + +      var nextIndex = currentIndex - 1; + +      // If none are highlighted, highlight the first +      if ($highlighted.length === 0) { +        nextIndex = 0; +      } + +      var $next = $options.eq(nextIndex); + +      $next.trigger('mouseenter'); + +      var currentOffset = self.$results.offset().top; +      var nextTop = $next.offset().top; +      var nextOffset = self.$results.scrollTop() + (nextTop - currentOffset); + +      if (nextIndex === 0) { +        self.$results.scrollTop(0); +      } else if (nextTop - currentOffset < 0) { +        self.$results.scrollTop(nextOffset); +      } +    }); + +    container.on('results:next', function () { +      var $highlighted = self.getHighlightedResults(); + +      var $options = self.$results.find('[aria-selected]'); + +      var currentIndex = $options.index($highlighted); + +      var nextIndex = currentIndex + 1; + +      // If we are at the last option, stay there +      if (nextIndex >= $options.length) { +        return; +      } + +      var $next = $options.eq(nextIndex); + +      $next.trigger('mouseenter'); + +      var currentOffset = self.$results.offset().top + +        self.$results.outerHeight(false); +      var nextBottom = $next.offset().top + $next.outerHeight(false); +      var nextOffset = self.$results.scrollTop() + nextBottom - currentOffset; + +      if (nextIndex === 0) { +        self.$results.scrollTop(0); +      } else if (nextBottom > currentOffset) { +        self.$results.scrollTop(nextOffset); +      } +    }); + +    container.on('results:focus', function (params) { +      params.element.addClass('select2-results__option--highlighted'); +    }); + +    container.on('results:message', function (params) { +      self.displayMessage(params); +    }); + +    if ($.fn.mousewheel) { +      this.$results.on('mousewheel', function (e) { +        var top = self.$results.scrollTop(); + +        var bottom = self.$results.get(0).scrollHeight - top + e.deltaY; + +        var isAtTop = e.deltaY > 0 && top - e.deltaY <= 0; +        var isAtBottom = e.deltaY < 0 && bottom <= self.$results.height(); + +        if (isAtTop) { +          self.$results.scrollTop(0); + +          e.preventDefault(); +          e.stopPropagation(); +        } else if (isAtBottom) { +          self.$results.scrollTop( +            self.$results.get(0).scrollHeight - self.$results.height() +          ); + +          e.preventDefault(); +          e.stopPropagation(); +        } +      }); +    } + +    this.$results.on('mouseup', '.select2-results__option[aria-selected]', +      function (evt) { +      var $this = $(this); + +      var data = $this.data('data'); + +      if ($this.attr('aria-selected') === 'true') { +        if (self.options.get('multiple')) { +          self.trigger('unselect', { +            originalEvent: evt, +            data: data +          }); +        } else { +          self.trigger('close', {}); +        } + +        return; +      } + +      self.trigger('select', { +        originalEvent: evt, +        data: data +      }); +    }); + +    this.$results.on('mouseenter', '.select2-results__option[aria-selected]', +      function (evt) { +      var data = $(this).data('data'); + +      self.getHighlightedResults() +          .removeClass('select2-results__option--highlighted'); + +      self.trigger('results:focus', { +        data: data, +        element: $(this) +      }); +    }); +  }; + +  Results.prototype.getHighlightedResults = function () { +    var $highlighted = this.$results +    .find('.select2-results__option--highlighted'); + +    return $highlighted; +  }; + +  Results.prototype.destroy = function () { +    this.$results.remove(); +  }; + +  Results.prototype.ensureHighlightVisible = function () { +    var $highlighted = this.getHighlightedResults(); + +    if ($highlighted.length === 0) { +      return; +    } + +    var $options = this.$results.find('[aria-selected]'); + +    var currentIndex = $options.index($highlighted); + +    var currentOffset = this.$results.offset().top; +    var nextTop = $highlighted.offset().top; +    var nextOffset = this.$results.scrollTop() + (nextTop - currentOffset); + +    var offsetDelta = nextTop - currentOffset; +    nextOffset -= $highlighted.outerHeight(false) * 2; + +    if (currentIndex <= 2) { +      this.$results.scrollTop(0); +    } else if (offsetDelta > this.$results.outerHeight() || offsetDelta < 0) { +      this.$results.scrollTop(nextOffset); +    } +  }; + +  Results.prototype.template = function (result, container) { +    var template = this.options.get('templateResult'); +    var escapeMarkup = this.options.get('escapeMarkup'); + +    var content = template(result, container); + +    if (content == null) { +      container.style.display = 'none'; +    } else if (typeof content === 'string') { +      container.innerHTML = escapeMarkup(content); +    } else { +      $(container).append(content); +    } +  }; + +  return Results; +}); + +S2.define('select2/keys',[ + +], function () { +  var KEYS = { +    BACKSPACE: 8, +    TAB: 9, +    ENTER: 13, +    SHIFT: 16, +    CTRL: 17, +    ALT: 18, +    ESC: 27, +    SPACE: 32, +    PAGE_UP: 33, +    PAGE_DOWN: 34, +    END: 35, +    HOME: 36, +    LEFT: 37, +    UP: 38, +    RIGHT: 39, +    DOWN: 40, +    DELETE: 46 +  }; + +  return KEYS; +}); + +S2.define('select2/selection/base',[ +  'jquery', +  '../utils', +  '../keys' +], function ($, Utils, KEYS) { +  function BaseSelection ($element, options) { +    this.$element = $element; +    this.options = options; + +    BaseSelection.__super__.constructor.call(this); +  } + +  Utils.Extend(BaseSelection, Utils.Observable); + +  BaseSelection.prototype.render = function () { +    var $selection = $( +      '<span class="select2-selection" role="combobox" ' + +      ' aria-haspopup="true" aria-expanded="false">' + +      '</span>' +    ); + +    this._tabindex = 0; + +    if (this.$element.data('old-tabindex') != null) { +      this._tabindex = this.$element.data('old-tabindex'); +    } else if (this.$element.attr('tabindex') != null) { +      this._tabindex = this.$element.attr('tabindex'); +    } + +    $selection.attr('title', this.$element.attr('title')); +    $selection.attr('tabindex', this._tabindex); + +    this.$selection = $selection; + +    return $selection; +  }; + +  BaseSelection.prototype.bind = function (container, $container) { +    var self = this; + +    var id = container.id + '-container'; +    var resultsId = container.id + '-results'; + +    this.container = container; + +    this.$selection.on('focus', function (evt) { +      self.trigger('focus', evt); +    }); + +    this.$selection.on('blur', function (evt) { +      self._handleBlur(evt); +    }); + +    this.$selection.on('keydown', function (evt) { +      self.trigger('keypress', evt); + +      if (evt.which === KEYS.SPACE) { +        evt.preventDefault(); +      } +    }); + +    container.on('results:focus', function (params) { +      self.$selection.attr('aria-activedescendant', params.data._resultId); +    }); + +    container.on('selection:update', function (params) { +      self.update(params.data); +    }); + +    container.on('open', function () { +      // When the dropdown is open, aria-expanded="true" +      self.$selection.attr('aria-expanded', 'true'); +      self.$selection.attr('aria-owns', resultsId); + +      self._attachCloseHandler(container); +    }); + +    container.on('close', function () { +      // When the dropdown is closed, aria-expanded="false" +      self.$selection.attr('aria-expanded', 'false'); +      self.$selection.removeAttr('aria-activedescendant'); +      self.$selection.removeAttr('aria-owns'); + +      self.$selection.focus(); + +      self._detachCloseHandler(container); +    }); + +    container.on('enable', function () { +      self.$selection.attr('tabindex', self._tabindex); +    }); + +    container.on('disable', function () { +      self.$selection.attr('tabindex', '-1'); +    }); +  }; + +  BaseSelection.prototype._handleBlur = function (evt) { +    var self = this; + +    // This needs to be delayed as the active element is the body when the tab +    // key is pressed, possibly along with others. +    window.setTimeout(function () { +      // Don't trigger `blur` if the focus is still in the selection +      if ( +        (document.activeElement == self.$selection[0]) || +        ($.contains(self.$selection[0], document.activeElement)) +      ) { +        return; +      } + +      self.trigger('blur', evt); +    }, 1); +  }; + +  BaseSelection.prototype._attachCloseHandler = function (container) { +    var self = this; + +    $(document.body).on('mousedown.select2.' + container.id, function (e) { +      var $target = $(e.target); + +      var $select = $target.closest('.select2'); + +      var $all = $('.select2.select2-container--open'); + +      $all.each(function () { +        var $this = $(this); + +        if (this == $select[0]) { +          return; +        } + +        var $element = $this.data('element'); + +        $element.select2('close'); +      }); +    }); +  }; + +  BaseSelection.prototype._detachCloseHandler = function (container) { +    $(document.body).off('mousedown.select2.' + container.id); +  }; + +  BaseSelection.prototype.position = function ($selection, $container) { +    var $selectionContainer = $container.find('.selection'); +    $selectionContainer.append($selection); +  }; + +  BaseSelection.prototype.destroy = function () { +    this._detachCloseHandler(this.container); +  }; + +  BaseSelection.prototype.update = function (data) { +    throw new Error('The `update` method must be defined in child classes.'); +  }; + +  return BaseSelection; +}); + +S2.define('select2/selection/single',[ +  'jquery', +  './base', +  '../utils', +  '../keys' +], function ($, BaseSelection, Utils, KEYS) { +  function SingleSelection () { +    SingleSelection.__super__.constructor.apply(this, arguments); +  } + +  Utils.Extend(SingleSelection, BaseSelection); + +  SingleSelection.prototype.render = function () { +    var $selection = SingleSelection.__super__.render.call(this); + +    $selection.addClass('select2-selection--single'); + +    $selection.html( +      '<span class="select2-selection__rendered"></span>' + +      '<span class="select2-selection__arrow" role="presentation">' + +        '<b role="presentation"></b>' + +      '</span>' +    ); + +    return $selection; +  }; + +  SingleSelection.prototype.bind = function (container, $container) { +    var self = this; + +    SingleSelection.__super__.bind.apply(this, arguments); + +    var id = container.id + '-container'; + +    this.$selection.find('.select2-selection__rendered').attr('id', id); +    this.$selection.attr('aria-labelledby', id); + +    this.$selection.on('mousedown', function (evt) { +      // Only respond to left clicks +      if (evt.which !== 1) { +        return; +      } + +      self.trigger('toggle', { +        originalEvent: evt +      }); +    }); + +    this.$selection.on('focus', function (evt) { +      // User focuses on the container +    }); + +    this.$selection.on('blur', function (evt) { +      // User exits the container +    }); + +    container.on('focus', function (evt) { +      if (!container.isOpen()) { +        self.$selection.focus(); +      } +    }); + +    container.on('selection:update', function (params) { +      self.update(params.data); +    }); +  }; + +  SingleSelection.prototype.clear = function () { +    this.$selection.find('.select2-selection__rendered').empty(); +  }; + +  SingleSelection.prototype.display = function (data, container) { +    var template = this.options.get('templateSelection'); +    var escapeMarkup = this.options.get('escapeMarkup'); + +    return escapeMarkup(template(data, container)); +  }; + +  SingleSelection.prototype.selectionContainer = function () { +    return $('<span></span>'); +  }; + +  SingleSelection.prototype.update = function (data) { +    if (data.length === 0) { +      this.clear(); +      return; +    } + +    var selection = data[0]; + +    var $rendered = this.$selection.find('.select2-selection__rendered'); +    var formatted = this.display(selection, $rendered); + +    $rendered.empty().append(formatted); +    $rendered.prop('title', selection.title || selection.text); +  }; + +  return SingleSelection; +}); + +S2.define('select2/selection/multiple',[ +  'jquery', +  './base', +  '../utils' +], function ($, BaseSelection, Utils) { +  function MultipleSelection ($element, options) { +    MultipleSelection.__super__.constructor.apply(this, arguments); +  } + +  Utils.Extend(MultipleSelection, BaseSelection); + +  MultipleSelection.prototype.render = function () { +    var $selection = MultipleSelection.__super__.render.call(this); + +    $selection.addClass('select2-selection--multiple'); + +    $selection.html( +      '<ul class="select2-selection__rendered"></ul>' +    ); + +    return $selection; +  }; + +  MultipleSelection.prototype.bind = function (container, $container) { +    var self = this; + +    MultipleSelection.__super__.bind.apply(this, arguments); + +    this.$selection.on('click', function (evt) { +      self.trigger('toggle', { +        originalEvent: evt +      }); +    }); + +    this.$selection.on( +      'click', +      '.select2-selection__choice__remove', +      function (evt) { +        // Ignore the event if it is disabled +        if (self.options.get('disabled')) { +          return; +        } + +        var $remove = $(this); +        var $selection = $remove.parent(); + +        var data = $selection.data('data'); + +        self.trigger('unselect', { +          originalEvent: evt, +          data: data +        }); +      } +    ); +  }; + +  MultipleSelection.prototype.clear = function () { +    this.$selection.find('.select2-selection__rendered').empty(); +  }; + +  MultipleSelection.prototype.display = function (data, container) { +    var template = this.options.get('templateSelection'); +    var escapeMarkup = this.options.get('escapeMarkup'); + +    return escapeMarkup(template(data, container)); +  }; + +  MultipleSelection.prototype.selectionContainer = function () { +    var $container = $( +      '<li class="select2-selection__choice">' + +        '<span class="select2-selection__choice__remove" role="presentation">' + +          '×' + +        '</span>' + +      '</li>' +    ); + +    return $container; +  }; + +  MultipleSelection.prototype.update = function (data) { +    this.clear(); + +    if (data.length === 0) { +      return; +    } + +    var $selections = []; + +    for (var d = 0; d < data.length; d++) { +      var selection = data[d]; + +      var $selection = this.selectionContainer(); +      var formatted = this.display(selection, $selection); + +      $selection.append(formatted); +      $selection.prop('title', selection.title || selection.text); + +      $selection.data('data', selection); + +      $selections.push($selection); +    } + +    var $rendered = this.$selection.find('.select2-selection__rendered'); + +    Utils.appendMany($rendered, $selections); +  }; + +  return MultipleSelection; +}); + +S2.define('select2/selection/placeholder',[ +  '../utils' +], function (Utils) { +  function Placeholder (decorated, $element, options) { +    this.placeholder = this.normalizePlaceholder(options.get('placeholder')); + +    decorated.call(this, $element, options); +  } + +  Placeholder.prototype.normalizePlaceholder = function (_, placeholder) { +    if (typeof placeholder === 'string') { +      placeholder = { +        id: '', +        text: placeholder +      }; +    } + +    return placeholder; +  }; + +  Placeholder.prototype.createPlaceholder = function (decorated, placeholder) { +    var $placeholder = this.selectionContainer(); + +    $placeholder.html(this.display(placeholder)); +    $placeholder.addClass('select2-selection__placeholder') +                .removeClass('select2-selection__choice'); + +    return $placeholder; +  }; + +  Placeholder.prototype.update = function (decorated, data) { +    var singlePlaceholder = ( +      data.length == 1 && data[0].id != this.placeholder.id +    ); +    var multipleSelections = data.length > 1; + +    if (multipleSelections || singlePlaceholder) { +      return decorated.call(this, data); +    } + +    this.clear(); + +    var $placeholder = this.createPlaceholder(this.placeholder); + +    this.$selection.find('.select2-selection__rendered').append($placeholder); +  }; + +  return Placeholder; +}); + +S2.define('select2/selection/allowClear',[ +  'jquery', +  '../keys' +], function ($, KEYS) { +  function AllowClear () { } + +  AllowClear.prototype.bind = function (decorated, container, $container) { +    var self = this; + +    decorated.call(this, container, $container); + +    if (this.placeholder == null) { +      if (this.options.get('debug') && window.console && console.error) { +        console.error( +          'Select2: The `allowClear` option should be used in combination ' + +          'with the `placeholder` option.' +        ); +      } +    } + +    this.$selection.on('mousedown', '.select2-selection__clear', +      function (evt) { +        self._handleClear(evt); +    }); + +    container.on('keypress', function (evt) { +      self._handleKeyboardClear(evt, container); +    }); +  }; + +  AllowClear.prototype._handleClear = function (_, evt) { +    // Ignore the event if it is disabled +    if (this.options.get('disabled')) { +      return; +    } + +    var $clear = this.$selection.find('.select2-selection__clear'); + +    // Ignore the event if nothing has been selected +    if ($clear.length === 0) { +      return; +    } + +    evt.stopPropagation(); + +    var data = $clear.data('data'); + +    for (var d = 0; d < data.length; d++) { +      var unselectData = { +        data: data[d] +      }; + +      // Trigger the `unselect` event, so people can prevent it from being +      // cleared. +      this.trigger('unselect', unselectData); + +      // If the event was prevented, don't clear it out. +      if (unselectData.prevented) { +        return; +      } +    } + +    this.$element.val(this.placeholder.id).trigger('change'); + +    this.trigger('toggle', {}); +  }; + +  AllowClear.prototype._handleKeyboardClear = function (_, evt, container) { +    if (container.isOpen()) { +      return; +    } + +    if (evt.which == KEYS.DELETE || evt.which == KEYS.BACKSPACE) { +      this._handleClear(evt); +    } +  }; + +  AllowClear.prototype.update = function (decorated, data) { +    decorated.call(this, data); + +    if (this.$selection.find('.select2-selection__placeholder').length > 0 || +        data.length === 0) { +      return; +    } + +    var $remove = $( +      '<span class="select2-selection__clear">' + +        '×' + +      '</span>' +    ); +    $remove.data('data', data); + +    this.$selection.find('.select2-selection__rendered').prepend($remove); +  }; + +  return AllowClear; +}); + +S2.define('select2/selection/search',[ +  'jquery', +  '../utils', +  '../keys' +], function ($, Utils, KEYS) { +  function Search (decorated, $element, options) { +    decorated.call(this, $element, options); +  } + +  Search.prototype.render = function (decorated) { +    var $search = $( +      '<li class="select2-search select2-search--inline">' + +        '<input class="select2-search__field" type="search" tabindex="-1"' + +        ' autocomplete="off" autocorrect="off" autocapitalize="off"' + +        ' spellcheck="false" role="textbox" aria-autocomplete="list" />' + +      '</li>' +    ); + +    this.$searchContainer = $search; +    this.$search = $search.find('input'); + +    var $rendered = decorated.call(this); + +    this._transferTabIndex(); + +    return $rendered; +  }; + +  Search.prototype.bind = function (decorated, container, $container) { +    var self = this; + +    decorated.call(this, container, $container); + +    container.on('open', function () { +      self.$search.trigger('focus'); +    }); + +    container.on('close', function () { +      self.$search.val(''); +      self.$search.removeAttr('aria-activedescendant'); +      self.$search.trigger('focus'); +    }); + +    container.on('enable', function () { +      self.$search.prop('disabled', false); + +      self._transferTabIndex(); +    }); + +    container.on('disable', function () { +      self.$search.prop('disabled', true); +    }); + +    container.on('focus', function (evt) { +      self.$search.trigger('focus'); +    }); + +    container.on('results:focus', function (params) { +      self.$search.attr('aria-activedescendant', params.id); +    }); + +    this.$selection.on('focusin', '.select2-search--inline', function (evt) { +      self.trigger('focus', evt); +    }); + +    this.$selection.on('focusout', '.select2-search--inline', function (evt) { +      self._handleBlur(evt); +    }); + +    this.$selection.on('keydown', '.select2-search--inline', function (evt) { +      evt.stopPropagation(); + +      self.trigger('keypress', evt); + +      self._keyUpPrevented = evt.isDefaultPrevented(); + +      var key = evt.which; + +      if (key === KEYS.BACKSPACE && self.$search.val() === '') { +        var $previousChoice = self.$searchContainer +          .prev('.select2-selection__choice'); + +        if ($previousChoice.length > 0) { +          var item = $previousChoice.data('data'); + +          self.searchRemoveChoice(item); + +          evt.preventDefault(); +        } +      } +    }); + +    // Try to detect the IE version should the `documentMode` property that +    // is stored on the document. This is only implemented in IE and is +    // slightly cleaner than doing a user agent check. +    // This property is not available in Edge, but Edge also doesn't have +    // this bug. +    var msie = document.documentMode; +    var disableInputEvents = msie && msie <= 11; + +    // Workaround for browsers which do not support the `input` event +    // This will prevent double-triggering of events for browsers which support +    // both the `keyup` and `input` events. +    this.$selection.on( +      'input.searchcheck', +      '.select2-search--inline', +      function (evt) { +        // IE will trigger the `input` event when a placeholder is used on a +        // search box. To get around this issue, we are forced to ignore all +        // `input` events in IE and keep using `keyup`. +        if (disableInputEvents) { +          self.$selection.off('input.search input.searchcheck'); +          return; +        } + +        // Unbind the duplicated `keyup` event +        self.$selection.off('keyup.search'); +      } +    ); + +    this.$selection.on( +      'keyup.search input.search', +      '.select2-search--inline', +      function (evt) { +        // IE will trigger the `input` event when a placeholder is used on a +        // search box. To get around this issue, we are forced to ignore all +        // `input` events in IE and keep using `keyup`. +        if (disableInputEvents && evt.type === 'input') { +          self.$selection.off('input.search input.searchcheck'); +          return; +        } + +        var key = evt.which; + +        // We can freely ignore events from modifier keys +        if (key == KEYS.SHIFT || key == KEYS.CTRL || key == KEYS.ALT) { +          return; +        } + +        // Tabbing will be handled during the `keydown` phase +        if (key == KEYS.TAB) { +          return; +        } + +        self.handleSearch(evt); +      } +    ); +  }; + +  /** +   * This method will transfer the tabindex attribute from the rendered +   * selection to the search box. This allows for the search box to be used as +   * the primary focus instead of the selection container. +   * +   * @private +   */ +  Search.prototype._transferTabIndex = function (decorated) { +    this.$search.attr('tabindex', this.$selection.attr('tabindex')); +    this.$selection.attr('tabindex', '-1'); +  }; + +  Search.prototype.createPlaceholder = function (decorated, placeholder) { +    this.$search.attr('placeholder', placeholder.text); +  }; + +  Search.prototype.update = function (decorated, data) { +    var searchHadFocus = this.$search[0] == document.activeElement; + +    this.$search.attr('placeholder', ''); + +    decorated.call(this, data); + +    this.$selection.find('.select2-selection__rendered') +                   .append(this.$searchContainer); + +    this.resizeSearch(); +    if (searchHadFocus) { +      this.$search.focus(); +    } +  }; + +  Search.prototype.handleSearch = function () { +    this.resizeSearch(); + +    if (!this._keyUpPrevented) { +      var input = this.$search.val(); + +      this.trigger('query', { +        term: input +      }); +    } + +    this._keyUpPrevented = false; +  }; + +  Search.prototype.searchRemoveChoice = function (decorated, item) { +    this.trigger('unselect', { +      data: item +    }); + +    this.$search.val(item.text); +    this.handleSearch(); +  }; + +  Search.prototype.resizeSearch = function () { +    this.$search.css('width', '25px'); + +    var width = ''; + +    if (this.$search.attr('placeholder') !== '') { +      width = this.$selection.find('.select2-selection__rendered').innerWidth(); +    } else { +      var minimumWidth = this.$search.val().length + 1; + +      width = (minimumWidth * 0.75) + 'em'; +    } + +    this.$search.css('width', width); +  }; + +  return Search; +}); + +S2.define('select2/selection/eventRelay',[ +  'jquery' +], function ($) { +  function EventRelay () { } + +  EventRelay.prototype.bind = function (decorated, container, $container) { +    var self = this; +    var relayEvents = [ +      'open', 'opening', +      'close', 'closing', +      'select', 'selecting', +      'unselect', 'unselecting' +    ]; + +    var preventableEvents = ['opening', 'closing', 'selecting', 'unselecting']; + +    decorated.call(this, container, $container); + +    container.on('*', function (name, params) { +      // Ignore events that should not be relayed +      if ($.inArray(name, relayEvents) === -1) { +        return; +      } + +      // The parameters should always be an object +      params = params || {}; + +      // Generate the jQuery event for the Select2 event +      var evt = $.Event('select2:' + name, { +        params: params +      }); + +      self.$element.trigger(evt); + +      // Only handle preventable events if it was one +      if ($.inArray(name, preventableEvents) === -1) { +        return; +      } + +      params.prevented = evt.isDefaultPrevented(); +    }); +  }; + +  return EventRelay; +}); + +S2.define('select2/translation',[ +  'jquery', +  'require' +], function ($, require) { +  function Translation (dict) { +    this.dict = dict || {}; +  } + +  Translation.prototype.all = function () { +    return this.dict; +  }; + +  Translation.prototype.get = function (key) { +    return this.dict[key]; +  }; + +  Translation.prototype.extend = function (translation) { +    this.dict = $.extend({}, translation.all(), this.dict); +  }; + +  // Static functions + +  Translation._cache = {}; + +  Translation.loadPath = function (path) { +    if (!(path in Translation._cache)) { +      var translations = require(path); + +      Translation._cache[path] = translations; +    } + +    return new Translation(Translation._cache[path]); +  }; + +  return Translation; +}); + +S2.define('select2/diacritics',[ + +], function () { +  var diacritics = { +    '\u24B6': 'A', +    '\uFF21': 'A', +    '\u00C0': 'A', +    '\u00C1': 'A', +    '\u00C2': 'A', +    '\u1EA6': 'A', +    '\u1EA4': 'A', +    '\u1EAA': 'A', +    '\u1EA8': 'A', +    '\u00C3': 'A', +    '\u0100': 'A', +    '\u0102': 'A', +    '\u1EB0': 'A', +    '\u1EAE': 'A', +    '\u1EB4': 'A', +    '\u1EB2': 'A', +    '\u0226': 'A', +    '\u01E0': 'A', +    '\u00C4': 'A', +    '\u01DE': 'A', +    '\u1EA2': 'A', +    '\u00C5': 'A', +    '\u01FA': 'A', +    '\u01CD': 'A', +    '\u0200': 'A', +    '\u0202': 'A', +    '\u1EA0': 'A', +    '\u1EAC': 'A', +    '\u1EB6': 'A', +    '\u1E00': 'A', +    '\u0104': 'A', +    '\u023A': 'A', +    '\u2C6F': 'A', +    '\uA732': 'AA', +    '\u00C6': 'AE', +    '\u01FC': 'AE', +    '\u01E2': 'AE', +    '\uA734': 'AO', +    '\uA736': 'AU', +    '\uA738': 'AV', +    '\uA73A': 'AV', +    '\uA73C': 'AY', +    '\u24B7': 'B', +    '\uFF22': 'B', +    '\u1E02': 'B', +    '\u1E04': 'B', +    '\u1E06': 'B', +    '\u0243': 'B', +    '\u0182': 'B', +    '\u0181': 'B', +    '\u24B8': 'C', +    '\uFF23': 'C', +    '\u0106': 'C', +    '\u0108': 'C', +    '\u010A': 'C', +    '\u010C': 'C', +    '\u00C7': 'C', +    '\u1E08': 'C', +    '\u0187': 'C', +    '\u023B': 'C', +    '\uA73E': 'C', +    '\u24B9': 'D', +    '\uFF24': 'D', +    '\u1E0A': 'D', +    '\u010E': 'D', +    '\u1E0C': 'D', +    '\u1E10': 'D', +    '\u1E12': 'D', +    '\u1E0E': 'D', +    '\u0110': 'D', +    '\u018B': 'D', +    '\u018A': 'D', +    '\u0189': 'D', +    '\uA779': 'D', +    '\u01F1': 'DZ', +    '\u01C4': 'DZ', +    '\u01F2': 'Dz', +    '\u01C5': 'Dz', +    '\u24BA': 'E', +    '\uFF25': 'E', +    '\u00C8': 'E', +    '\u00C9': 'E', +    '\u00CA': 'E', +    '\u1EC0': 'E', +    '\u1EBE': 'E', +    '\u1EC4': 'E', +    '\u1EC2': 'E', +    '\u1EBC': 'E', +    '\u0112': 'E', +    '\u1E14': 'E', +    '\u1E16': 'E', +    '\u0114': 'E', +    '\u0116': 'E', +    '\u00CB': 'E', +    '\u1EBA': 'E', +    '\u011A': 'E', +    '\u0204': 'E', +    '\u0206': 'E', +    '\u1EB8': 'E', +    '\u1EC6': 'E', +    '\u0228': 'E', +    '\u1E1C': 'E', +    '\u0118': 'E', +    '\u1E18': 'E', +    '\u1E1A': 'E', +    '\u0190': 'E', +    '\u018E': 'E', +    '\u24BB': 'F', +    '\uFF26': 'F', +    '\u1E1E': 'F', +    '\u0191': 'F', +    '\uA77B': 'F', +    '\u24BC': 'G', +    '\uFF27': 'G', +    '\u01F4': 'G', +    '\u011C': 'G', +    '\u1E20': 'G', +    '\u011E': 'G', +    '\u0120': 'G', +    '\u01E6': 'G', +    '\u0122': 'G', +    '\u01E4': 'G', +    '\u0193': 'G', +    '\uA7A0': 'G', +    '\uA77D': 'G', +    '\uA77E': 'G', +    '\u24BD': 'H', +    '\uFF28': 'H', +    '\u0124': 'H', +    '\u1E22': 'H', +    '\u1E26': 'H', +    '\u021E': 'H', +    '\u1E24': 'H', +    '\u1E28': 'H', +    '\u1E2A': 'H', +    '\u0126': 'H', +    '\u2C67': 'H', +    '\u2C75': 'H', +    '\uA78D': 'H', +    '\u24BE': 'I', +    '\uFF29': 'I', +    '\u00CC': 'I', +    '\u00CD': 'I', +    '\u00CE': 'I', +    '\u0128': 'I', +    '\u012A': 'I', +    '\u012C': 'I', +    '\u0130': 'I', +    '\u00CF': 'I', +    '\u1E2E': 'I', +    '\u1EC8': 'I', +    '\u01CF': 'I', +    '\u0208': 'I', +    '\u020A': 'I', +    '\u1ECA': 'I', +    '\u012E': 'I', +    '\u1E2C': 'I', +    '\u0197': 'I', +    '\u24BF': 'J', +    '\uFF2A': 'J', +    '\u0134': 'J', +    '\u0248': 'J', +    '\u24C0': 'K', +    '\uFF2B': 'K', +    '\u1E30': 'K', +    '\u01E8': 'K', +    '\u1E32': 'K', +    '\u0136': 'K', +    '\u1E34': 'K', +    '\u0198': 'K', +    '\u2C69': 'K', +    '\uA740': 'K', +    '\uA742': 'K', +    '\uA744': 'K', +    '\uA7A2': 'K', +    '\u24C1': 'L', +    '\uFF2C': 'L', +    '\u013F': 'L', +    '\u0139': 'L', +    '\u013D': 'L', +    '\u1E36': 'L', +    '\u1E38': 'L', +    '\u013B': 'L', +    '\u1E3C': 'L', +    '\u1E3A': 'L', +    '\u0141': 'L', +    '\u023D': 'L', +    '\u2C62': 'L', +    '\u2C60': 'L', +    '\uA748': 'L', +    '\uA746': 'L', +    '\uA780': 'L', +    '\u01C7': 'LJ', +    '\u01C8': 'Lj', +    '\u24C2': 'M', +    '\uFF2D': 'M', +    '\u1E3E': 'M', +    '\u1E40': 'M', +    '\u1E42': 'M', +    '\u2C6E': 'M', +    '\u019C': 'M', +    '\u24C3': 'N', +    '\uFF2E': 'N', +    '\u01F8': 'N', +    '\u0143': 'N', +    '\u00D1': 'N', +    '\u1E44': 'N', +    '\u0147': 'N', +    '\u1E46': 'N', +    '\u0145': 'N', +    '\u1E4A': 'N', +    '\u1E48': 'N', +    '\u0220': 'N', +    '\u019D': 'N', +    '\uA790': 'N', +    '\uA7A4': 'N', +    '\u01CA': 'NJ', +    '\u01CB': 'Nj', +    '\u24C4': 'O', +    '\uFF2F': 'O', +    '\u00D2': 'O', +    '\u00D3': 'O', +    '\u00D4': 'O', +    '\u1ED2': 'O', +    '\u1ED0': 'O', +    '\u1ED6': 'O', +    '\u1ED4': 'O', +    '\u00D5': 'O', +    '\u1E4C': 'O', +    '\u022C': 'O', +    '\u1E4E': 'O', +    '\u014C': 'O', +    '\u1E50': 'O', +    '\u1E52': 'O', +    '\u014E': 'O', +    '\u022E': 'O', +    '\u0230': 'O', +    '\u00D6': 'O', +    '\u022A': 'O', +    '\u1ECE': 'O', +    '\u0150': 'O', +    '\u01D1': 'O', +    '\u020C': 'O', +    '\u020E': 'O', +    '\u01A0': 'O', +    '\u1EDC': 'O', +    '\u1EDA': 'O', +    '\u1EE0': 'O', +    '\u1EDE': 'O', +    '\u1EE2': 'O', +    '\u1ECC': 'O', +    '\u1ED8': 'O', +    '\u01EA': 'O', +    '\u01EC': 'O', +    '\u00D8': 'O', +    '\u01FE': 'O', +    '\u0186': 'O', +    '\u019F': 'O', +    '\uA74A': 'O', +    '\uA74C': 'O', +    '\u01A2': 'OI', +    '\uA74E': 'OO', +    '\u0222': 'OU', +    '\u24C5': 'P', +    '\uFF30': 'P', +    '\u1E54': 'P', +    '\u1E56': 'P', +    '\u01A4': 'P', +    '\u2C63': 'P', +    '\uA750': 'P', +    '\uA752': 'P', +    '\uA754': 'P', +    '\u24C6': 'Q', +    '\uFF31': 'Q', +    '\uA756': 'Q', +    '\uA758': 'Q', +    '\u024A': 'Q', +    '\u24C7': 'R', +    '\uFF32': 'R', +    '\u0154': 'R', +    '\u1E58': 'R', +    '\u0158': 'R', +    '\u0210': 'R', +    '\u0212': 'R', +    '\u1E5A': 'R', +    '\u1E5C': 'R', +    '\u0156': 'R', +    '\u1E5E': 'R', +    '\u024C': 'R', +    '\u2C64': 'R', +    '\uA75A': 'R', +    '\uA7A6': 'R', +    '\uA782': 'R', +    '\u24C8': 'S', +    '\uFF33': 'S', +    '\u1E9E': 'S', +    '\u015A': 'S', +    '\u1E64': 'S', +    '\u015C': 'S', +    '\u1E60': 'S', +    '\u0160': 'S', +    '\u1E66': 'S', +    '\u1E62': 'S', +    '\u1E68': 'S', +    '\u0218': 'S', +    '\u015E': 'S', +    '\u2C7E': 'S', +    '\uA7A8': 'S', +    '\uA784': 'S', +    '\u24C9': 'T', +    '\uFF34': 'T', +    '\u1E6A': 'T', +    '\u0164': 'T', +    '\u1E6C': 'T', +    '\u021A': 'T', +    '\u0162': 'T', +    '\u1E70': 'T', +    '\u1E6E': 'T', +    '\u0166': 'T', +    '\u01AC': 'T', +    '\u01AE': 'T', +    '\u023E': 'T', +    '\uA786': 'T', +    '\uA728': 'TZ', +    '\u24CA': 'U', +    '\uFF35': 'U', +    '\u00D9': 'U', +    '\u00DA': 'U', +    '\u00DB': 'U', +    '\u0168': 'U', +    '\u1E78': 'U', +    '\u016A': 'U', +    '\u1E7A': 'U', +    '\u016C': 'U', +    '\u00DC': 'U', +    '\u01DB': 'U', +    '\u01D7': 'U', +    '\u01D5': 'U', +    '\u01D9': 'U', +    '\u1EE6': 'U', +    '\u016E': 'U', +    '\u0170': 'U', +    '\u01D3': 'U', +    '\u0214': 'U', +    '\u0216': 'U', +    '\u01AF': 'U', +    '\u1EEA': 'U', +    '\u1EE8': 'U', +    '\u1EEE': 'U', +    '\u1EEC': 'U', +    '\u1EF0': 'U', +    '\u1EE4': 'U', +    '\u1E72': 'U', +    '\u0172': 'U', +    '\u1E76': 'U', +    '\u1E74': 'U', +    '\u0244': 'U', +    '\u24CB': 'V', +    '\uFF36': 'V', +    '\u1E7C': 'V', +    '\u1E7E': 'V', +    '\u01B2': 'V', +    '\uA75E': 'V', +    '\u0245': 'V', +    '\uA760': 'VY', +    '\u24CC': 'W', +    '\uFF37': 'W', +    '\u1E80': 'W', +    '\u1E82': 'W', +    '\u0174': 'W', +    '\u1E86': 'W', +    '\u1E84': 'W', +    '\u1E88': 'W', +    '\u2C72': 'W', +    '\u24CD': 'X', +    '\uFF38': 'X', +    '\u1E8A': 'X', +    '\u1E8C': 'X', +    '\u24CE': 'Y', +    '\uFF39': 'Y', +    '\u1EF2': 'Y', +    '\u00DD': 'Y', +    '\u0176': 'Y', +    '\u1EF8': 'Y', +    '\u0232': 'Y', +    '\u1E8E': 'Y', +    '\u0178': 'Y', +    '\u1EF6': 'Y', +    '\u1EF4': 'Y', +    '\u01B3': 'Y', +    '\u024E': 'Y', +    '\u1EFE': 'Y', +    '\u24CF': 'Z', +    '\uFF3A': 'Z', +    '\u0179': 'Z', +    '\u1E90': 'Z', +    '\u017B': 'Z', +    '\u017D': 'Z', +    '\u1E92': 'Z', +    '\u1E94': 'Z', +    '\u01B5': 'Z', +    '\u0224': 'Z', +    '\u2C7F': 'Z', +    '\u2C6B': 'Z', +    '\uA762': 'Z', +    '\u24D0': 'a', +    '\uFF41': 'a', +    '\u1E9A': 'a', +    '\u00E0': 'a', +    '\u00E1': 'a', +    '\u00E2': 'a', +    '\u1EA7': 'a', +    '\u1EA5': 'a', +    '\u1EAB': 'a', +    '\u1EA9': 'a', +    '\u00E3': 'a', +    '\u0101': 'a', +    '\u0103': 'a', +    '\u1EB1': 'a', +    '\u1EAF': 'a', +    '\u1EB5': 'a', +    '\u1EB3': 'a', +    '\u0227': 'a', +    '\u01E1': 'a', +    '\u00E4': 'a', +    '\u01DF': 'a', +    '\u1EA3': 'a', +    '\u00E5': 'a', +    '\u01FB': 'a', +    '\u01CE': 'a', +    '\u0201': 'a', +    '\u0203': 'a', +    '\u1EA1': 'a', +    '\u1EAD': 'a', +    '\u1EB7': 'a', +    '\u1E01': 'a', +    '\u0105': 'a', +    '\u2C65': 'a', +    '\u0250': 'a', +    '\uA733': 'aa', +    '\u00E6': 'ae', +    '\u01FD': 'ae', +    '\u01E3': 'ae', +    '\uA735': 'ao', +    '\uA737': 'au', +    '\uA739': 'av', +    '\uA73B': 'av', +    '\uA73D': 'ay', +    '\u24D1': 'b', +    '\uFF42': 'b', +    '\u1E03': 'b', +    '\u1E05': 'b', +    '\u1E07': 'b', +    '\u0180': 'b', +    '\u0183': 'b', +    '\u0253': 'b', +    '\u24D2': 'c', +    '\uFF43': 'c', +    '\u0107': 'c', +    '\u0109': 'c', +    '\u010B': 'c', +    '\u010D': 'c', +    '\u00E7': 'c', +    '\u1E09': 'c', +    '\u0188': 'c', +    '\u023C': 'c', +    '\uA73F': 'c', +    '\u2184': 'c', +    '\u24D3': 'd', +    '\uFF44': 'd', +    '\u1E0B': 'd', +    '\u010F': 'd', +    '\u1E0D': 'd', +    '\u1E11': 'd', +    '\u1E13': 'd', +    '\u1E0F': 'd', +    '\u0111': 'd', +    '\u018C': 'd', +    '\u0256': 'd', +    '\u0257': 'd', +    '\uA77A': 'd', +    '\u01F3': 'dz', +    '\u01C6': 'dz', +    '\u24D4': 'e', +    '\uFF45': 'e', +    '\u00E8': 'e', +    '\u00E9': 'e', +    '\u00EA': 'e', +    '\u1EC1': 'e', +    '\u1EBF': 'e', +    '\u1EC5': 'e', +    '\u1EC3': 'e', +    '\u1EBD': 'e', +    '\u0113': 'e', +    '\u1E15': 'e', +    '\u1E17': 'e', +    '\u0115': 'e', +    '\u0117': 'e', +    '\u00EB': 'e', +    '\u1EBB': 'e', +    '\u011B': 'e', +    '\u0205': 'e', +    '\u0207': 'e', +    '\u1EB9': 'e', +    '\u1EC7': 'e', +    '\u0229': 'e', +    '\u1E1D': 'e', +    '\u0119': 'e', +    '\u1E19': 'e', +    '\u1E1B': 'e', +    '\u0247': 'e', +    '\u025B': 'e', +    '\u01DD': 'e', +    '\u24D5': 'f', +    '\uFF46': 'f', +    '\u1E1F': 'f', +    '\u0192': 'f', +    '\uA77C': 'f', +    '\u24D6': 'g', +    '\uFF47': 'g', +    '\u01F5': 'g', +    '\u011D': 'g', +    '\u1E21': 'g', +    '\u011F': 'g', +    '\u0121': 'g', +    '\u01E7': 'g', +    '\u0123': 'g', +    '\u01E5': 'g', +    '\u0260': 'g', +    '\uA7A1': 'g', +    '\u1D79': 'g', +    '\uA77F': 'g', +    '\u24D7': 'h', +    '\uFF48': 'h', +    '\u0125': 'h', +    '\u1E23': 'h', +    '\u1E27': 'h', +    '\u021F': 'h', +    '\u1E25': 'h', +    '\u1E29': 'h', +    '\u1E2B': 'h', +    '\u1E96': 'h', +    '\u0127': 'h', +    '\u2C68': 'h', +    '\u2C76': 'h', +    '\u0265': 'h', +    '\u0195': 'hv', +    '\u24D8': 'i', +    '\uFF49': 'i', +    '\u00EC': 'i', +    '\u00ED': 'i', +    '\u00EE': 'i', +    '\u0129': 'i', +    '\u012B': 'i', +    '\u012D': 'i', +    '\u00EF': 'i', +    '\u1E2F': 'i', +    '\u1EC9': 'i', +    '\u01D0': 'i', +    '\u0209': 'i', +    '\u020B': 'i', +    '\u1ECB': 'i', +    '\u012F': 'i', +    '\u1E2D': 'i', +    '\u0268': 'i', +    '\u0131': 'i', +    '\u24D9': 'j', +    '\uFF4A': 'j', +    '\u0135': 'j', +    '\u01F0': 'j', +    '\u0249': 'j', +    '\u24DA': 'k', +    '\uFF4B': 'k', +    '\u1E31': 'k', +    '\u01E9': 'k', +    '\u1E33': 'k', +    '\u0137': 'k', +    '\u1E35': 'k', +    '\u0199': 'k', +    '\u2C6A': 'k', +    '\uA741': 'k', +    '\uA743': 'k', +    '\uA745': 'k', +    '\uA7A3': 'k', +    '\u24DB': 'l', +    '\uFF4C': 'l', +    '\u0140': 'l', +    '\u013A': 'l', +    '\u013E': 'l', +    '\u1E37': 'l', +    '\u1E39': 'l', +    '\u013C': 'l', +    '\u1E3D': 'l', +    '\u1E3B': 'l', +    '\u017F': 'l', +    '\u0142': 'l', +    '\u019A': 'l', +    '\u026B': 'l', +    '\u2C61': 'l', +    '\uA749': 'l', +    '\uA781': 'l', +    '\uA747': 'l', +    '\u01C9': 'lj', +    '\u24DC': 'm', +    '\uFF4D': 'm', +    '\u1E3F': 'm', +    '\u1E41': 'm', +    '\u1E43': 'm', +    '\u0271': 'm', +    '\u026F': 'm', +    '\u24DD': 'n', +    '\uFF4E': 'n', +    '\u01F9': 'n', +    '\u0144': 'n', +    '\u00F1': 'n', +    '\u1E45': 'n', +    '\u0148': 'n', +    '\u1E47': 'n', +    '\u0146': 'n', +    '\u1E4B': 'n', +    '\u1E49': 'n', +    '\u019E': 'n', +    '\u0272': 'n', +    '\u0149': 'n', +    '\uA791': 'n', +    '\uA7A5': 'n', +    '\u01CC': 'nj', +    '\u24DE': 'o', +    '\uFF4F': 'o', +    '\u00F2': 'o', +    '\u00F3': 'o', +    '\u00F4': 'o', +    '\u1ED3': 'o', +    '\u1ED1': 'o', +    '\u1ED7': 'o', +    '\u1ED5': 'o', +    '\u00F5': 'o', +    '\u1E4D': 'o', +    '\u022D': 'o', +    '\u1E4F': 'o', +    '\u014D': 'o', +    '\u1E51': 'o', +    '\u1E53': 'o', +    '\u014F': 'o', +    '\u022F': 'o', +    '\u0231': 'o', +    '\u00F6': 'o', +    '\u022B': 'o', +    '\u1ECF': 'o', +    '\u0151': 'o', +    '\u01D2': 'o', +    '\u020D': 'o', +    '\u020F': 'o', +    '\u01A1': 'o', +    '\u1EDD': 'o', +    '\u1EDB': 'o', +    '\u1EE1': 'o', +    '\u1EDF': 'o', +    '\u1EE3': 'o', +    '\u1ECD': 'o', +    '\u1ED9': 'o', +    '\u01EB': 'o', +    '\u01ED': 'o', +    '\u00F8': 'o', +    '\u01FF': 'o', +    '\u0254': 'o', +    '\uA74B': 'o', +    '\uA74D': 'o', +    '\u0275': 'o', +    '\u01A3': 'oi', +    '\u0223': 'ou', +    '\uA74F': 'oo', +    '\u24DF': 'p', +    '\uFF50': 'p', +    '\u1E55': 'p', +    '\u1E57': 'p', +    '\u01A5': 'p', +    '\u1D7D': 'p', +    '\uA751': 'p', +    '\uA753': 'p', +    '\uA755': 'p', +    '\u24E0': 'q', +    '\uFF51': 'q', +    '\u024B': 'q', +    '\uA757': 'q', +    '\uA759': 'q', +    '\u24E1': 'r', +    '\uFF52': 'r', +    '\u0155': 'r', +    '\u1E59': 'r', +    '\u0159': 'r', +    '\u0211': 'r', +    '\u0213': 'r', +    '\u1E5B': 'r', +    '\u1E5D': 'r', +    '\u0157': 'r', +    '\u1E5F': 'r', +    '\u024D': 'r', +    '\u027D': 'r', +    '\uA75B': 'r', +    '\uA7A7': 'r', +    '\uA783': 'r', +    '\u24E2': 's', +    '\uFF53': 's', +    '\u00DF': 's', +    '\u015B': 's', +    '\u1E65': 's', +    '\u015D': 's', +    '\u1E61': 's', +    '\u0161': 's', +    '\u1E67': 's', +    '\u1E63': 's', +    '\u1E69': 's', +    '\u0219': 's', +    '\u015F': 's', +    '\u023F': 's', +    '\uA7A9': 's', +    '\uA785': 's', +    '\u1E9B': 's', +    '\u24E3': 't', +    '\uFF54': 't', +    '\u1E6B': 't', +    '\u1E97': 't', +    '\u0165': 't', +    '\u1E6D': 't', +    '\u021B': 't', +    '\u0163': 't', +    '\u1E71': 't', +    '\u1E6F': 't', +    '\u0167': 't', +    '\u01AD': 't', +    '\u0288': 't', +    '\u2C66': 't', +    '\uA787': 't', +    '\uA729': 'tz', +    '\u24E4': 'u', +    '\uFF55': 'u', +    '\u00F9': 'u', +    '\u00FA': 'u', +    '\u00FB': 'u', +    '\u0169': 'u', +    '\u1E79': 'u', +    '\u016B': 'u', +    '\u1E7B': 'u', +    '\u016D': 'u', +    '\u00FC': 'u', +    '\u01DC': 'u', +    '\u01D8': 'u', +    '\u01D6': 'u', +    '\u01DA': 'u', +    '\u1EE7': 'u', +    '\u016F': 'u', +    '\u0171': 'u', +    '\u01D4': 'u', +    '\u0215': 'u', +    '\u0217': 'u', +    '\u01B0': 'u', +    '\u1EEB': 'u', +    '\u1EE9': 'u', +    '\u1EEF': 'u', +    '\u1EED': 'u', +    '\u1EF1': 'u', +    '\u1EE5': 'u', +    '\u1E73': 'u', +    '\u0173': 'u', +    '\u1E77': 'u', +    '\u1E75': 'u', +    '\u0289': 'u', +    '\u24E5': 'v', +    '\uFF56': 'v', +    '\u1E7D': 'v', +    '\u1E7F': 'v', +    '\u028B': 'v', +    '\uA75F': 'v', +    '\u028C': 'v', +    '\uA761': 'vy', +    '\u24E6': 'w', +    '\uFF57': 'w', +    '\u1E81': 'w', +    '\u1E83': 'w', +    '\u0175': 'w', +    '\u1E87': 'w', +    '\u1E85': 'w', +    '\u1E98': 'w', +    '\u1E89': 'w', +    '\u2C73': 'w', +    '\u24E7': 'x', +    '\uFF58': 'x', +    '\u1E8B': 'x', +    '\u1E8D': 'x', +    '\u24E8': 'y', +    '\uFF59': 'y', +    '\u1EF3': 'y', +    '\u00FD': 'y', +    '\u0177': 'y', +    '\u1EF9': 'y', +    '\u0233': 'y', +    '\u1E8F': 'y', +    '\u00FF': 'y', +    '\u1EF7': 'y', +    '\u1E99': 'y', +    '\u1EF5': 'y', +    '\u01B4': 'y', +    '\u024F': 'y', +    '\u1EFF': 'y', +    '\u24E9': 'z', +    '\uFF5A': 'z', +    '\u017A': 'z', +    '\u1E91': 'z', +    '\u017C': 'z', +    '\u017E': 'z', +    '\u1E93': 'z', +    '\u1E95': 'z', +    '\u01B6': 'z', +    '\u0225': 'z', +    '\u0240': 'z', +    '\u2C6C': 'z', +    '\uA763': 'z', +    '\u0386': '\u0391', +    '\u0388': '\u0395', +    '\u0389': '\u0397', +    '\u038A': '\u0399', +    '\u03AA': '\u0399', +    '\u038C': '\u039F', +    '\u038E': '\u03A5', +    '\u03AB': '\u03A5', +    '\u038F': '\u03A9', +    '\u03AC': '\u03B1', +    '\u03AD': '\u03B5', +    '\u03AE': '\u03B7', +    '\u03AF': '\u03B9', +    '\u03CA': '\u03B9', +    '\u0390': '\u03B9', +    '\u03CC': '\u03BF', +    '\u03CD': '\u03C5', +    '\u03CB': '\u03C5', +    '\u03B0': '\u03C5', +    '\u03C9': '\u03C9', +    '\u03C2': '\u03C3' +  }; + +  return diacritics; +}); + +S2.define('select2/data/base',[ +  '../utils' +], function (Utils) { +  function BaseAdapter ($element, options) { +    BaseAdapter.__super__.constructor.call(this); +  } + +  Utils.Extend(BaseAdapter, Utils.Observable); + +  BaseAdapter.prototype.current = function (callback) { +    throw new Error('The `current` method must be defined in child classes.'); +  }; + +  BaseAdapter.prototype.query = function (params, callback) { +    throw new Error('The `query` method must be defined in child classes.'); +  }; + +  BaseAdapter.prototype.bind = function (container, $container) { +    // Can be implemented in subclasses +  }; + +  BaseAdapter.prototype.destroy = function () { +    // Can be implemented in subclasses +  }; + +  BaseAdapter.prototype.generateResultId = function (container, data) { +    var id = container.id + '-result-'; + +    id += Utils.generateChars(4); + +    if (data.id != null) { +      id += '-' + data.id.toString(); +    } else { +      id += '-' + Utils.generateChars(4); +    } +    return id; +  }; + +  return BaseAdapter; +}); + +S2.define('select2/data/select',[ +  './base', +  '../utils', +  'jquery' +], function (BaseAdapter, Utils, $) { +  function SelectAdapter ($element, options) { +    this.$element = $element; +    this.options = options; + +    SelectAdapter.__super__.constructor.call(this); +  } + +  Utils.Extend(SelectAdapter, BaseAdapter); + +  SelectAdapter.prototype.current = function (callback) { +    var data = []; +    var self = this; + +    this.$element.find(':selected').each(function () { +      var $option = $(this); + +      var option = self.item($option); + +      data.push(option); +    }); + +    callback(data); +  }; + +  SelectAdapter.prototype.select = function (data) { +    var self = this; + +    data.selected = true; + +    // If data.element is a DOM node, use it instead +    if ($(data.element).is('option')) { +      data.element.selected = true; + +      this.$element.trigger('change'); + +      return; +    } + +    if (this.$element.prop('multiple')) { +      this.current(function (currentData) { +        var val = []; + +        data = [data]; +        data.push.apply(data, currentData); + +        for (var d = 0; d < data.length; d++) { +          var id = data[d].id; + +          if ($.inArray(id, val) === -1) { +            val.push(id); +          } +        } + +        self.$element.val(val); +        self.$element.trigger('change'); +      }); +    } else { +      var val = data.id; + +      this.$element.val(val); +      this.$element.trigger('change'); +    } +  }; + +  SelectAdapter.prototype.unselect = function (data) { +    var self = this; + +    if (!this.$element.prop('multiple')) { +      return; +    } + +    data.selected = false; + +    if ($(data.element).is('option')) { +      data.element.selected = false; + +      this.$element.trigger('change'); + +      return; +    } + +    this.current(function (currentData) { +      var val = []; + +      for (var d = 0; d < currentData.length; d++) { +        var id = currentData[d].id; + +        if (id !== data.id && $.inArray(id, val) === -1) { +          val.push(id); +        } +      } + +      self.$element.val(val); + +      self.$element.trigger('change'); +    }); +  }; + +  SelectAdapter.prototype.bind = function (container, $container) { +    var self = this; + +    this.container = container; + +    container.on('select', function (params) { +      self.select(params.data); +    }); + +    container.on('unselect', function (params) { +      self.unselect(params.data); +    }); +  }; + +  SelectAdapter.prototype.destroy = function () { +    // Remove anything added to child elements +    this.$element.find('*').each(function () { +      // Remove any custom data set by Select2 +      $.removeData(this, 'data'); +    }); +  }; + +  SelectAdapter.prototype.query = function (params, callback) { +    var data = []; +    var self = this; + +    var $options = this.$element.children(); + +    $options.each(function () { +      var $option = $(this); + +      if (!$option.is('option') && !$option.is('optgroup')) { +        return; +      } + +      var option = self.item($option); + +      var matches = self.matches(params, option); + +      if (matches !== null) { +        data.push(matches); +      } +    }); + +    callback({ +      results: data +    }); +  }; + +  SelectAdapter.prototype.addOptions = function ($options) { +    Utils.appendMany(this.$element, $options); +  }; + +  SelectAdapter.prototype.option = function (data) { +    var option; + +    if (data.children) { +      option = document.createElement('optgroup'); +      option.label = data.text; +    } else { +      option = document.createElement('option'); + +      if (option.textContent !== undefined) { +        option.textContent = data.text; +      } else { +        option.innerText = data.text; +      } +    } + +    if (data.id) { +      option.value = data.id; +    } + +    if (data.disabled) { +      option.disabled = true; +    } + +    if (data.selected) { +      option.selected = true; +    } + +    if (data.title) { +      option.title = data.title; +    } + +    var $option = $(option); + +    var normalizedData = this._normalizeItem(data); +    normalizedData.element = option; + +    // Override the option's data with the combined data +    $.data(option, 'data', normalizedData); + +    return $option; +  }; + +  SelectAdapter.prototype.item = function ($option) { +    var data = {}; + +    data = $.data($option[0], 'data'); + +    if (data != null) { +      return data; +    } + +    if ($option.is('option')) { +      data = { +        id: $option.val(), +        text: $option.text(), +        disabled: $option.prop('disabled'), +        selected: $option.prop('selected'), +        title: $option.prop('title') +      }; +    } else if ($option.is('optgroup')) { +      data = { +        text: $option.prop('label'), +        children: [], +        title: $option.prop('title') +      }; + +      var $children = $option.children('option'); +      var children = []; + +      for (var c = 0; c < $children.length; c++) { +        var $child = $($children[c]); + +        var child = this.item($child); + +        children.push(child); +      } + +      data.children = children; +    } + +    data = this._normalizeItem(data); +    data.element = $option[0]; + +    $.data($option[0], 'data', data); + +    return data; +  }; + +  SelectAdapter.prototype._normalizeItem = function (item) { +    if (!$.isPlainObject(item)) { +      item = { +        id: item, +        text: item +      }; +    } + +    item = $.extend({}, { +      text: '' +    }, item); + +    var defaults = { +      selected: false, +      disabled: false +    }; + +    if (item.id != null) { +      item.id = item.id.toString(); +    } + +    if (item.text != null) { +      item.text = item.text.toString(); +    } + +    if (item._resultId == null && item.id && this.container != null) { +      item._resultId = this.generateResultId(this.container, item); +    } + +    return $.extend({}, defaults, item); +  }; + +  SelectAdapter.prototype.matches = function (params, data) { +    var matcher = this.options.get('matcher'); + +    return matcher(params, data); +  }; + +  return SelectAdapter; +}); + +S2.define('select2/data/array',[ +  './select', +  '../utils', +  'jquery' +], function (SelectAdapter, Utils, $) { +  function ArrayAdapter ($element, options) { +    var data = options.get('data') || []; + +    ArrayAdapter.__super__.constructor.call(this, $element, options); + +    this.addOptions(this.convertToOptions(data)); +  } + +  Utils.Extend(ArrayAdapter, SelectAdapter); + +  ArrayAdapter.prototype.select = function (data) { +    var $option = this.$element.find('option').filter(function (i, elm) { +      return elm.value == data.id.toString(); +    }); + +    if ($option.length === 0) { +      $option = this.option(data); + +      this.addOptions($option); +    } + +    ArrayAdapter.__super__.select.call(this, data); +  }; + +  ArrayAdapter.prototype.convertToOptions = function (data) { +    var self = this; + +    var $existing = this.$element.find('option'); +    var existingIds = $existing.map(function () { +      return self.item($(this)).id; +    }).get(); + +    var $options = []; + +    // Filter out all items except for the one passed in the argument +    function onlyItem (item) { +      return function () { +        return $(this).val() == item.id; +      }; +    } + +    for (var d = 0; d < data.length; d++) { +      var item = this._normalizeItem(data[d]); + +      // Skip items which were pre-loaded, only merge the data +      if ($.inArray(item.id, existingIds) >= 0) { +        var $existingOption = $existing.filter(onlyItem(item)); + +        var existingData = this.item($existingOption); +        var newData = $.extend(true, {}, item, existingData); + +        var $newOption = this.option(newData); + +        $existingOption.replaceWith($newOption); + +        continue; +      } + +      var $option = this.option(item); + +      if (item.children) { +        var $children = this.convertToOptions(item.children); + +        Utils.appendMany($option, $children); +      } + +      $options.push($option); +    } + +    return $options; +  }; + +  return ArrayAdapter; +}); + +S2.define('select2/data/ajax',[ +  './array', +  '../utils', +  'jquery' +], function (ArrayAdapter, Utils, $) { +  function AjaxAdapter ($element, options) { +    this.ajaxOptions = this._applyDefaults(options.get('ajax')); + +    if (this.ajaxOptions.processResults != null) { +      this.processResults = this.ajaxOptions.processResults; +    } + +    AjaxAdapter.__super__.constructor.call(this, $element, options); +  } + +  Utils.Extend(AjaxAdapter, ArrayAdapter); + +  AjaxAdapter.prototype._applyDefaults = function (options) { +    var defaults = { +      data: function (params) { +        return $.extend({}, params, { +          q: params.term +        }); +      }, +      transport: function (params, success, failure) { +        var $request = $.ajax(params); + +        $request.then(success); +        $request.fail(failure); + +        return $request; +      } +    }; + +    return $.extend({}, defaults, options, true); +  }; + +  AjaxAdapter.prototype.processResults = function (results) { +    return results; +  }; + +  AjaxAdapter.prototype.query = function (params, callback) { +    var matches = []; +    var self = this; + +    if (this._request != null) { +      // JSONP requests cannot always be aborted +      if ($.isFunction(this._request.abort)) { +        this._request.abort(); +      } + +      this._request = null; +    } + +    var options = $.extend({ +      type: 'GET' +    }, this.ajaxOptions); + +    if (typeof options.url === 'function') { +      options.url = options.url.call(this.$element, params); +    } + +    if (typeof options.data === 'function') { +      options.data = options.data.call(this.$element, params); +    } + +    function request () { +      var $request = options.transport(options, function (data) { +        var results = self.processResults(data, params); + +        if (self.options.get('debug') && window.console && console.error) { +          // Check to make sure that the response included a `results` key. +          if (!results || !results.results || !$.isArray(results.results)) { +            console.error( +              'Select2: The AJAX results did not return an array in the ' + +              '`results` key of the response.' +            ); +          } +        } + +        callback(results); +      }, function () { +        // Attempt to detect if a request was aborted +        // Only works if the transport exposes a status property +        if ($request.status && $request.status === '0') { +          return; +        } + +        self.trigger('results:message', { +          message: 'errorLoading' +        }); +      }); + +      self._request = $request; +    } + +    if (this.ajaxOptions.delay && params.term != null) { +      if (this._queryTimeout) { +        window.clearTimeout(this._queryTimeout); +      } + +      this._queryTimeout = window.setTimeout(request, this.ajaxOptions.delay); +    } else { +      request(); +    } +  }; + +  return AjaxAdapter; +}); + +S2.define('select2/data/tags',[ +  'jquery' +], function ($) { +  function Tags (decorated, $element, options) { +    var tags = options.get('tags'); + +    var createTag = options.get('createTag'); + +    if (createTag !== undefined) { +      this.createTag = createTag; +    } + +    var insertTag = options.get('insertTag'); + +    if (insertTag !== undefined) { +        this.insertTag = insertTag; +    } + +    decorated.call(this, $element, options); + +    if ($.isArray(tags)) { +      for (var t = 0; t < tags.length; t++) { +        var tag = tags[t]; +        var item = this._normalizeItem(tag); + +        var $option = this.option(item); + +        this.$element.append($option); +      } +    } +  } + +  Tags.prototype.query = function (decorated, params, callback) { +    var self = this; + +    this._removeOldTags(); + +    if (params.term == null || params.page != null) { +      decorated.call(this, params, callback); +      return; +    } + +    function wrapper (obj, child) { +      var data = obj.results; + +      for (var i = 0; i < data.length; i++) { +        var option = data[i]; + +        var checkChildren = ( +          option.children != null && +          !wrapper({ +            results: option.children +          }, true) +        ); + +        var checkText = option.text === params.term; + +        if (checkText || checkChildren) { +          if (child) { +            return false; +          } + +          obj.data = data; +          callback(obj); + +          return; +        } +      } + +      if (child) { +        return true; +      } + +      var tag = self.createTag(params); + +      if (tag != null) { +        var $option = self.option(tag); +        $option.attr('data-select2-tag', true); + +        self.addOptions([$option]); + +        self.insertTag(data, tag); +      } + +      obj.results = data; + +      callback(obj); +    } + +    decorated.call(this, params, wrapper); +  }; + +  Tags.prototype.createTag = function (decorated, params) { +    var term = $.trim(params.term); + +    if (term === '') { +      return null; +    } + +    return { +      id: term, +      text: term +    }; +  }; + +  Tags.prototype.insertTag = function (_, data, tag) { +    data.unshift(tag); +  }; + +  Tags.prototype._removeOldTags = function (_) { +    var tag = this._lastTag; + +    var $options = this.$element.find('option[data-select2-tag]'); + +    $options.each(function () { +      if (this.selected) { +        return; +      } + +      $(this).remove(); +    }); +  }; + +  return Tags; +}); + +S2.define('select2/data/tokenizer',[ +  'jquery' +], function ($) { +  function Tokenizer (decorated, $element, options) { +    var tokenizer = options.get('tokenizer'); + +    if (tokenizer !== undefined) { +      this.tokenizer = tokenizer; +    } + +    decorated.call(this, $element, options); +  } + +  Tokenizer.prototype.bind = function (decorated, container, $container) { +    decorated.call(this, container, $container); + +    this.$search =  container.dropdown.$search || container.selection.$search || +      $container.find('.select2-search__field'); +  }; + +  Tokenizer.prototype.query = function (decorated, params, callback) { +    var self = this; + +    function createAndSelect (data) { +      // Normalize the data object so we can use it for checks +      var item = self._normalizeItem(data); + +      // Check if the data object already exists as a tag +      // Select it if it doesn't +      var $existingOptions = self.$element.find('option').filter(function () { +        return $(this).val() === item.id; +      }); + +      // If an existing option wasn't found for it, create the option +      if (!$existingOptions.length) { +        var $option = self.option(item); +        $option.attr('data-select2-tag', true); + +        self._removeOldTags(); +        self.addOptions([$option]); +      } + +      // Select the item, now that we know there is an option for it +      select(item); +    } + +    function select (data) { +      self.trigger('select', { +        data: data +      }); +    } + +    params.term = params.term || ''; + +    var tokenData = this.tokenizer(params, this.options, createAndSelect); + +    if (tokenData.term !== params.term) { +      // Replace the search term if we have the search box +      if (this.$search.length) { +        this.$search.val(tokenData.term); +        this.$search.focus(); +      } + +      params.term = tokenData.term; +    } + +    decorated.call(this, params, callback); +  }; + +  Tokenizer.prototype.tokenizer = function (_, params, options, callback) { +    var separators = options.get('tokenSeparators') || []; +    var term = params.term; +    var i = 0; + +    var createTag = this.createTag || function (params) { +      return { +        id: params.term, +        text: params.term +      }; +    }; + +    while (i < term.length) { +      var termChar = term[i]; + +      if ($.inArray(termChar, separators) === -1) { +        i++; + +        continue; +      } + +      var part = term.substr(0, i); +      var partParams = $.extend({}, params, { +        term: part +      }); + +      var data = createTag(partParams); + +      if (data == null) { +        i++; +        continue; +      } + +      callback(data); + +      // Reset the term to not include the tokenized portion +      term = term.substr(i + 1) || ''; +      i = 0; +    } + +    return { +      term: term +    }; +  }; + +  return Tokenizer; +}); + +S2.define('select2/data/minimumInputLength',[ + +], function () { +  function MinimumInputLength (decorated, $e, options) { +    this.minimumInputLength = options.get('minimumInputLength'); + +    decorated.call(this, $e, options); +  } + +  MinimumInputLength.prototype.query = function (decorated, params, callback) { +    params.term = params.term || ''; + +    if (params.term.length < this.minimumInputLength) { +      this.trigger('results:message', { +        message: 'inputTooShort', +        args: { +          minimum: this.minimumInputLength, +          input: params.term, +          params: params +        } +      }); + +      return; +    } + +    decorated.call(this, params, callback); +  }; + +  return MinimumInputLength; +}); + +S2.define('select2/data/maximumInputLength',[ + +], function () { +  function MaximumInputLength (decorated, $e, options) { +    this.maximumInputLength = options.get('maximumInputLength'); + +    decorated.call(this, $e, options); +  } + +  MaximumInputLength.prototype.query = function (decorated, params, callback) { +    params.term = params.term || ''; + +    if (this.maximumInputLength > 0 && +        params.term.length > this.maximumInputLength) { +      this.trigger('results:message', { +        message: 'inputTooLong', +        args: { +          maximum: this.maximumInputLength, +          input: params.term, +          params: params +        } +      }); + +      return; +    } + +    decorated.call(this, params, callback); +  }; + +  return MaximumInputLength; +}); + +S2.define('select2/data/maximumSelectionLength',[ + +], function (){ +  function MaximumSelectionLength (decorated, $e, options) { +    this.maximumSelectionLength = options.get('maximumSelectionLength'); + +    decorated.call(this, $e, options); +  } + +  MaximumSelectionLength.prototype.query = +    function (decorated, params, callback) { +      var self = this; + +      this.current(function (currentData) { +        var count = currentData != null ? currentData.length : 0; +        if (self.maximumSelectionLength > 0 && +          count >= self.maximumSelectionLength) { +          self.trigger('results:message', { +            message: 'maximumSelected', +            args: { +              maximum: self.maximumSelectionLength +            } +          }); +          return; +        } +        decorated.call(self, params, callback); +      }); +  }; + +  return MaximumSelectionLength; +}); + +S2.define('select2/dropdown',[ +  'jquery', +  './utils' +], function ($, Utils) { +  function Dropdown ($element, options) { +    this.$element = $element; +    this.options = options; + +    Dropdown.__super__.constructor.call(this); +  } + +  Utils.Extend(Dropdown, Utils.Observable); + +  Dropdown.prototype.render = function () { +    var $dropdown = $( +      '<span class="select2-dropdown">' + +        '<span class="select2-results"></span>' + +      '</span>' +    ); + +    $dropdown.attr('dir', this.options.get('dir')); + +    this.$dropdown = $dropdown; + +    return $dropdown; +  }; + +  Dropdown.prototype.bind = function () { +    // Should be implemented in subclasses +  }; + +  Dropdown.prototype.position = function ($dropdown, $container) { +    // Should be implmented in subclasses +  }; + +  Dropdown.prototype.destroy = function () { +    // Remove the dropdown from the DOM +    this.$dropdown.remove(); +  }; + +  return Dropdown; +}); + +S2.define('select2/dropdown/search',[ +  'jquery', +  '../utils' +], function ($, Utils) { +  function Search () { } + +  Search.prototype.render = function (decorated) { +    var $rendered = decorated.call(this); + +    var $search = $( +      '<span class="select2-search select2-search--dropdown">' + +        '<input class="select2-search__field" type="search" tabindex="-1"' + +        ' autocomplete="off" autocorrect="off" autocapitalize="off"' + +        ' spellcheck="false" role="textbox" />' + +      '</span>' +    ); + +    this.$searchContainer = $search; +    this.$search = $search.find('input'); + +    $rendered.prepend($search); + +    return $rendered; +  }; + +  Search.prototype.bind = function (decorated, container, $container) { +    var self = this; + +    decorated.call(this, container, $container); + +    this.$search.on('keydown', function (evt) { +      self.trigger('keypress', evt); + +      self._keyUpPrevented = evt.isDefaultPrevented(); +    }); + +    // Workaround for browsers which do not support the `input` event +    // This will prevent double-triggering of events for browsers which support +    // both the `keyup` and `input` events. +    this.$search.on('input', function (evt) { +      // Unbind the duplicated `keyup` event +      $(this).off('keyup'); +    }); + +    this.$search.on('keyup input', function (evt) { +      self.handleSearch(evt); +    }); + +    container.on('open', function () { +      self.$search.attr('tabindex', 0); + +      self.$search.focus(); + +      window.setTimeout(function () { +        self.$search.focus(); +      }, 0); +    }); + +    container.on('close', function () { +      self.$search.attr('tabindex', -1); + +      self.$search.val(''); +    }); + +    container.on('focus', function () { +      if (container.isOpen()) { +        self.$search.focus(); +      } +    }); + +    container.on('results:all', function (params) { +      if (params.query.term == null || params.query.term === '') { +        var showSearch = self.showSearch(params); + +        if (showSearch) { +          self.$searchContainer.removeClass('select2-search--hide'); +        } else { +          self.$searchContainer.addClass('select2-search--hide'); +        } +      } +    }); +  }; + +  Search.prototype.handleSearch = function (evt) { +    if (!this._keyUpPrevented) { +      var input = this.$search.val(); + +      this.trigger('query', { +        term: input +      }); +    } + +    this._keyUpPrevented = false; +  }; + +  Search.prototype.showSearch = function (_, params) { +    return true; +  }; + +  return Search; +}); + +S2.define('select2/dropdown/hidePlaceholder',[ + +], function () { +  function HidePlaceholder (decorated, $element, options, dataAdapter) { +    this.placeholder = this.normalizePlaceholder(options.get('placeholder')); + +    decorated.call(this, $element, options, dataAdapter); +  } + +  HidePlaceholder.prototype.append = function (decorated, data) { +    data.results = this.removePlaceholder(data.results); + +    decorated.call(this, data); +  }; + +  HidePlaceholder.prototype.normalizePlaceholder = function (_, placeholder) { +    if (typeof placeholder === 'string') { +      placeholder = { +        id: '', +        text: placeholder +      }; +    } + +    return placeholder; +  }; + +  HidePlaceholder.prototype.removePlaceholder = function (_, data) { +    var modifiedData = data.slice(0); + +    for (var d = data.length - 1; d >= 0; d--) { +      var item = data[d]; + +      if (this.placeholder.id === item.id) { +        modifiedData.splice(d, 1); +      } +    } + +    return modifiedData; +  }; + +  return HidePlaceholder; +}); + +S2.define('select2/dropdown/infiniteScroll',[ +  'jquery' +], function ($) { +  function InfiniteScroll (decorated, $element, options, dataAdapter) { +    this.lastParams = {}; + +    decorated.call(this, $element, options, dataAdapter); + +    this.$loadingMore = this.createLoadingMore(); +    this.loading = false; +  } + +  InfiniteScroll.prototype.append = function (decorated, data) { +    this.$loadingMore.remove(); +    this.loading = false; + +    decorated.call(this, data); + +    if (this.showLoadingMore(data)) { +      this.$results.append(this.$loadingMore); +    } +  }; + +  InfiniteScroll.prototype.bind = function (decorated, container, $container) { +    var self = this; + +    decorated.call(this, container, $container); + +    container.on('query', function (params) { +      self.lastParams = params; +      self.loading = true; +    }); + +    container.on('query:append', function (params) { +      self.lastParams = params; +      self.loading = true; +    }); + +    this.$results.on('scroll', function () { +      var isLoadMoreVisible = $.contains( +        document.documentElement, +        self.$loadingMore[0] +      ); + +      if (self.loading || !isLoadMoreVisible) { +        return; +      } + +      var currentOffset = self.$results.offset().top + +        self.$results.outerHeight(false); +      var loadingMoreOffset = self.$loadingMore.offset().top + +        self.$loadingMore.outerHeight(false); + +      if (currentOffset + 50 >= loadingMoreOffset) { +        self.loadMore(); +      } +    }); +  }; + +  InfiniteScroll.prototype.loadMore = function () { +    this.loading = true; + +    var params = $.extend({}, {page: 1}, this.lastParams); + +    params.page++; + +    this.trigger('query:append', params); +  }; + +  InfiniteScroll.prototype.showLoadingMore = function (_, data) { +    return data.pagination && data.pagination.more; +  }; + +  InfiniteScroll.prototype.createLoadingMore = function () { +    var $option = $( +      '<li ' + +      'class="select2-results__option select2-results__option--load-more"' + +      'role="treeitem" aria-disabled="true"></li>' +    ); + +    var message = this.options.get('translations').get('loadingMore'); + +    $option.html(message(this.lastParams)); + +    return $option; +  }; + +  return InfiniteScroll; +}); + +S2.define('select2/dropdown/attachBody',[ +  'jquery', +  '../utils' +], function ($, Utils) { +  function AttachBody (decorated, $element, options) { +    this.$dropdownParent = options.get('dropdownParent') || $(document.body); + +    decorated.call(this, $element, options); +  } + +  AttachBody.prototype.bind = function (decorated, container, $container) { +    var self = this; + +    var setupResultsEvents = false; + +    decorated.call(this, container, $container); + +    container.on('open', function () { +      self._showDropdown(); +      self._attachPositioningHandler(container); + +      if (!setupResultsEvents) { +        setupResultsEvents = true; + +        container.on('results:all', function () { +          self._positionDropdown(); +          self._resizeDropdown(); +        }); + +        container.on('results:append', function () { +          self._positionDropdown(); +          self._resizeDropdown(); +        }); +      } +    }); + +    container.on('close', function () { +      self._hideDropdown(); +      self._detachPositioningHandler(container); +    }); + +    this.$dropdownContainer.on('mousedown', function (evt) { +      evt.stopPropagation(); +    }); +  }; + +  AttachBody.prototype.destroy = function (decorated) { +    decorated.call(this); + +    this.$dropdownContainer.remove(); +  }; + +  AttachBody.prototype.position = function (decorated, $dropdown, $container) { +    // Clone all of the container classes +    $dropdown.attr('class', $container.attr('class')); + +    $dropdown.removeClass('select2'); +    $dropdown.addClass('select2-container--open'); + +    $dropdown.css({ +      position: 'absolute', +      top: -999999 +    }); + +    this.$container = $container; +  }; + +  AttachBody.prototype.render = function (decorated) { +    var $container = $('<span></span>'); + +    var $dropdown = decorated.call(this); +    $container.append($dropdown); + +    this.$dropdownContainer = $container; + +    return $container; +  }; + +  AttachBody.prototype._hideDropdown = function (decorated) { +    this.$dropdownContainer.detach(); +  }; + +  AttachBody.prototype._attachPositioningHandler = +      function (decorated, container) { +    var self = this; + +    var scrollEvent = 'scroll.select2.' + container.id; +    var resizeEvent = 'resize.select2.' + container.id; +    var orientationEvent = 'orientationchange.select2.' + container.id; + +    var $watchers = this.$container.parents().filter(Utils.hasScroll); +    $watchers.each(function () { +      $(this).data('select2-scroll-position', { +        x: $(this).scrollLeft(), +        y: $(this).scrollTop() +      }); +    }); + +    $watchers.on(scrollEvent, function (ev) { +      var position = $(this).data('select2-scroll-position'); +      $(this).scrollTop(position.y); +    }); + +    $(window).on(scrollEvent + ' ' + resizeEvent + ' ' + orientationEvent, +      function (e) { +      self._positionDropdown(); +      self._resizeDropdown(); +    }); +  }; + +  AttachBody.prototype._detachPositioningHandler = +      function (decorated, container) { +    var scrollEvent = 'scroll.select2.' + container.id; +    var resizeEvent = 'resize.select2.' + container.id; +    var orientationEvent = 'orientationchange.select2.' + container.id; + +    var $watchers = this.$container.parents().filter(Utils.hasScroll); +    $watchers.off(scrollEvent); + +    $(window).off(scrollEvent + ' ' + resizeEvent + ' ' + orientationEvent); +  }; + +  AttachBody.prototype._positionDropdown = function () { +    var $window = $(window); + +    var isCurrentlyAbove = this.$dropdown.hasClass('select2-dropdown--above'); +    var isCurrentlyBelow = this.$dropdown.hasClass('select2-dropdown--below'); + +    var newDirection = null; + +    var offset = this.$container.offset(); + +    offset.bottom = offset.top + this.$container.outerHeight(false); + +    var container = { +      height: this.$container.outerHeight(false) +    }; + +    container.top = offset.top; +    container.bottom = offset.top + container.height; + +    var dropdown = { +      height: this.$dropdown.outerHeight(false) +    }; + +    var viewport = { +      top: $window.scrollTop(), +      bottom: $window.scrollTop() + $window.height() +    }; + +    var enoughRoomAbove = viewport.top < (offset.top - dropdown.height); +    var enoughRoomBelow = viewport.bottom > (offset.bottom + dropdown.height); + +    var css = { +      left: offset.left, +      top: container.bottom +    }; + +    // Determine what the parent element is to use for calciulating the offset +    var $offsetParent = this.$dropdownParent; + +    // For statically positoned elements, we need to get the element +    // that is determining the offset +    if ($offsetParent.css('position') === 'static') { +      $offsetParent = $offsetParent.offsetParent(); +    } + +    var parentOffset = $offsetParent.offset(); + +    css.top -= parentOffset.top; +    css.left -= parentOffset.left; + +    if (!isCurrentlyAbove && !isCurrentlyBelow) { +      newDirection = 'below'; +    } + +    if (!enoughRoomBelow && enoughRoomAbove && !isCurrentlyAbove) { +      newDirection = 'above'; +    } else if (!enoughRoomAbove && enoughRoomBelow && isCurrentlyAbove) { +      newDirection = 'below'; +    } + +    if (newDirection == 'above' || +      (isCurrentlyAbove && newDirection !== 'below')) { +      css.top = container.top - parentOffset.top - dropdown.height; +    } + +    if (newDirection != null) { +      this.$dropdown +        .removeClass('select2-dropdown--below select2-dropdown--above') +        .addClass('select2-dropdown--' + newDirection); +      this.$container +        .removeClass('select2-container--below select2-container--above') +        .addClass('select2-container--' + newDirection); +    } + +    this.$dropdownContainer.css(css); +  }; + +  AttachBody.prototype._resizeDropdown = function () { +    var css = { +      width: this.$container.outerWidth(false) + 'px' +    }; + +    if (this.options.get('dropdownAutoWidth')) { +      css.minWidth = css.width; +      css.position = 'relative'; +      css.width = 'auto'; +    } + +    this.$dropdown.css(css); +  }; + +  AttachBody.prototype._showDropdown = function (decorated) { +    this.$dropdownContainer.appendTo(this.$dropdownParent); + +    this._positionDropdown(); +    this._resizeDropdown(); +  }; + +  return AttachBody; +}); + +S2.define('select2/dropdown/minimumResultsForSearch',[ + +], function () { +  function countResults (data) { +    var count = 0; + +    for (var d = 0; d < data.length; d++) { +      var item = data[d]; + +      if (item.children) { +        count += countResults(item.children); +      } else { +        count++; +      } +    } + +    return count; +  } + +  function MinimumResultsForSearch (decorated, $element, options, dataAdapter) { +    this.minimumResultsForSearch = options.get('minimumResultsForSearch'); + +    if (this.minimumResultsForSearch < 0) { +      this.minimumResultsForSearch = Infinity; +    } + +    decorated.call(this, $element, options, dataAdapter); +  } + +  MinimumResultsForSearch.prototype.showSearch = function (decorated, params) { +    if (countResults(params.data.results) < this.minimumResultsForSearch) { +      return false; +    } + +    return decorated.call(this, params); +  }; + +  return MinimumResultsForSearch; +}); + +S2.define('select2/dropdown/selectOnClose',[ + +], function () { +  function SelectOnClose () { } + +  SelectOnClose.prototype.bind = function (decorated, container, $container) { +    var self = this; + +    decorated.call(this, container, $container); + +    container.on('close', function (params) { +      self._handleSelectOnClose(params); +    }); +  }; + +  SelectOnClose.prototype._handleSelectOnClose = function (_, params) { +    if (params && params.originalSelect2Event != null) { +      var event = params.originalSelect2Event; + +      // Don't select an item if the close event was triggered from a select or +      // unselect event +      if (event._type === 'select' || event._type === 'unselect') { +        return; +      } +    } + +    var $highlightedResults = this.getHighlightedResults(); + +    // Only select highlighted results +    if ($highlightedResults.length < 1) { +      return; +    } + +    var data = $highlightedResults.data('data'); + +    // Don't re-select already selected resulte +    if ( +      (data.element != null && data.element.selected) || +      (data.element == null && data.selected) +    ) { +      return; +    } + +    this.trigger('select', { +        data: data +    }); +  }; + +  return SelectOnClose; +}); + +S2.define('select2/dropdown/closeOnSelect',[ + +], function () { +  function CloseOnSelect () { } + +  CloseOnSelect.prototype.bind = function (decorated, container, $container) { +    var self = this; + +    decorated.call(this, container, $container); + +    container.on('select', function (evt) { +      self._selectTriggered(evt); +    }); + +    container.on('unselect', function (evt) { +      self._selectTriggered(evt); +    }); +  }; + +  CloseOnSelect.prototype._selectTriggered = function (_, evt) { +    var originalEvent = evt.originalEvent; + +    // Don't close if the control key is being held +    if (originalEvent && originalEvent.ctrlKey) { +      return; +    } + +    this.trigger('close', { +      originalEvent: originalEvent, +      originalSelect2Event: evt +    }); +  }; + +  return CloseOnSelect; +}); + +S2.define('select2/i18n/en',[],function () { +  // English +  return { +    errorLoading: function () { +      return 'The results could not be loaded.'; +    }, +    inputTooLong: function (args) { +      var overChars = args.input.length - args.maximum; + +      var message = 'Please delete ' + overChars + ' character'; + +      if (overChars != 1) { +        message += 's'; +      } + +      return message; +    }, +    inputTooShort: function (args) { +      var remainingChars = args.minimum - args.input.length; + +      var message = 'Please enter ' + remainingChars + ' or more characters'; + +      return message; +    }, +    loadingMore: function () { +      return 'Loading more results…'; +    }, +    maximumSelected: function (args) { +      var message = 'You can only select ' + args.maximum + ' item'; + +      if (args.maximum != 1) { +        message += 's'; +      } + +      return message; +    }, +    noResults: function () { +      return 'No results found'; +    }, +    searching: function () { +      return 'Searching…'; +    } +  }; +}); + +S2.define('select2/defaults',[ +  'jquery', +  'require', + +  './results', + +  './selection/single', +  './selection/multiple', +  './selection/placeholder', +  './selection/allowClear', +  './selection/search', +  './selection/eventRelay', + +  './utils', +  './translation', +  './diacritics', + +  './data/select', +  './data/array', +  './data/ajax', +  './data/tags', +  './data/tokenizer', +  './data/minimumInputLength', +  './data/maximumInputLength', +  './data/maximumSelectionLength', + +  './dropdown', +  './dropdown/search', +  './dropdown/hidePlaceholder', +  './dropdown/infiniteScroll', +  './dropdown/attachBody', +  './dropdown/minimumResultsForSearch', +  './dropdown/selectOnClose', +  './dropdown/closeOnSelect', + +  './i18n/en' +], function ($, require, + +             ResultsList, + +             SingleSelection, MultipleSelection, Placeholder, AllowClear, +             SelectionSearch, EventRelay, + +             Utils, Translation, DIACRITICS, + +             SelectData, ArrayData, AjaxData, Tags, Tokenizer, +             MinimumInputLength, MaximumInputLength, MaximumSelectionLength, + +             Dropdown, DropdownSearch, HidePlaceholder, InfiniteScroll, +             AttachBody, MinimumResultsForSearch, SelectOnClose, CloseOnSelect, + +             EnglishTranslation) { +  function Defaults () { +    this.reset(); +  } + +  Defaults.prototype.apply = function (options) { +    options = $.extend(true, {}, this.defaults, options); + +    if (options.dataAdapter == null) { +      if (options.ajax != null) { +        options.dataAdapter = AjaxData; +      } else if (options.data != null) { +        options.dataAdapter = ArrayData; +      } else { +        options.dataAdapter = SelectData; +      } + +      if (options.minimumInputLength > 0) { +        options.dataAdapter = Utils.Decorate( +          options.dataAdapter, +          MinimumInputLength +        ); +      } + +      if (options.maximumInputLength > 0) { +        options.dataAdapter = Utils.Decorate( +          options.dataAdapter, +          MaximumInputLength +        ); +      } + +      if (options.maximumSelectionLength > 0) { +        options.dataAdapter = Utils.Decorate( +          options.dataAdapter, +          MaximumSelectionLength +        ); +      } + +      if (options.tags) { +        options.dataAdapter = Utils.Decorate(options.dataAdapter, Tags); +      } + +      if (options.tokenSeparators != null || options.tokenizer != null) { +        options.dataAdapter = Utils.Decorate( +          options.dataAdapter, +          Tokenizer +        ); +      } + +      if (options.query != null) { +        var Query = require(options.amdBase + 'compat/query'); + +        options.dataAdapter = Utils.Decorate( +          options.dataAdapter, +          Query +        ); +      } + +      if (options.initSelection != null) { +        var InitSelection = require(options.amdBase + 'compat/initSelection'); + +        options.dataAdapter = Utils.Decorate( +          options.dataAdapter, +          InitSelection +        ); +      } +    } + +    if (options.resultsAdapter == null) { +      options.resultsAdapter = ResultsList; + +      if (options.ajax != null) { +        options.resultsAdapter = Utils.Decorate( +          options.resultsAdapter, +          InfiniteScroll +        ); +      } + +      if (options.placeholder != null) { +        options.resultsAdapter = Utils.Decorate( +          options.resultsAdapter, +          HidePlaceholder +        ); +      } + +      if (options.selectOnClose) { +        options.resultsAdapter = Utils.Decorate( +          options.resultsAdapter, +          SelectOnClose +        ); +      } +    } + +    if (options.dropdownAdapter == null) { +      if (options.multiple) { +        options.dropdownAdapter = Dropdown; +      } else { +        var SearchableDropdown = Utils.Decorate(Dropdown, DropdownSearch); + +        options.dropdownAdapter = SearchableDropdown; +      } + +      if (options.minimumResultsForSearch !== 0) { +        options.dropdownAdapter = Utils.Decorate( +          options.dropdownAdapter, +          MinimumResultsForSearch +        ); +      } + +      if (options.closeOnSelect) { +        options.dropdownAdapter = Utils.Decorate( +          options.dropdownAdapter, +          CloseOnSelect +        ); +      } + +      if ( +        options.dropdownCssClass != null || +        options.dropdownCss != null || +        options.adaptDropdownCssClass != null +      ) { +        var DropdownCSS = require(options.amdBase + 'compat/dropdownCss'); + +        options.dropdownAdapter = Utils.Decorate( +          options.dropdownAdapter, +          DropdownCSS +        ); +      } + +      options.dropdownAdapter = Utils.Decorate( +        options.dropdownAdapter, +        AttachBody +      ); +    } + +    if (options.selectionAdapter == null) { +      if (options.multiple) { +        options.selectionAdapter = MultipleSelection; +      } else { +        options.selectionAdapter = SingleSelection; +      } + +      // Add the placeholder mixin if a placeholder was specified +      if (options.placeholder != null) { +        options.selectionAdapter = Utils.Decorate( +          options.selectionAdapter, +          Placeholder +        ); +      } + +      if (options.allowClear) { +        options.selectionAdapter = Utils.Decorate( +          options.selectionAdapter, +          AllowClear +        ); +      } + +      if (options.multiple) { +        options.selectionAdapter = Utils.Decorate( +          options.selectionAdapter, +          SelectionSearch +        ); +      } + +      if ( +        options.containerCssClass != null || +        options.containerCss != null || +        options.adaptContainerCssClass != null +      ) { +        var ContainerCSS = require(options.amdBase + 'compat/containerCss'); + +        options.selectionAdapter = Utils.Decorate( +          options.selectionAdapter, +          ContainerCSS +        ); +      } + +      options.selectionAdapter = Utils.Decorate( +        options.selectionAdapter, +        EventRelay +      ); +    } + +    if (typeof options.language === 'string') { +      // Check if the language is specified with a region +      if (options.language.indexOf('-') > 0) { +        // Extract the region information if it is included +        var languageParts = options.language.split('-'); +        var baseLanguage = languageParts[0]; + +        options.language = [options.language, baseLanguage]; +      } else { +        options.language = [options.language]; +      } +    } + +    if ($.isArray(options.language)) { +      var languages = new Translation(); +      options.language.push('en'); + +      var languageNames = options.language; + +      for (var l = 0; l < languageNames.length; l++) { +        var name = languageNames[l]; +        var language = {}; + +        try { +          // Try to load it with the original name +          language = Translation.loadPath(name); +        } catch (e) { +          try { +            // If we couldn't load it, check if it wasn't the full path +            name = this.defaults.amdLanguageBase + name; +            language = Translation.loadPath(name); +          } catch (ex) { +            // The translation could not be loaded at all. Sometimes this is +            // because of a configuration problem, other times this can be +            // because of how Select2 helps load all possible translation files. +            if (options.debug && window.console && console.warn) { +              console.warn( +                'Select2: The language file for "' + name + '" could not be ' + +                'automatically loaded. A fallback will be used instead.' +              ); +            } + +            continue; +          } +        } + +        languages.extend(language); +      } + +      options.translations = languages; +    } else { +      var baseTranslation = Translation.loadPath( +        this.defaults.amdLanguageBase + 'en' +      ); +      var customTranslation = new Translation(options.language); + +      customTranslation.extend(baseTranslation); + +      options.translations = customTranslation; +    } + +    return options; +  }; + +  Defaults.prototype.reset = function () { +    function stripDiacritics (text) { +      // Used 'uni range + named function' from http://jsperf.com/diacritics/18 +      function match(a) { +        return DIACRITICS[a] || a; +      } + +      return text.replace(/[^\u0000-\u007E]/g, match); +    } + +    function matcher (params, data) { +      // Always return the object if there is nothing to compare +      if ($.trim(params.term) === '') { +        return data; +      } + +      // Do a recursive check for options with children +      if (data.children && data.children.length > 0) { +        // Clone the data object if there are children +        // This is required as we modify the object to remove any non-matches +        var match = $.extend(true, {}, data); + +        // Check each child of the option +        for (var c = data.children.length - 1; c >= 0; c--) { +          var child = data.children[c]; + +          var matches = matcher(params, child); + +          // If there wasn't a match, remove the object in the array +          if (matches == null) { +            match.children.splice(c, 1); +          } +        } + +        // If any children matched, return the new object +        if (match.children.length > 0) { +          return match; +        } + +        // If there were no matching children, check just the plain object +        return matcher(params, match); +      } + +      var original = stripDiacritics(data.text).toUpperCase(); +      var term = stripDiacritics(params.term).toUpperCase(); + +      // Check if the text contains the term +      if (original.indexOf(term) > -1) { +        return data; +      } + +      // If it doesn't contain the term, don't return anything +      return null; +    } + +    this.defaults = { +      amdBase: './', +      amdLanguageBase: './i18n/', +      closeOnSelect: true, +      debug: false, +      dropdownAutoWidth: false, +      escapeMarkup: Utils.escapeMarkup, +      language: EnglishTranslation, +      matcher: matcher, +      minimumInputLength: 0, +      maximumInputLength: 0, +      maximumSelectionLength: 0, +      minimumResultsForSearch: 0, +      selectOnClose: false, +      sorter: function (data) { +        return data; +      }, +      templateResult: function (result) { +        return result.text; +      }, +      templateSelection: function (selection) { +        return selection.text; +      }, +      theme: 'default', +      width: 'resolve' +    }; +  }; + +  Defaults.prototype.set = function (key, value) { +    var camelKey = $.camelCase(key); + +    var data = {}; +    data[camelKey] = value; + +    var convertedData = Utils._convertData(data); + +    $.extend(this.defaults, convertedData); +  }; + +  var defaults = new Defaults(); + +  return defaults; +}); + +S2.define('select2/options',[ +  'require', +  'jquery', +  './defaults', +  './utils' +], function (require, $, Defaults, Utils) { +  function Options (options, $element) { +    this.options = options; + +    if ($element != null) { +      this.fromElement($element); +    } + +    this.options = Defaults.apply(this.options); + +    if ($element && $element.is('input')) { +      var InputCompat = require(this.get('amdBase') + 'compat/inputData'); + +      this.options.dataAdapter = Utils.Decorate( +        this.options.dataAdapter, +        InputCompat +      ); +    } +  } + +  Options.prototype.fromElement = function ($e) { +    var excludedData = ['select2']; + +    if (this.options.multiple == null) { +      this.options.multiple = $e.prop('multiple'); +    } + +    if (this.options.disabled == null) { +      this.options.disabled = $e.prop('disabled'); +    } + +    if (this.options.language == null) { +      if ($e.prop('lang')) { +        this.options.language = $e.prop('lang').toLowerCase(); +      } else if ($e.closest('[lang]').prop('lang')) { +        this.options.language = $e.closest('[lang]').prop('lang'); +      } +    } + +    if (this.options.dir == null) { +      if ($e.prop('dir')) { +        this.options.dir = $e.prop('dir'); +      } else if ($e.closest('[dir]').prop('dir')) { +        this.options.dir = $e.closest('[dir]').prop('dir'); +      } else { +        this.options.dir = 'ltr'; +      } +    } + +    $e.prop('disabled', this.options.disabled); +    $e.prop('multiple', this.options.multiple); + +    if ($e.data('select2Tags')) { +      if (this.options.debug && window.console && console.warn) { +        console.warn( +          'Select2: The `data-select2-tags` attribute has been changed to ' + +          'use the `data-data` and `data-tags="true"` attributes and will be ' + +          'removed in future versions of Select2.' +        ); +      } + +      $e.data('data', $e.data('select2Tags')); +      $e.data('tags', true); +    } + +    if ($e.data('ajaxUrl')) { +      if (this.options.debug && window.console && console.warn) { +        console.warn( +          'Select2: The `data-ajax-url` attribute has been changed to ' + +          '`data-ajax--url` and support for the old attribute will be removed' + +          ' in future versions of Select2.' +        ); +      } + +      $e.attr('ajax--url', $e.data('ajaxUrl')); +      $e.data('ajax--url', $e.data('ajaxUrl')); +    } + +    var dataset = {}; + +    // Prefer the element's `dataset` attribute if it exists +    // jQuery 1.x does not correctly handle data attributes with multiple dashes +    if ($.fn.jquery && $.fn.jquery.substr(0, 2) == '1.' && $e[0].dataset) { +      dataset = $.extend(true, {}, $e[0].dataset, $e.data()); +    } else { +      dataset = $e.data(); +    } + +    var data = $.extend(true, {}, dataset); + +    data = Utils._convertData(data); + +    for (var key in data) { +      if ($.inArray(key, excludedData) > -1) { +        continue; +      } + +      if ($.isPlainObject(this.options[key])) { +        $.extend(this.options[key], data[key]); +      } else { +        this.options[key] = data[key]; +      } +    } + +    return this; +  }; + +  Options.prototype.get = function (key) { +    return this.options[key]; +  }; + +  Options.prototype.set = function (key, val) { +    this.options[key] = val; +  }; + +  return Options; +}); + +S2.define('select2/core',[ +  'jquery', +  './options', +  './utils', +  './keys' +], function ($, Options, Utils, KEYS) { +  var Select2 = function ($element, options) { +    if ($element.data('select2') != null) { +      $element.data('select2').destroy(); +    } + +    this.$element = $element; + +    this.id = this._generateId($element); + +    options = options || {}; + +    this.options = new Options(options, $element); + +    Select2.__super__.constructor.call(this); + +    // Set up the tabindex + +    var tabindex = $element.attr('tabindex') || 0; +    $element.data('old-tabindex', tabindex); +    $element.attr('tabindex', '-1'); + +    // Set up containers and adapters + +    var DataAdapter = this.options.get('dataAdapter'); +    this.dataAdapter = new DataAdapter($element, this.options); + +    var $container = this.render(); + +    this._placeContainer($container); + +    var SelectionAdapter = this.options.get('selectionAdapter'); +    this.selection = new SelectionAdapter($element, this.options); +    this.$selection = this.selection.render(); + +    this.selection.position(this.$selection, $container); + +    var DropdownAdapter = this.options.get('dropdownAdapter'); +    this.dropdown = new DropdownAdapter($element, this.options); +    this.$dropdown = this.dropdown.render(); + +    this.dropdown.position(this.$dropdown, $container); + +    var ResultsAdapter = this.options.get('resultsAdapter'); +    this.results = new ResultsAdapter($element, this.options, this.dataAdapter); +    this.$results = this.results.render(); + +    this.results.position(this.$results, this.$dropdown); + +    // Bind events + +    var self = this; + +    // Bind the container to all of the adapters +    this._bindAdapters(); + +    // Register any DOM event handlers +    this._registerDomEvents(); + +    // Register any internal event handlers +    this._registerDataEvents(); +    this._registerSelectionEvents(); +    this._registerDropdownEvents(); +    this._registerResultsEvents(); +    this._registerEvents(); + +    // Set the initial state +    this.dataAdapter.current(function (initialData) { +      self.trigger('selection:update', { +        data: initialData +      }); +    }); + +    // Hide the original select +    $element.addClass('select2-hidden-accessible'); +    $element.attr('aria-hidden', 'true'); + +    // Synchronize any monitored attributes +    this._syncAttributes(); + +    $element.data('select2', this); +  }; + +  Utils.Extend(Select2, Utils.Observable); + +  Select2.prototype._generateId = function ($element) { +    var id = ''; + +    if ($element.attr('id') != null) { +      id = $element.attr('id'); +    } else if ($element.attr('name') != null) { +      id = $element.attr('name') + '-' + Utils.generateChars(2); +    } else { +      id = Utils.generateChars(4); +    } + +    id = id.replace(/(:|\.|\[|\]|,)/g, ''); +    id = 'select2-' + id; + +    return id; +  }; + +  Select2.prototype._placeContainer = function ($container) { +    $container.insertAfter(this.$element); + +    var width = this._resolveWidth(this.$element, this.options.get('width')); + +    if (width != null) { +      $container.css('width', width); +    } +  }; + +  Select2.prototype._resolveWidth = function ($element, method) { +    var WIDTH = /^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i; + +    if (method == 'resolve') { +      var styleWidth = this._resolveWidth($element, 'style'); + +      if (styleWidth != null) { +        return styleWidth; +      } + +      return this._resolveWidth($element, 'element'); +    } + +    if (method == 'element') { +      var elementWidth = $element.outerWidth(false); + +      if (elementWidth <= 0) { +        return 'auto'; +      } + +      return elementWidth + 'px'; +    } + +    if (method == 'style') { +      var style = $element.attr('style'); + +      if (typeof(style) !== 'string') { +        return null; +      } + +      var attrs = style.split(';'); + +      for (var i = 0, l = attrs.length; i < l; i = i + 1) { +        var attr = attrs[i].replace(/\s/g, ''); +        var matches = attr.match(WIDTH); + +        if (matches !== null && matches.length >= 1) { +          return matches[1]; +        } +      } + +      return null; +    } + +    return method; +  }; + +  Select2.prototype._bindAdapters = function () { +    this.dataAdapter.bind(this, this.$container); +    this.selection.bind(this, this.$container); + +    this.dropdown.bind(this, this.$container); +    this.results.bind(this, this.$container); +  }; + +  Select2.prototype._registerDomEvents = function () { +    var self = this; + +    this.$element.on('change.select2', function () { +      self.dataAdapter.current(function (data) { +        self.trigger('selection:update', { +          data: data +        }); +      }); +    }); + +    this.$element.on('focus.select2', function (evt) { +      self.trigger('focus', evt); +    }); + +    this._syncA = Utils.bind(this._syncAttributes, this); +    this._syncS = Utils.bind(this._syncSubtree, this); + +    if (this.$element[0].attachEvent) { +      this.$element[0].attachEvent('onpropertychange', this._syncA); +    } + +    var observer = window.MutationObserver || +      window.WebKitMutationObserver || +      window.MozMutationObserver +    ; + +    if (observer != null) { +      this._observer = new observer(function (mutations) { +        $.each(mutations, self._syncA); +        $.each(mutations, self._syncS); +      }); +      this._observer.observe(this.$element[0], { +        attributes: true, +        childList: true, +        subtree: false +      }); +    } else if (this.$element[0].addEventListener) { +      this.$element[0].addEventListener( +        'DOMAttrModified', +        self._syncA, +        false +      ); +      this.$element[0].addEventListener( +        'DOMNodeInserted', +        self._syncS, +        false +      ); +      this.$element[0].addEventListener( +        'DOMNodeRemoved', +        self._syncS, +        false +      ); +    } +  }; + +  Select2.prototype._registerDataEvents = function () { +    var self = this; + +    this.dataAdapter.on('*', function (name, params) { +      self.trigger(name, params); +    }); +  }; + +  Select2.prototype._registerSelectionEvents = function () { +    var self = this; +    var nonRelayEvents = ['toggle', 'focus']; + +    this.selection.on('toggle', function () { +      self.toggleDropdown(); +    }); + +    this.selection.on('focus', function (params) { +      self.focus(params); +    }); + +    this.selection.on('*', function (name, params) { +      if ($.inArray(name, nonRelayEvents) !== -1) { +        return; +      } + +      self.trigger(name, params); +    }); +  }; + +  Select2.prototype._registerDropdownEvents = function () { +    var self = this; + +    this.dropdown.on('*', function (name, params) { +      self.trigger(name, params); +    }); +  }; + +  Select2.prototype._registerResultsEvents = function () { +    var self = this; + +    this.results.on('*', function (name, params) { +      self.trigger(name, params); +    }); +  }; + +  Select2.prototype._registerEvents = function () { +    var self = this; + +    this.on('open', function () { +      self.$container.addClass('select2-container--open'); +    }); + +    this.on('close', function () { +      self.$container.removeClass('select2-container--open'); +    }); + +    this.on('enable', function () { +      self.$container.removeClass('select2-container--disabled'); +    }); + +    this.on('disable', function () { +      self.$container.addClass('select2-container--disabled'); +    }); + +    this.on('blur', function () { +      self.$container.removeClass('select2-container--focus'); +    }); + +    this.on('query', function (params) { +      if (!self.isOpen()) { +        self.trigger('open', {}); +      } + +      this.dataAdapter.query(params, function (data) { +        self.trigger('results:all', { +          data: data, +          query: params +        }); +      }); +    }); + +    this.on('query:append', function (params) { +      this.dataAdapter.query(params, function (data) { +        self.trigger('results:append', { +          data: data, +          query: params +        }); +      }); +    }); + +    this.on('keypress', function (evt) { +      var key = evt.which; + +      if (self.isOpen()) { +        if (key === KEYS.ESC || key === KEYS.TAB || +            (key === KEYS.UP && evt.altKey)) { +          self.close(); + +          evt.preventDefault(); +        } else if (key === KEYS.ENTER) { +          self.trigger('results:select', {}); + +          evt.preventDefault(); +        } else if ((key === KEYS.SPACE && evt.ctrlKey)) { +          self.trigger('results:toggle', {}); + +          evt.preventDefault(); +        } else if (key === KEYS.UP) { +          self.trigger('results:previous', {}); + +          evt.preventDefault(); +        } else if (key === KEYS.DOWN) { +          self.trigger('results:next', {}); + +          evt.preventDefault(); +        } +      } else { +        if (key === KEYS.ENTER || key === KEYS.SPACE || +            (key === KEYS.DOWN && evt.altKey)) { +          self.open(); + +          evt.preventDefault(); +        } +      } +    }); +  }; + +  Select2.prototype._syncAttributes = function () { +    this.options.set('disabled', this.$element.prop('disabled')); + +    if (this.options.get('disabled')) { +      if (this.isOpen()) { +        this.close(); +      } + +      this.trigger('disable', {}); +    } else { +      this.trigger('enable', {}); +    } +  }; + +  Select2.prototype._syncSubtree = function (evt, mutations) { +    var changed = false; +    var self = this; + +    // Ignore any mutation events raised for elements that aren't options or +    // optgroups. This handles the case when the select element is destroyed +    if ( +      evt && evt.target && ( +        evt.target.nodeName !== 'OPTION' && evt.target.nodeName !== 'OPTGROUP' +      ) +    ) { +      return; +    } + +    if (!mutations) { +      // If mutation events aren't supported, then we can only assume that the +      // change affected the selections +      changed = true; +    } else if (mutations.addedNodes && mutations.addedNodes.length > 0) { +      for (var n = 0; n < mutations.addedNodes.length; n++) { +        var node = mutations.addedNodes[n]; + +        if (node.selected) { +          changed = true; +        } +      } +    } else if (mutations.removedNodes && mutations.removedNodes.length > 0) { +      changed = true; +    } + +    // Only re-pull the data if we think there is a change +    if (changed) { +      this.dataAdapter.current(function (currentData) { +        self.trigger('selection:update', { +          data: currentData +        }); +      }); +    } +  }; + +  /** +   * Override the trigger method to automatically trigger pre-events when +   * there are events that can be prevented. +   */ +  Select2.prototype.trigger = function (name, args) { +    var actualTrigger = Select2.__super__.trigger; +    var preTriggerMap = { +      'open': 'opening', +      'close': 'closing', +      'select': 'selecting', +      'unselect': 'unselecting' +    }; + +    if (args === undefined) { +      args = {}; +    } + +    if (name in preTriggerMap) { +      var preTriggerName = preTriggerMap[name]; +      var preTriggerArgs = { +        prevented: false, +        name: name, +        args: args +      }; + +      actualTrigger.call(this, preTriggerName, preTriggerArgs); + +      if (preTriggerArgs.prevented) { +        args.prevented = true; + +        return; +      } +    } + +    actualTrigger.call(this, name, args); +  }; + +  Select2.prototype.toggleDropdown = function () { +    if (this.options.get('disabled')) { +      return; +    } + +    if (this.isOpen()) { +      this.close(); +    } else { +      this.open(); +    } +  }; + +  Select2.prototype.open = function () { +    if (this.isOpen()) { +      return; +    } + +    this.trigger('query', {}); +  }; + +  Select2.prototype.close = function () { +    if (!this.isOpen()) { +      return; +    } + +    this.trigger('close', {}); +  }; + +  Select2.prototype.isOpen = function () { +    return this.$container.hasClass('select2-container--open'); +  }; + +  Select2.prototype.hasFocus = function () { +    return this.$container.hasClass('select2-container--focus'); +  }; + +  Select2.prototype.focus = function (data) { +    // No need to re-trigger focus events if we are already focused +    if (this.hasFocus()) { +      return; +    } + +    this.$container.addClass('select2-container--focus'); +    this.trigger('focus', {}); +  }; + +  Select2.prototype.enable = function (args) { +    if (this.options.get('debug') && window.console && console.warn) { +      console.warn( +        'Select2: The `select2("enable")` method has been deprecated and will' + +        ' be removed in later Select2 versions. Use $element.prop("disabled")' + +        ' instead.' +      ); +    } + +    if (args == null || args.length === 0) { +      args = [true]; +    } + +    var disabled = !args[0]; + +    this.$element.prop('disabled', disabled); +  }; + +  Select2.prototype.data = function () { +    if (this.options.get('debug') && +        arguments.length > 0 && window.console && console.warn) { +      console.warn( +        'Select2: Data can no longer be set using `select2("data")`. You ' + +        'should consider setting the value instead using `$element.val()`.' +      ); +    } + +    var data = []; + +    this.dataAdapter.current(function (currentData) { +      data = currentData; +    }); + +    return data; +  }; + +  Select2.prototype.val = function (args) { +    if (this.options.get('debug') && window.console && console.warn) { +      console.warn( +        'Select2: The `select2("val")` method has been deprecated and will be' + +        ' removed in later Select2 versions. Use $element.val() instead.' +      ); +    } + +    if (args == null || args.length === 0) { +      return this.$element.val(); +    } + +    var newVal = args[0]; + +    if ($.isArray(newVal)) { +      newVal = $.map(newVal, function (obj) { +        return obj.toString(); +      }); +    } + +    this.$element.val(newVal).trigger('change'); +  }; + +  Select2.prototype.destroy = function () { +    this.$container.remove(); + +    if (this.$element[0].detachEvent) { +      this.$element[0].detachEvent('onpropertychange', this._syncA); +    } + +    if (this._observer != null) { +      this._observer.disconnect(); +      this._observer = null; +    } else if (this.$element[0].removeEventListener) { +      this.$element[0] +        .removeEventListener('DOMAttrModified', this._syncA, false); +      this.$element[0] +        .removeEventListener('DOMNodeInserted', this._syncS, false); +      this.$element[0] +        .removeEventListener('DOMNodeRemoved', this._syncS, false); +    } + +    this._syncA = null; +    this._syncS = null; + +    this.$element.off('.select2'); +    this.$element.attr('tabindex', this.$element.data('old-tabindex')); + +    this.$element.removeClass('select2-hidden-accessible'); +    this.$element.attr('aria-hidden', 'false'); +    this.$element.removeData('select2'); + +    this.dataAdapter.destroy(); +    this.selection.destroy(); +    this.dropdown.destroy(); +    this.results.destroy(); + +    this.dataAdapter = null; +    this.selection = null; +    this.dropdown = null; +    this.results = null; +  }; + +  Select2.prototype.render = function () { +    var $container = $( +      '<span class="select2 select2-container">' + +        '<span class="selection"></span>' + +        '<span class="dropdown-wrapper" aria-hidden="true"></span>' + +      '</span>' +    ); + +    $container.attr('dir', this.options.get('dir')); + +    this.$container = $container; + +    this.$container.addClass('select2-container--' + this.options.get('theme')); + +    $container.data('element', this.$element); + +    return $container; +  }; + +  return Select2; +}); + +S2.define('select2/compat/utils',[ +  'jquery' +], function ($) { +  function syncCssClasses ($dest, $src, adapter) { +    var classes, replacements = [], adapted; + +    classes = $.trim($dest.attr('class')); + +    if (classes) { +      classes = '' + classes; // for IE which returns object + +      $(classes.split(/\s+/)).each(function () { +        // Save all Select2 classes +        if (this.indexOf('select2-') === 0) { +          replacements.push(this); +        } +      }); +    } + +    classes = $.trim($src.attr('class')); + +    if (classes) { +      classes = '' + classes; // for IE which returns object + +      $(classes.split(/\s+/)).each(function () { +        // Only adapt non-Select2 classes +        if (this.indexOf('select2-') !== 0) { +          adapted = adapter(this); + +          if (adapted != null) { +            replacements.push(adapted); +          } +        } +      }); +    } + +    $dest.attr('class', replacements.join(' ')); +  } + +  return { +    syncCssClasses: syncCssClasses +  }; +}); + +S2.define('select2/compat/containerCss',[ +  'jquery', +  './utils' +], function ($, CompatUtils) { +  // No-op CSS adapter that discards all classes by default +  function _containerAdapter (clazz) { +    return null; +  } + +  function ContainerCSS () { } + +  ContainerCSS.prototype.render = function (decorated) { +    var $container = decorated.call(this); + +    var containerCssClass = this.options.get('containerCssClass') || ''; + +    if ($.isFunction(containerCssClass)) { +      containerCssClass = containerCssClass(this.$element); +    } + +    var containerCssAdapter = this.options.get('adaptContainerCssClass'); +    containerCssAdapter = containerCssAdapter || _containerAdapter; + +    if (containerCssClass.indexOf(':all:') !== -1) { +      containerCssClass = containerCssClass.replace(':all:', ''); + +      var _cssAdapter = containerCssAdapter; + +      containerCssAdapter = function (clazz) { +        var adapted = _cssAdapter(clazz); + +        if (adapted != null) { +          // Append the old one along with the adapted one +          return adapted + ' ' + clazz; +        } + +        return clazz; +      }; +    } + +    var containerCss = this.options.get('containerCss') || {}; + +    if ($.isFunction(containerCss)) { +      containerCss = containerCss(this.$element); +    } + +    CompatUtils.syncCssClasses($container, this.$element, containerCssAdapter); + +    $container.css(containerCss); +    $container.addClass(containerCssClass); + +    return $container; +  }; + +  return ContainerCSS; +}); + +S2.define('select2/compat/dropdownCss',[ +  'jquery', +  './utils' +], function ($, CompatUtils) { +  // No-op CSS adapter that discards all classes by default +  function _dropdownAdapter (clazz) { +    return null; +  } + +  function DropdownCSS () { } + +  DropdownCSS.prototype.render = function (decorated) { +    var $dropdown = decorated.call(this); + +    var dropdownCssClass = this.options.get('dropdownCssClass') || ''; + +    if ($.isFunction(dropdownCssClass)) { +      dropdownCssClass = dropdownCssClass(this.$element); +    } + +    var dropdownCssAdapter = this.options.get('adaptDropdownCssClass'); +    dropdownCssAdapter = dropdownCssAdapter || _dropdownAdapter; + +    if (dropdownCssClass.indexOf(':all:') !== -1) { +      dropdownCssClass = dropdownCssClass.replace(':all:', ''); + +      var _cssAdapter = dropdownCssAdapter; + +      dropdownCssAdapter = function (clazz) { +        var adapted = _cssAdapter(clazz); + +        if (adapted != null) { +          // Append the old one along with the adapted one +          return adapted + ' ' + clazz; +        } + +        return clazz; +      }; +    } + +    var dropdownCss = this.options.get('dropdownCss') || {}; + +    if ($.isFunction(dropdownCss)) { +      dropdownCss = dropdownCss(this.$element); +    } + +    CompatUtils.syncCssClasses($dropdown, this.$element, dropdownCssAdapter); + +    $dropdown.css(dropdownCss); +    $dropdown.addClass(dropdownCssClass); + +    return $dropdown; +  }; + +  return DropdownCSS; +}); + +S2.define('select2/compat/initSelection',[ +  'jquery' +], function ($) { +  function InitSelection (decorated, $element, options) { +    if (options.get('debug') && window.console && console.warn) { +      console.warn( +        'Select2: The `initSelection` option has been deprecated in favor' + +        ' of a custom data adapter that overrides the `current` method. ' + +        'This method is now called multiple times instead of a single ' + +        'time when the instance is initialized. Support will be removed ' + +        'for the `initSelection` option in future versions of Select2' +      ); +    } + +    this.initSelection = options.get('initSelection'); +    this._isInitialized = false; + +    decorated.call(this, $element, options); +  } + +  InitSelection.prototype.current = function (decorated, callback) { +    var self = this; + +    if (this._isInitialized) { +      decorated.call(this, callback); + +      return; +    } + +    this.initSelection.call(null, this.$element, function (data) { +      self._isInitialized = true; + +      if (!$.isArray(data)) { +        data = [data]; +      } + +      callback(data); +    }); +  }; + +  return InitSelection; +}); + +S2.define('select2/compat/inputData',[ +  'jquery' +], function ($) { +  function InputData (decorated, $element, options) { +    this._currentData = []; +    this._valueSeparator = options.get('valueSeparator') || ','; + +    if ($element.prop('type') === 'hidden') { +      if (options.get('debug') && console && console.warn) { +        console.warn( +          'Select2: Using a hidden input with Select2 is no longer ' + +          'supported and may stop working in the future. It is recommended ' + +          'to use a `<select>` element instead.' +        ); +      } +    } + +    decorated.call(this, $element, options); +  } + +  InputData.prototype.current = function (_, callback) { +    function getSelected (data, selectedIds) { +      var selected = []; + +      if (data.selected || $.inArray(data.id, selectedIds) !== -1) { +        data.selected = true; +        selected.push(data); +      } else { +        data.selected = false; +      } + +      if (data.children) { +        selected.push.apply(selected, getSelected(data.children, selectedIds)); +      } + +      return selected; +    } + +    var selected = []; + +    for (var d = 0; d < this._currentData.length; d++) { +      var data = this._currentData[d]; + +      selected.push.apply( +        selected, +        getSelected( +          data, +          this.$element.val().split( +            this._valueSeparator +          ) +        ) +      ); +    } + +    callback(selected); +  }; + +  InputData.prototype.select = function (_, data) { +    if (!this.options.get('multiple')) { +      this.current(function (allData) { +        $.map(allData, function (data) { +          data.selected = false; +        }); +      }); + +      this.$element.val(data.id); +      this.$element.trigger('change'); +    } else { +      var value = this.$element.val(); +      value += this._valueSeparator + data.id; + +      this.$element.val(value); +      this.$element.trigger('change'); +    } +  }; + +  InputData.prototype.unselect = function (_, data) { +    var self = this; + +    data.selected = false; + +    this.current(function (allData) { +      var values = []; + +      for (var d = 0; d < allData.length; d++) { +        var item = allData[d]; + +        if (data.id == item.id) { +          continue; +        } + +        values.push(item.id); +      } + +      self.$element.val(values.join(self._valueSeparator)); +      self.$element.trigger('change'); +    }); +  }; + +  InputData.prototype.query = function (_, params, callback) { +    var results = []; + +    for (var d = 0; d < this._currentData.length; d++) { +      var data = this._currentData[d]; + +      var matches = this.matches(params, data); + +      if (matches !== null) { +        results.push(matches); +      } +    } + +    callback({ +      results: results +    }); +  }; + +  InputData.prototype.addOptions = function (_, $options) { +    var options = $.map($options, function ($option) { +      return $.data($option[0], 'data'); +    }); + +    this._currentData.push.apply(this._currentData, options); +  }; + +  return InputData; +}); + +S2.define('select2/compat/matcher',[ +  'jquery' +], function ($) { +  function oldMatcher (matcher) { +    function wrappedMatcher (params, data) { +      var match = $.extend(true, {}, data); + +      if (params.term == null || $.trim(params.term) === '') { +        return match; +      } + +      if (data.children) { +        for (var c = data.children.length - 1; c >= 0; c--) { +          var child = data.children[c]; + +          // Check if the child object matches +          // The old matcher returned a boolean true or false +          var doesMatch = matcher(params.term, child.text, child); + +          // If the child didn't match, pop it off +          if (!doesMatch) { +            match.children.splice(c, 1); +          } +        } + +        if (match.children.length > 0) { +          return match; +        } +      } + +      if (matcher(params.term, data.text, data)) { +        return match; +      } + +      return null; +    } + +    return wrappedMatcher; +  } + +  return oldMatcher; +}); + +S2.define('select2/compat/query',[ + +], function () { +  function Query (decorated, $element, options) { +    if (options.get('debug') && window.console && console.warn) { +      console.warn( +        'Select2: The `query` option has been deprecated in favor of a ' + +        'custom data adapter that overrides the `query` method. Support ' + +        'will be removed for the `query` option in future versions of ' + +        'Select2.' +      ); +    } + +    decorated.call(this, $element, options); +  } + +  Query.prototype.query = function (_, params, callback) { +    params.callback = callback; + +    var query = this.options.get('query'); + +    query.call(null, params); +  }; + +  return Query; +}); + +S2.define('select2/dropdown/attachContainer',[ + +], function () { +  function AttachContainer (decorated, $element, options) { +    decorated.call(this, $element, options); +  } + +  AttachContainer.prototype.position = +    function (decorated, $dropdown, $container) { +    var $dropdownContainer = $container.find('.dropdown-wrapper'); +    $dropdownContainer.append($dropdown); + +    $dropdown.addClass('select2-dropdown--below'); +    $container.addClass('select2-container--below'); +  }; + +  return AttachContainer; +}); + +S2.define('select2/dropdown/stopPropagation',[ + +], function () { +  function StopPropagation () { } + +  StopPropagation.prototype.bind = function (decorated, container, $container) { +    decorated.call(this, container, $container); + +    var stoppedEvents = [ +    'blur', +    'change', +    'click', +    'dblclick', +    'focus', +    'focusin', +    'focusout', +    'input', +    'keydown', +    'keyup', +    'keypress', +    'mousedown', +    'mouseenter', +    'mouseleave', +    'mousemove', +    'mouseover', +    'mouseup', +    'search', +    'touchend', +    'touchstart' +    ]; + +    this.$dropdown.on(stoppedEvents.join(' '), function (evt) { +      evt.stopPropagation(); +    }); +  }; + +  return StopPropagation; +}); + +S2.define('select2/selection/stopPropagation',[ + +], function () { +  function StopPropagation () { } + +  StopPropagation.prototype.bind = function (decorated, container, $container) { +    decorated.call(this, container, $container); + +    var stoppedEvents = [ +      'blur', +      'change', +      'click', +      'dblclick', +      'focus', +      'focusin', +      'focusout', +      'input', +      'keydown', +      'keyup', +      'keypress', +      'mousedown', +      'mouseenter', +      'mouseleave', +      'mousemove', +      'mouseover', +      'mouseup', +      'search', +      'touchend', +      'touchstart' +    ]; + +    this.$selection.on(stoppedEvents.join(' '), function (evt) { +      evt.stopPropagation(); +    }); +  }; + +  return StopPropagation; +}); + +/*! + * jQuery Mousewheel 3.1.13 + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license + * http://jquery.org/license + */ + +(function (factory) { +    if ( typeof S2.define === 'function' && S2.define.amd ) { +        // AMD. Register as an anonymous module. +        S2.define('jquery-mousewheel',['jquery'], factory); +    } else if (typeof exports === 'object') { +        // Node/CommonJS style for Browserify +        module.exports = factory; +    } else { +        // Browser globals +        factory(jQuery); +    } +}(function ($) { + +    var toFix  = ['wheel', 'mousewheel', 'DOMMouseScroll', 'MozMousePixelScroll'], +        toBind = ( 'onwheel' in document || document.documentMode >= 9 ) ? +                    ['wheel'] : ['mousewheel', 'DomMouseScroll', 'MozMousePixelScroll'], +        slice  = Array.prototype.slice, +        nullLowestDeltaTimeout, lowestDelta; + +    if ( $.event.fixHooks ) { +        for ( var i = toFix.length; i; ) { +            $.event.fixHooks[ toFix[--i] ] = $.event.mouseHooks; +        } +    } + +    var special = $.event.special.mousewheel = { +        version: '3.1.12', + +        setup: function() { +            if ( this.addEventListener ) { +                for ( var i = toBind.length; i; ) { +                    this.addEventListener( toBind[--i], handler, false ); +                } +            } else { +                this.onmousewheel = handler; +            } +            // Store the line height and page height for this particular element +            $.data(this, 'mousewheel-line-height', special.getLineHeight(this)); +            $.data(this, 'mousewheel-page-height', special.getPageHeight(this)); +        }, + +        teardown: function() { +            if ( this.removeEventListener ) { +                for ( var i = toBind.length; i; ) { +                    this.removeEventListener( toBind[--i], handler, false ); +                } +            } else { +                this.onmousewheel = null; +            } +            // Clean up the data we added to the element +            $.removeData(this, 'mousewheel-line-height'); +            $.removeData(this, 'mousewheel-page-height'); +        }, + +        getLineHeight: function(elem) { +            var $elem = $(elem), +                $parent = $elem['offsetParent' in $.fn ? 'offsetParent' : 'parent'](); +            if (!$parent.length) { +                $parent = $('body'); +            } +            return parseInt($parent.css('fontSize'), 10) || parseInt($elem.css('fontSize'), 10) || 16; +        }, + +        getPageHeight: function(elem) { +            return $(elem).height(); +        }, + +        settings: { +            adjustOldDeltas: true, // see shouldAdjustOldDeltas() below +            normalizeOffset: true  // calls getBoundingClientRect for each event +        } +    }; + +    $.fn.extend({ +        mousewheel: function(fn) { +            return fn ? this.bind('mousewheel', fn) : this.trigger('mousewheel'); +        }, + +        unmousewheel: function(fn) { +            return this.unbind('mousewheel', fn); +        } +    }); + + +    function handler(event) { +        var orgEvent   = event || window.event, +            args       = slice.call(arguments, 1), +            delta      = 0, +            deltaX     = 0, +            deltaY     = 0, +            absDelta   = 0, +            offsetX    = 0, +            offsetY    = 0; +        event = $.event.fix(orgEvent); +        event.type = 'mousewheel'; + +        // Old school scrollwheel delta +        if ( 'detail'      in orgEvent ) { deltaY = orgEvent.detail * -1;      } +        if ( 'wheelDelta'  in orgEvent ) { deltaY = orgEvent.wheelDelta;       } +        if ( 'wheelDeltaY' in orgEvent ) { deltaY = orgEvent.wheelDeltaY;      } +        if ( 'wheelDeltaX' in orgEvent ) { deltaX = orgEvent.wheelDeltaX * -1; } + +        // Firefox < 17 horizontal scrolling related to DOMMouseScroll event +        if ( 'axis' in orgEvent && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) { +            deltaX = deltaY * -1; +            deltaY = 0; +        } + +        // Set delta to be deltaY or deltaX if deltaY is 0 for backwards compatabilitiy +        delta = deltaY === 0 ? deltaX : deltaY; + +        // New school wheel delta (wheel event) +        if ( 'deltaY' in orgEvent ) { +            deltaY = orgEvent.deltaY * -1; +            delta  = deltaY; +        } +        if ( 'deltaX' in orgEvent ) { +            deltaX = orgEvent.deltaX; +            if ( deltaY === 0 ) { delta  = deltaX * -1; } +        } + +        // No change actually happened, no reason to go any further +        if ( deltaY === 0 && deltaX === 0 ) { return; } + +        // Need to convert lines and pages to pixels if we aren't already in pixels +        // There are three delta modes: +        //   * deltaMode 0 is by pixels, nothing to do +        //   * deltaMode 1 is by lines +        //   * deltaMode 2 is by pages +        if ( orgEvent.deltaMode === 1 ) { +            var lineHeight = $.data(this, 'mousewheel-line-height'); +            delta  *= lineHeight; +            deltaY *= lineHeight; +            deltaX *= lineHeight; +        } else if ( orgEvent.deltaMode === 2 ) { +            var pageHeight = $.data(this, 'mousewheel-page-height'); +            delta  *= pageHeight; +            deltaY *= pageHeight; +            deltaX *= pageHeight; +        } + +        // Store lowest absolute delta to normalize the delta values +        absDelta = Math.max( Math.abs(deltaY), Math.abs(deltaX) ); + +        if ( !lowestDelta || absDelta < lowestDelta ) { +            lowestDelta = absDelta; + +            // Adjust older deltas if necessary +            if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) { +                lowestDelta /= 40; +            } +        } + +        // Adjust older deltas if necessary +        if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) { +            // Divide all the things by 40! +            delta  /= 40; +            deltaX /= 40; +            deltaY /= 40; +        } + +        // Get a whole, normalized value for the deltas +        delta  = Math[ delta  >= 1 ? 'floor' : 'ceil' ](delta  / lowestDelta); +        deltaX = Math[ deltaX >= 1 ? 'floor' : 'ceil' ](deltaX / lowestDelta); +        deltaY = Math[ deltaY >= 1 ? 'floor' : 'ceil' ](deltaY / lowestDelta); + +        // Normalise offsetX and offsetY properties +        if ( special.settings.normalizeOffset && this.getBoundingClientRect ) { +            var boundingRect = this.getBoundingClientRect(); +            offsetX = event.clientX - boundingRect.left; +            offsetY = event.clientY - boundingRect.top; +        } + +        // Add information to the event object +        event.deltaX = deltaX; +        event.deltaY = deltaY; +        event.deltaFactor = lowestDelta; +        event.offsetX = offsetX; +        event.offsetY = offsetY; +        // Go ahead and set deltaMode to 0 since we converted to pixels +        // Although this is a little odd since we overwrite the deltaX/Y +        // properties with normalized deltas. +        event.deltaMode = 0; + +        // Add event and delta to the front of the arguments +        args.unshift(event, delta, deltaX, deltaY); + +        // Clearout lowestDelta after sometime to better +        // handle multiple device types that give different +        // a different lowestDelta +        // Ex: trackpad = 3 and mouse wheel = 120 +        if (nullLowestDeltaTimeout) { clearTimeout(nullLowestDeltaTimeout); } +        nullLowestDeltaTimeout = setTimeout(nullLowestDelta, 200); + +        return ($.event.dispatch || $.event.handle).apply(this, args); +    } + +    function nullLowestDelta() { +        lowestDelta = null; +    } + +    function shouldAdjustOldDeltas(orgEvent, absDelta) { +        // If this is an older event and the delta is divisable by 120, +        // then we are assuming that the browser is treating this as an +        // older mouse wheel event and that we should divide the deltas +        // by 40 to try and get a more usable deltaFactor. +        // Side note, this actually impacts the reported scroll distance +        // in older browsers and can cause scrolling to be slower than native. +        // Turn this off by setting $.event.special.mousewheel.settings.adjustOldDeltas to false. +        return special.settings.adjustOldDeltas && orgEvent.type === 'mousewheel' && absDelta % 120 === 0; +    } + +})); + +S2.define('jquery.select2',[ +  'jquery', +  'jquery-mousewheel', + +  './select2/core', +  './select2/defaults' +], function ($, _, Select2, Defaults) { +  if ($.fn.select2 == null) { +    // All methods that should return the element +    var thisMethods = ['open', 'close', 'destroy']; + +    $.fn.select2 = function (options) { +      options = options || {}; + +      if (typeof options === 'object') { +        this.each(function () { +          var instanceOptions = $.extend(true, {}, options); + +          var instance = new Select2($(this), instanceOptions); +        }); + +        return this; +      } else if (typeof options === 'string') { +        var ret; +        var args = Array.prototype.slice.call(arguments, 1); + +        this.each(function () { +          var instance = $(this).data('select2'); + +          if (instance == null && window.console && console.error) { +            console.error( +              'The select2(\'' + options + '\') method was called on an ' + +              'element that is not using Select2.' +            ); +          } + +          ret = instance[options].apply(instance, args); +        }); + +        // Check if we should be returning `this` +        if ($.inArray(options, thisMethods) > -1) { +          return this; +        } + +        return ret; +      } else { +        throw new Error('Invalid arguments for Select2: ' + options); +      } +    }; +  } + +  if ($.fn.select2.defaults == null) { +    $.fn.select2.defaults = Defaults; +  } + +  return Select2; +}); + +  // Return the AMD loader configuration so it can be used outside of this file +  return { +    define: S2.define, +    require: S2.require +  }; +}()); + +  // Autoload the jQuery bindings +  // We know that all of the modules exist above this, so we're safe +  var select2 = S2.require('jquery.select2'); + +  // Hold the AMD module references on the jQuery function that was just loaded +  // This allows Select2 to use the internal loader outside of this file, such +  // as in the language files. +  jQuery.fn.select2.amd = S2; + +  // Return the Select2 instance for anyone who is importing it. +  return select2; +})); diff --git a/ishtar_common/static/select2/js/select2.full.min.js b/ishtar_common/static/select2/js/select2.full.min.js new file mode 100644 index 000000000..684edf323 --- /dev/null +++ b/ishtar_common/static/select2/js/select2.full.min.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){var b=function(){if(a&&a.fn&&a.fn.select2&&a.fn.select2.amd)var b=a.fn.select2.amd;var b;return function(){if(!b||!b.requirejs){b?c=b:b={};var a,c,d;!function(b){function e(a,b){return u.call(a,b)}function f(a,b){var c,d,e,f,g,h,i,j,k,l,m,n=b&&b.split("/"),o=s.map,p=o&&o["*"]||{};if(a&&"."===a.charAt(0))if(b){for(a=a.split("/"),g=a.length-1,s.nodeIdCompat&&w.test(a[g])&&(a[g]=a[g].replace(w,"")),a=n.slice(0,n.length-1).concat(a),k=0;k<a.length;k+=1)if(m=a[k],"."===m)a.splice(k,1),k-=1;else if(".."===m){if(1===k&&(".."===a[2]||".."===a[0]))break;k>0&&(a.splice(k-1,2),k-=2)}a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((n||p)&&o){for(c=a.split("/"),k=c.length;k>0;k-=1){if(d=c.slice(0,k).join("/"),n)for(l=n.length;l>0;l-=1)if(e=o[n.slice(0,l).join("/")],e&&(e=e[d])){f=e,h=k;break}if(f)break;!i&&p&&p[d]&&(i=p[d],j=k)}!f&&i&&(f=i,h=j),f&&(c.splice(0,h,f),a=c.join("/"))}return a}function g(a,c){return function(){var d=v.call(arguments,0);return"string"!=typeof d[0]&&1===d.length&&d.push(null),n.apply(b,d.concat([a,c]))}}function h(a){return function(b){return f(b,a)}}function i(a){return function(b){q[a]=b}}function j(a){if(e(r,a)){var c=r[a];delete r[a],t[a]=!0,m.apply(b,c)}if(!e(q,a)&&!e(t,a))throw new Error("No "+a);return q[a]}function k(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function l(a){return function(){return s&&s.config&&s.config[a]||{}}}var m,n,o,p,q={},r={},s={},t={},u=Object.prototype.hasOwnProperty,v=[].slice,w=/\.js$/;o=function(a,b){var c,d=k(a),e=d[0];return a=d[1],e&&(e=f(e,b),c=j(e)),e?a=c&&c.normalize?c.normalize(a,h(b)):f(a,b):(a=f(a,b),d=k(a),e=d[0],a=d[1],e&&(c=j(e))),{f:e?e+"!"+a:a,n:a,pr:e,p:c}},p={require:function(a){return g(a)},exports:function(a){var b=q[a];return"undefined"!=typeof b?b:q[a]={}},module:function(a){return{id:a,uri:"",exports:q[a],config:l(a)}}},m=function(a,c,d,f){var h,k,l,m,n,s,u=[],v=typeof d;if(f=f||a,"undefined"===v||"function"===v){for(c=!c.length&&d.length?["require","exports","module"]:c,n=0;n<c.length;n+=1)if(m=o(c[n],f),k=m.f,"require"===k)u[n]=p.require(a);else if("exports"===k)u[n]=p.exports(a),s=!0;else if("module"===k)h=u[n]=p.module(a);else if(e(q,k)||e(r,k)||e(t,k))u[n]=j(k);else{if(!m.p)throw new Error(a+" missing "+k);m.p.load(m.n,g(f,!0),i(k),{}),u[n]=q[k]}l=d?d.apply(q[a],u):void 0,a&&(h&&h.exports!==b&&h.exports!==q[a]?q[a]=h.exports:l===b&&s||(q[a]=l))}else a&&(q[a]=d)},a=c=n=function(a,c,d,e,f){if("string"==typeof a)return p[a]?p[a](c):j(o(a,c).f);if(!a.splice){if(s=a,s.deps&&n(s.deps,s.callback),!c)return;c.splice?(a=c,c=d,d=null):a=b}return c=c||function(){},"function"==typeof d&&(d=e,e=f),e?m(b,a,c,d):setTimeout(function(){m(b,a,c,d)},4),n},n.config=function(a){return n(a)},a._defined=q,d=function(a,b,c){if("string"!=typeof a)throw new Error("See almond README: incorrect module build, no module name");b.splice||(c=b,b=[]),e(q,a)||e(r,a)||(r[a]=[a,b,c])},d.amd={jQuery:!0}}(),b.requirejs=a,b.require=c,b.define=d}}(),b.define("almond",function(){}),b.define("jquery",[],function(){var b=a||$;return null==b&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),b}),b.define("select2/utils",["jquery"],function(a){function b(a){var b=a.prototype,c=[];for(var d in b){var e=b[d];"function"==typeof e&&"constructor"!==d&&c.push(d)}return c}var c={};c.Extend=function(a,b){function c(){this.constructor=a}var d={}.hasOwnProperty;for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},c.Decorate=function(a,c){function d(){var b=Array.prototype.unshift,d=c.prototype.constructor.length,e=a.prototype.constructor;d>0&&(b.call(arguments,a.prototype.constructor),e=c.prototype.constructor),e.apply(this,arguments)}function e(){this.constructor=d}var f=b(c),g=b(a);c.displayName=a.displayName,d.prototype=new e;for(var h=0;h<g.length;h++){var i=g[h];d.prototype[i]=a.prototype[i]}for(var j=(function(a){var b=function(){};a in d.prototype&&(b=d.prototype[a]);var e=c.prototype[a];return function(){var a=Array.prototype.unshift;return a.call(arguments,b),e.apply(this,arguments)}}),k=0;k<f.length;k++){var l=f[k];d.prototype[l]=j(l)}return d};var d=function(){this.listeners={}};return d.prototype.on=function(a,b){this.listeners=this.listeners||{},a in this.listeners?this.listeners[a].push(b):this.listeners[a]=[b]},d.prototype.trigger=function(a){var b=Array.prototype.slice,c=b.call(arguments,1);this.listeners=this.listeners||{},null==c&&(c=[]),0===c.length&&c.push({}),c[0]._type=a,a in this.listeners&&this.invoke(this.listeners[a],b.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},d.prototype.invoke=function(a,b){for(var c=0,d=a.length;d>c;c++)a[c].apply(this,b)},c.Observable=d,c.generateChars=function(a){for(var b="",c=0;a>c;c++){var d=Math.floor(36*Math.random());b+=d.toString(36)}return b},c.bind=function(a,b){return function(){a.apply(b,arguments)}},c._convertData=function(a){for(var b in a){var c=b.split("-"),d=a;if(1!==c.length){for(var e=0;e<c.length;e++){var f=c[e];f=f.substring(0,1).toLowerCase()+f.substring(1),f in d||(d[f]={}),e==c.length-1&&(d[f]=a[b]),d=d[f]}delete a[b]}}return a},c.hasScroll=function(b,c){var d=a(c),e=c.style.overflowX,f=c.style.overflowY;return e!==f||"hidden"!==f&&"visible"!==f?"scroll"===e||"scroll"===f?!0:d.innerHeight()<c.scrollHeight||d.innerWidth()<c.scrollWidth:!1},c.escapeMarkup=function(a){var b={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return"string"!=typeof a?a:String(a).replace(/[&<>"'\/\\]/g,function(a){return b[a]})},c.appendMany=function(b,c){if("1.7"===a.fn.jquery.substr(0,3)){var d=a();a.map(c,function(a){d=d.add(a)}),c=d}b.append(c)},c}),b.define("select2/results",["jquery","./utils"],function(a,b){function c(a,b,d){this.$element=a,this.data=d,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('<ul class="select2-results__options" role="tree"></ul>');return this.options.get("multiple")&&b.attr("aria-multiselectable","true"),this.$results=b,b},c.prototype.clear=function(){this.$results.empty()},c.prototype.displayMessage=function(b){var c=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var d=a('<li role="treeitem" aria-live="assertive" class="select2-results__option"></li>'),e=this.options.get("translations").get(b.message);d.append(c(e(b.args))),d[0].className+=" select2-results__message",this.$results.append(d)},c.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},c.prototype.append=function(a){this.hideLoading();var b=[];if(null==a.results||0===a.results.length)return void(0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"}));a.results=this.sort(a.results);for(var c=0;c<a.results.length;c++){var d=a.results[c],e=this.option(d);b.push(e)}this.$results.append(b)},c.prototype.position=function(a,b){var c=b.find(".select2-results");c.append(a)},c.prototype.sort=function(a){var b=this.options.get("sorter");return b(a)},c.prototype.highlightFirstItem=function(){var a=this.$results.find(".select2-results__option[aria-selected]"),b=a.filter("[aria-selected=true]");b.length>0?b.first().trigger("mouseenter"):a.first().trigger("mouseenter"),this.ensureHighlightVisible()},c.prototype.setClasses=function(){var b=this;this.data.current(function(c){var d=a.map(c,function(a){return a.id.toString()}),e=b.$results.find(".select2-results__option[aria-selected]");e.each(function(){var b=a(this),c=a.data(this,"data"),e=""+c.id;null!=c.element&&c.element.selected||null==c.element&&a.inArray(e,d)>-1?b.attr("aria-selected","true"):b.attr("aria-selected","false")})})},c.prototype.showLoading=function(a){this.hideLoading();var b=this.options.get("translations").get("searching"),c={disabled:!0,loading:!0,text:b(a)},d=this.option(c);d.className+=" loading-results",this.$results.prepend(d)},c.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},c.prototype.option=function(b){var c=document.createElement("li");c.className="select2-results__option";var d={role:"treeitem","aria-selected":"false"};b.disabled&&(delete d["aria-selected"],d["aria-disabled"]="true"),null==b.id&&delete d["aria-selected"],null!=b._resultId&&(c.id=b._resultId),b.title&&(c.title=b.title),b.children&&(d.role="group",d["aria-label"]=b.text,delete d["aria-selected"]);for(var e in d){var f=d[e];c.setAttribute(e,f)}if(b.children){var g=a(c),h=document.createElement("strong");h.className="select2-results__group";a(h);this.template(b,h);for(var i=[],j=0;j<b.children.length;j++){var k=b.children[j],l=this.option(k);i.push(l)}var m=a("<ul></ul>",{"class":"select2-results__options select2-results__options--nested"});m.append(i),g.append(h),g.append(m)}else this.template(b,c);return a.data(c,"data",b),c},c.prototype.bind=function(b,c){var d=this,e=b.id+"-results";this.$results.attr("id",e),b.on("results:all",function(a){d.clear(),d.append(a.data),b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("results:append",function(a){d.append(a.data),b.isOpen()&&d.setClasses()}),b.on("query",function(a){d.hideMessages(),d.showLoading(a)}),b.on("select",function(){b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("unselect",function(){b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("open",function(){d.$results.attr("aria-expanded","true"),d.$results.attr("aria-hidden","false"),d.setClasses(),d.ensureHighlightVisible()}),b.on("close",function(){d.$results.attr("aria-expanded","false"),d.$results.attr("aria-hidden","true"),d.$results.removeAttr("aria-activedescendant")}),b.on("results:toggle",function(){var a=d.getHighlightedResults();0!==a.length&&a.trigger("mouseup")}),b.on("results:select",function(){var a=d.getHighlightedResults();if(0!==a.length){var b=a.data("data");"true"==a.attr("aria-selected")?d.trigger("close",{}):d.trigger("select",{data:b})}}),b.on("results:previous",function(){var a=d.getHighlightedResults(),b=d.$results.find("[aria-selected]"),c=b.index(a);if(0!==c){var e=c-1;0===a.length&&(e=0);var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top,h=f.offset().top,i=d.$results.scrollTop()+(h-g);0===e?d.$results.scrollTop(0):0>h-g&&d.$results.scrollTop(i)}}),b.on("results:next",function(){var a=d.getHighlightedResults(),b=d.$results.find("[aria-selected]"),c=b.index(a),e=c+1;if(!(e>=b.length)){var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top+d.$results.outerHeight(!1),h=f.offset().top+f.outerHeight(!1),i=d.$results.scrollTop()+h-g;0===e?d.$results.scrollTop(0):h>g&&d.$results.scrollTop(i)}}),b.on("results:focus",function(a){a.element.addClass("select2-results__option--highlighted")}),b.on("results:message",function(a){d.displayMessage(a)}),a.fn.mousewheel&&this.$results.on("mousewheel",function(a){var b=d.$results.scrollTop(),c=d.$results.get(0).scrollHeight-b+a.deltaY,e=a.deltaY>0&&b-a.deltaY<=0,f=a.deltaY<0&&c<=d.$results.height();e?(d.$results.scrollTop(0),a.preventDefault(),a.stopPropagation()):f&&(d.$results.scrollTop(d.$results.get(0).scrollHeight-d.$results.height()),a.preventDefault(),a.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(b){var c=a(this),e=c.data("data");return"true"===c.attr("aria-selected")?void(d.options.get("multiple")?d.trigger("unselect",{originalEvent:b,data:e}):d.trigger("close",{})):void d.trigger("select",{originalEvent:b,data:e})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(b){var c=a(this).data("data");d.getHighlightedResults().removeClass("select2-results__option--highlighted"),d.trigger("results:focus",{data:c,element:a(this)})})},c.prototype.getHighlightedResults=function(){var a=this.$results.find(".select2-results__option--highlighted");return a},c.prototype.destroy=function(){this.$results.remove()},c.prototype.ensureHighlightVisible=function(){var a=this.getHighlightedResults();if(0!==a.length){var b=this.$results.find("[aria-selected]"),c=b.index(a),d=this.$results.offset().top,e=a.offset().top,f=this.$results.scrollTop()+(e-d),g=e-d;f-=2*a.outerHeight(!1),2>=c?this.$results.scrollTop(0):(g>this.$results.outerHeight()||0>g)&&this.$results.scrollTop(f)}},c.prototype.template=function(b,c){var d=this.options.get("templateResult"),e=this.options.get("escapeMarkup"),f=d(b,c);null==f?c.style.display="none":"string"==typeof f?c.innerHTML=e(f):a(c).append(f)},c}),b.define("select2/keys",[],function(){var a={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46};return a}),b.define("select2/selection/base",["jquery","../utils","../keys"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,b.Observable),d.prototype.render=function(){var b=a('<span class="select2-selection" role="combobox"  aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),b.attr("title",this.$element.attr("title")),b.attr("tabindex",this._tabindex),this.$selection=b,b},d.prototype.bind=function(a,b){var d=this,e=(a.id+"-container",a.id+"-results");this.container=a,this.$selection.on("focus",function(a){d.trigger("focus",a)}),this.$selection.on("blur",function(a){d._handleBlur(a)}),this.$selection.on("keydown",function(a){d.trigger("keypress",a),a.which===c.SPACE&&a.preventDefault()}),a.on("results:focus",function(a){d.$selection.attr("aria-activedescendant",a.data._resultId)}),a.on("selection:update",function(a){d.update(a.data)}),a.on("open",function(){d.$selection.attr("aria-expanded","true"),d.$selection.attr("aria-owns",e),d._attachCloseHandler(a)}),a.on("close",function(){d.$selection.attr("aria-expanded","false"),d.$selection.removeAttr("aria-activedescendant"),d.$selection.removeAttr("aria-owns"),d.$selection.focus(),d._detachCloseHandler(a)}),a.on("enable",function(){d.$selection.attr("tabindex",d._tabindex)}),a.on("disable",function(){d.$selection.attr("tabindex","-1")})},d.prototype._handleBlur=function(b){var c=this;window.setTimeout(function(){document.activeElement==c.$selection[0]||a.contains(c.$selection[0],document.activeElement)||c.trigger("blur",b)},1)},d.prototype._attachCloseHandler=function(b){a(document.body).on("mousedown.select2."+b.id,function(b){var c=a(b.target),d=c.closest(".select2"),e=a(".select2.select2-container--open");e.each(function(){var b=a(this);if(this!=d[0]){var c=b.data("element");c.select2("close")}})})},d.prototype._detachCloseHandler=function(b){a(document.body).off("mousedown.select2."+b.id)},d.prototype.position=function(a,b){var c=b.find(".selection");c.append(a)},d.prototype.destroy=function(){this._detachCloseHandler(this.container)},d.prototype.update=function(a){throw new Error("The `update` method must be defined in child classes.")},d}),b.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(a,b,c,d){function e(){e.__super__.constructor.apply(this,arguments)}return c.Extend(e,b),e.prototype.render=function(){var a=e.__super__.render.call(this);return a.addClass("select2-selection--single"),a.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),a},e.prototype.bind=function(a,b){var c=this;e.__super__.bind.apply(this,arguments);var d=a.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",d),this.$selection.attr("aria-labelledby",d),this.$selection.on("mousedown",function(a){1===a.which&&c.trigger("toggle",{originalEvent:a})}),this.$selection.on("focus",function(a){}),this.$selection.on("blur",function(a){}),a.on("focus",function(b){a.isOpen()||c.$selection.focus()}),a.on("selection:update",function(a){c.update(a.data)})},e.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},e.prototype.display=function(a,b){var c=this.options.get("templateSelection"),d=this.options.get("escapeMarkup");return d(c(a,b))},e.prototype.selectionContainer=function(){return a("<span></span>")},e.prototype.update=function(a){if(0===a.length)return void this.clear();var b=a[0],c=this.$selection.find(".select2-selection__rendered"),d=this.display(b,c);c.empty().append(d),c.prop("title",b.title||b.text)},e}),b.define("select2/selection/multiple",["jquery","./base","../utils"],function(a,b,c){function d(a,b){d.__super__.constructor.apply(this,arguments)}return c.Extend(d,b),d.prototype.render=function(){var a=d.__super__.render.call(this);return a.addClass("select2-selection--multiple"),a.html('<ul class="select2-selection__rendered"></ul>'),a},d.prototype.bind=function(b,c){var e=this;d.__super__.bind.apply(this,arguments),this.$selection.on("click",function(a){e.trigger("toggle",{originalEvent:a})}),this.$selection.on("click",".select2-selection__choice__remove",function(b){if(!e.options.get("disabled")){var c=a(this),d=c.parent(),f=d.data("data");e.trigger("unselect",{originalEvent:b,data:f})}})},d.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},d.prototype.display=function(a,b){var c=this.options.get("templateSelection"),d=this.options.get("escapeMarkup");return d(c(a,b))},d.prototype.selectionContainer=function(){var b=a('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">×</span></li>');return b},d.prototype.update=function(a){if(this.clear(),0!==a.length){for(var b=[],d=0;d<a.length;d++){var e=a[d],f=this.selectionContainer(),g=this.display(e,f);f.append(g),f.prop("title",e.title||e.text),f.data("data",e),b.push(f)}var h=this.$selection.find(".select2-selection__rendered");c.appendMany(h,b)}},d}),b.define("select2/selection/placeholder",["../utils"],function(a){function b(a,b,c){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c)}return b.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},b.prototype.createPlaceholder=function(a,b){var c=this.selectionContainer();return c.html(this.display(b)),c.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),c},b.prototype.update=function(a,b){var c=1==b.length&&b[0].id!=this.placeholder.id,d=b.length>1;if(d||c)return a.call(this,b);this.clear();var e=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(e)},b}),b.define("select2/selection/allowClear",["jquery","../keys"],function(a,b){function c(){}return c.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(a){d._handleClear(a)}),b.on("keypress",function(a){d._handleKeyboardClear(a,b)})},c.prototype._handleClear=function(a,b){if(!this.options.get("disabled")){var c=this.$selection.find(".select2-selection__clear");if(0!==c.length){b.stopPropagation();for(var d=c.data("data"),e=0;e<d.length;e++){var f={data:d[e]};if(this.trigger("unselect",f),f.prevented)return}this.$element.val(this.placeholder.id).trigger("change"),this.trigger("toggle",{})}}},c.prototype._handleKeyboardClear=function(a,c,d){d.isOpen()||(c.which==b.DELETE||c.which==b.BACKSPACE)&&this._handleClear(c)},c.prototype.update=function(b,c){if(b.call(this,c),!(this.$selection.find(".select2-selection__placeholder").length>0||0===c.length)){var d=a('<span class="select2-selection__clear">×</span>');d.data("data",c),this.$selection.find(".select2-selection__rendered").prepend(d)}},c}),b.define("select2/selection/search",["jquery","../utils","../keys"],function(a,b,c){function d(a,b,c){a.call(this,b,c)}return d.prototype.render=function(b){var c=a('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>');this.$searchContainer=c,this.$search=c.find("input");var d=b.call(this);return this._transferTabIndex(),d},d.prototype.bind=function(a,b,d){var e=this;a.call(this,b,d),b.on("open",function(){e.$search.trigger("focus")}),b.on("close",function(){e.$search.val(""),e.$search.removeAttr("aria-activedescendant"),e.$search.trigger("focus")}),b.on("enable",function(){e.$search.prop("disabled",!1),e._transferTabIndex()}),b.on("disable",function(){e.$search.prop("disabled",!0)}),b.on("focus",function(a){e.$search.trigger("focus")}),b.on("results:focus",function(a){e.$search.attr("aria-activedescendant",a.id)}),this.$selection.on("focusin",".select2-search--inline",function(a){e.trigger("focus",a)}),this.$selection.on("focusout",".select2-search--inline",function(a){e._handleBlur(a)}),this.$selection.on("keydown",".select2-search--inline",function(a){a.stopPropagation(),e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented();var b=a.which;if(b===c.BACKSPACE&&""===e.$search.val()){var d=e.$searchContainer.prev(".select2-selection__choice");if(d.length>0){var f=d.data("data");e.searchRemoveChoice(f),a.preventDefault()}}});var f=document.documentMode,g=f&&11>=f;this.$selection.on("input.searchcheck",".select2-search--inline",function(a){return g?void e.$selection.off("input.search input.searchcheck"):void e.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(a){if(g&&"input"===a.type)return void e.$selection.off("input.search input.searchcheck");var b=a.which;b!=c.SHIFT&&b!=c.CTRL&&b!=c.ALT&&b!=c.TAB&&e.handleSearch(a)})},d.prototype._transferTabIndex=function(a){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},d.prototype.createPlaceholder=function(a,b){this.$search.attr("placeholder",b.text)},d.prototype.update=function(a,b){var c=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),a.call(this,b),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),c&&this.$search.focus()},d.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var a=this.$search.val();this.trigger("query",{term:a})}this._keyUpPrevented=!1},d.prototype.searchRemoveChoice=function(a,b){this.trigger("unselect",{data:b}),this.$search.val(b.text),this.handleSearch()},d.prototype.resizeSearch=function(){this.$search.css("width","25px");var a="";if(""!==this.$search.attr("placeholder"))a=this.$selection.find(".select2-selection__rendered").innerWidth();else{var b=this.$search.val().length+1;a=.75*b+"em"}this.$search.css("width",a)},d}),b.define("select2/selection/eventRelay",["jquery"],function(a){function b(){}return b.prototype.bind=function(b,c,d){var e=this,f=["open","opening","close","closing","select","selecting","unselect","unselecting"],g=["opening","closing","selecting","unselecting"];b.call(this,c,d),c.on("*",function(b,c){if(-1!==a.inArray(b,f)){c=c||{};var d=a.Event("select2:"+b,{params:c});e.$element.trigger(d),-1!==a.inArray(b,g)&&(c.prevented=d.isDefaultPrevented())}})},b}),b.define("select2/translation",["jquery","require"],function(a,b){function c(a){this.dict=a||{}}return c.prototype.all=function(){return this.dict},c.prototype.get=function(a){return this.dict[a]},c.prototype.extend=function(b){this.dict=a.extend({},b.all(),this.dict)},c._cache={},c.loadPath=function(a){if(!(a in c._cache)){var d=b(a);c._cache[a]=d}return new c(c._cache[a])},c}),b.define("select2/diacritics",[],function(){var a={"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"};return a}),b.define("select2/data/base",["../utils"],function(a){function b(a,c){b.__super__.constructor.call(this)}return a.Extend(b,a.Observable),b.prototype.current=function(a){throw new Error("The `current` method must be defined in child classes.")},b.prototype.query=function(a,b){throw new Error("The `query` method must be defined in child classes.")},b.prototype.bind=function(a,b){},b.prototype.destroy=function(){},b.prototype.generateResultId=function(b,c){var d=b.id+"-result-";return d+=a.generateChars(4),d+=null!=c.id?"-"+c.id.toString():"-"+a.generateChars(4)},b}),b.define("select2/data/select",["./base","../utils","jquery"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,a),d.prototype.current=function(a){var b=[],d=this;this.$element.find(":selected").each(function(){var a=c(this),e=d.item(a);b.push(e)}),a(b)},d.prototype.select=function(a){var b=this;if(a.selected=!0,c(a.element).is("option"))return a.element.selected=!0,void this.$element.trigger("change"); +if(this.$element.prop("multiple"))this.current(function(d){var e=[];a=[a],a.push.apply(a,d);for(var f=0;f<a.length;f++){var g=a[f].id;-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("change")});else{var d=a.id;this.$element.val(d),this.$element.trigger("change")}},d.prototype.unselect=function(a){var b=this;if(this.$element.prop("multiple"))return a.selected=!1,c(a.element).is("option")?(a.element.selected=!1,void this.$element.trigger("change")):void this.current(function(d){for(var e=[],f=0;f<d.length;f++){var g=d[f].id;g!==a.id&&-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("change")})},d.prototype.bind=function(a,b){var c=this;this.container=a,a.on("select",function(a){c.select(a.data)}),a.on("unselect",function(a){c.unselect(a.data)})},d.prototype.destroy=function(){this.$element.find("*").each(function(){c.removeData(this,"data")})},d.prototype.query=function(a,b){var d=[],e=this,f=this.$element.children();f.each(function(){var b=c(this);if(b.is("option")||b.is("optgroup")){var f=e.item(b),g=e.matches(a,f);null!==g&&d.push(g)}}),b({results:d})},d.prototype.addOptions=function(a){b.appendMany(this.$element,a)},d.prototype.option=function(a){var b;a.children?(b=document.createElement("optgroup"),b.label=a.text):(b=document.createElement("option"),void 0!==b.textContent?b.textContent=a.text:b.innerText=a.text),a.id&&(b.value=a.id),a.disabled&&(b.disabled=!0),a.selected&&(b.selected=!0),a.title&&(b.title=a.title);var d=c(b),e=this._normalizeItem(a);return e.element=b,c.data(b,"data",e),d},d.prototype.item=function(a){var b={};if(b=c.data(a[0],"data"),null!=b)return b;if(a.is("option"))b={id:a.val(),text:a.text(),disabled:a.prop("disabled"),selected:a.prop("selected"),title:a.prop("title")};else if(a.is("optgroup")){b={text:a.prop("label"),children:[],title:a.prop("title")};for(var d=a.children("option"),e=[],f=0;f<d.length;f++){var g=c(d[f]),h=this.item(g);e.push(h)}b.children=e}return b=this._normalizeItem(b),b.element=a[0],c.data(a[0],"data",b),b},d.prototype._normalizeItem=function(a){c.isPlainObject(a)||(a={id:a,text:a}),a=c.extend({},{text:""},a);var b={selected:!1,disabled:!1};return null!=a.id&&(a.id=a.id.toString()),null!=a.text&&(a.text=a.text.toString()),null==a._resultId&&a.id&&null!=this.container&&(a._resultId=this.generateResultId(this.container,a)),c.extend({},b,a)},d.prototype.matches=function(a,b){var c=this.options.get("matcher");return c(a,b)},d}),b.define("select2/data/array",["./select","../utils","jquery"],function(a,b,c){function d(a,b){var c=b.get("data")||[];d.__super__.constructor.call(this,a,b),this.addOptions(this.convertToOptions(c))}return b.Extend(d,a),d.prototype.select=function(a){var b=this.$element.find("option").filter(function(b,c){return c.value==a.id.toString()});0===b.length&&(b=this.option(a),this.addOptions(b)),d.__super__.select.call(this,a)},d.prototype.convertToOptions=function(a){function d(a){return function(){return c(this).val()==a.id}}for(var e=this,f=this.$element.find("option"),g=f.map(function(){return e.item(c(this)).id}).get(),h=[],i=0;i<a.length;i++){var j=this._normalizeItem(a[i]);if(c.inArray(j.id,g)>=0){var k=f.filter(d(j)),l=this.item(k),m=c.extend(!0,{},j,l),n=this.option(m);k.replaceWith(n)}else{var o=this.option(j);if(j.children){var p=this.convertToOptions(j.children);b.appendMany(o,p)}h.push(o)}}return h},d}),b.define("select2/data/ajax",["./array","../utils","jquery"],function(a,b,c){function d(a,b){this.ajaxOptions=this._applyDefaults(b.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),d.__super__.constructor.call(this,a,b)}return b.Extend(d,a),d.prototype._applyDefaults=function(a){var b={data:function(a){return c.extend({},a,{q:a.term})},transport:function(a,b,d){var e=c.ajax(a);return e.then(b),e.fail(d),e}};return c.extend({},b,a,!0)},d.prototype.processResults=function(a){return a},d.prototype.query=function(a,b){function d(){var d=f.transport(f,function(d){var f=e.processResults(d,a);e.options.get("debug")&&window.console&&console.error&&(f&&f.results&&c.isArray(f.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),b(f)},function(){d.status&&"0"===d.status||e.trigger("results:message",{message:"errorLoading"})});e._request=d}var e=this;null!=this._request&&(c.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var f=c.extend({type:"GET"},this.ajaxOptions);"function"==typeof f.url&&(f.url=f.url.call(this.$element,a)),"function"==typeof f.data&&(f.data=f.data.call(this.$element,a)),this.ajaxOptions.delay&&null!=a.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(d,this.ajaxOptions.delay)):d()},d}),b.define("select2/data/tags",["jquery"],function(a){function b(b,c,d){var e=d.get("tags"),f=d.get("createTag");void 0!==f&&(this.createTag=f);var g=d.get("insertTag");if(void 0!==g&&(this.insertTag=g),b.call(this,c,d),a.isArray(e))for(var h=0;h<e.length;h++){var i=e[h],j=this._normalizeItem(i),k=this.option(j);this.$element.append(k)}}return b.prototype.query=function(a,b,c){function d(a,f){for(var g=a.results,h=0;h<g.length;h++){var i=g[h],j=null!=i.children&&!d({results:i.children},!0),k=i.text===b.term;if(k||j)return f?!1:(a.data=g,void c(a))}if(f)return!0;var l=e.createTag(b);if(null!=l){var m=e.option(l);m.attr("data-select2-tag",!0),e.addOptions([m]),e.insertTag(g,l)}a.results=g,c(a)}var e=this;return this._removeOldTags(),null==b.term||null!=b.page?void a.call(this,b,c):void a.call(this,b,d)},b.prototype.createTag=function(b,c){var d=a.trim(c.term);return""===d?null:{id:d,text:d}},b.prototype.insertTag=function(a,b,c){b.unshift(c)},b.prototype._removeOldTags=function(b){var c=(this._lastTag,this.$element.find("option[data-select2-tag]"));c.each(function(){this.selected||a(this).remove()})},b}),b.define("select2/data/tokenizer",["jquery"],function(a){function b(a,b,c){var d=c.get("tokenizer");void 0!==d&&(this.tokenizer=d),a.call(this,b,c)}return b.prototype.bind=function(a,b,c){a.call(this,b,c),this.$search=b.dropdown.$search||b.selection.$search||c.find(".select2-search__field")},b.prototype.query=function(b,c,d){function e(b){var c=g._normalizeItem(b),d=g.$element.find("option").filter(function(){return a(this).val()===c.id});if(!d.length){var e=g.option(c);e.attr("data-select2-tag",!0),g._removeOldTags(),g.addOptions([e])}f(c)}function f(a){g.trigger("select",{data:a})}var g=this;c.term=c.term||"";var h=this.tokenizer(c,this.options,e);h.term!==c.term&&(this.$search.length&&(this.$search.val(h.term),this.$search.focus()),c.term=h.term),b.call(this,c,d)},b.prototype.tokenizer=function(b,c,d,e){for(var f=d.get("tokenSeparators")||[],g=c.term,h=0,i=this.createTag||function(a){return{id:a.term,text:a.term}};h<g.length;){var j=g[h];if(-1!==a.inArray(j,f)){var k=g.substr(0,h),l=a.extend({},c,{term:k}),m=i(l);null!=m?(e(m),g=g.substr(h+1)||"",h=0):h++}else h++}return{term:g}},b}),b.define("select2/data/minimumInputLength",[],function(){function a(a,b,c){this.minimumInputLength=c.get("minimumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){return b.term=b.term||"",b.term.length<this.minimumInputLength?void this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:b.term,params:b}}):void a.call(this,b,c)},a}),b.define("select2/data/maximumInputLength",[],function(){function a(a,b,c){this.maximumInputLength=c.get("maximumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){return b.term=b.term||"",this.maximumInputLength>0&&b.term.length>this.maximumInputLength?void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:b.term,params:b}}):void a.call(this,b,c)},a}),b.define("select2/data/maximumSelectionLength",[],function(){function a(a,b,c){this.maximumSelectionLength=c.get("maximumSelectionLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){var d=this;this.current(function(e){var f=null!=e?e.length:0;return d.maximumSelectionLength>0&&f>=d.maximumSelectionLength?void d.trigger("results:message",{message:"maximumSelected",args:{maximum:d.maximumSelectionLength}}):void a.call(d,b,c)})},a}),b.define("select2/dropdown",["jquery","./utils"],function(a,b){function c(a,b){this.$element=a,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('<span class="select2-dropdown"><span class="select2-results"></span></span>');return b.attr("dir",this.options.get("dir")),this.$dropdown=b,b},c.prototype.bind=function(){},c.prototype.position=function(a,b){},c.prototype.destroy=function(){this.$dropdown.remove()},c}),b.define("select2/dropdown/search",["jquery","../utils"],function(a,b){function c(){}return c.prototype.render=function(b){var c=b.call(this),d=a('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" /></span>');return this.$searchContainer=d,this.$search=d.find("input"),c.prepend(d),c},c.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),this.$search.on("keydown",function(a){e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented()}),this.$search.on("input",function(b){a(this).off("keyup")}),this.$search.on("keyup input",function(a){e.handleSearch(a)}),c.on("open",function(){e.$search.attr("tabindex",0),e.$search.focus(),window.setTimeout(function(){e.$search.focus()},0)}),c.on("close",function(){e.$search.attr("tabindex",-1),e.$search.val("")}),c.on("focus",function(){c.isOpen()&&e.$search.focus()}),c.on("results:all",function(a){if(null==a.query.term||""===a.query.term){var b=e.showSearch(a);b?e.$searchContainer.removeClass("select2-search--hide"):e.$searchContainer.addClass("select2-search--hide")}})},c.prototype.handleSearch=function(a){if(!this._keyUpPrevented){var b=this.$search.val();this.trigger("query",{term:b})}this._keyUpPrevented=!1},c.prototype.showSearch=function(a,b){return!0},c}),b.define("select2/dropdown/hidePlaceholder",[],function(){function a(a,b,c,d){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c,d)}return a.prototype.append=function(a,b){b.results=this.removePlaceholder(b.results),a.call(this,b)},a.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},a.prototype.removePlaceholder=function(a,b){for(var c=b.slice(0),d=b.length-1;d>=0;d--){var e=b[d];this.placeholder.id===e.id&&c.splice(d,1)}return c},a}),b.define("select2/dropdown/infiniteScroll",["jquery"],function(a){function b(a,b,c,d){this.lastParams={},a.call(this,b,c,d),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return b.prototype.append=function(a,b){this.$loadingMore.remove(),this.loading=!1,a.call(this,b),this.showLoadingMore(b)&&this.$results.append(this.$loadingMore)},b.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),c.on("query",function(a){e.lastParams=a,e.loading=!0}),c.on("query:append",function(a){e.lastParams=a,e.loading=!0}),this.$results.on("scroll",function(){var b=a.contains(document.documentElement,e.$loadingMore[0]);if(!e.loading&&b){var c=e.$results.offset().top+e.$results.outerHeight(!1),d=e.$loadingMore.offset().top+e.$loadingMore.outerHeight(!1);c+50>=d&&e.loadMore()}})},b.prototype.loadMore=function(){this.loading=!0;var b=a.extend({},{page:1},this.lastParams);b.page++,this.trigger("query:append",b)},b.prototype.showLoadingMore=function(a,b){return b.pagination&&b.pagination.more},b.prototype.createLoadingMore=function(){var b=a('<li class="select2-results__option select2-results__option--load-more"role="treeitem" aria-disabled="true"></li>'),c=this.options.get("translations").get("loadingMore");return b.html(c(this.lastParams)),b},b}),b.define("select2/dropdown/attachBody",["jquery","../utils"],function(a,b){function c(b,c,d){this.$dropdownParent=d.get("dropdownParent")||a(document.body),b.call(this,c,d)}return c.prototype.bind=function(a,b,c){var d=this,e=!1;a.call(this,b,c),b.on("open",function(){d._showDropdown(),d._attachPositioningHandler(b),e||(e=!0,b.on("results:all",function(){d._positionDropdown(),d._resizeDropdown()}),b.on("results:append",function(){d._positionDropdown(),d._resizeDropdown()}))}),b.on("close",function(){d._hideDropdown(),d._detachPositioningHandler(b)}),this.$dropdownContainer.on("mousedown",function(a){a.stopPropagation()})},c.prototype.destroy=function(a){a.call(this),this.$dropdownContainer.remove()},c.prototype.position=function(a,b,c){b.attr("class",c.attr("class")),b.removeClass("select2"),b.addClass("select2-container--open"),b.css({position:"absolute",top:-999999}),this.$container=c},c.prototype.render=function(b){var c=a("<span></span>"),d=b.call(this);return c.append(d),this.$dropdownContainer=c,c},c.prototype._hideDropdown=function(a){this.$dropdownContainer.detach()},c.prototype._attachPositioningHandler=function(c,d){var e=this,f="scroll.select2."+d.id,g="resize.select2."+d.id,h="orientationchange.select2."+d.id,i=this.$container.parents().filter(b.hasScroll);i.each(function(){a(this).data("select2-scroll-position",{x:a(this).scrollLeft(),y:a(this).scrollTop()})}),i.on(f,function(b){var c=a(this).data("select2-scroll-position");a(this).scrollTop(c.y)}),a(window).on(f+" "+g+" "+h,function(a){e._positionDropdown(),e._resizeDropdown()})},c.prototype._detachPositioningHandler=function(c,d){var e="scroll.select2."+d.id,f="resize.select2."+d.id,g="orientationchange.select2."+d.id,h=this.$container.parents().filter(b.hasScroll);h.off(e),a(window).off(e+" "+f+" "+g)},c.prototype._positionDropdown=function(){var b=a(window),c=this.$dropdown.hasClass("select2-dropdown--above"),d=this.$dropdown.hasClass("select2-dropdown--below"),e=null,f=this.$container.offset();f.bottom=f.top+this.$container.outerHeight(!1);var g={height:this.$container.outerHeight(!1)};g.top=f.top,g.bottom=f.top+g.height;var h={height:this.$dropdown.outerHeight(!1)},i={top:b.scrollTop(),bottom:b.scrollTop()+b.height()},j=i.top<f.top-h.height,k=i.bottom>f.bottom+h.height,l={left:f.left,top:g.bottom},m=this.$dropdownParent;"static"===m.css("position")&&(m=m.offsetParent());var n=m.offset();l.top-=n.top,l.left-=n.left,c||d||(e="below"),k||!j||c?!j&&k&&c&&(e="below"):e="above",("above"==e||c&&"below"!==e)&&(l.top=g.top-n.top-h.height),null!=e&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+e),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+e)),this.$dropdownContainer.css(l)},c.prototype._resizeDropdown=function(){var a={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(a.minWidth=a.width,a.position="relative",a.width="auto"),this.$dropdown.css(a)},c.prototype._showDropdown=function(a){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},c}),b.define("select2/dropdown/minimumResultsForSearch",[],function(){function a(b){for(var c=0,d=0;d<b.length;d++){var e=b[d];e.children?c+=a(e.children):c++}return c}function b(a,b,c,d){this.minimumResultsForSearch=c.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),a.call(this,b,c,d)}return b.prototype.showSearch=function(b,c){return a(c.data.results)<this.minimumResultsForSearch?!1:b.call(this,c)},b}),b.define("select2/dropdown/selectOnClose",[],function(){function a(){}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("close",function(a){d._handleSelectOnClose(a)})},a.prototype._handleSelectOnClose=function(a,b){if(b&&null!=b.originalSelect2Event){var c=b.originalSelect2Event;if("select"===c._type||"unselect"===c._type)return}var d=this.getHighlightedResults();if(!(d.length<1)){var e=d.data("data");null!=e.element&&e.element.selected||null==e.element&&e.selected||this.trigger("select",{data:e})}},a}),b.define("select2/dropdown/closeOnSelect",[],function(){function a(){}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("select",function(a){d._selectTriggered(a)}),b.on("unselect",function(a){d._selectTriggered(a)})},a.prototype._selectTriggered=function(a,b){var c=b.originalEvent;c&&c.ctrlKey||this.trigger("close",{originalEvent:c,originalSelect2Event:b})},a}),b.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(a){var b=a.input.length-a.maximum,c="Please delete "+b+" character";return 1!=b&&(c+="s"),c},inputTooShort:function(a){var b=a.minimum-a.input.length,c="Please enter "+b+" or more characters";return c},loadingMore:function(){return"Loading more results…"},maximumSelected:function(a){var b="You can only select "+a.maximum+" item";return 1!=a.maximum&&(b+="s"),b},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),b.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C){function D(){this.reset()}D.prototype.apply=function(l){if(l=a.extend(!0,{},this.defaults,l),null==l.dataAdapter){if(null!=l.ajax?l.dataAdapter=o:null!=l.data?l.dataAdapter=n:l.dataAdapter=m,l.minimumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,r)),l.maximumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,s)),l.maximumSelectionLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,t)),l.tags&&(l.dataAdapter=j.Decorate(l.dataAdapter,p)),(null!=l.tokenSeparators||null!=l.tokenizer)&&(l.dataAdapter=j.Decorate(l.dataAdapter,q)),null!=l.query){var C=b(l.amdBase+"compat/query");l.dataAdapter=j.Decorate(l.dataAdapter,C)}if(null!=l.initSelection){var D=b(l.amdBase+"compat/initSelection");l.dataAdapter=j.Decorate(l.dataAdapter,D)}}if(null==l.resultsAdapter&&(l.resultsAdapter=c,null!=l.ajax&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,x)),null!=l.placeholder&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,w)),l.selectOnClose&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,A))),null==l.dropdownAdapter){if(l.multiple)l.dropdownAdapter=u;else{var E=j.Decorate(u,v);l.dropdownAdapter=E}if(0!==l.minimumResultsForSearch&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,z)),l.closeOnSelect&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,B)),null!=l.dropdownCssClass||null!=l.dropdownCss||null!=l.adaptDropdownCssClass){var F=b(l.amdBase+"compat/dropdownCss");l.dropdownAdapter=j.Decorate(l.dropdownAdapter,F)}l.dropdownAdapter=j.Decorate(l.dropdownAdapter,y)}if(null==l.selectionAdapter){if(l.multiple?l.selectionAdapter=e:l.selectionAdapter=d,null!=l.placeholder&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,f)),l.allowClear&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,g)),l.multiple&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,h)),null!=l.containerCssClass||null!=l.containerCss||null!=l.adaptContainerCssClass){var G=b(l.amdBase+"compat/containerCss");l.selectionAdapter=j.Decorate(l.selectionAdapter,G)}l.selectionAdapter=j.Decorate(l.selectionAdapter,i)}if("string"==typeof l.language)if(l.language.indexOf("-")>0){var H=l.language.split("-"),I=H[0];l.language=[l.language,I]}else l.language=[l.language];if(a.isArray(l.language)){var J=new k;l.language.push("en");for(var K=l.language,L=0;L<K.length;L++){var M=K[L],N={};try{N=k.loadPath(M)}catch(O){try{M=this.defaults.amdLanguageBase+M,N=k.loadPath(M)}catch(P){l.debug&&window.console&&console.warn&&console.warn('Select2: The language file for "'+M+'" could not be automatically loaded. A fallback will be used instead.');continue}}J.extend(N)}l.translations=J}else{var Q=k.loadPath(this.defaults.amdLanguageBase+"en"),R=new k(l.language);R.extend(Q),l.translations=R}return l},D.prototype.reset=function(){function b(a){function b(a){return l[a]||a}return a.replace(/[^\u0000-\u007E]/g,b)}function c(d,e){if(""===a.trim(d.term))return e;if(e.children&&e.children.length>0){for(var f=a.extend(!0,{},e),g=e.children.length-1;g>=0;g--){var h=e.children[g],i=c(d,h);null==i&&f.children.splice(g,1)}return f.children.length>0?f:c(d,f)}var j=b(e.text).toUpperCase(),k=b(d.term).toUpperCase();return j.indexOf(k)>-1?e:null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:j.escapeMarkup,language:C,matcher:c,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(a){return a},templateResult:function(a){return a.text},templateSelection:function(a){return a.text},theme:"default",width:"resolve"}},D.prototype.set=function(b,c){var d=a.camelCase(b),e={};e[d]=c;var f=j._convertData(e);a.extend(this.defaults,f)};var E=new D;return E}),b.define("select2/options",["require","jquery","./defaults","./utils"],function(a,b,c,d){function e(b,e){if(this.options=b,null!=e&&this.fromElement(e),this.options=c.apply(this.options),e&&e.is("input")){var f=a(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=d.Decorate(this.options.dataAdapter,f)}}return e.prototype.fromElement=function(a){var c=["select2"];null==this.options.multiple&&(this.options.multiple=a.prop("multiple")),null==this.options.disabled&&(this.options.disabled=a.prop("disabled")),null==this.options.language&&(a.prop("lang")?this.options.language=a.prop("lang").toLowerCase():a.closest("[lang]").prop("lang")&&(this.options.language=a.closest("[lang]").prop("lang"))),null==this.options.dir&&(a.prop("dir")?this.options.dir=a.prop("dir"):a.closest("[dir]").prop("dir")?this.options.dir=a.closest("[dir]").prop("dir"):this.options.dir="ltr"),a.prop("disabled",this.options.disabled),a.prop("multiple",this.options.multiple),a.data("select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),a.data("data",a.data("select2Tags")),a.data("tags",!0)),a.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),a.attr("ajax--url",a.data("ajaxUrl")),a.data("ajax--url",a.data("ajaxUrl")));var e={};e=b.fn.jquery&&"1."==b.fn.jquery.substr(0,2)&&a[0].dataset?b.extend(!0,{},a[0].dataset,a.data()):a.data();var f=b.extend(!0,{},e);f=d._convertData(f);for(var g in f)b.inArray(g,c)>-1||(b.isPlainObject(this.options[g])?b.extend(this.options[g],f[g]):this.options[g]=f[g]);return this},e.prototype.get=function(a){return this.options[a]},e.prototype.set=function(a,b){this.options[a]=b},e}),b.define("select2/core",["jquery","./options","./utils","./keys"],function(a,b,c,d){var e=function(a,c){null!=a.data("select2")&&a.data("select2").destroy(),this.$element=a,this.id=this._generateId(a),c=c||{},this.options=new b(c,a),e.__super__.constructor.call(this);var d=a.attr("tabindex")||0;a.data("old-tabindex",d),a.attr("tabindex","-1");var f=this.options.get("dataAdapter");this.dataAdapter=new f(a,this.options);var g=this.render();this._placeContainer(g);var h=this.options.get("selectionAdapter");this.selection=new h(a,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,g);var i=this.options.get("dropdownAdapter");this.dropdown=new i(a,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,g);var j=this.options.get("resultsAdapter");this.results=new j(a,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var k=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(a){k.trigger("selection:update",{data:a})}),a.addClass("select2-hidden-accessible"),a.attr("aria-hidden","true"),this._syncAttributes(),a.data("select2",this)};return c.Extend(e,c.Observable),e.prototype._generateId=function(a){var b="";return b=null!=a.attr("id")?a.attr("id"):null!=a.attr("name")?a.attr("name")+"-"+c.generateChars(2):c.generateChars(4),b=b.replace(/(:|\.|\[|\]|,)/g,""),b="select2-"+b},e.prototype._placeContainer=function(a){a.insertAfter(this.$element);var b=this._resolveWidth(this.$element,this.options.get("width"));null!=b&&a.css("width",b)},e.prototype._resolveWidth=function(a,b){var c=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==b){var d=this._resolveWidth(a,"style");return null!=d?d:this._resolveWidth(a,"element")}if("element"==b){var e=a.outerWidth(!1);return 0>=e?"auto":e+"px"}if("style"==b){var f=a.attr("style");if("string"!=typeof f)return null;for(var g=f.split(";"),h=0,i=g.length;i>h;h+=1){var j=g[h].replace(/\s/g,""),k=j.match(c);if(null!==k&&k.length>=1)return k[1]}return null}return b},e.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},e.prototype._registerDomEvents=function(){var b=this;this.$element.on("change.select2",function(){b.dataAdapter.current(function(a){b.trigger("selection:update",{data:a})})}),this.$element.on("focus.select2",function(a){b.trigger("focus",a)}),this._syncA=c.bind(this._syncAttributes,this),this._syncS=c.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var d=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=d?(this._observer=new d(function(c){a.each(c,b._syncA),a.each(c,b._syncS)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",b._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",b._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",b._syncS,!1))},e.prototype._registerDataEvents=function(){var a=this;this.dataAdapter.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerSelectionEvents=function(){var b=this,c=["toggle","focus"];this.selection.on("toggle",function(){b.toggleDropdown()}),this.selection.on("focus",function(a){b.focus(a)}),this.selection.on("*",function(d,e){-1===a.inArray(d,c)&&b.trigger(d,e)})},e.prototype._registerDropdownEvents=function(){var a=this;this.dropdown.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerResultsEvents=function(){var a=this;this.results.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerEvents=function(){var a=this;this.on("open",function(){a.$container.addClass("select2-container--open")}),this.on("close",function(){a.$container.removeClass("select2-container--open")}),this.on("enable",function(){a.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){a.$container.addClass("select2-container--disabled")}),this.on("blur",function(){a.$container.removeClass("select2-container--focus")}),this.on("query",function(b){a.isOpen()||a.trigger("open",{}),this.dataAdapter.query(b,function(c){a.trigger("results:all",{data:c,query:b})})}),this.on("query:append",function(b){this.dataAdapter.query(b,function(c){a.trigger("results:append",{data:c,query:b})})}),this.on("keypress",function(b){var c=b.which;a.isOpen()?c===d.ESC||c===d.TAB||c===d.UP&&b.altKey?(a.close(),b.preventDefault()):c===d.ENTER?(a.trigger("results:select",{}),b.preventDefault()):c===d.SPACE&&b.ctrlKey?(a.trigger("results:toggle",{}),b.preventDefault()):c===d.UP?(a.trigger("results:previous",{}),b.preventDefault()):c===d.DOWN&&(a.trigger("results:next",{}),b.preventDefault()):(c===d.ENTER||c===d.SPACE||c===d.DOWN&&b.altKey)&&(a.open(),b.preventDefault())})},e.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},e.prototype._syncSubtree=function(a,b){var c=!1,d=this;if(!a||!a.target||"OPTION"===a.target.nodeName||"OPTGROUP"===a.target.nodeName){if(b)if(b.addedNodes&&b.addedNodes.length>0)for(var e=0;e<b.addedNodes.length;e++){var f=b.addedNodes[e];f.selected&&(c=!0)}else b.removedNodes&&b.removedNodes.length>0&&(c=!0);else c=!0;c&&this.dataAdapter.current(function(a){d.trigger("selection:update",{data:a})})}},e.prototype.trigger=function(a,b){var c=e.__super__.trigger,d={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===b&&(b={}),a in d){var f=d[a],g={prevented:!1,name:a,args:b};if(c.call(this,f,g),g.prevented)return void(b.prevented=!0)}c.call(this,a,b)},e.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},e.prototype.open=function(){this.isOpen()||this.trigger("query",{})},e.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},e.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},e.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},e.prototype.focus=function(a){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},e.prototype.enable=function(a){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),(null==a||0===a.length)&&(a=[!0]);var b=!a[0];this.$element.prop("disabled",b)},e.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var a=[];return this.dataAdapter.current(function(b){a=b}),a},e.prototype.val=function(b){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==b||0===b.length)return this.$element.val();var c=b[0];a.isArray(c)&&(c=a.map(c,function(a){return a.toString()})),this.$element.val(c).trigger("change")},e.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null; +},e.prototype.render=function(){var b=a('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return b.attr("dir",this.options.get("dir")),this.$container=b,this.$container.addClass("select2-container--"+this.options.get("theme")),b.data("element",this.$element),b},e}),b.define("select2/compat/utils",["jquery"],function(a){function b(b,c,d){var e,f,g=[];e=a.trim(b.attr("class")),e&&(e=""+e,a(e.split(/\s+/)).each(function(){0===this.indexOf("select2-")&&g.push(this)})),e=a.trim(c.attr("class")),e&&(e=""+e,a(e.split(/\s+/)).each(function(){0!==this.indexOf("select2-")&&(f=d(this),null!=f&&g.push(f))})),b.attr("class",g.join(" "))}return{syncCssClasses:b}}),b.define("select2/compat/containerCss",["jquery","./utils"],function(a,b){function c(a){return null}function d(){}return d.prototype.render=function(d){var e=d.call(this),f=this.options.get("containerCssClass")||"";a.isFunction(f)&&(f=f(this.$element));var g=this.options.get("adaptContainerCssClass");if(g=g||c,-1!==f.indexOf(":all:")){f=f.replace(":all:","");var h=g;g=function(a){var b=h(a);return null!=b?b+" "+a:a}}var i=this.options.get("containerCss")||{};return a.isFunction(i)&&(i=i(this.$element)),b.syncCssClasses(e,this.$element,g),e.css(i),e.addClass(f),e},d}),b.define("select2/compat/dropdownCss",["jquery","./utils"],function(a,b){function c(a){return null}function d(){}return d.prototype.render=function(d){var e=d.call(this),f=this.options.get("dropdownCssClass")||"";a.isFunction(f)&&(f=f(this.$element));var g=this.options.get("adaptDropdownCssClass");if(g=g||c,-1!==f.indexOf(":all:")){f=f.replace(":all:","");var h=g;g=function(a){var b=h(a);return null!=b?b+" "+a:a}}var i=this.options.get("dropdownCss")||{};return a.isFunction(i)&&(i=i(this.$element)),b.syncCssClasses(e,this.$element,g),e.css(i),e.addClass(f),e},d}),b.define("select2/compat/initSelection",["jquery"],function(a){function b(a,b,c){c.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `initSelection` option has been deprecated in favor of a custom data adapter that overrides the `current` method. This method is now called multiple times instead of a single time when the instance is initialized. Support will be removed for the `initSelection` option in future versions of Select2"),this.initSelection=c.get("initSelection"),this._isInitialized=!1,a.call(this,b,c)}return b.prototype.current=function(b,c){var d=this;return this._isInitialized?void b.call(this,c):void this.initSelection.call(null,this.$element,function(b){d._isInitialized=!0,a.isArray(b)||(b=[b]),c(b)})},b}),b.define("select2/compat/inputData",["jquery"],function(a){function b(a,b,c){this._currentData=[],this._valueSeparator=c.get("valueSeparator")||",","hidden"===b.prop("type")&&c.get("debug")&&console&&console.warn&&console.warn("Select2: Using a hidden input with Select2 is no longer supported and may stop working in the future. It is recommended to use a `<select>` element instead."),a.call(this,b,c)}return b.prototype.current=function(b,c){function d(b,c){var e=[];return b.selected||-1!==a.inArray(b.id,c)?(b.selected=!0,e.push(b)):b.selected=!1,b.children&&e.push.apply(e,d(b.children,c)),e}for(var e=[],f=0;f<this._currentData.length;f++){var g=this._currentData[f];e.push.apply(e,d(g,this.$element.val().split(this._valueSeparator)))}c(e)},b.prototype.select=function(b,c){if(this.options.get("multiple")){var d=this.$element.val();d+=this._valueSeparator+c.id,this.$element.val(d),this.$element.trigger("change")}else this.current(function(b){a.map(b,function(a){a.selected=!1})}),this.$element.val(c.id),this.$element.trigger("change")},b.prototype.unselect=function(a,b){var c=this;b.selected=!1,this.current(function(a){for(var d=[],e=0;e<a.length;e++){var f=a[e];b.id!=f.id&&d.push(f.id)}c.$element.val(d.join(c._valueSeparator)),c.$element.trigger("change")})},b.prototype.query=function(a,b,c){for(var d=[],e=0;e<this._currentData.length;e++){var f=this._currentData[e],g=this.matches(b,f);null!==g&&d.push(g)}c({results:d})},b.prototype.addOptions=function(b,c){var d=a.map(c,function(b){return a.data(b[0],"data")});this._currentData.push.apply(this._currentData,d)},b}),b.define("select2/compat/matcher",["jquery"],function(a){function b(b){function c(c,d){var e=a.extend(!0,{},d);if(null==c.term||""===a.trim(c.term))return e;if(d.children){for(var f=d.children.length-1;f>=0;f--){var g=d.children[f],h=b(c.term,g.text,g);h||e.children.splice(f,1)}if(e.children.length>0)return e}return b(c.term,d.text,d)?e:null}return c}return b}),b.define("select2/compat/query",[],function(){function a(a,b,c){c.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `query` option has been deprecated in favor of a custom data adapter that overrides the `query` method. Support will be removed for the `query` option in future versions of Select2."),a.call(this,b,c)}return a.prototype.query=function(a,b,c){b.callback=c;var d=this.options.get("query");d.call(null,b)},a}),b.define("select2/dropdown/attachContainer",[],function(){function a(a,b,c){a.call(this,b,c)}return a.prototype.position=function(a,b,c){var d=c.find(".dropdown-wrapper");d.append(b),b.addClass("select2-dropdown--below"),c.addClass("select2-container--below")},a}),b.define("select2/dropdown/stopPropagation",[],function(){function a(){}return a.prototype.bind=function(a,b,c){a.call(this,b,c);var d=["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"];this.$dropdown.on(d.join(" "),function(a){a.stopPropagation()})},a}),b.define("select2/selection/stopPropagation",[],function(){function a(){}return a.prototype.bind=function(a,b,c){a.call(this,b,c);var d=["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"];this.$selection.on(d.join(" "),function(a){a.stopPropagation()})},a}),function(c){"function"==typeof b.define&&b.define.amd?b.define("jquery-mousewheel",["jquery"],c):"object"==typeof exports?module.exports=c:c(a)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})}),b.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults"],function(a,b,c,d){if(null==a.fn.select2){var e=["open","close","destroy"];a.fn.select2=function(b){if(b=b||{},"object"==typeof b)return this.each(function(){var d=a.extend(!0,{},b);new c(a(this),d)}),this;if("string"==typeof b){var d,f=Array.prototype.slice.call(arguments,1);return this.each(function(){var c=a(this).data("select2");null==c&&window.console&&console.error&&console.error("The select2('"+b+"') method was called on an element that is not using Select2."),d=c[b].apply(c,f)}),a.inArray(b,e)>-1?this:d}throw new Error("Invalid arguments for Select2: "+b)}}return null==a.fn.select2.defaults&&(a.fn.select2.defaults=d),c}),{define:b.define,require:b.require}}(),c=b.require("jquery.select2");return a.fn.select2.amd=b,c});
\ No newline at end of file diff --git a/ishtar_common/static/select2/js/select2.js b/ishtar_common/static/select2/js/select2.js new file mode 100644 index 000000000..13b84fadf --- /dev/null +++ b/ishtar_common/static/select2/js/select2.js @@ -0,0 +1,5725 @@ +/*! + * Select2 4.0.3 + * https://select2.github.io + * + * Released under the MIT license + * https://github.com/select2/select2/blob/master/LICENSE.md + */ +(function (factory) { +  if (typeof define === 'function' && define.amd) { +    // AMD. Register as an anonymous module. +    define(['jquery'], factory); +  } else if (typeof exports === 'object') { +    // Node/CommonJS +    factory(require('jquery')); +  } else { +    // Browser globals +    factory(jQuery); +  } +}(function (jQuery) { +  // This is needed so we can catch the AMD loader configuration and use it +  // The inner file should be wrapped (by `banner.start.js`) in a function that +  // returns the AMD loader references. +  var S2 = +(function () { +  // Restore the Select2 AMD loader so it can be used +  // Needed mostly in the language files, where the loader is not inserted +  if (jQuery && jQuery.fn && jQuery.fn.select2 && jQuery.fn.select2.amd) { +    var S2 = jQuery.fn.select2.amd; +  } +var S2;(function () { if (!S2 || !S2.requirejs) { +if (!S2) { S2 = {}; } else { require = S2; } +/** + * @license almond 0.3.1 Copyright (c) 2011-2014, The Dojo Foundation All Rights Reserved. + * Available via the MIT or new BSD license. + * see: http://github.com/jrburke/almond for details + */ +//Going sloppy to avoid 'use strict' string cost, but strict practices should +//be followed. +/*jslint sloppy: true */ +/*global setTimeout: false */ + +var requirejs, require, define; +(function (undef) { +    var main, req, makeMap, handlers, +        defined = {}, +        waiting = {}, +        config = {}, +        defining = {}, +        hasOwn = Object.prototype.hasOwnProperty, +        aps = [].slice, +        jsSuffixRegExp = /\.js$/; + +    function hasProp(obj, prop) { +        return hasOwn.call(obj, prop); +    } + +    /** +     * Given a relative module name, like ./something, normalize it to +     * a real name that can be mapped to a path. +     * @param {String} name the relative name +     * @param {String} baseName a real name that the name arg is relative +     * to. +     * @returns {String} normalized name +     */ +    function normalize(name, baseName) { +        var nameParts, nameSegment, mapValue, foundMap, lastIndex, +            foundI, foundStarMap, starI, i, j, part, +            baseParts = baseName && baseName.split("/"), +            map = config.map, +            starMap = (map && map['*']) || {}; + +        //Adjust any relative paths. +        if (name && name.charAt(0) === ".") { +            //If have a base name, try to normalize against it, +            //otherwise, assume it is a top-level require that will +            //be relative to baseUrl in the end. +            if (baseName) { +                name = name.split('/'); +                lastIndex = name.length - 1; + +                // Node .js allowance: +                if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) { +                    name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, ''); +                } + +                //Lop off the last part of baseParts, so that . matches the +                //"directory" and not name of the baseName's module. For instance, +                //baseName of "one/two/three", maps to "one/two/three.js", but we +                //want the directory, "one/two" for this normalization. +                name = baseParts.slice(0, baseParts.length - 1).concat(name); + +                //start trimDots +                for (i = 0; i < name.length; i += 1) { +                    part = name[i]; +                    if (part === ".") { +                        name.splice(i, 1); +                        i -= 1; +                    } else if (part === "..") { +                        if (i === 1 && (name[2] === '..' || name[0] === '..')) { +                            //End of the line. Keep at least one non-dot +                            //path segment at the front so it can be mapped +                            //correctly to disk. Otherwise, there is likely +                            //no path mapping for a path starting with '..'. +                            //This can still fail, but catches the most reasonable +                            //uses of .. +                            break; +                        } else if (i > 0) { +                            name.splice(i - 1, 2); +                            i -= 2; +                        } +                    } +                } +                //end trimDots + +                name = name.join("/"); +            } else if (name.indexOf('./') === 0) { +                // No baseName, so this is ID is resolved relative +                // to baseUrl, pull off the leading dot. +                name = name.substring(2); +            } +        } + +        //Apply map config if available. +        if ((baseParts || starMap) && map) { +            nameParts = name.split('/'); + +            for (i = nameParts.length; i > 0; i -= 1) { +                nameSegment = nameParts.slice(0, i).join("/"); + +                if (baseParts) { +                    //Find the longest baseName segment match in the config. +                    //So, do joins on the biggest to smallest lengths of baseParts. +                    for (j = baseParts.length; j > 0; j -= 1) { +                        mapValue = map[baseParts.slice(0, j).join('/')]; + +                        //baseName segment has  config, find if it has one for +                        //this name. +                        if (mapValue) { +                            mapValue = mapValue[nameSegment]; +                            if (mapValue) { +                                //Match, update name to the new value. +                                foundMap = mapValue; +                                foundI = i; +                                break; +                            } +                        } +                    } +                } + +                if (foundMap) { +                    break; +                } + +                //Check for a star map match, but just hold on to it, +                //if there is a shorter segment match later in a matching +                //config, then favor over this star map. +                if (!foundStarMap && starMap && starMap[nameSegment]) { +                    foundStarMap = starMap[nameSegment]; +                    starI = i; +                } +            } + +            if (!foundMap && foundStarMap) { +                foundMap = foundStarMap; +                foundI = starI; +            } + +            if (foundMap) { +                nameParts.splice(0, foundI, foundMap); +                name = nameParts.join('/'); +            } +        } + +        return name; +    } + +    function makeRequire(relName, forceSync) { +        return function () { +            //A version of a require function that passes a moduleName +            //value for items that may need to +            //look up paths relative to the moduleName +            var args = aps.call(arguments, 0); + +            //If first arg is not require('string'), and there is only +            //one arg, it is the array form without a callback. Insert +            //a null so that the following concat is correct. +            if (typeof args[0] !== 'string' && args.length === 1) { +                args.push(null); +            } +            return req.apply(undef, args.concat([relName, forceSync])); +        }; +    } + +    function makeNormalize(relName) { +        return function (name) { +            return normalize(name, relName); +        }; +    } + +    function makeLoad(depName) { +        return function (value) { +            defined[depName] = value; +        }; +    } + +    function callDep(name) { +        if (hasProp(waiting, name)) { +            var args = waiting[name]; +            delete waiting[name]; +            defining[name] = true; +            main.apply(undef, args); +        } + +        if (!hasProp(defined, name) && !hasProp(defining, name)) { +            throw new Error('No ' + name); +        } +        return defined[name]; +    } + +    //Turns a plugin!resource to [plugin, resource] +    //with the plugin being undefined if the name +    //did not have a plugin prefix. +    function splitPrefix(name) { +        var prefix, +            index = name ? name.indexOf('!') : -1; +        if (index > -1) { +            prefix = name.substring(0, index); +            name = name.substring(index + 1, name.length); +        } +        return [prefix, name]; +    } + +    /** +     * Makes a name map, normalizing the name, and using a plugin +     * for normalization if necessary. Grabs a ref to plugin +     * too, as an optimization. +     */ +    makeMap = function (name, relName) { +        var plugin, +            parts = splitPrefix(name), +            prefix = parts[0]; + +        name = parts[1]; + +        if (prefix) { +            prefix = normalize(prefix, relName); +            plugin = callDep(prefix); +        } + +        //Normalize according +        if (prefix) { +            if (plugin && plugin.normalize) { +                name = plugin.normalize(name, makeNormalize(relName)); +            } else { +                name = normalize(name, relName); +            } +        } else { +            name = normalize(name, relName); +            parts = splitPrefix(name); +            prefix = parts[0]; +            name = parts[1]; +            if (prefix) { +                plugin = callDep(prefix); +            } +        } + +        //Using ridiculous property names for space reasons +        return { +            f: prefix ? prefix + '!' + name : name, //fullName +            n: name, +            pr: prefix, +            p: plugin +        }; +    }; + +    function makeConfig(name) { +        return function () { +            return (config && config.config && config.config[name]) || {}; +        }; +    } + +    handlers = { +        require: function (name) { +            return makeRequire(name); +        }, +        exports: function (name) { +            var e = defined[name]; +            if (typeof e !== 'undefined') { +                return e; +            } else { +                return (defined[name] = {}); +            } +        }, +        module: function (name) { +            return { +                id: name, +                uri: '', +                exports: defined[name], +                config: makeConfig(name) +            }; +        } +    }; + +    main = function (name, deps, callback, relName) { +        var cjsModule, depName, ret, map, i, +            args = [], +            callbackType = typeof callback, +            usingExports; + +        //Use name if no relName +        relName = relName || name; + +        //Call the callback to define the module, if necessary. +        if (callbackType === 'undefined' || callbackType === 'function') { +            //Pull out the defined dependencies and pass the ordered +            //values to the callback. +            //Default to [require, exports, module] if no deps +            deps = !deps.length && callback.length ? ['require', 'exports', 'module'] : deps; +            for (i = 0; i < deps.length; i += 1) { +                map = makeMap(deps[i], relName); +                depName = map.f; + +                //Fast path CommonJS standard dependencies. +                if (depName === "require") { +                    args[i] = handlers.require(name); +                } else if (depName === "exports") { +                    //CommonJS module spec 1.1 +                    args[i] = handlers.exports(name); +                    usingExports = true; +                } else if (depName === "module") { +                    //CommonJS module spec 1.1 +                    cjsModule = args[i] = handlers.module(name); +                } else if (hasProp(defined, depName) || +                           hasProp(waiting, depName) || +                           hasProp(defining, depName)) { +                    args[i] = callDep(depName); +                } else if (map.p) { +                    map.p.load(map.n, makeRequire(relName, true), makeLoad(depName), {}); +                    args[i] = defined[depName]; +                } else { +                    throw new Error(name + ' missing ' + depName); +                } +            } + +            ret = callback ? callback.apply(defined[name], args) : undefined; + +            if (name) { +                //If setting exports via "module" is in play, +                //favor that over return value and exports. After that, +                //favor a non-undefined return value over exports use. +                if (cjsModule && cjsModule.exports !== undef && +                        cjsModule.exports !== defined[name]) { +                    defined[name] = cjsModule.exports; +                } else if (ret !== undef || !usingExports) { +                    //Use the return value from the function. +                    defined[name] = ret; +                } +            } +        } else if (name) { +            //May just be an object definition for the module. Only +            //worry about defining if have a module name. +            defined[name] = callback; +        } +    }; + +    requirejs = require = req = function (deps, callback, relName, forceSync, alt) { +        if (typeof deps === "string") { +            if (handlers[deps]) { +                //callback in this case is really relName +                return handlers[deps](callback); +            } +            //Just return the module wanted. In this scenario, the +            //deps arg is the module name, and second arg (if passed) +            //is just the relName. +            //Normalize module name, if it contains . or .. +            return callDep(makeMap(deps, callback).f); +        } else if (!deps.splice) { +            //deps is a config object, not an array. +            config = deps; +            if (config.deps) { +                req(config.deps, config.callback); +            } +            if (!callback) { +                return; +            } + +            if (callback.splice) { +                //callback is an array, which means it is a dependency list. +                //Adjust args if there are dependencies +                deps = callback; +                callback = relName; +                relName = null; +            } else { +                deps = undef; +            } +        } + +        //Support require(['a']) +        callback = callback || function () {}; + +        //If relName is a function, it is an errback handler, +        //so remove it. +        if (typeof relName === 'function') { +            relName = forceSync; +            forceSync = alt; +        } + +        //Simulate async callback; +        if (forceSync) { +            main(undef, deps, callback, relName); +        } else { +            //Using a non-zero value because of concern for what old browsers +            //do, and latest browsers "upgrade" to 4 if lower value is used: +            //http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#dom-windowtimers-settimeout: +            //If want a value immediately, use require('id') instead -- something +            //that works in almond on the global level, but not guaranteed and +            //unlikely to work in other AMD implementations. +            setTimeout(function () { +                main(undef, deps, callback, relName); +            }, 4); +        } + +        return req; +    }; + +    /** +     * Just drops the config on the floor, but returns req in case +     * the config return value is used. +     */ +    req.config = function (cfg) { +        return req(cfg); +    }; + +    /** +     * Expose module registry for debugging and tooling +     */ +    requirejs._defined = defined; + +    define = function (name, deps, callback) { +        if (typeof name !== 'string') { +            throw new Error('See almond README: incorrect module build, no module name'); +        } + +        //This module may not have dependencies +        if (!deps.splice) { +            //deps is not an array, so probably means +            //an object literal or factory function for +            //the value. Adjust args. +            callback = deps; +            deps = []; +        } + +        if (!hasProp(defined, name) && !hasProp(waiting, name)) { +            waiting[name] = [name, deps, callback]; +        } +    }; + +    define.amd = { +        jQuery: true +    }; +}()); + +S2.requirejs = requirejs;S2.require = require;S2.define = define; +} +}()); +S2.define("almond", function(){}); + +/* global jQuery:false, $:false */ +S2.define('jquery',[],function () { +  var _$ = jQuery || $; + +  if (_$ == null && console && console.error) { +    console.error( +      'Select2: An instance of jQuery or a jQuery-compatible library was not ' + +      'found. Make sure that you are including jQuery before Select2 on your ' + +      'web page.' +    ); +  } + +  return _$; +}); + +S2.define('select2/utils',[ +  'jquery' +], function ($) { +  var Utils = {}; + +  Utils.Extend = function (ChildClass, SuperClass) { +    var __hasProp = {}.hasOwnProperty; + +    function BaseConstructor () { +      this.constructor = ChildClass; +    } + +    for (var key in SuperClass) { +      if (__hasProp.call(SuperClass, key)) { +        ChildClass[key] = SuperClass[key]; +      } +    } + +    BaseConstructor.prototype = SuperClass.prototype; +    ChildClass.prototype = new BaseConstructor(); +    ChildClass.__super__ = SuperClass.prototype; + +    return ChildClass; +  }; + +  function getMethods (theClass) { +    var proto = theClass.prototype; + +    var methods = []; + +    for (var methodName in proto) { +      var m = proto[methodName]; + +      if (typeof m !== 'function') { +        continue; +      } + +      if (methodName === 'constructor') { +        continue; +      } + +      methods.push(methodName); +    } + +    return methods; +  } + +  Utils.Decorate = function (SuperClass, DecoratorClass) { +    var decoratedMethods = getMethods(DecoratorClass); +    var superMethods = getMethods(SuperClass); + +    function DecoratedClass () { +      var unshift = Array.prototype.unshift; + +      var argCount = DecoratorClass.prototype.constructor.length; + +      var calledConstructor = SuperClass.prototype.constructor; + +      if (argCount > 0) { +        unshift.call(arguments, SuperClass.prototype.constructor); + +        calledConstructor = DecoratorClass.prototype.constructor; +      } + +      calledConstructor.apply(this, arguments); +    } + +    DecoratorClass.displayName = SuperClass.displayName; + +    function ctr () { +      this.constructor = DecoratedClass; +    } + +    DecoratedClass.prototype = new ctr(); + +    for (var m = 0; m < superMethods.length; m++) { +        var superMethod = superMethods[m]; + +        DecoratedClass.prototype[superMethod] = +          SuperClass.prototype[superMethod]; +    } + +    var calledMethod = function (methodName) { +      // Stub out the original method if it's not decorating an actual method +      var originalMethod = function () {}; + +      if (methodName in DecoratedClass.prototype) { +        originalMethod = DecoratedClass.prototype[methodName]; +      } + +      var decoratedMethod = DecoratorClass.prototype[methodName]; + +      return function () { +        var unshift = Array.prototype.unshift; + +        unshift.call(arguments, originalMethod); + +        return decoratedMethod.apply(this, arguments); +      }; +    }; + +    for (var d = 0; d < decoratedMethods.length; d++) { +      var decoratedMethod = decoratedMethods[d]; + +      DecoratedClass.prototype[decoratedMethod] = calledMethod(decoratedMethod); +    } + +    return DecoratedClass; +  }; + +  var Observable = function () { +    this.listeners = {}; +  }; + +  Observable.prototype.on = function (event, callback) { +    this.listeners = this.listeners || {}; + +    if (event in this.listeners) { +      this.listeners[event].push(callback); +    } else { +      this.listeners[event] = [callback]; +    } +  }; + +  Observable.prototype.trigger = function (event) { +    var slice = Array.prototype.slice; +    var params = slice.call(arguments, 1); + +    this.listeners = this.listeners || {}; + +    // Params should always come in as an array +    if (params == null) { +      params = []; +    } + +    // If there are no arguments to the event, use a temporary object +    if (params.length === 0) { +      params.push({}); +    } + +    // Set the `_type` of the first object to the event +    params[0]._type = event; + +    if (event in this.listeners) { +      this.invoke(this.listeners[event], slice.call(arguments, 1)); +    } + +    if ('*' in this.listeners) { +      this.invoke(this.listeners['*'], arguments); +    } +  }; + +  Observable.prototype.invoke = function (listeners, params) { +    for (var i = 0, len = listeners.length; i < len; i++) { +      listeners[i].apply(this, params); +    } +  }; + +  Utils.Observable = Observable; + +  Utils.generateChars = function (length) { +    var chars = ''; + +    for (var i = 0; i < length; i++) { +      var randomChar = Math.floor(Math.random() * 36); +      chars += randomChar.toString(36); +    } + +    return chars; +  }; + +  Utils.bind = function (func, context) { +    return function () { +      func.apply(context, arguments); +    }; +  }; + +  Utils._convertData = function (data) { +    for (var originalKey in data) { +      var keys = originalKey.split('-'); + +      var dataLevel = data; + +      if (keys.length === 1) { +        continue; +      } + +      for (var k = 0; k < keys.length; k++) { +        var key = keys[k]; + +        // Lowercase the first letter +        // By default, dash-separated becomes camelCase +        key = key.substring(0, 1).toLowerCase() + key.substring(1); + +        if (!(key in dataLevel)) { +          dataLevel[key] = {}; +        } + +        if (k == keys.length - 1) { +          dataLevel[key] = data[originalKey]; +        } + +        dataLevel = dataLevel[key]; +      } + +      delete data[originalKey]; +    } + +    return data; +  }; + +  Utils.hasScroll = function (index, el) { +    // Adapted from the function created by @ShadowScripter +    // and adapted by @BillBarry on the Stack Exchange Code Review website. +    // The original code can be found at +    // http://codereview.stackexchange.com/q/13338 +    // and was designed to be used with the Sizzle selector engine. + +    var $el = $(el); +    var overflowX = el.style.overflowX; +    var overflowY = el.style.overflowY; + +    //Check both x and y declarations +    if (overflowX === overflowY && +        (overflowY === 'hidden' || overflowY === 'visible')) { +      return false; +    } + +    if (overflowX === 'scroll' || overflowY === 'scroll') { +      return true; +    } + +    return ($el.innerHeight() < el.scrollHeight || +      $el.innerWidth() < el.scrollWidth); +  }; + +  Utils.escapeMarkup = function (markup) { +    var replaceMap = { +      '\\': '\', +      '&': '&', +      '<': '<', +      '>': '>', +      '"': '"', +      '\'': ''', +      '/': '/' +    }; + +    // Do not try to escape the markup if it's not a string +    if (typeof markup !== 'string') { +      return markup; +    } + +    return String(markup).replace(/[&<>"'\/\\]/g, function (match) { +      return replaceMap[match]; +    }); +  }; + +  // Append an array of jQuery nodes to a given element. +  Utils.appendMany = function ($element, $nodes) { +    // jQuery 1.7.x does not support $.fn.append() with an array +    // Fall back to a jQuery object collection using $.fn.add() +    if ($.fn.jquery.substr(0, 3) === '1.7') { +      var $jqNodes = $(); + +      $.map($nodes, function (node) { +        $jqNodes = $jqNodes.add(node); +      }); + +      $nodes = $jqNodes; +    } + +    $element.append($nodes); +  }; + +  return Utils; +}); + +S2.define('select2/results',[ +  'jquery', +  './utils' +], function ($, Utils) { +  function Results ($element, options, dataAdapter) { +    this.$element = $element; +    this.data = dataAdapter; +    this.options = options; + +    Results.__super__.constructor.call(this); +  } + +  Utils.Extend(Results, Utils.Observable); + +  Results.prototype.render = function () { +    var $results = $( +      '<ul class="select2-results__options" role="tree"></ul>' +    ); + +    if (this.options.get('multiple')) { +      $results.attr('aria-multiselectable', 'true'); +    } + +    this.$results = $results; + +    return $results; +  }; + +  Results.prototype.clear = function () { +    this.$results.empty(); +  }; + +  Results.prototype.displayMessage = function (params) { +    var escapeMarkup = this.options.get('escapeMarkup'); + +    this.clear(); +    this.hideLoading(); + +    var $message = $( +      '<li role="treeitem" aria-live="assertive"' + +      ' class="select2-results__option"></li>' +    ); + +    var message = this.options.get('translations').get(params.message); + +    $message.append( +      escapeMarkup( +        message(params.args) +      ) +    ); + +    $message[0].className += ' select2-results__message'; + +    this.$results.append($message); +  }; + +  Results.prototype.hideMessages = function () { +    this.$results.find('.select2-results__message').remove(); +  }; + +  Results.prototype.append = function (data) { +    this.hideLoading(); + +    var $options = []; + +    if (data.results == null || data.results.length === 0) { +      if (this.$results.children().length === 0) { +        this.trigger('results:message', { +          message: 'noResults' +        }); +      } + +      return; +    } + +    data.results = this.sort(data.results); + +    for (var d = 0; d < data.results.length; d++) { +      var item = data.results[d]; + +      var $option = this.option(item); + +      $options.push($option); +    } + +    this.$results.append($options); +  }; + +  Results.prototype.position = function ($results, $dropdown) { +    var $resultsContainer = $dropdown.find('.select2-results'); +    $resultsContainer.append($results); +  }; + +  Results.prototype.sort = function (data) { +    var sorter = this.options.get('sorter'); + +    return sorter(data); +  }; + +  Results.prototype.highlightFirstItem = function () { +    var $options = this.$results +      .find('.select2-results__option[aria-selected]'); + +    var $selected = $options.filter('[aria-selected=true]'); + +    // Check if there are any selected options +    if ($selected.length > 0) { +      // If there are selected options, highlight the first +      $selected.first().trigger('mouseenter'); +    } else { +      // If there are no selected options, highlight the first option +      // in the dropdown +      $options.first().trigger('mouseenter'); +    } + +    this.ensureHighlightVisible(); +  }; + +  Results.prototype.setClasses = function () { +    var self = this; + +    this.data.current(function (selected) { +      var selectedIds = $.map(selected, function (s) { +        return s.id.toString(); +      }); + +      var $options = self.$results +        .find('.select2-results__option[aria-selected]'); + +      $options.each(function () { +        var $option = $(this); + +        var item = $.data(this, 'data'); + +        // id needs to be converted to a string when comparing +        var id = '' + item.id; + +        if ((item.element != null && item.element.selected) || +            (item.element == null && $.inArray(id, selectedIds) > -1)) { +          $option.attr('aria-selected', 'true'); +        } else { +          $option.attr('aria-selected', 'false'); +        } +      }); + +    }); +  }; + +  Results.prototype.showLoading = function (params) { +    this.hideLoading(); + +    var loadingMore = this.options.get('translations').get('searching'); + +    var loading = { +      disabled: true, +      loading: true, +      text: loadingMore(params) +    }; +    var $loading = this.option(loading); +    $loading.className += ' loading-results'; + +    this.$results.prepend($loading); +  }; + +  Results.prototype.hideLoading = function () { +    this.$results.find('.loading-results').remove(); +  }; + +  Results.prototype.option = function (data) { +    var option = document.createElement('li'); +    option.className = 'select2-results__option'; + +    var attrs = { +      'role': 'treeitem', +      'aria-selected': 'false' +    }; + +    if (data.disabled) { +      delete attrs['aria-selected']; +      attrs['aria-disabled'] = 'true'; +    } + +    if (data.id == null) { +      delete attrs['aria-selected']; +    } + +    if (data._resultId != null) { +      option.id = data._resultId; +    } + +    if (data.title) { +      option.title = data.title; +    } + +    if (data.children) { +      attrs.role = 'group'; +      attrs['aria-label'] = data.text; +      delete attrs['aria-selected']; +    } + +    for (var attr in attrs) { +      var val = attrs[attr]; + +      option.setAttribute(attr, val); +    } + +    if (data.children) { +      var $option = $(option); + +      var label = document.createElement('strong'); +      label.className = 'select2-results__group'; + +      var $label = $(label); +      this.template(data, label); + +      var $children = []; + +      for (var c = 0; c < data.children.length; c++) { +        var child = data.children[c]; + +        var $child = this.option(child); + +        $children.push($child); +      } + +      var $childrenContainer = $('<ul></ul>', { +        'class': 'select2-results__options select2-results__options--nested' +      }); + +      $childrenContainer.append($children); + +      $option.append(label); +      $option.append($childrenContainer); +    } else { +      this.template(data, option); +    } + +    $.data(option, 'data', data); + +    return option; +  }; + +  Results.prototype.bind = function (container, $container) { +    var self = this; + +    var id = container.id + '-results'; + +    this.$results.attr('id', id); + +    container.on('results:all', function (params) { +      self.clear(); +      self.append(params.data); + +      if (container.isOpen()) { +        self.setClasses(); +        self.highlightFirstItem(); +      } +    }); + +    container.on('results:append', function (params) { +      self.append(params.data); + +      if (container.isOpen()) { +        self.setClasses(); +      } +    }); + +    container.on('query', function (params) { +      self.hideMessages(); +      self.showLoading(params); +    }); + +    container.on('select', function () { +      if (!container.isOpen()) { +        return; +      } + +      self.setClasses(); +      self.highlightFirstItem(); +    }); + +    container.on('unselect', function () { +      if (!container.isOpen()) { +        return; +      } + +      self.setClasses(); +      self.highlightFirstItem(); +    }); + +    container.on('open', function () { +      // When the dropdown is open, aria-expended="true" +      self.$results.attr('aria-expanded', 'true'); +      self.$results.attr('aria-hidden', 'false'); + +      self.setClasses(); +      self.ensureHighlightVisible(); +    }); + +    container.on('close', function () { +      // When the dropdown is closed, aria-expended="false" +      self.$results.attr('aria-expanded', 'false'); +      self.$results.attr('aria-hidden', 'true'); +      self.$results.removeAttr('aria-activedescendant'); +    }); + +    container.on('results:toggle', function () { +      var $highlighted = self.getHighlightedResults(); + +      if ($highlighted.length === 0) { +        return; +      } + +      $highlighted.trigger('mouseup'); +    }); + +    container.on('results:select', function () { +      var $highlighted = self.getHighlightedResults(); + +      if ($highlighted.length === 0) { +        return; +      } + +      var data = $highlighted.data('data'); + +      if ($highlighted.attr('aria-selected') == 'true') { +        self.trigger('close', {}); +      } else { +        self.trigger('select', { +          data: data +        }); +      } +    }); + +    container.on('results:previous', function () { +      var $highlighted = self.getHighlightedResults(); + +      var $options = self.$results.find('[aria-selected]'); + +      var currentIndex = $options.index($highlighted); + +      // If we are already at te top, don't move further +      if (currentIndex === 0) { +        return; +      } + +      var nextIndex = currentIndex - 1; + +      // If none are highlighted, highlight the first +      if ($highlighted.length === 0) { +        nextIndex = 0; +      } + +      var $next = $options.eq(nextIndex); + +      $next.trigger('mouseenter'); + +      var currentOffset = self.$results.offset().top; +      var nextTop = $next.offset().top; +      var nextOffset = self.$results.scrollTop() + (nextTop - currentOffset); + +      if (nextIndex === 0) { +        self.$results.scrollTop(0); +      } else if (nextTop - currentOffset < 0) { +        self.$results.scrollTop(nextOffset); +      } +    }); + +    container.on('results:next', function () { +      var $highlighted = self.getHighlightedResults(); + +      var $options = self.$results.find('[aria-selected]'); + +      var currentIndex = $options.index($highlighted); + +      var nextIndex = currentIndex + 1; + +      // If we are at the last option, stay there +      if (nextIndex >= $options.length) { +        return; +      } + +      var $next = $options.eq(nextIndex); + +      $next.trigger('mouseenter'); + +      var currentOffset = self.$results.offset().top + +        self.$results.outerHeight(false); +      var nextBottom = $next.offset().top + $next.outerHeight(false); +      var nextOffset = self.$results.scrollTop() + nextBottom - currentOffset; + +      if (nextIndex === 0) { +        self.$results.scrollTop(0); +      } else if (nextBottom > currentOffset) { +        self.$results.scrollTop(nextOffset); +      } +    }); + +    container.on('results:focus', function (params) { +      params.element.addClass('select2-results__option--highlighted'); +    }); + +    container.on('results:message', function (params) { +      self.displayMessage(params); +    }); + +    if ($.fn.mousewheel) { +      this.$results.on('mousewheel', function (e) { +        var top = self.$results.scrollTop(); + +        var bottom = self.$results.get(0).scrollHeight - top + e.deltaY; + +        var isAtTop = e.deltaY > 0 && top - e.deltaY <= 0; +        var isAtBottom = e.deltaY < 0 && bottom <= self.$results.height(); + +        if (isAtTop) { +          self.$results.scrollTop(0); + +          e.preventDefault(); +          e.stopPropagation(); +        } else if (isAtBottom) { +          self.$results.scrollTop( +            self.$results.get(0).scrollHeight - self.$results.height() +          ); + +          e.preventDefault(); +          e.stopPropagation(); +        } +      }); +    } + +    this.$results.on('mouseup', '.select2-results__option[aria-selected]', +      function (evt) { +      var $this = $(this); + +      var data = $this.data('data'); + +      if ($this.attr('aria-selected') === 'true') { +        if (self.options.get('multiple')) { +          self.trigger('unselect', { +            originalEvent: evt, +            data: data +          }); +        } else { +          self.trigger('close', {}); +        } + +        return; +      } + +      self.trigger('select', { +        originalEvent: evt, +        data: data +      }); +    }); + +    this.$results.on('mouseenter', '.select2-results__option[aria-selected]', +      function (evt) { +      var data = $(this).data('data'); + +      self.getHighlightedResults() +          .removeClass('select2-results__option--highlighted'); + +      self.trigger('results:focus', { +        data: data, +        element: $(this) +      }); +    }); +  }; + +  Results.prototype.getHighlightedResults = function () { +    var $highlighted = this.$results +    .find('.select2-results__option--highlighted'); + +    return $highlighted; +  }; + +  Results.prototype.destroy = function () { +    this.$results.remove(); +  }; + +  Results.prototype.ensureHighlightVisible = function () { +    var $highlighted = this.getHighlightedResults(); + +    if ($highlighted.length === 0) { +      return; +    } + +    var $options = this.$results.find('[aria-selected]'); + +    var currentIndex = $options.index($highlighted); + +    var currentOffset = this.$results.offset().top; +    var nextTop = $highlighted.offset().top; +    var nextOffset = this.$results.scrollTop() + (nextTop - currentOffset); + +    var offsetDelta = nextTop - currentOffset; +    nextOffset -= $highlighted.outerHeight(false) * 2; + +    if (currentIndex <= 2) { +      this.$results.scrollTop(0); +    } else if (offsetDelta > this.$results.outerHeight() || offsetDelta < 0) { +      this.$results.scrollTop(nextOffset); +    } +  }; + +  Results.prototype.template = function (result, container) { +    var template = this.options.get('templateResult'); +    var escapeMarkup = this.options.get('escapeMarkup'); + +    var content = template(result, container); + +    if (content == null) { +      container.style.display = 'none'; +    } else if (typeof content === 'string') { +      container.innerHTML = escapeMarkup(content); +    } else { +      $(container).append(content); +    } +  }; + +  return Results; +}); + +S2.define('select2/keys',[ + +], function () { +  var KEYS = { +    BACKSPACE: 8, +    TAB: 9, +    ENTER: 13, +    SHIFT: 16, +    CTRL: 17, +    ALT: 18, +    ESC: 27, +    SPACE: 32, +    PAGE_UP: 33, +    PAGE_DOWN: 34, +    END: 35, +    HOME: 36, +    LEFT: 37, +    UP: 38, +    RIGHT: 39, +    DOWN: 40, +    DELETE: 46 +  }; + +  return KEYS; +}); + +S2.define('select2/selection/base',[ +  'jquery', +  '../utils', +  '../keys' +], function ($, Utils, KEYS) { +  function BaseSelection ($element, options) { +    this.$element = $element; +    this.options = options; + +    BaseSelection.__super__.constructor.call(this); +  } + +  Utils.Extend(BaseSelection, Utils.Observable); + +  BaseSelection.prototype.render = function () { +    var $selection = $( +      '<span class="select2-selection" role="combobox" ' + +      ' aria-haspopup="true" aria-expanded="false">' + +      '</span>' +    ); + +    this._tabindex = 0; + +    if (this.$element.data('old-tabindex') != null) { +      this._tabindex = this.$element.data('old-tabindex'); +    } else if (this.$element.attr('tabindex') != null) { +      this._tabindex = this.$element.attr('tabindex'); +    } + +    $selection.attr('title', this.$element.attr('title')); +    $selection.attr('tabindex', this._tabindex); + +    this.$selection = $selection; + +    return $selection; +  }; + +  BaseSelection.prototype.bind = function (container, $container) { +    var self = this; + +    var id = container.id + '-container'; +    var resultsId = container.id + '-results'; + +    this.container = container; + +    this.$selection.on('focus', function (evt) { +      self.trigger('focus', evt); +    }); + +    this.$selection.on('blur', function (evt) { +      self._handleBlur(evt); +    }); + +    this.$selection.on('keydown', function (evt) { +      self.trigger('keypress', evt); + +      if (evt.which === KEYS.SPACE) { +        evt.preventDefault(); +      } +    }); + +    container.on('results:focus', function (params) { +      self.$selection.attr('aria-activedescendant', params.data._resultId); +    }); + +    container.on('selection:update', function (params) { +      self.update(params.data); +    }); + +    container.on('open', function () { +      // When the dropdown is open, aria-expanded="true" +      self.$selection.attr('aria-expanded', 'true'); +      self.$selection.attr('aria-owns', resultsId); + +      self._attachCloseHandler(container); +    }); + +    container.on('close', function () { +      // When the dropdown is closed, aria-expanded="false" +      self.$selection.attr('aria-expanded', 'false'); +      self.$selection.removeAttr('aria-activedescendant'); +      self.$selection.removeAttr('aria-owns'); + +      self.$selection.focus(); + +      self._detachCloseHandler(container); +    }); + +    container.on('enable', function () { +      self.$selection.attr('tabindex', self._tabindex); +    }); + +    container.on('disable', function () { +      self.$selection.attr('tabindex', '-1'); +    }); +  }; + +  BaseSelection.prototype._handleBlur = function (evt) { +    var self = this; + +    // This needs to be delayed as the active element is the body when the tab +    // key is pressed, possibly along with others. +    window.setTimeout(function () { +      // Don't trigger `blur` if the focus is still in the selection +      if ( +        (document.activeElement == self.$selection[0]) || +        ($.contains(self.$selection[0], document.activeElement)) +      ) { +        return; +      } + +      self.trigger('blur', evt); +    }, 1); +  }; + +  BaseSelection.prototype._attachCloseHandler = function (container) { +    var self = this; + +    $(document.body).on('mousedown.select2.' + container.id, function (e) { +      var $target = $(e.target); + +      var $select = $target.closest('.select2'); + +      var $all = $('.select2.select2-container--open'); + +      $all.each(function () { +        var $this = $(this); + +        if (this == $select[0]) { +          return; +        } + +        var $element = $this.data('element'); + +        $element.select2('close'); +      }); +    }); +  }; + +  BaseSelection.prototype._detachCloseHandler = function (container) { +    $(document.body).off('mousedown.select2.' + container.id); +  }; + +  BaseSelection.prototype.position = function ($selection, $container) { +    var $selectionContainer = $container.find('.selection'); +    $selectionContainer.append($selection); +  }; + +  BaseSelection.prototype.destroy = function () { +    this._detachCloseHandler(this.container); +  }; + +  BaseSelection.prototype.update = function (data) { +    throw new Error('The `update` method must be defined in child classes.'); +  }; + +  return BaseSelection; +}); + +S2.define('select2/selection/single',[ +  'jquery', +  './base', +  '../utils', +  '../keys' +], function ($, BaseSelection, Utils, KEYS) { +  function SingleSelection () { +    SingleSelection.__super__.constructor.apply(this, arguments); +  } + +  Utils.Extend(SingleSelection, BaseSelection); + +  SingleSelection.prototype.render = function () { +    var $selection = SingleSelection.__super__.render.call(this); + +    $selection.addClass('select2-selection--single'); + +    $selection.html( +      '<span class="select2-selection__rendered"></span>' + +      '<span class="select2-selection__arrow" role="presentation">' + +        '<b role="presentation"></b>' + +      '</span>' +    ); + +    return $selection; +  }; + +  SingleSelection.prototype.bind = function (container, $container) { +    var self = this; + +    SingleSelection.__super__.bind.apply(this, arguments); + +    var id = container.id + '-container'; + +    this.$selection.find('.select2-selection__rendered').attr('id', id); +    this.$selection.attr('aria-labelledby', id); + +    this.$selection.on('mousedown', function (evt) { +      // Only respond to left clicks +      if (evt.which !== 1) { +        return; +      } + +      self.trigger('toggle', { +        originalEvent: evt +      }); +    }); + +    this.$selection.on('focus', function (evt) { +      // User focuses on the container +    }); + +    this.$selection.on('blur', function (evt) { +      // User exits the container +    }); + +    container.on('focus', function (evt) { +      if (!container.isOpen()) { +        self.$selection.focus(); +      } +    }); + +    container.on('selection:update', function (params) { +      self.update(params.data); +    }); +  }; + +  SingleSelection.prototype.clear = function () { +    this.$selection.find('.select2-selection__rendered').empty(); +  }; + +  SingleSelection.prototype.display = function (data, container) { +    var template = this.options.get('templateSelection'); +    var escapeMarkup = this.options.get('escapeMarkup'); + +    return escapeMarkup(template(data, container)); +  }; + +  SingleSelection.prototype.selectionContainer = function () { +    return $('<span></span>'); +  }; + +  SingleSelection.prototype.update = function (data) { +    if (data.length === 0) { +      this.clear(); +      return; +    } + +    var selection = data[0]; + +    var $rendered = this.$selection.find('.select2-selection__rendered'); +    var formatted = this.display(selection, $rendered); + +    $rendered.empty().append(formatted); +    $rendered.prop('title', selection.title || selection.text); +  }; + +  return SingleSelection; +}); + +S2.define('select2/selection/multiple',[ +  'jquery', +  './base', +  '../utils' +], function ($, BaseSelection, Utils) { +  function MultipleSelection ($element, options) { +    MultipleSelection.__super__.constructor.apply(this, arguments); +  } + +  Utils.Extend(MultipleSelection, BaseSelection); + +  MultipleSelection.prototype.render = function () { +    var $selection = MultipleSelection.__super__.render.call(this); + +    $selection.addClass('select2-selection--multiple'); + +    $selection.html( +      '<ul class="select2-selection__rendered"></ul>' +    ); + +    return $selection; +  }; + +  MultipleSelection.prototype.bind = function (container, $container) { +    var self = this; + +    MultipleSelection.__super__.bind.apply(this, arguments); + +    this.$selection.on('click', function (evt) { +      self.trigger('toggle', { +        originalEvent: evt +      }); +    }); + +    this.$selection.on( +      'click', +      '.select2-selection__choice__remove', +      function (evt) { +        // Ignore the event if it is disabled +        if (self.options.get('disabled')) { +          return; +        } + +        var $remove = $(this); +        var $selection = $remove.parent(); + +        var data = $selection.data('data'); + +        self.trigger('unselect', { +          originalEvent: evt, +          data: data +        }); +      } +    ); +  }; + +  MultipleSelection.prototype.clear = function () { +    this.$selection.find('.select2-selection__rendered').empty(); +  }; + +  MultipleSelection.prototype.display = function (data, container) { +    var template = this.options.get('templateSelection'); +    var escapeMarkup = this.options.get('escapeMarkup'); + +    return escapeMarkup(template(data, container)); +  }; + +  MultipleSelection.prototype.selectionContainer = function () { +    var $container = $( +      '<li class="select2-selection__choice">' + +        '<span class="select2-selection__choice__remove" role="presentation">' + +          '×' + +        '</span>' + +      '</li>' +    ); + +    return $container; +  }; + +  MultipleSelection.prototype.update = function (data) { +    this.clear(); + +    if (data.length === 0) { +      return; +    } + +    var $selections = []; + +    for (var d = 0; d < data.length; d++) { +      var selection = data[d]; + +      var $selection = this.selectionContainer(); +      var formatted = this.display(selection, $selection); + +      $selection.append(formatted); +      $selection.prop('title', selection.title || selection.text); + +      $selection.data('data', selection); + +      $selections.push($selection); +    } + +    var $rendered = this.$selection.find('.select2-selection__rendered'); + +    Utils.appendMany($rendered, $selections); +  }; + +  return MultipleSelection; +}); + +S2.define('select2/selection/placeholder',[ +  '../utils' +], function (Utils) { +  function Placeholder (decorated, $element, options) { +    this.placeholder = this.normalizePlaceholder(options.get('placeholder')); + +    decorated.call(this, $element, options); +  } + +  Placeholder.prototype.normalizePlaceholder = function (_, placeholder) { +    if (typeof placeholder === 'string') { +      placeholder = { +        id: '', +        text: placeholder +      }; +    } + +    return placeholder; +  }; + +  Placeholder.prototype.createPlaceholder = function (decorated, placeholder) { +    var $placeholder = this.selectionContainer(); + +    $placeholder.html(this.display(placeholder)); +    $placeholder.addClass('select2-selection__placeholder') +                .removeClass('select2-selection__choice'); + +    return $placeholder; +  }; + +  Placeholder.prototype.update = function (decorated, data) { +    var singlePlaceholder = ( +      data.length == 1 && data[0].id != this.placeholder.id +    ); +    var multipleSelections = data.length > 1; + +    if (multipleSelections || singlePlaceholder) { +      return decorated.call(this, data); +    } + +    this.clear(); + +    var $placeholder = this.createPlaceholder(this.placeholder); + +    this.$selection.find('.select2-selection__rendered').append($placeholder); +  }; + +  return Placeholder; +}); + +S2.define('select2/selection/allowClear',[ +  'jquery', +  '../keys' +], function ($, KEYS) { +  function AllowClear () { } + +  AllowClear.prototype.bind = function (decorated, container, $container) { +    var self = this; + +    decorated.call(this, container, $container); + +    if (this.placeholder == null) { +      if (this.options.get('debug') && window.console && console.error) { +        console.error( +          'Select2: The `allowClear` option should be used in combination ' + +          'with the `placeholder` option.' +        ); +      } +    } + +    this.$selection.on('mousedown', '.select2-selection__clear', +      function (evt) { +        self._handleClear(evt); +    }); + +    container.on('keypress', function (evt) { +      self._handleKeyboardClear(evt, container); +    }); +  }; + +  AllowClear.prototype._handleClear = function (_, evt) { +    // Ignore the event if it is disabled +    if (this.options.get('disabled')) { +      return; +    } + +    var $clear = this.$selection.find('.select2-selection__clear'); + +    // Ignore the event if nothing has been selected +    if ($clear.length === 0) { +      return; +    } + +    evt.stopPropagation(); + +    var data = $clear.data('data'); + +    for (var d = 0; d < data.length; d++) { +      var unselectData = { +        data: data[d] +      }; + +      // Trigger the `unselect` event, so people can prevent it from being +      // cleared. +      this.trigger('unselect', unselectData); + +      // If the event was prevented, don't clear it out. +      if (unselectData.prevented) { +        return; +      } +    } + +    this.$element.val(this.placeholder.id).trigger('change'); + +    this.trigger('toggle', {}); +  }; + +  AllowClear.prototype._handleKeyboardClear = function (_, evt, container) { +    if (container.isOpen()) { +      return; +    } + +    if (evt.which == KEYS.DELETE || evt.which == KEYS.BACKSPACE) { +      this._handleClear(evt); +    } +  }; + +  AllowClear.prototype.update = function (decorated, data) { +    decorated.call(this, data); + +    if (this.$selection.find('.select2-selection__placeholder').length > 0 || +        data.length === 0) { +      return; +    } + +    var $remove = $( +      '<span class="select2-selection__clear">' + +        '×' + +      '</span>' +    ); +    $remove.data('data', data); + +    this.$selection.find('.select2-selection__rendered').prepend($remove); +  }; + +  return AllowClear; +}); + +S2.define('select2/selection/search',[ +  'jquery', +  '../utils', +  '../keys' +], function ($, Utils, KEYS) { +  function Search (decorated, $element, options) { +    decorated.call(this, $element, options); +  } + +  Search.prototype.render = function (decorated) { +    var $search = $( +      '<li class="select2-search select2-search--inline">' + +        '<input class="select2-search__field" type="search" tabindex="-1"' + +        ' autocomplete="off" autocorrect="off" autocapitalize="off"' + +        ' spellcheck="false" role="textbox" aria-autocomplete="list" />' + +      '</li>' +    ); + +    this.$searchContainer = $search; +    this.$search = $search.find('input'); + +    var $rendered = decorated.call(this); + +    this._transferTabIndex(); + +    return $rendered; +  }; + +  Search.prototype.bind = function (decorated, container, $container) { +    var self = this; + +    decorated.call(this, container, $container); + +    container.on('open', function () { +      self.$search.trigger('focus'); +    }); + +    container.on('close', function () { +      self.$search.val(''); +      self.$search.removeAttr('aria-activedescendant'); +      self.$search.trigger('focus'); +    }); + +    container.on('enable', function () { +      self.$search.prop('disabled', false); + +      self._transferTabIndex(); +    }); + +    container.on('disable', function () { +      self.$search.prop('disabled', true); +    }); + +    container.on('focus', function (evt) { +      self.$search.trigger('focus'); +    }); + +    container.on('results:focus', function (params) { +      self.$search.attr('aria-activedescendant', params.id); +    }); + +    this.$selection.on('focusin', '.select2-search--inline', function (evt) { +      self.trigger('focus', evt); +    }); + +    this.$selection.on('focusout', '.select2-search--inline', function (evt) { +      self._handleBlur(evt); +    }); + +    this.$selection.on('keydown', '.select2-search--inline', function (evt) { +      evt.stopPropagation(); + +      self.trigger('keypress', evt); + +      self._keyUpPrevented = evt.isDefaultPrevented(); + +      var key = evt.which; + +      if (key === KEYS.BACKSPACE && self.$search.val() === '') { +        var $previousChoice = self.$searchContainer +          .prev('.select2-selection__choice'); + +        if ($previousChoice.length > 0) { +          var item = $previousChoice.data('data'); + +          self.searchRemoveChoice(item); + +          evt.preventDefault(); +        } +      } +    }); + +    // Try to detect the IE version should the `documentMode` property that +    // is stored on the document. This is only implemented in IE and is +    // slightly cleaner than doing a user agent check. +    // This property is not available in Edge, but Edge also doesn't have +    // this bug. +    var msie = document.documentMode; +    var disableInputEvents = msie && msie <= 11; + +    // Workaround for browsers which do not support the `input` event +    // This will prevent double-triggering of events for browsers which support +    // both the `keyup` and `input` events. +    this.$selection.on( +      'input.searchcheck', +      '.select2-search--inline', +      function (evt) { +        // IE will trigger the `input` event when a placeholder is used on a +        // search box. To get around this issue, we are forced to ignore all +        // `input` events in IE and keep using `keyup`. +        if (disableInputEvents) { +          self.$selection.off('input.search input.searchcheck'); +          return; +        } + +        // Unbind the duplicated `keyup` event +        self.$selection.off('keyup.search'); +      } +    ); + +    this.$selection.on( +      'keyup.search input.search', +      '.select2-search--inline', +      function (evt) { +        // IE will trigger the `input` event when a placeholder is used on a +        // search box. To get around this issue, we are forced to ignore all +        // `input` events in IE and keep using `keyup`. +        if (disableInputEvents && evt.type === 'input') { +          self.$selection.off('input.search input.searchcheck'); +          return; +        } + +        var key = evt.which; + +        // We can freely ignore events from modifier keys +        if (key == KEYS.SHIFT || key == KEYS.CTRL || key == KEYS.ALT) { +          return; +        } + +        // Tabbing will be handled during the `keydown` phase +        if (key == KEYS.TAB) { +          return; +        } + +        self.handleSearch(evt); +      } +    ); +  }; + +  /** +   * This method will transfer the tabindex attribute from the rendered +   * selection to the search box. This allows for the search box to be used as +   * the primary focus instead of the selection container. +   * +   * @private +   */ +  Search.prototype._transferTabIndex = function (decorated) { +    this.$search.attr('tabindex', this.$selection.attr('tabindex')); +    this.$selection.attr('tabindex', '-1'); +  }; + +  Search.prototype.createPlaceholder = function (decorated, placeholder) { +    this.$search.attr('placeholder', placeholder.text); +  }; + +  Search.prototype.update = function (decorated, data) { +    var searchHadFocus = this.$search[0] == document.activeElement; + +    this.$search.attr('placeholder', ''); + +    decorated.call(this, data); + +    this.$selection.find('.select2-selection__rendered') +                   .append(this.$searchContainer); + +    this.resizeSearch(); +    if (searchHadFocus) { +      this.$search.focus(); +    } +  }; + +  Search.prototype.handleSearch = function () { +    this.resizeSearch(); + +    if (!this._keyUpPrevented) { +      var input = this.$search.val(); + +      this.trigger('query', { +        term: input +      }); +    } + +    this._keyUpPrevented = false; +  }; + +  Search.prototype.searchRemoveChoice = function (decorated, item) { +    this.trigger('unselect', { +      data: item +    }); + +    this.$search.val(item.text); +    this.handleSearch(); +  }; + +  Search.prototype.resizeSearch = function () { +    this.$search.css('width', '25px'); + +    var width = ''; + +    if (this.$search.attr('placeholder') !== '') { +      width = this.$selection.find('.select2-selection__rendered').innerWidth(); +    } else { +      var minimumWidth = this.$search.val().length + 1; + +      width = (minimumWidth * 0.75) + 'em'; +    } + +    this.$search.css('width', width); +  }; + +  return Search; +}); + +S2.define('select2/selection/eventRelay',[ +  'jquery' +], function ($) { +  function EventRelay () { } + +  EventRelay.prototype.bind = function (decorated, container, $container) { +    var self = this; +    var relayEvents = [ +      'open', 'opening', +      'close', 'closing', +      'select', 'selecting', +      'unselect', 'unselecting' +    ]; + +    var preventableEvents = ['opening', 'closing', 'selecting', 'unselecting']; + +    decorated.call(this, container, $container); + +    container.on('*', function (name, params) { +      // Ignore events that should not be relayed +      if ($.inArray(name, relayEvents) === -1) { +        return; +      } + +      // The parameters should always be an object +      params = params || {}; + +      // Generate the jQuery event for the Select2 event +      var evt = $.Event('select2:' + name, { +        params: params +      }); + +      self.$element.trigger(evt); + +      // Only handle preventable events if it was one +      if ($.inArray(name, preventableEvents) === -1) { +        return; +      } + +      params.prevented = evt.isDefaultPrevented(); +    }); +  }; + +  return EventRelay; +}); + +S2.define('select2/translation',[ +  'jquery', +  'require' +], function ($, require) { +  function Translation (dict) { +    this.dict = dict || {}; +  } + +  Translation.prototype.all = function () { +    return this.dict; +  }; + +  Translation.prototype.get = function (key) { +    return this.dict[key]; +  }; + +  Translation.prototype.extend = function (translation) { +    this.dict = $.extend({}, translation.all(), this.dict); +  }; + +  // Static functions + +  Translation._cache = {}; + +  Translation.loadPath = function (path) { +    if (!(path in Translation._cache)) { +      var translations = require(path); + +      Translation._cache[path] = translations; +    } + +    return new Translation(Translation._cache[path]); +  }; + +  return Translation; +}); + +S2.define('select2/diacritics',[ + +], function () { +  var diacritics = { +    '\u24B6': 'A', +    '\uFF21': 'A', +    '\u00C0': 'A', +    '\u00C1': 'A', +    '\u00C2': 'A', +    '\u1EA6': 'A', +    '\u1EA4': 'A', +    '\u1EAA': 'A', +    '\u1EA8': 'A', +    '\u00C3': 'A', +    '\u0100': 'A', +    '\u0102': 'A', +    '\u1EB0': 'A', +    '\u1EAE': 'A', +    '\u1EB4': 'A', +    '\u1EB2': 'A', +    '\u0226': 'A', +    '\u01E0': 'A', +    '\u00C4': 'A', +    '\u01DE': 'A', +    '\u1EA2': 'A', +    '\u00C5': 'A', +    '\u01FA': 'A', +    '\u01CD': 'A', +    '\u0200': 'A', +    '\u0202': 'A', +    '\u1EA0': 'A', +    '\u1EAC': 'A', +    '\u1EB6': 'A', +    '\u1E00': 'A', +    '\u0104': 'A', +    '\u023A': 'A', +    '\u2C6F': 'A', +    '\uA732': 'AA', +    '\u00C6': 'AE', +    '\u01FC': 'AE', +    '\u01E2': 'AE', +    '\uA734': 'AO', +    '\uA736': 'AU', +    '\uA738': 'AV', +    '\uA73A': 'AV', +    '\uA73C': 'AY', +    '\u24B7': 'B', +    '\uFF22': 'B', +    '\u1E02': 'B', +    '\u1E04': 'B', +    '\u1E06': 'B', +    '\u0243': 'B', +    '\u0182': 'B', +    '\u0181': 'B', +    '\u24B8': 'C', +    '\uFF23': 'C', +    '\u0106': 'C', +    '\u0108': 'C', +    '\u010A': 'C', +    '\u010C': 'C', +    '\u00C7': 'C', +    '\u1E08': 'C', +    '\u0187': 'C', +    '\u023B': 'C', +    '\uA73E': 'C', +    '\u24B9': 'D', +    '\uFF24': 'D', +    '\u1E0A': 'D', +    '\u010E': 'D', +    '\u1E0C': 'D', +    '\u1E10': 'D', +    '\u1E12': 'D', +    '\u1E0E': 'D', +    '\u0110': 'D', +    '\u018B': 'D', +    '\u018A': 'D', +    '\u0189': 'D', +    '\uA779': 'D', +    '\u01F1': 'DZ', +    '\u01C4': 'DZ', +    '\u01F2': 'Dz', +    '\u01C5': 'Dz', +    '\u24BA': 'E', +    '\uFF25': 'E', +    '\u00C8': 'E', +    '\u00C9': 'E', +    '\u00CA': 'E', +    '\u1EC0': 'E', +    '\u1EBE': 'E', +    '\u1EC4': 'E', +    '\u1EC2': 'E', +    '\u1EBC': 'E', +    '\u0112': 'E', +    '\u1E14': 'E', +    '\u1E16': 'E', +    '\u0114': 'E', +    '\u0116': 'E', +    '\u00CB': 'E', +    '\u1EBA': 'E', +    '\u011A': 'E', +    '\u0204': 'E', +    '\u0206': 'E', +    '\u1EB8': 'E', +    '\u1EC6': 'E', +    '\u0228': 'E', +    '\u1E1C': 'E', +    '\u0118': 'E', +    '\u1E18': 'E', +    '\u1E1A': 'E', +    '\u0190': 'E', +    '\u018E': 'E', +    '\u24BB': 'F', +    '\uFF26': 'F', +    '\u1E1E': 'F', +    '\u0191': 'F', +    '\uA77B': 'F', +    '\u24BC': 'G', +    '\uFF27': 'G', +    '\u01F4': 'G', +    '\u011C': 'G', +    '\u1E20': 'G', +    '\u011E': 'G', +    '\u0120': 'G', +    '\u01E6': 'G', +    '\u0122': 'G', +    '\u01E4': 'G', +    '\u0193': 'G', +    '\uA7A0': 'G', +    '\uA77D': 'G', +    '\uA77E': 'G', +    '\u24BD': 'H', +    '\uFF28': 'H', +    '\u0124': 'H', +    '\u1E22': 'H', +    '\u1E26': 'H', +    '\u021E': 'H', +    '\u1E24': 'H', +    '\u1E28': 'H', +    '\u1E2A': 'H', +    '\u0126': 'H', +    '\u2C67': 'H', +    '\u2C75': 'H', +    '\uA78D': 'H', +    '\u24BE': 'I', +    '\uFF29': 'I', +    '\u00CC': 'I', +    '\u00CD': 'I', +    '\u00CE': 'I', +    '\u0128': 'I', +    '\u012A': 'I', +    '\u012C': 'I', +    '\u0130': 'I', +    '\u00CF': 'I', +    '\u1E2E': 'I', +    '\u1EC8': 'I', +    '\u01CF': 'I', +    '\u0208': 'I', +    '\u020A': 'I', +    '\u1ECA': 'I', +    '\u012E': 'I', +    '\u1E2C': 'I', +    '\u0197': 'I', +    '\u24BF': 'J', +    '\uFF2A': 'J', +    '\u0134': 'J', +    '\u0248': 'J', +    '\u24C0': 'K', +    '\uFF2B': 'K', +    '\u1E30': 'K', +    '\u01E8': 'K', +    '\u1E32': 'K', +    '\u0136': 'K', +    '\u1E34': 'K', +    '\u0198': 'K', +    '\u2C69': 'K', +    '\uA740': 'K', +    '\uA742': 'K', +    '\uA744': 'K', +    '\uA7A2': 'K', +    '\u24C1': 'L', +    '\uFF2C': 'L', +    '\u013F': 'L', +    '\u0139': 'L', +    '\u013D': 'L', +    '\u1E36': 'L', +    '\u1E38': 'L', +    '\u013B': 'L', +    '\u1E3C': 'L', +    '\u1E3A': 'L', +    '\u0141': 'L', +    '\u023D': 'L', +    '\u2C62': 'L', +    '\u2C60': 'L', +    '\uA748': 'L', +    '\uA746': 'L', +    '\uA780': 'L', +    '\u01C7': 'LJ', +    '\u01C8': 'Lj', +    '\u24C2': 'M', +    '\uFF2D': 'M', +    '\u1E3E': 'M', +    '\u1E40': 'M', +    '\u1E42': 'M', +    '\u2C6E': 'M', +    '\u019C': 'M', +    '\u24C3': 'N', +    '\uFF2E': 'N', +    '\u01F8': 'N', +    '\u0143': 'N', +    '\u00D1': 'N', +    '\u1E44': 'N', +    '\u0147': 'N', +    '\u1E46': 'N', +    '\u0145': 'N', +    '\u1E4A': 'N', +    '\u1E48': 'N', +    '\u0220': 'N', +    '\u019D': 'N', +    '\uA790': 'N', +    '\uA7A4': 'N', +    '\u01CA': 'NJ', +    '\u01CB': 'Nj', +    '\u24C4': 'O', +    '\uFF2F': 'O', +    '\u00D2': 'O', +    '\u00D3': 'O', +    '\u00D4': 'O', +    '\u1ED2': 'O', +    '\u1ED0': 'O', +    '\u1ED6': 'O', +    '\u1ED4': 'O', +    '\u00D5': 'O', +    '\u1E4C': 'O', +    '\u022C': 'O', +    '\u1E4E': 'O', +    '\u014C': 'O', +    '\u1E50': 'O', +    '\u1E52': 'O', +    '\u014E': 'O', +    '\u022E': 'O', +    '\u0230': 'O', +    '\u00D6': 'O', +    '\u022A': 'O', +    '\u1ECE': 'O', +    '\u0150': 'O', +    '\u01D1': 'O', +    '\u020C': 'O', +    '\u020E': 'O', +    '\u01A0': 'O', +    '\u1EDC': 'O', +    '\u1EDA': 'O', +    '\u1EE0': 'O', +    '\u1EDE': 'O', +    '\u1EE2': 'O', +    '\u1ECC': 'O', +    '\u1ED8': 'O', +    '\u01EA': 'O', +    '\u01EC': 'O', +    '\u00D8': 'O', +    '\u01FE': 'O', +    '\u0186': 'O', +    '\u019F': 'O', +    '\uA74A': 'O', +    '\uA74C': 'O', +    '\u01A2': 'OI', +    '\uA74E': 'OO', +    '\u0222': 'OU', +    '\u24C5': 'P', +    '\uFF30': 'P', +    '\u1E54': 'P', +    '\u1E56': 'P', +    '\u01A4': 'P', +    '\u2C63': 'P', +    '\uA750': 'P', +    '\uA752': 'P', +    '\uA754': 'P', +    '\u24C6': 'Q', +    '\uFF31': 'Q', +    '\uA756': 'Q', +    '\uA758': 'Q', +    '\u024A': 'Q', +    '\u24C7': 'R', +    '\uFF32': 'R', +    '\u0154': 'R', +    '\u1E58': 'R', +    '\u0158': 'R', +    '\u0210': 'R', +    '\u0212': 'R', +    '\u1E5A': 'R', +    '\u1E5C': 'R', +    '\u0156': 'R', +    '\u1E5E': 'R', +    '\u024C': 'R', +    '\u2C64': 'R', +    '\uA75A': 'R', +    '\uA7A6': 'R', +    '\uA782': 'R', +    '\u24C8': 'S', +    '\uFF33': 'S', +    '\u1E9E': 'S', +    '\u015A': 'S', +    '\u1E64': 'S', +    '\u015C': 'S', +    '\u1E60': 'S', +    '\u0160': 'S', +    '\u1E66': 'S', +    '\u1E62': 'S', +    '\u1E68': 'S', +    '\u0218': 'S', +    '\u015E': 'S', +    '\u2C7E': 'S', +    '\uA7A8': 'S', +    '\uA784': 'S', +    '\u24C9': 'T', +    '\uFF34': 'T', +    '\u1E6A': 'T', +    '\u0164': 'T', +    '\u1E6C': 'T', +    '\u021A': 'T', +    '\u0162': 'T', +    '\u1E70': 'T', +    '\u1E6E': 'T', +    '\u0166': 'T', +    '\u01AC': 'T', +    '\u01AE': 'T', +    '\u023E': 'T', +    '\uA786': 'T', +    '\uA728': 'TZ', +    '\u24CA': 'U', +    '\uFF35': 'U', +    '\u00D9': 'U', +    '\u00DA': 'U', +    '\u00DB': 'U', +    '\u0168': 'U', +    '\u1E78': 'U', +    '\u016A': 'U', +    '\u1E7A': 'U', +    '\u016C': 'U', +    '\u00DC': 'U', +    '\u01DB': 'U', +    '\u01D7': 'U', +    '\u01D5': 'U', +    '\u01D9': 'U', +    '\u1EE6': 'U', +    '\u016E': 'U', +    '\u0170': 'U', +    '\u01D3': 'U', +    '\u0214': 'U', +    '\u0216': 'U', +    '\u01AF': 'U', +    '\u1EEA': 'U', +    '\u1EE8': 'U', +    '\u1EEE': 'U', +    '\u1EEC': 'U', +    '\u1EF0': 'U', +    '\u1EE4': 'U', +    '\u1E72': 'U', +    '\u0172': 'U', +    '\u1E76': 'U', +    '\u1E74': 'U', +    '\u0244': 'U', +    '\u24CB': 'V', +    '\uFF36': 'V', +    '\u1E7C': 'V', +    '\u1E7E': 'V', +    '\u01B2': 'V', +    '\uA75E': 'V', +    '\u0245': 'V', +    '\uA760': 'VY', +    '\u24CC': 'W', +    '\uFF37': 'W', +    '\u1E80': 'W', +    '\u1E82': 'W', +    '\u0174': 'W', +    '\u1E86': 'W', +    '\u1E84': 'W', +    '\u1E88': 'W', +    '\u2C72': 'W', +    '\u24CD': 'X', +    '\uFF38': 'X', +    '\u1E8A': 'X', +    '\u1E8C': 'X', +    '\u24CE': 'Y', +    '\uFF39': 'Y', +    '\u1EF2': 'Y', +    '\u00DD': 'Y', +    '\u0176': 'Y', +    '\u1EF8': 'Y', +    '\u0232': 'Y', +    '\u1E8E': 'Y', +    '\u0178': 'Y', +    '\u1EF6': 'Y', +    '\u1EF4': 'Y', +    '\u01B3': 'Y', +    '\u024E': 'Y', +    '\u1EFE': 'Y', +    '\u24CF': 'Z', +    '\uFF3A': 'Z', +    '\u0179': 'Z', +    '\u1E90': 'Z', +    '\u017B': 'Z', +    '\u017D': 'Z', +    '\u1E92': 'Z', +    '\u1E94': 'Z', +    '\u01B5': 'Z', +    '\u0224': 'Z', +    '\u2C7F': 'Z', +    '\u2C6B': 'Z', +    '\uA762': 'Z', +    '\u24D0': 'a', +    '\uFF41': 'a', +    '\u1E9A': 'a', +    '\u00E0': 'a', +    '\u00E1': 'a', +    '\u00E2': 'a', +    '\u1EA7': 'a', +    '\u1EA5': 'a', +    '\u1EAB': 'a', +    '\u1EA9': 'a', +    '\u00E3': 'a', +    '\u0101': 'a', +    '\u0103': 'a', +    '\u1EB1': 'a', +    '\u1EAF': 'a', +    '\u1EB5': 'a', +    '\u1EB3': 'a', +    '\u0227': 'a', +    '\u01E1': 'a', +    '\u00E4': 'a', +    '\u01DF': 'a', +    '\u1EA3': 'a', +    '\u00E5': 'a', +    '\u01FB': 'a', +    '\u01CE': 'a', +    '\u0201': 'a', +    '\u0203': 'a', +    '\u1EA1': 'a', +    '\u1EAD': 'a', +    '\u1EB7': 'a', +    '\u1E01': 'a', +    '\u0105': 'a', +    '\u2C65': 'a', +    '\u0250': 'a', +    '\uA733': 'aa', +    '\u00E6': 'ae', +    '\u01FD': 'ae', +    '\u01E3': 'ae', +    '\uA735': 'ao', +    '\uA737': 'au', +    '\uA739': 'av', +    '\uA73B': 'av', +    '\uA73D': 'ay', +    '\u24D1': 'b', +    '\uFF42': 'b', +    '\u1E03': 'b', +    '\u1E05': 'b', +    '\u1E07': 'b', +    '\u0180': 'b', +    '\u0183': 'b', +    '\u0253': 'b', +    '\u24D2': 'c', +    '\uFF43': 'c', +    '\u0107': 'c', +    '\u0109': 'c', +    '\u010B': 'c', +    '\u010D': 'c', +    '\u00E7': 'c', +    '\u1E09': 'c', +    '\u0188': 'c', +    '\u023C': 'c', +    '\uA73F': 'c', +    '\u2184': 'c', +    '\u24D3': 'd', +    '\uFF44': 'd', +    '\u1E0B': 'd', +    '\u010F': 'd', +    '\u1E0D': 'd', +    '\u1E11': 'd', +    '\u1E13': 'd', +    '\u1E0F': 'd', +    '\u0111': 'd', +    '\u018C': 'd', +    '\u0256': 'd', +    '\u0257': 'd', +    '\uA77A': 'd', +    '\u01F3': 'dz', +    '\u01C6': 'dz', +    '\u24D4': 'e', +    '\uFF45': 'e', +    '\u00E8': 'e', +    '\u00E9': 'e', +    '\u00EA': 'e', +    '\u1EC1': 'e', +    '\u1EBF': 'e', +    '\u1EC5': 'e', +    '\u1EC3': 'e', +    '\u1EBD': 'e', +    '\u0113': 'e', +    '\u1E15': 'e', +    '\u1E17': 'e', +    '\u0115': 'e', +    '\u0117': 'e', +    '\u00EB': 'e', +    '\u1EBB': 'e', +    '\u011B': 'e', +    '\u0205': 'e', +    '\u0207': 'e', +    '\u1EB9': 'e', +    '\u1EC7': 'e', +    '\u0229': 'e', +    '\u1E1D': 'e', +    '\u0119': 'e', +    '\u1E19': 'e', +    '\u1E1B': 'e', +    '\u0247': 'e', +    '\u025B': 'e', +    '\u01DD': 'e', +    '\u24D5': 'f', +    '\uFF46': 'f', +    '\u1E1F': 'f', +    '\u0192': 'f', +    '\uA77C': 'f', +    '\u24D6': 'g', +    '\uFF47': 'g', +    '\u01F5': 'g', +    '\u011D': 'g', +    '\u1E21': 'g', +    '\u011F': 'g', +    '\u0121': 'g', +    '\u01E7': 'g', +    '\u0123': 'g', +    '\u01E5': 'g', +    '\u0260': 'g', +    '\uA7A1': 'g', +    '\u1D79': 'g', +    '\uA77F': 'g', +    '\u24D7': 'h', +    '\uFF48': 'h', +    '\u0125': 'h', +    '\u1E23': 'h', +    '\u1E27': 'h', +    '\u021F': 'h', +    '\u1E25': 'h', +    '\u1E29': 'h', +    '\u1E2B': 'h', +    '\u1E96': 'h', +    '\u0127': 'h', +    '\u2C68': 'h', +    '\u2C76': 'h', +    '\u0265': 'h', +    '\u0195': 'hv', +    '\u24D8': 'i', +    '\uFF49': 'i', +    '\u00EC': 'i', +    '\u00ED': 'i', +    '\u00EE': 'i', +    '\u0129': 'i', +    '\u012B': 'i', +    '\u012D': 'i', +    '\u00EF': 'i', +    '\u1E2F': 'i', +    '\u1EC9': 'i', +    '\u01D0': 'i', +    '\u0209': 'i', +    '\u020B': 'i', +    '\u1ECB': 'i', +    '\u012F': 'i', +    '\u1E2D': 'i', +    '\u0268': 'i', +    '\u0131': 'i', +    '\u24D9': 'j', +    '\uFF4A': 'j', +    '\u0135': 'j', +    '\u01F0': 'j', +    '\u0249': 'j', +    '\u24DA': 'k', +    '\uFF4B': 'k', +    '\u1E31': 'k', +    '\u01E9': 'k', +    '\u1E33': 'k', +    '\u0137': 'k', +    '\u1E35': 'k', +    '\u0199': 'k', +    '\u2C6A': 'k', +    '\uA741': 'k', +    '\uA743': 'k', +    '\uA745': 'k', +    '\uA7A3': 'k', +    '\u24DB': 'l', +    '\uFF4C': 'l', +    '\u0140': 'l', +    '\u013A': 'l', +    '\u013E': 'l', +    '\u1E37': 'l', +    '\u1E39': 'l', +    '\u013C': 'l', +    '\u1E3D': 'l', +    '\u1E3B': 'l', +    '\u017F': 'l', +    '\u0142': 'l', +    '\u019A': 'l', +    '\u026B': 'l', +    '\u2C61': 'l', +    '\uA749': 'l', +    '\uA781': 'l', +    '\uA747': 'l', +    '\u01C9': 'lj', +    '\u24DC': 'm', +    '\uFF4D': 'm', +    '\u1E3F': 'm', +    '\u1E41': 'm', +    '\u1E43': 'm', +    '\u0271': 'm', +    '\u026F': 'm', +    '\u24DD': 'n', +    '\uFF4E': 'n', +    '\u01F9': 'n', +    '\u0144': 'n', +    '\u00F1': 'n', +    '\u1E45': 'n', +    '\u0148': 'n', +    '\u1E47': 'n', +    '\u0146': 'n', +    '\u1E4B': 'n', +    '\u1E49': 'n', +    '\u019E': 'n', +    '\u0272': 'n', +    '\u0149': 'n', +    '\uA791': 'n', +    '\uA7A5': 'n', +    '\u01CC': 'nj', +    '\u24DE': 'o', +    '\uFF4F': 'o', +    '\u00F2': 'o', +    '\u00F3': 'o', +    '\u00F4': 'o', +    '\u1ED3': 'o', +    '\u1ED1': 'o', +    '\u1ED7': 'o', +    '\u1ED5': 'o', +    '\u00F5': 'o', +    '\u1E4D': 'o', +    '\u022D': 'o', +    '\u1E4F': 'o', +    '\u014D': 'o', +    '\u1E51': 'o', +    '\u1E53': 'o', +    '\u014F': 'o', +    '\u022F': 'o', +    '\u0231': 'o', +    '\u00F6': 'o', +    '\u022B': 'o', +    '\u1ECF': 'o', +    '\u0151': 'o', +    '\u01D2': 'o', +    '\u020D': 'o', +    '\u020F': 'o', +    '\u01A1': 'o', +    '\u1EDD': 'o', +    '\u1EDB': 'o', +    '\u1EE1': 'o', +    '\u1EDF': 'o', +    '\u1EE3': 'o', +    '\u1ECD': 'o', +    '\u1ED9': 'o', +    '\u01EB': 'o', +    '\u01ED': 'o', +    '\u00F8': 'o', +    '\u01FF': 'o', +    '\u0254': 'o', +    '\uA74B': 'o', +    '\uA74D': 'o', +    '\u0275': 'o', +    '\u01A3': 'oi', +    '\u0223': 'ou', +    '\uA74F': 'oo', +    '\u24DF': 'p', +    '\uFF50': 'p', +    '\u1E55': 'p', +    '\u1E57': 'p', +    '\u01A5': 'p', +    '\u1D7D': 'p', +    '\uA751': 'p', +    '\uA753': 'p', +    '\uA755': 'p', +    '\u24E0': 'q', +    '\uFF51': 'q', +    '\u024B': 'q', +    '\uA757': 'q', +    '\uA759': 'q', +    '\u24E1': 'r', +    '\uFF52': 'r', +    '\u0155': 'r', +    '\u1E59': 'r', +    '\u0159': 'r', +    '\u0211': 'r', +    '\u0213': 'r', +    '\u1E5B': 'r', +    '\u1E5D': 'r', +    '\u0157': 'r', +    '\u1E5F': 'r', +    '\u024D': 'r', +    '\u027D': 'r', +    '\uA75B': 'r', +    '\uA7A7': 'r', +    '\uA783': 'r', +    '\u24E2': 's', +    '\uFF53': 's', +    '\u00DF': 's', +    '\u015B': 's', +    '\u1E65': 's', +    '\u015D': 's', +    '\u1E61': 's', +    '\u0161': 's', +    '\u1E67': 's', +    '\u1E63': 's', +    '\u1E69': 's', +    '\u0219': 's', +    '\u015F': 's', +    '\u023F': 's', +    '\uA7A9': 's', +    '\uA785': 's', +    '\u1E9B': 's', +    '\u24E3': 't', +    '\uFF54': 't', +    '\u1E6B': 't', +    '\u1E97': 't', +    '\u0165': 't', +    '\u1E6D': 't', +    '\u021B': 't', +    '\u0163': 't', +    '\u1E71': 't', +    '\u1E6F': 't', +    '\u0167': 't', +    '\u01AD': 't', +    '\u0288': 't', +    '\u2C66': 't', +    '\uA787': 't', +    '\uA729': 'tz', +    '\u24E4': 'u', +    '\uFF55': 'u', +    '\u00F9': 'u', +    '\u00FA': 'u', +    '\u00FB': 'u', +    '\u0169': 'u', +    '\u1E79': 'u', +    '\u016B': 'u', +    '\u1E7B': 'u', +    '\u016D': 'u', +    '\u00FC': 'u', +    '\u01DC': 'u', +    '\u01D8': 'u', +    '\u01D6': 'u', +    '\u01DA': 'u', +    '\u1EE7': 'u', +    '\u016F': 'u', +    '\u0171': 'u', +    '\u01D4': 'u', +    '\u0215': 'u', +    '\u0217': 'u', +    '\u01B0': 'u', +    '\u1EEB': 'u', +    '\u1EE9': 'u', +    '\u1EEF': 'u', +    '\u1EED': 'u', +    '\u1EF1': 'u', +    '\u1EE5': 'u', +    '\u1E73': 'u', +    '\u0173': 'u', +    '\u1E77': 'u', +    '\u1E75': 'u', +    '\u0289': 'u', +    '\u24E5': 'v', +    '\uFF56': 'v', +    '\u1E7D': 'v', +    '\u1E7F': 'v', +    '\u028B': 'v', +    '\uA75F': 'v', +    '\u028C': 'v', +    '\uA761': 'vy', +    '\u24E6': 'w', +    '\uFF57': 'w', +    '\u1E81': 'w', +    '\u1E83': 'w', +    '\u0175': 'w', +    '\u1E87': 'w', +    '\u1E85': 'w', +    '\u1E98': 'w', +    '\u1E89': 'w', +    '\u2C73': 'w', +    '\u24E7': 'x', +    '\uFF58': 'x', +    '\u1E8B': 'x', +    '\u1E8D': 'x', +    '\u24E8': 'y', +    '\uFF59': 'y', +    '\u1EF3': 'y', +    '\u00FD': 'y', +    '\u0177': 'y', +    '\u1EF9': 'y', +    '\u0233': 'y', +    '\u1E8F': 'y', +    '\u00FF': 'y', +    '\u1EF7': 'y', +    '\u1E99': 'y', +    '\u1EF5': 'y', +    '\u01B4': 'y', +    '\u024F': 'y', +    '\u1EFF': 'y', +    '\u24E9': 'z', +    '\uFF5A': 'z', +    '\u017A': 'z', +    '\u1E91': 'z', +    '\u017C': 'z', +    '\u017E': 'z', +    '\u1E93': 'z', +    '\u1E95': 'z', +    '\u01B6': 'z', +    '\u0225': 'z', +    '\u0240': 'z', +    '\u2C6C': 'z', +    '\uA763': 'z', +    '\u0386': '\u0391', +    '\u0388': '\u0395', +    '\u0389': '\u0397', +    '\u038A': '\u0399', +    '\u03AA': '\u0399', +    '\u038C': '\u039F', +    '\u038E': '\u03A5', +    '\u03AB': '\u03A5', +    '\u038F': '\u03A9', +    '\u03AC': '\u03B1', +    '\u03AD': '\u03B5', +    '\u03AE': '\u03B7', +    '\u03AF': '\u03B9', +    '\u03CA': '\u03B9', +    '\u0390': '\u03B9', +    '\u03CC': '\u03BF', +    '\u03CD': '\u03C5', +    '\u03CB': '\u03C5', +    '\u03B0': '\u03C5', +    '\u03C9': '\u03C9', +    '\u03C2': '\u03C3' +  }; + +  return diacritics; +}); + +S2.define('select2/data/base',[ +  '../utils' +], function (Utils) { +  function BaseAdapter ($element, options) { +    BaseAdapter.__super__.constructor.call(this); +  } + +  Utils.Extend(BaseAdapter, Utils.Observable); + +  BaseAdapter.prototype.current = function (callback) { +    throw new Error('The `current` method must be defined in child classes.'); +  }; + +  BaseAdapter.prototype.query = function (params, callback) { +    throw new Error('The `query` method must be defined in child classes.'); +  }; + +  BaseAdapter.prototype.bind = function (container, $container) { +    // Can be implemented in subclasses +  }; + +  BaseAdapter.prototype.destroy = function () { +    // Can be implemented in subclasses +  }; + +  BaseAdapter.prototype.generateResultId = function (container, data) { +    var id = container.id + '-result-'; + +    id += Utils.generateChars(4); + +    if (data.id != null) { +      id += '-' + data.id.toString(); +    } else { +      id += '-' + Utils.generateChars(4); +    } +    return id; +  }; + +  return BaseAdapter; +}); + +S2.define('select2/data/select',[ +  './base', +  '../utils', +  'jquery' +], function (BaseAdapter, Utils, $) { +  function SelectAdapter ($element, options) { +    this.$element = $element; +    this.options = options; + +    SelectAdapter.__super__.constructor.call(this); +  } + +  Utils.Extend(SelectAdapter, BaseAdapter); + +  SelectAdapter.prototype.current = function (callback) { +    var data = []; +    var self = this; + +    this.$element.find(':selected').each(function () { +      var $option = $(this); + +      var option = self.item($option); + +      data.push(option); +    }); + +    callback(data); +  }; + +  SelectAdapter.prototype.select = function (data) { +    var self = this; + +    data.selected = true; + +    // If data.element is a DOM node, use it instead +    if ($(data.element).is('option')) { +      data.element.selected = true; + +      this.$element.trigger('change'); + +      return; +    } + +    if (this.$element.prop('multiple')) { +      this.current(function (currentData) { +        var val = []; + +        data = [data]; +        data.push.apply(data, currentData); + +        for (var d = 0; d < data.length; d++) { +          var id = data[d].id; + +          if ($.inArray(id, val) === -1) { +            val.push(id); +          } +        } + +        self.$element.val(val); +        self.$element.trigger('change'); +      }); +    } else { +      var val = data.id; + +      this.$element.val(val); +      this.$element.trigger('change'); +    } +  }; + +  SelectAdapter.prototype.unselect = function (data) { +    var self = this; + +    if (!this.$element.prop('multiple')) { +      return; +    } + +    data.selected = false; + +    if ($(data.element).is('option')) { +      data.element.selected = false; + +      this.$element.trigger('change'); + +      return; +    } + +    this.current(function (currentData) { +      var val = []; + +      for (var d = 0; d < currentData.length; d++) { +        var id = currentData[d].id; + +        if (id !== data.id && $.inArray(id, val) === -1) { +          val.push(id); +        } +      } + +      self.$element.val(val); + +      self.$element.trigger('change'); +    }); +  }; + +  SelectAdapter.prototype.bind = function (container, $container) { +    var self = this; + +    this.container = container; + +    container.on('select', function (params) { +      self.select(params.data); +    }); + +    container.on('unselect', function (params) { +      self.unselect(params.data); +    }); +  }; + +  SelectAdapter.prototype.destroy = function () { +    // Remove anything added to child elements +    this.$element.find('*').each(function () { +      // Remove any custom data set by Select2 +      $.removeData(this, 'data'); +    }); +  }; + +  SelectAdapter.prototype.query = function (params, callback) { +    var data = []; +    var self = this; + +    var $options = this.$element.children(); + +    $options.each(function () { +      var $option = $(this); + +      if (!$option.is('option') && !$option.is('optgroup')) { +        return; +      } + +      var option = self.item($option); + +      var matches = self.matches(params, option); + +      if (matches !== null) { +        data.push(matches); +      } +    }); + +    callback({ +      results: data +    }); +  }; + +  SelectAdapter.prototype.addOptions = function ($options) { +    Utils.appendMany(this.$element, $options); +  }; + +  SelectAdapter.prototype.option = function (data) { +    var option; + +    if (data.children) { +      option = document.createElement('optgroup'); +      option.label = data.text; +    } else { +      option = document.createElement('option'); + +      if (option.textContent !== undefined) { +        option.textContent = data.text; +      } else { +        option.innerText = data.text; +      } +    } + +    if (data.id) { +      option.value = data.id; +    } + +    if (data.disabled) { +      option.disabled = true; +    } + +    if (data.selected) { +      option.selected = true; +    } + +    if (data.title) { +      option.title = data.title; +    } + +    var $option = $(option); + +    var normalizedData = this._normalizeItem(data); +    normalizedData.element = option; + +    // Override the option's data with the combined data +    $.data(option, 'data', normalizedData); + +    return $option; +  }; + +  SelectAdapter.prototype.item = function ($option) { +    var data = {}; + +    data = $.data($option[0], 'data'); + +    if (data != null) { +      return data; +    } + +    if ($option.is('option')) { +      data = { +        id: $option.val(), +        text: $option.text(), +        disabled: $option.prop('disabled'), +        selected: $option.prop('selected'), +        title: $option.prop('title') +      }; +    } else if ($option.is('optgroup')) { +      data = { +        text: $option.prop('label'), +        children: [], +        title: $option.prop('title') +      }; + +      var $children = $option.children('option'); +      var children = []; + +      for (var c = 0; c < $children.length; c++) { +        var $child = $($children[c]); + +        var child = this.item($child); + +        children.push(child); +      } + +      data.children = children; +    } + +    data = this._normalizeItem(data); +    data.element = $option[0]; + +    $.data($option[0], 'data', data); + +    return data; +  }; + +  SelectAdapter.prototype._normalizeItem = function (item) { +    if (!$.isPlainObject(item)) { +      item = { +        id: item, +        text: item +      }; +    } + +    item = $.extend({}, { +      text: '' +    }, item); + +    var defaults = { +      selected: false, +      disabled: false +    }; + +    if (item.id != null) { +      item.id = item.id.toString(); +    } + +    if (item.text != null) { +      item.text = item.text.toString(); +    } + +    if (item._resultId == null && item.id && this.container != null) { +      item._resultId = this.generateResultId(this.container, item); +    } + +    return $.extend({}, defaults, item); +  }; + +  SelectAdapter.prototype.matches = function (params, data) { +    var matcher = this.options.get('matcher'); + +    return matcher(params, data); +  }; + +  return SelectAdapter; +}); + +S2.define('select2/data/array',[ +  './select', +  '../utils', +  'jquery' +], function (SelectAdapter, Utils, $) { +  function ArrayAdapter ($element, options) { +    var data = options.get('data') || []; + +    ArrayAdapter.__super__.constructor.call(this, $element, options); + +    this.addOptions(this.convertToOptions(data)); +  } + +  Utils.Extend(ArrayAdapter, SelectAdapter); + +  ArrayAdapter.prototype.select = function (data) { +    var $option = this.$element.find('option').filter(function (i, elm) { +      return elm.value == data.id.toString(); +    }); + +    if ($option.length === 0) { +      $option = this.option(data); + +      this.addOptions($option); +    } + +    ArrayAdapter.__super__.select.call(this, data); +  }; + +  ArrayAdapter.prototype.convertToOptions = function (data) { +    var self = this; + +    var $existing = this.$element.find('option'); +    var existingIds = $existing.map(function () { +      return self.item($(this)).id; +    }).get(); + +    var $options = []; + +    // Filter out all items except for the one passed in the argument +    function onlyItem (item) { +      return function () { +        return $(this).val() == item.id; +      }; +    } + +    for (var d = 0; d < data.length; d++) { +      var item = this._normalizeItem(data[d]); + +      // Skip items which were pre-loaded, only merge the data +      if ($.inArray(item.id, existingIds) >= 0) { +        var $existingOption = $existing.filter(onlyItem(item)); + +        var existingData = this.item($existingOption); +        var newData = $.extend(true, {}, item, existingData); + +        var $newOption = this.option(newData); + +        $existingOption.replaceWith($newOption); + +        continue; +      } + +      var $option = this.option(item); + +      if (item.children) { +        var $children = this.convertToOptions(item.children); + +        Utils.appendMany($option, $children); +      } + +      $options.push($option); +    } + +    return $options; +  }; + +  return ArrayAdapter; +}); + +S2.define('select2/data/ajax',[ +  './array', +  '../utils', +  'jquery' +], function (ArrayAdapter, Utils, $) { +  function AjaxAdapter ($element, options) { +    this.ajaxOptions = this._applyDefaults(options.get('ajax')); + +    if (this.ajaxOptions.processResults != null) { +      this.processResults = this.ajaxOptions.processResults; +    } + +    AjaxAdapter.__super__.constructor.call(this, $element, options); +  } + +  Utils.Extend(AjaxAdapter, ArrayAdapter); + +  AjaxAdapter.prototype._applyDefaults = function (options) { +    var defaults = { +      data: function (params) { +        return $.extend({}, params, { +          q: params.term +        }); +      }, +      transport: function (params, success, failure) { +        var $request = $.ajax(params); + +        $request.then(success); +        $request.fail(failure); + +        return $request; +      } +    }; + +    return $.extend({}, defaults, options, true); +  }; + +  AjaxAdapter.prototype.processResults = function (results) { +    return results; +  }; + +  AjaxAdapter.prototype.query = function (params, callback) { +    var matches = []; +    var self = this; + +    if (this._request != null) { +      // JSONP requests cannot always be aborted +      if ($.isFunction(this._request.abort)) { +        this._request.abort(); +      } + +      this._request = null; +    } + +    var options = $.extend({ +      type: 'GET' +    }, this.ajaxOptions); + +    if (typeof options.url === 'function') { +      options.url = options.url.call(this.$element, params); +    } + +    if (typeof options.data === 'function') { +      options.data = options.data.call(this.$element, params); +    } + +    function request () { +      var $request = options.transport(options, function (data) { +        var results = self.processResults(data, params); + +        if (self.options.get('debug') && window.console && console.error) { +          // Check to make sure that the response included a `results` key. +          if (!results || !results.results || !$.isArray(results.results)) { +            console.error( +              'Select2: The AJAX results did not return an array in the ' + +              '`results` key of the response.' +            ); +          } +        } + +        callback(results); +      }, function () { +        // Attempt to detect if a request was aborted +        // Only works if the transport exposes a status property +        if ($request.status && $request.status === '0') { +          return; +        } + +        self.trigger('results:message', { +          message: 'errorLoading' +        }); +      }); + +      self._request = $request; +    } + +    if (this.ajaxOptions.delay && params.term != null) { +      if (this._queryTimeout) { +        window.clearTimeout(this._queryTimeout); +      } + +      this._queryTimeout = window.setTimeout(request, this.ajaxOptions.delay); +    } else { +      request(); +    } +  }; + +  return AjaxAdapter; +}); + +S2.define('select2/data/tags',[ +  'jquery' +], function ($) { +  function Tags (decorated, $element, options) { +    var tags = options.get('tags'); + +    var createTag = options.get('createTag'); + +    if (createTag !== undefined) { +      this.createTag = createTag; +    } + +    var insertTag = options.get('insertTag'); + +    if (insertTag !== undefined) { +        this.insertTag = insertTag; +    } + +    decorated.call(this, $element, options); + +    if ($.isArray(tags)) { +      for (var t = 0; t < tags.length; t++) { +        var tag = tags[t]; +        var item = this._normalizeItem(tag); + +        var $option = this.option(item); + +        this.$element.append($option); +      } +    } +  } + +  Tags.prototype.query = function (decorated, params, callback) { +    var self = this; + +    this._removeOldTags(); + +    if (params.term == null || params.page != null) { +      decorated.call(this, params, callback); +      return; +    } + +    function wrapper (obj, child) { +      var data = obj.results; + +      for (var i = 0; i < data.length; i++) { +        var option = data[i]; + +        var checkChildren = ( +          option.children != null && +          !wrapper({ +            results: option.children +          }, true) +        ); + +        var checkText = option.text === params.term; + +        if (checkText || checkChildren) { +          if (child) { +            return false; +          } + +          obj.data = data; +          callback(obj); + +          return; +        } +      } + +      if (child) { +        return true; +      } + +      var tag = self.createTag(params); + +      if (tag != null) { +        var $option = self.option(tag); +        $option.attr('data-select2-tag', true); + +        self.addOptions([$option]); + +        self.insertTag(data, tag); +      } + +      obj.results = data; + +      callback(obj); +    } + +    decorated.call(this, params, wrapper); +  }; + +  Tags.prototype.createTag = function (decorated, params) { +    var term = $.trim(params.term); + +    if (term === '') { +      return null; +    } + +    return { +      id: term, +      text: term +    }; +  }; + +  Tags.prototype.insertTag = function (_, data, tag) { +    data.unshift(tag); +  }; + +  Tags.prototype._removeOldTags = function (_) { +    var tag = this._lastTag; + +    var $options = this.$element.find('option[data-select2-tag]'); + +    $options.each(function () { +      if (this.selected) { +        return; +      } + +      $(this).remove(); +    }); +  }; + +  return Tags; +}); + +S2.define('select2/data/tokenizer',[ +  'jquery' +], function ($) { +  function Tokenizer (decorated, $element, options) { +    var tokenizer = options.get('tokenizer'); + +    if (tokenizer !== undefined) { +      this.tokenizer = tokenizer; +    } + +    decorated.call(this, $element, options); +  } + +  Tokenizer.prototype.bind = function (decorated, container, $container) { +    decorated.call(this, container, $container); + +    this.$search =  container.dropdown.$search || container.selection.$search || +      $container.find('.select2-search__field'); +  }; + +  Tokenizer.prototype.query = function (decorated, params, callback) { +    var self = this; + +    function createAndSelect (data) { +      // Normalize the data object so we can use it for checks +      var item = self._normalizeItem(data); + +      // Check if the data object already exists as a tag +      // Select it if it doesn't +      var $existingOptions = self.$element.find('option').filter(function () { +        return $(this).val() === item.id; +      }); + +      // If an existing option wasn't found for it, create the option +      if (!$existingOptions.length) { +        var $option = self.option(item); +        $option.attr('data-select2-tag', true); + +        self._removeOldTags(); +        self.addOptions([$option]); +      } + +      // Select the item, now that we know there is an option for it +      select(item); +    } + +    function select (data) { +      self.trigger('select', { +        data: data +      }); +    } + +    params.term = params.term || ''; + +    var tokenData = this.tokenizer(params, this.options, createAndSelect); + +    if (tokenData.term !== params.term) { +      // Replace the search term if we have the search box +      if (this.$search.length) { +        this.$search.val(tokenData.term); +        this.$search.focus(); +      } + +      params.term = tokenData.term; +    } + +    decorated.call(this, params, callback); +  }; + +  Tokenizer.prototype.tokenizer = function (_, params, options, callback) { +    var separators = options.get('tokenSeparators') || []; +    var term = params.term; +    var i = 0; + +    var createTag = this.createTag || function (params) { +      return { +        id: params.term, +        text: params.term +      }; +    }; + +    while (i < term.length) { +      var termChar = term[i]; + +      if ($.inArray(termChar, separators) === -1) { +        i++; + +        continue; +      } + +      var part = term.substr(0, i); +      var partParams = $.extend({}, params, { +        term: part +      }); + +      var data = createTag(partParams); + +      if (data == null) { +        i++; +        continue; +      } + +      callback(data); + +      // Reset the term to not include the tokenized portion +      term = term.substr(i + 1) || ''; +      i = 0; +    } + +    return { +      term: term +    }; +  }; + +  return Tokenizer; +}); + +S2.define('select2/data/minimumInputLength',[ + +], function () { +  function MinimumInputLength (decorated, $e, options) { +    this.minimumInputLength = options.get('minimumInputLength'); + +    decorated.call(this, $e, options); +  } + +  MinimumInputLength.prototype.query = function (decorated, params, callback) { +    params.term = params.term || ''; + +    if (params.term.length < this.minimumInputLength) { +      this.trigger('results:message', { +        message: 'inputTooShort', +        args: { +          minimum: this.minimumInputLength, +          input: params.term, +          params: params +        } +      }); + +      return; +    } + +    decorated.call(this, params, callback); +  }; + +  return MinimumInputLength; +}); + +S2.define('select2/data/maximumInputLength',[ + +], function () { +  function MaximumInputLength (decorated, $e, options) { +    this.maximumInputLength = options.get('maximumInputLength'); + +    decorated.call(this, $e, options); +  } + +  MaximumInputLength.prototype.query = function (decorated, params, callback) { +    params.term = params.term || ''; + +    if (this.maximumInputLength > 0 && +        params.term.length > this.maximumInputLength) { +      this.trigger('results:message', { +        message: 'inputTooLong', +        args: { +          maximum: this.maximumInputLength, +          input: params.term, +          params: params +        } +      }); + +      return; +    } + +    decorated.call(this, params, callback); +  }; + +  return MaximumInputLength; +}); + +S2.define('select2/data/maximumSelectionLength',[ + +], function (){ +  function MaximumSelectionLength (decorated, $e, options) { +    this.maximumSelectionLength = options.get('maximumSelectionLength'); + +    decorated.call(this, $e, options); +  } + +  MaximumSelectionLength.prototype.query = +    function (decorated, params, callback) { +      var self = this; + +      this.current(function (currentData) { +        var count = currentData != null ? currentData.length : 0; +        if (self.maximumSelectionLength > 0 && +          count >= self.maximumSelectionLength) { +          self.trigger('results:message', { +            message: 'maximumSelected', +            args: { +              maximum: self.maximumSelectionLength +            } +          }); +          return; +        } +        decorated.call(self, params, callback); +      }); +  }; + +  return MaximumSelectionLength; +}); + +S2.define('select2/dropdown',[ +  'jquery', +  './utils' +], function ($, Utils) { +  function Dropdown ($element, options) { +    this.$element = $element; +    this.options = options; + +    Dropdown.__super__.constructor.call(this); +  } + +  Utils.Extend(Dropdown, Utils.Observable); + +  Dropdown.prototype.render = function () { +    var $dropdown = $( +      '<span class="select2-dropdown">' + +        '<span class="select2-results"></span>' + +      '</span>' +    ); + +    $dropdown.attr('dir', this.options.get('dir')); + +    this.$dropdown = $dropdown; + +    return $dropdown; +  }; + +  Dropdown.prototype.bind = function () { +    // Should be implemented in subclasses +  }; + +  Dropdown.prototype.position = function ($dropdown, $container) { +    // Should be implmented in subclasses +  }; + +  Dropdown.prototype.destroy = function () { +    // Remove the dropdown from the DOM +    this.$dropdown.remove(); +  }; + +  return Dropdown; +}); + +S2.define('select2/dropdown/search',[ +  'jquery', +  '../utils' +], function ($, Utils) { +  function Search () { } + +  Search.prototype.render = function (decorated) { +    var $rendered = decorated.call(this); + +    var $search = $( +      '<span class="select2-search select2-search--dropdown">' + +        '<input class="select2-search__field" type="search" tabindex="-1"' + +        ' autocomplete="off" autocorrect="off" autocapitalize="off"' + +        ' spellcheck="false" role="textbox" />' + +      '</span>' +    ); + +    this.$searchContainer = $search; +    this.$search = $search.find('input'); + +    $rendered.prepend($search); + +    return $rendered; +  }; + +  Search.prototype.bind = function (decorated, container, $container) { +    var self = this; + +    decorated.call(this, container, $container); + +    this.$search.on('keydown', function (evt) { +      self.trigger('keypress', evt); + +      self._keyUpPrevented = evt.isDefaultPrevented(); +    }); + +    // Workaround for browsers which do not support the `input` event +    // This will prevent double-triggering of events for browsers which support +    // both the `keyup` and `input` events. +    this.$search.on('input', function (evt) { +      // Unbind the duplicated `keyup` event +      $(this).off('keyup'); +    }); + +    this.$search.on('keyup input', function (evt) { +      self.handleSearch(evt); +    }); + +    container.on('open', function () { +      self.$search.attr('tabindex', 0); + +      self.$search.focus(); + +      window.setTimeout(function () { +        self.$search.focus(); +      }, 0); +    }); + +    container.on('close', function () { +      self.$search.attr('tabindex', -1); + +      self.$search.val(''); +    }); + +    container.on('focus', function () { +      if (container.isOpen()) { +        self.$search.focus(); +      } +    }); + +    container.on('results:all', function (params) { +      if (params.query.term == null || params.query.term === '') { +        var showSearch = self.showSearch(params); + +        if (showSearch) { +          self.$searchContainer.removeClass('select2-search--hide'); +        } else { +          self.$searchContainer.addClass('select2-search--hide'); +        } +      } +    }); +  }; + +  Search.prototype.handleSearch = function (evt) { +    if (!this._keyUpPrevented) { +      var input = this.$search.val(); + +      this.trigger('query', { +        term: input +      }); +    } + +    this._keyUpPrevented = false; +  }; + +  Search.prototype.showSearch = function (_, params) { +    return true; +  }; + +  return Search; +}); + +S2.define('select2/dropdown/hidePlaceholder',[ + +], function () { +  function HidePlaceholder (decorated, $element, options, dataAdapter) { +    this.placeholder = this.normalizePlaceholder(options.get('placeholder')); + +    decorated.call(this, $element, options, dataAdapter); +  } + +  HidePlaceholder.prototype.append = function (decorated, data) { +    data.results = this.removePlaceholder(data.results); + +    decorated.call(this, data); +  }; + +  HidePlaceholder.prototype.normalizePlaceholder = function (_, placeholder) { +    if (typeof placeholder === 'string') { +      placeholder = { +        id: '', +        text: placeholder +      }; +    } + +    return placeholder; +  }; + +  HidePlaceholder.prototype.removePlaceholder = function (_, data) { +    var modifiedData = data.slice(0); + +    for (var d = data.length - 1; d >= 0; d--) { +      var item = data[d]; + +      if (this.placeholder.id === item.id) { +        modifiedData.splice(d, 1); +      } +    } + +    return modifiedData; +  }; + +  return HidePlaceholder; +}); + +S2.define('select2/dropdown/infiniteScroll',[ +  'jquery' +], function ($) { +  function InfiniteScroll (decorated, $element, options, dataAdapter) { +    this.lastParams = {}; + +    decorated.call(this, $element, options, dataAdapter); + +    this.$loadingMore = this.createLoadingMore(); +    this.loading = false; +  } + +  InfiniteScroll.prototype.append = function (decorated, data) { +    this.$loadingMore.remove(); +    this.loading = false; + +    decorated.call(this, data); + +    if (this.showLoadingMore(data)) { +      this.$results.append(this.$loadingMore); +    } +  }; + +  InfiniteScroll.prototype.bind = function (decorated, container, $container) { +    var self = this; + +    decorated.call(this, container, $container); + +    container.on('query', function (params) { +      self.lastParams = params; +      self.loading = true; +    }); + +    container.on('query:append', function (params) { +      self.lastParams = params; +      self.loading = true; +    }); + +    this.$results.on('scroll', function () { +      var isLoadMoreVisible = $.contains( +        document.documentElement, +        self.$loadingMore[0] +      ); + +      if (self.loading || !isLoadMoreVisible) { +        return; +      } + +      var currentOffset = self.$results.offset().top + +        self.$results.outerHeight(false); +      var loadingMoreOffset = self.$loadingMore.offset().top + +        self.$loadingMore.outerHeight(false); + +      if (currentOffset + 50 >= loadingMoreOffset) { +        self.loadMore(); +      } +    }); +  }; + +  InfiniteScroll.prototype.loadMore = function () { +    this.loading = true; + +    var params = $.extend({}, {page: 1}, this.lastParams); + +    params.page++; + +    this.trigger('query:append', params); +  }; + +  InfiniteScroll.prototype.showLoadingMore = function (_, data) { +    return data.pagination && data.pagination.more; +  }; + +  InfiniteScroll.prototype.createLoadingMore = function () { +    var $option = $( +      '<li ' + +      'class="select2-results__option select2-results__option--load-more"' + +      'role="treeitem" aria-disabled="true"></li>' +    ); + +    var message = this.options.get('translations').get('loadingMore'); + +    $option.html(message(this.lastParams)); + +    return $option; +  }; + +  return InfiniteScroll; +}); + +S2.define('select2/dropdown/attachBody',[ +  'jquery', +  '../utils' +], function ($, Utils) { +  function AttachBody (decorated, $element, options) { +    this.$dropdownParent = options.get('dropdownParent') || $(document.body); + +    decorated.call(this, $element, options); +  } + +  AttachBody.prototype.bind = function (decorated, container, $container) { +    var self = this; + +    var setupResultsEvents = false; + +    decorated.call(this, container, $container); + +    container.on('open', function () { +      self._showDropdown(); +      self._attachPositioningHandler(container); + +      if (!setupResultsEvents) { +        setupResultsEvents = true; + +        container.on('results:all', function () { +          self._positionDropdown(); +          self._resizeDropdown(); +        }); + +        container.on('results:append', function () { +          self._positionDropdown(); +          self._resizeDropdown(); +        }); +      } +    }); + +    container.on('close', function () { +      self._hideDropdown(); +      self._detachPositioningHandler(container); +    }); + +    this.$dropdownContainer.on('mousedown', function (evt) { +      evt.stopPropagation(); +    }); +  }; + +  AttachBody.prototype.destroy = function (decorated) { +    decorated.call(this); + +    this.$dropdownContainer.remove(); +  }; + +  AttachBody.prototype.position = function (decorated, $dropdown, $container) { +    // Clone all of the container classes +    $dropdown.attr('class', $container.attr('class')); + +    $dropdown.removeClass('select2'); +    $dropdown.addClass('select2-container--open'); + +    $dropdown.css({ +      position: 'absolute', +      top: -999999 +    }); + +    this.$container = $container; +  }; + +  AttachBody.prototype.render = function (decorated) { +    var $container = $('<span></span>'); + +    var $dropdown = decorated.call(this); +    $container.append($dropdown); + +    this.$dropdownContainer = $container; + +    return $container; +  }; + +  AttachBody.prototype._hideDropdown = function (decorated) { +    this.$dropdownContainer.detach(); +  }; + +  AttachBody.prototype._attachPositioningHandler = +      function (decorated, container) { +    var self = this; + +    var scrollEvent = 'scroll.select2.' + container.id; +    var resizeEvent = 'resize.select2.' + container.id; +    var orientationEvent = 'orientationchange.select2.' + container.id; + +    var $watchers = this.$container.parents().filter(Utils.hasScroll); +    $watchers.each(function () { +      $(this).data('select2-scroll-position', { +        x: $(this).scrollLeft(), +        y: $(this).scrollTop() +      }); +    }); + +    $watchers.on(scrollEvent, function (ev) { +      var position = $(this).data('select2-scroll-position'); +      $(this).scrollTop(position.y); +    }); + +    $(window).on(scrollEvent + ' ' + resizeEvent + ' ' + orientationEvent, +      function (e) { +      self._positionDropdown(); +      self._resizeDropdown(); +    }); +  }; + +  AttachBody.prototype._detachPositioningHandler = +      function (decorated, container) { +    var scrollEvent = 'scroll.select2.' + container.id; +    var resizeEvent = 'resize.select2.' + container.id; +    var orientationEvent = 'orientationchange.select2.' + container.id; + +    var $watchers = this.$container.parents().filter(Utils.hasScroll); +    $watchers.off(scrollEvent); + +    $(window).off(scrollEvent + ' ' + resizeEvent + ' ' + orientationEvent); +  }; + +  AttachBody.prototype._positionDropdown = function () { +    var $window = $(window); + +    var isCurrentlyAbove = this.$dropdown.hasClass('select2-dropdown--above'); +    var isCurrentlyBelow = this.$dropdown.hasClass('select2-dropdown--below'); + +    var newDirection = null; + +    var offset = this.$container.offset(); + +    offset.bottom = offset.top + this.$container.outerHeight(false); + +    var container = { +      height: this.$container.outerHeight(false) +    }; + +    container.top = offset.top; +    container.bottom = offset.top + container.height; + +    var dropdown = { +      height: this.$dropdown.outerHeight(false) +    }; + +    var viewport = { +      top: $window.scrollTop(), +      bottom: $window.scrollTop() + $window.height() +    }; + +    var enoughRoomAbove = viewport.top < (offset.top - dropdown.height); +    var enoughRoomBelow = viewport.bottom > (offset.bottom + dropdown.height); + +    var css = { +      left: offset.left, +      top: container.bottom +    }; + +    // Determine what the parent element is to use for calciulating the offset +    var $offsetParent = this.$dropdownParent; + +    // For statically positoned elements, we need to get the element +    // that is determining the offset +    if ($offsetParent.css('position') === 'static') { +      $offsetParent = $offsetParent.offsetParent(); +    } + +    var parentOffset = $offsetParent.offset(); + +    css.top -= parentOffset.top; +    css.left -= parentOffset.left; + +    if (!isCurrentlyAbove && !isCurrentlyBelow) { +      newDirection = 'below'; +    } + +    if (!enoughRoomBelow && enoughRoomAbove && !isCurrentlyAbove) { +      newDirection = 'above'; +    } else if (!enoughRoomAbove && enoughRoomBelow && isCurrentlyAbove) { +      newDirection = 'below'; +    } + +    if (newDirection == 'above' || +      (isCurrentlyAbove && newDirection !== 'below')) { +      css.top = container.top - parentOffset.top - dropdown.height; +    } + +    if (newDirection != null) { +      this.$dropdown +        .removeClass('select2-dropdown--below select2-dropdown--above') +        .addClass('select2-dropdown--' + newDirection); +      this.$container +        .removeClass('select2-container--below select2-container--above') +        .addClass('select2-container--' + newDirection); +    } + +    this.$dropdownContainer.css(css); +  }; + +  AttachBody.prototype._resizeDropdown = function () { +    var css = { +      width: this.$container.outerWidth(false) + 'px' +    }; + +    if (this.options.get('dropdownAutoWidth')) { +      css.minWidth = css.width; +      css.position = 'relative'; +      css.width = 'auto'; +    } + +    this.$dropdown.css(css); +  }; + +  AttachBody.prototype._showDropdown = function (decorated) { +    this.$dropdownContainer.appendTo(this.$dropdownParent); + +    this._positionDropdown(); +    this._resizeDropdown(); +  }; + +  return AttachBody; +}); + +S2.define('select2/dropdown/minimumResultsForSearch',[ + +], function () { +  function countResults (data) { +    var count = 0; + +    for (var d = 0; d < data.length; d++) { +      var item = data[d]; + +      if (item.children) { +        count += countResults(item.children); +      } else { +        count++; +      } +    } + +    return count; +  } + +  function MinimumResultsForSearch (decorated, $element, options, dataAdapter) { +    this.minimumResultsForSearch = options.get('minimumResultsForSearch'); + +    if (this.minimumResultsForSearch < 0) { +      this.minimumResultsForSearch = Infinity; +    } + +    decorated.call(this, $element, options, dataAdapter); +  } + +  MinimumResultsForSearch.prototype.showSearch = function (decorated, params) { +    if (countResults(params.data.results) < this.minimumResultsForSearch) { +      return false; +    } + +    return decorated.call(this, params); +  }; + +  return MinimumResultsForSearch; +}); + +S2.define('select2/dropdown/selectOnClose',[ + +], function () { +  function SelectOnClose () { } + +  SelectOnClose.prototype.bind = function (decorated, container, $container) { +    var self = this; + +    decorated.call(this, container, $container); + +    container.on('close', function (params) { +      self._handleSelectOnClose(params); +    }); +  }; + +  SelectOnClose.prototype._handleSelectOnClose = function (_, params) { +    if (params && params.originalSelect2Event != null) { +      var event = params.originalSelect2Event; + +      // Don't select an item if the close event was triggered from a select or +      // unselect event +      if (event._type === 'select' || event._type === 'unselect') { +        return; +      } +    } + +    var $highlightedResults = this.getHighlightedResults(); + +    // Only select highlighted results +    if ($highlightedResults.length < 1) { +      return; +    } + +    var data = $highlightedResults.data('data'); + +    // Don't re-select already selected resulte +    if ( +      (data.element != null && data.element.selected) || +      (data.element == null && data.selected) +    ) { +      return; +    } + +    this.trigger('select', { +        data: data +    }); +  }; + +  return SelectOnClose; +}); + +S2.define('select2/dropdown/closeOnSelect',[ + +], function () { +  function CloseOnSelect () { } + +  CloseOnSelect.prototype.bind = function (decorated, container, $container) { +    var self = this; + +    decorated.call(this, container, $container); + +    container.on('select', function (evt) { +      self._selectTriggered(evt); +    }); + +    container.on('unselect', function (evt) { +      self._selectTriggered(evt); +    }); +  }; + +  CloseOnSelect.prototype._selectTriggered = function (_, evt) { +    var originalEvent = evt.originalEvent; + +    // Don't close if the control key is being held +    if (originalEvent && originalEvent.ctrlKey) { +      return; +    } + +    this.trigger('close', { +      originalEvent: originalEvent, +      originalSelect2Event: evt +    }); +  }; + +  return CloseOnSelect; +}); + +S2.define('select2/i18n/en',[],function () { +  // English +  return { +    errorLoading: function () { +      return 'The results could not be loaded.'; +    }, +    inputTooLong: function (args) { +      var overChars = args.input.length - args.maximum; + +      var message = 'Please delete ' + overChars + ' character'; + +      if (overChars != 1) { +        message += 's'; +      } + +      return message; +    }, +    inputTooShort: function (args) { +      var remainingChars = args.minimum - args.input.length; + +      var message = 'Please enter ' + remainingChars + ' or more characters'; + +      return message; +    }, +    loadingMore: function () { +      return 'Loading more results…'; +    }, +    maximumSelected: function (args) { +      var message = 'You can only select ' + args.maximum + ' item'; + +      if (args.maximum != 1) { +        message += 's'; +      } + +      return message; +    }, +    noResults: function () { +      return 'No results found'; +    }, +    searching: function () { +      return 'Searching…'; +    } +  }; +}); + +S2.define('select2/defaults',[ +  'jquery', +  'require', + +  './results', + +  './selection/single', +  './selection/multiple', +  './selection/placeholder', +  './selection/allowClear', +  './selection/search', +  './selection/eventRelay', + +  './utils', +  './translation', +  './diacritics', + +  './data/select', +  './data/array', +  './data/ajax', +  './data/tags', +  './data/tokenizer', +  './data/minimumInputLength', +  './data/maximumInputLength', +  './data/maximumSelectionLength', + +  './dropdown', +  './dropdown/search', +  './dropdown/hidePlaceholder', +  './dropdown/infiniteScroll', +  './dropdown/attachBody', +  './dropdown/minimumResultsForSearch', +  './dropdown/selectOnClose', +  './dropdown/closeOnSelect', + +  './i18n/en' +], function ($, require, + +             ResultsList, + +             SingleSelection, MultipleSelection, Placeholder, AllowClear, +             SelectionSearch, EventRelay, + +             Utils, Translation, DIACRITICS, + +             SelectData, ArrayData, AjaxData, Tags, Tokenizer, +             MinimumInputLength, MaximumInputLength, MaximumSelectionLength, + +             Dropdown, DropdownSearch, HidePlaceholder, InfiniteScroll, +             AttachBody, MinimumResultsForSearch, SelectOnClose, CloseOnSelect, + +             EnglishTranslation) { +  function Defaults () { +    this.reset(); +  } + +  Defaults.prototype.apply = function (options) { +    options = $.extend(true, {}, this.defaults, options); + +    if (options.dataAdapter == null) { +      if (options.ajax != null) { +        options.dataAdapter = AjaxData; +      } else if (options.data != null) { +        options.dataAdapter = ArrayData; +      } else { +        options.dataAdapter = SelectData; +      } + +      if (options.minimumInputLength > 0) { +        options.dataAdapter = Utils.Decorate( +          options.dataAdapter, +          MinimumInputLength +        ); +      } + +      if (options.maximumInputLength > 0) { +        options.dataAdapter = Utils.Decorate( +          options.dataAdapter, +          MaximumInputLength +        ); +      } + +      if (options.maximumSelectionLength > 0) { +        options.dataAdapter = Utils.Decorate( +          options.dataAdapter, +          MaximumSelectionLength +        ); +      } + +      if (options.tags) { +        options.dataAdapter = Utils.Decorate(options.dataAdapter, Tags); +      } + +      if (options.tokenSeparators != null || options.tokenizer != null) { +        options.dataAdapter = Utils.Decorate( +          options.dataAdapter, +          Tokenizer +        ); +      } + +      if (options.query != null) { +        var Query = require(options.amdBase + 'compat/query'); + +        options.dataAdapter = Utils.Decorate( +          options.dataAdapter, +          Query +        ); +      } + +      if (options.initSelection != null) { +        var InitSelection = require(options.amdBase + 'compat/initSelection'); + +        options.dataAdapter = Utils.Decorate( +          options.dataAdapter, +          InitSelection +        ); +      } +    } + +    if (options.resultsAdapter == null) { +      options.resultsAdapter = ResultsList; + +      if (options.ajax != null) { +        options.resultsAdapter = Utils.Decorate( +          options.resultsAdapter, +          InfiniteScroll +        ); +      } + +      if (options.placeholder != null) { +        options.resultsAdapter = Utils.Decorate( +          options.resultsAdapter, +          HidePlaceholder +        ); +      } + +      if (options.selectOnClose) { +        options.resultsAdapter = Utils.Decorate( +          options.resultsAdapter, +          SelectOnClose +        ); +      } +    } + +    if (options.dropdownAdapter == null) { +      if (options.multiple) { +        options.dropdownAdapter = Dropdown; +      } else { +        var SearchableDropdown = Utils.Decorate(Dropdown, DropdownSearch); + +        options.dropdownAdapter = SearchableDropdown; +      } + +      if (options.minimumResultsForSearch !== 0) { +        options.dropdownAdapter = Utils.Decorate( +          options.dropdownAdapter, +          MinimumResultsForSearch +        ); +      } + +      if (options.closeOnSelect) { +        options.dropdownAdapter = Utils.Decorate( +          options.dropdownAdapter, +          CloseOnSelect +        ); +      } + +      if ( +        options.dropdownCssClass != null || +        options.dropdownCss != null || +        options.adaptDropdownCssClass != null +      ) { +        var DropdownCSS = require(options.amdBase + 'compat/dropdownCss'); + +        options.dropdownAdapter = Utils.Decorate( +          options.dropdownAdapter, +          DropdownCSS +        ); +      } + +      options.dropdownAdapter = Utils.Decorate( +        options.dropdownAdapter, +        AttachBody +      ); +    } + +    if (options.selectionAdapter == null) { +      if (options.multiple) { +        options.selectionAdapter = MultipleSelection; +      } else { +        options.selectionAdapter = SingleSelection; +      } + +      // Add the placeholder mixin if a placeholder was specified +      if (options.placeholder != null) { +        options.selectionAdapter = Utils.Decorate( +          options.selectionAdapter, +          Placeholder +        ); +      } + +      if (options.allowClear) { +        options.selectionAdapter = Utils.Decorate( +          options.selectionAdapter, +          AllowClear +        ); +      } + +      if (options.multiple) { +        options.selectionAdapter = Utils.Decorate( +          options.selectionAdapter, +          SelectionSearch +        ); +      } + +      if ( +        options.containerCssClass != null || +        options.containerCss != null || +        options.adaptContainerCssClass != null +      ) { +        var ContainerCSS = require(options.amdBase + 'compat/containerCss'); + +        options.selectionAdapter = Utils.Decorate( +          options.selectionAdapter, +          ContainerCSS +        ); +      } + +      options.selectionAdapter = Utils.Decorate( +        options.selectionAdapter, +        EventRelay +      ); +    } + +    if (typeof options.language === 'string') { +      // Check if the language is specified with a region +      if (options.language.indexOf('-') > 0) { +        // Extract the region information if it is included +        var languageParts = options.language.split('-'); +        var baseLanguage = languageParts[0]; + +        options.language = [options.language, baseLanguage]; +      } else { +        options.language = [options.language]; +      } +    } + +    if ($.isArray(options.language)) { +      var languages = new Translation(); +      options.language.push('en'); + +      var languageNames = options.language; + +      for (var l = 0; l < languageNames.length; l++) { +        var name = languageNames[l]; +        var language = {}; + +        try { +          // Try to load it with the original name +          language = Translation.loadPath(name); +        } catch (e) { +          try { +            // If we couldn't load it, check if it wasn't the full path +            name = this.defaults.amdLanguageBase + name; +            language = Translation.loadPath(name); +          } catch (ex) { +            // The translation could not be loaded at all. Sometimes this is +            // because of a configuration problem, other times this can be +            // because of how Select2 helps load all possible translation files. +            if (options.debug && window.console && console.warn) { +              console.warn( +                'Select2: The language file for "' + name + '" could not be ' + +                'automatically loaded. A fallback will be used instead.' +              ); +            } + +            continue; +          } +        } + +        languages.extend(language); +      } + +      options.translations = languages; +    } else { +      var baseTranslation = Translation.loadPath( +        this.defaults.amdLanguageBase + 'en' +      ); +      var customTranslation = new Translation(options.language); + +      customTranslation.extend(baseTranslation); + +      options.translations = customTranslation; +    } + +    return options; +  }; + +  Defaults.prototype.reset = function () { +    function stripDiacritics (text) { +      // Used 'uni range + named function' from http://jsperf.com/diacritics/18 +      function match(a) { +        return DIACRITICS[a] || a; +      } + +      return text.replace(/[^\u0000-\u007E]/g, match); +    } + +    function matcher (params, data) { +      // Always return the object if there is nothing to compare +      if ($.trim(params.term) === '') { +        return data; +      } + +      // Do a recursive check for options with children +      if (data.children && data.children.length > 0) { +        // Clone the data object if there are children +        // This is required as we modify the object to remove any non-matches +        var match = $.extend(true, {}, data); + +        // Check each child of the option +        for (var c = data.children.length - 1; c >= 0; c--) { +          var child = data.children[c]; + +          var matches = matcher(params, child); + +          // If there wasn't a match, remove the object in the array +          if (matches == null) { +            match.children.splice(c, 1); +          } +        } + +        // If any children matched, return the new object +        if (match.children.length > 0) { +          return match; +        } + +        // If there were no matching children, check just the plain object +        return matcher(params, match); +      } + +      var original = stripDiacritics(data.text).toUpperCase(); +      var term = stripDiacritics(params.term).toUpperCase(); + +      // Check if the text contains the term +      if (original.indexOf(term) > -1) { +        return data; +      } + +      // If it doesn't contain the term, don't return anything +      return null; +    } + +    this.defaults = { +      amdBase: './', +      amdLanguageBase: './i18n/', +      closeOnSelect: true, +      debug: false, +      dropdownAutoWidth: false, +      escapeMarkup: Utils.escapeMarkup, +      language: EnglishTranslation, +      matcher: matcher, +      minimumInputLength: 0, +      maximumInputLength: 0, +      maximumSelectionLength: 0, +      minimumResultsForSearch: 0, +      selectOnClose: false, +      sorter: function (data) { +        return data; +      }, +      templateResult: function (result) { +        return result.text; +      }, +      templateSelection: function (selection) { +        return selection.text; +      }, +      theme: 'default', +      width: 'resolve' +    }; +  }; + +  Defaults.prototype.set = function (key, value) { +    var camelKey = $.camelCase(key); + +    var data = {}; +    data[camelKey] = value; + +    var convertedData = Utils._convertData(data); + +    $.extend(this.defaults, convertedData); +  }; + +  var defaults = new Defaults(); + +  return defaults; +}); + +S2.define('select2/options',[ +  'require', +  'jquery', +  './defaults', +  './utils' +], function (require, $, Defaults, Utils) { +  function Options (options, $element) { +    this.options = options; + +    if ($element != null) { +      this.fromElement($element); +    } + +    this.options = Defaults.apply(this.options); + +    if ($element && $element.is('input')) { +      var InputCompat = require(this.get('amdBase') + 'compat/inputData'); + +      this.options.dataAdapter = Utils.Decorate( +        this.options.dataAdapter, +        InputCompat +      ); +    } +  } + +  Options.prototype.fromElement = function ($e) { +    var excludedData = ['select2']; + +    if (this.options.multiple == null) { +      this.options.multiple = $e.prop('multiple'); +    } + +    if (this.options.disabled == null) { +      this.options.disabled = $e.prop('disabled'); +    } + +    if (this.options.language == null) { +      if ($e.prop('lang')) { +        this.options.language = $e.prop('lang').toLowerCase(); +      } else if ($e.closest('[lang]').prop('lang')) { +        this.options.language = $e.closest('[lang]').prop('lang'); +      } +    } + +    if (this.options.dir == null) { +      if ($e.prop('dir')) { +        this.options.dir = $e.prop('dir'); +      } else if ($e.closest('[dir]').prop('dir')) { +        this.options.dir = $e.closest('[dir]').prop('dir'); +      } else { +        this.options.dir = 'ltr'; +      } +    } + +    $e.prop('disabled', this.options.disabled); +    $e.prop('multiple', this.options.multiple); + +    if ($e.data('select2Tags')) { +      if (this.options.debug && window.console && console.warn) { +        console.warn( +          'Select2: The `data-select2-tags` attribute has been changed to ' + +          'use the `data-data` and `data-tags="true"` attributes and will be ' + +          'removed in future versions of Select2.' +        ); +      } + +      $e.data('data', $e.data('select2Tags')); +      $e.data('tags', true); +    } + +    if ($e.data('ajaxUrl')) { +      if (this.options.debug && window.console && console.warn) { +        console.warn( +          'Select2: The `data-ajax-url` attribute has been changed to ' + +          '`data-ajax--url` and support for the old attribute will be removed' + +          ' in future versions of Select2.' +        ); +      } + +      $e.attr('ajax--url', $e.data('ajaxUrl')); +      $e.data('ajax--url', $e.data('ajaxUrl')); +    } + +    var dataset = {}; + +    // Prefer the element's `dataset` attribute if it exists +    // jQuery 1.x does not correctly handle data attributes with multiple dashes +    if ($.fn.jquery && $.fn.jquery.substr(0, 2) == '1.' && $e[0].dataset) { +      dataset = $.extend(true, {}, $e[0].dataset, $e.data()); +    } else { +      dataset = $e.data(); +    } + +    var data = $.extend(true, {}, dataset); + +    data = Utils._convertData(data); + +    for (var key in data) { +      if ($.inArray(key, excludedData) > -1) { +        continue; +      } + +      if ($.isPlainObject(this.options[key])) { +        $.extend(this.options[key], data[key]); +      } else { +        this.options[key] = data[key]; +      } +    } + +    return this; +  }; + +  Options.prototype.get = function (key) { +    return this.options[key]; +  }; + +  Options.prototype.set = function (key, val) { +    this.options[key] = val; +  }; + +  return Options; +}); + +S2.define('select2/core',[ +  'jquery', +  './options', +  './utils', +  './keys' +], function ($, Options, Utils, KEYS) { +  var Select2 = function ($element, options) { +    if ($element.data('select2') != null) { +      $element.data('select2').destroy(); +    } + +    this.$element = $element; + +    this.id = this._generateId($element); + +    options = options || {}; + +    this.options = new Options(options, $element); + +    Select2.__super__.constructor.call(this); + +    // Set up the tabindex + +    var tabindex = $element.attr('tabindex') || 0; +    $element.data('old-tabindex', tabindex); +    $element.attr('tabindex', '-1'); + +    // Set up containers and adapters + +    var DataAdapter = this.options.get('dataAdapter'); +    this.dataAdapter = new DataAdapter($element, this.options); + +    var $container = this.render(); + +    this._placeContainer($container); + +    var SelectionAdapter = this.options.get('selectionAdapter'); +    this.selection = new SelectionAdapter($element, this.options); +    this.$selection = this.selection.render(); + +    this.selection.position(this.$selection, $container); + +    var DropdownAdapter = this.options.get('dropdownAdapter'); +    this.dropdown = new DropdownAdapter($element, this.options); +    this.$dropdown = this.dropdown.render(); + +    this.dropdown.position(this.$dropdown, $container); + +    var ResultsAdapter = this.options.get('resultsAdapter'); +    this.results = new ResultsAdapter($element, this.options, this.dataAdapter); +    this.$results = this.results.render(); + +    this.results.position(this.$results, this.$dropdown); + +    // Bind events + +    var self = this; + +    // Bind the container to all of the adapters +    this._bindAdapters(); + +    // Register any DOM event handlers +    this._registerDomEvents(); + +    // Register any internal event handlers +    this._registerDataEvents(); +    this._registerSelectionEvents(); +    this._registerDropdownEvents(); +    this._registerResultsEvents(); +    this._registerEvents(); + +    // Set the initial state +    this.dataAdapter.current(function (initialData) { +      self.trigger('selection:update', { +        data: initialData +      }); +    }); + +    // Hide the original select +    $element.addClass('select2-hidden-accessible'); +    $element.attr('aria-hidden', 'true'); + +    // Synchronize any monitored attributes +    this._syncAttributes(); + +    $element.data('select2', this); +  }; + +  Utils.Extend(Select2, Utils.Observable); + +  Select2.prototype._generateId = function ($element) { +    var id = ''; + +    if ($element.attr('id') != null) { +      id = $element.attr('id'); +    } else if ($element.attr('name') != null) { +      id = $element.attr('name') + '-' + Utils.generateChars(2); +    } else { +      id = Utils.generateChars(4); +    } + +    id = id.replace(/(:|\.|\[|\]|,)/g, ''); +    id = 'select2-' + id; + +    return id; +  }; + +  Select2.prototype._placeContainer = function ($container) { +    $container.insertAfter(this.$element); + +    var width = this._resolveWidth(this.$element, this.options.get('width')); + +    if (width != null) { +      $container.css('width', width); +    } +  }; + +  Select2.prototype._resolveWidth = function ($element, method) { +    var WIDTH = /^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i; + +    if (method == 'resolve') { +      var styleWidth = this._resolveWidth($element, 'style'); + +      if (styleWidth != null) { +        return styleWidth; +      } + +      return this._resolveWidth($element, 'element'); +    } + +    if (method == 'element') { +      var elementWidth = $element.outerWidth(false); + +      if (elementWidth <= 0) { +        return 'auto'; +      } + +      return elementWidth + 'px'; +    } + +    if (method == 'style') { +      var style = $element.attr('style'); + +      if (typeof(style) !== 'string') { +        return null; +      } + +      var attrs = style.split(';'); + +      for (var i = 0, l = attrs.length; i < l; i = i + 1) { +        var attr = attrs[i].replace(/\s/g, ''); +        var matches = attr.match(WIDTH); + +        if (matches !== null && matches.length >= 1) { +          return matches[1]; +        } +      } + +      return null; +    } + +    return method; +  }; + +  Select2.prototype._bindAdapters = function () { +    this.dataAdapter.bind(this, this.$container); +    this.selection.bind(this, this.$container); + +    this.dropdown.bind(this, this.$container); +    this.results.bind(this, this.$container); +  }; + +  Select2.prototype._registerDomEvents = function () { +    var self = this; + +    this.$element.on('change.select2', function () { +      self.dataAdapter.current(function (data) { +        self.trigger('selection:update', { +          data: data +        }); +      }); +    }); + +    this.$element.on('focus.select2', function (evt) { +      self.trigger('focus', evt); +    }); + +    this._syncA = Utils.bind(this._syncAttributes, this); +    this._syncS = Utils.bind(this._syncSubtree, this); + +    if (this.$element[0].attachEvent) { +      this.$element[0].attachEvent('onpropertychange', this._syncA); +    } + +    var observer = window.MutationObserver || +      window.WebKitMutationObserver || +      window.MozMutationObserver +    ; + +    if (observer != null) { +      this._observer = new observer(function (mutations) { +        $.each(mutations, self._syncA); +        $.each(mutations, self._syncS); +      }); +      this._observer.observe(this.$element[0], { +        attributes: true, +        childList: true, +        subtree: false +      }); +    } else if (this.$element[0].addEventListener) { +      this.$element[0].addEventListener( +        'DOMAttrModified', +        self._syncA, +        false +      ); +      this.$element[0].addEventListener( +        'DOMNodeInserted', +        self._syncS, +        false +      ); +      this.$element[0].addEventListener( +        'DOMNodeRemoved', +        self._syncS, +        false +      ); +    } +  }; + +  Select2.prototype._registerDataEvents = function () { +    var self = this; + +    this.dataAdapter.on('*', function (name, params) { +      self.trigger(name, params); +    }); +  }; + +  Select2.prototype._registerSelectionEvents = function () { +    var self = this; +    var nonRelayEvents = ['toggle', 'focus']; + +    this.selection.on('toggle', function () { +      self.toggleDropdown(); +    }); + +    this.selection.on('focus', function (params) { +      self.focus(params); +    }); + +    this.selection.on('*', function (name, params) { +      if ($.inArray(name, nonRelayEvents) !== -1) { +        return; +      } + +      self.trigger(name, params); +    }); +  }; + +  Select2.prototype._registerDropdownEvents = function () { +    var self = this; + +    this.dropdown.on('*', function (name, params) { +      self.trigger(name, params); +    }); +  }; + +  Select2.prototype._registerResultsEvents = function () { +    var self = this; + +    this.results.on('*', function (name, params) { +      self.trigger(name, params); +    }); +  }; + +  Select2.prototype._registerEvents = function () { +    var self = this; + +    this.on('open', function () { +      self.$container.addClass('select2-container--open'); +    }); + +    this.on('close', function () { +      self.$container.removeClass('select2-container--open'); +    }); + +    this.on('enable', function () { +      self.$container.removeClass('select2-container--disabled'); +    }); + +    this.on('disable', function () { +      self.$container.addClass('select2-container--disabled'); +    }); + +    this.on('blur', function () { +      self.$container.removeClass('select2-container--focus'); +    }); + +    this.on('query', function (params) { +      if (!self.isOpen()) { +        self.trigger('open', {}); +      } + +      this.dataAdapter.query(params, function (data) { +        self.trigger('results:all', { +          data: data, +          query: params +        }); +      }); +    }); + +    this.on('query:append', function (params) { +      this.dataAdapter.query(params, function (data) { +        self.trigger('results:append', { +          data: data, +          query: params +        }); +      }); +    }); + +    this.on('keypress', function (evt) { +      var key = evt.which; + +      if (self.isOpen()) { +        if (key === KEYS.ESC || key === KEYS.TAB || +            (key === KEYS.UP && evt.altKey)) { +          self.close(); + +          evt.preventDefault(); +        } else if (key === KEYS.ENTER) { +          self.trigger('results:select', {}); + +          evt.preventDefault(); +        } else if ((key === KEYS.SPACE && evt.ctrlKey)) { +          self.trigger('results:toggle', {}); + +          evt.preventDefault(); +        } else if (key === KEYS.UP) { +          self.trigger('results:previous', {}); + +          evt.preventDefault(); +        } else if (key === KEYS.DOWN) { +          self.trigger('results:next', {}); + +          evt.preventDefault(); +        } +      } else { +        if (key === KEYS.ENTER || key === KEYS.SPACE || +            (key === KEYS.DOWN && evt.altKey)) { +          self.open(); + +          evt.preventDefault(); +        } +      } +    }); +  }; + +  Select2.prototype._syncAttributes = function () { +    this.options.set('disabled', this.$element.prop('disabled')); + +    if (this.options.get('disabled')) { +      if (this.isOpen()) { +        this.close(); +      } + +      this.trigger('disable', {}); +    } else { +      this.trigger('enable', {}); +    } +  }; + +  Select2.prototype._syncSubtree = function (evt, mutations) { +    var changed = false; +    var self = this; + +    // Ignore any mutation events raised for elements that aren't options or +    // optgroups. This handles the case when the select element is destroyed +    if ( +      evt && evt.target && ( +        evt.target.nodeName !== 'OPTION' && evt.target.nodeName !== 'OPTGROUP' +      ) +    ) { +      return; +    } + +    if (!mutations) { +      // If mutation events aren't supported, then we can only assume that the +      // change affected the selections +      changed = true; +    } else if (mutations.addedNodes && mutations.addedNodes.length > 0) { +      for (var n = 0; n < mutations.addedNodes.length; n++) { +        var node = mutations.addedNodes[n]; + +        if (node.selected) { +          changed = true; +        } +      } +    } else if (mutations.removedNodes && mutations.removedNodes.length > 0) { +      changed = true; +    } + +    // Only re-pull the data if we think there is a change +    if (changed) { +      this.dataAdapter.current(function (currentData) { +        self.trigger('selection:update', { +          data: currentData +        }); +      }); +    } +  }; + +  /** +   * Override the trigger method to automatically trigger pre-events when +   * there are events that can be prevented. +   */ +  Select2.prototype.trigger = function (name, args) { +    var actualTrigger = Select2.__super__.trigger; +    var preTriggerMap = { +      'open': 'opening', +      'close': 'closing', +      'select': 'selecting', +      'unselect': 'unselecting' +    }; + +    if (args === undefined) { +      args = {}; +    } + +    if (name in preTriggerMap) { +      var preTriggerName = preTriggerMap[name]; +      var preTriggerArgs = { +        prevented: false, +        name: name, +        args: args +      }; + +      actualTrigger.call(this, preTriggerName, preTriggerArgs); + +      if (preTriggerArgs.prevented) { +        args.prevented = true; + +        return; +      } +    } + +    actualTrigger.call(this, name, args); +  }; + +  Select2.prototype.toggleDropdown = function () { +    if (this.options.get('disabled')) { +      return; +    } + +    if (this.isOpen()) { +      this.close(); +    } else { +      this.open(); +    } +  }; + +  Select2.prototype.open = function () { +    if (this.isOpen()) { +      return; +    } + +    this.trigger('query', {}); +  }; + +  Select2.prototype.close = function () { +    if (!this.isOpen()) { +      return; +    } + +    this.trigger('close', {}); +  }; + +  Select2.prototype.isOpen = function () { +    return this.$container.hasClass('select2-container--open'); +  }; + +  Select2.prototype.hasFocus = function () { +    return this.$container.hasClass('select2-container--focus'); +  }; + +  Select2.prototype.focus = function (data) { +    // No need to re-trigger focus events if we are already focused +    if (this.hasFocus()) { +      return; +    } + +    this.$container.addClass('select2-container--focus'); +    this.trigger('focus', {}); +  }; + +  Select2.prototype.enable = function (args) { +    if (this.options.get('debug') && window.console && console.warn) { +      console.warn( +        'Select2: The `select2("enable")` method has been deprecated and will' + +        ' be removed in later Select2 versions. Use $element.prop("disabled")' + +        ' instead.' +      ); +    } + +    if (args == null || args.length === 0) { +      args = [true]; +    } + +    var disabled = !args[0]; + +    this.$element.prop('disabled', disabled); +  }; + +  Select2.prototype.data = function () { +    if (this.options.get('debug') && +        arguments.length > 0 && window.console && console.warn) { +      console.warn( +        'Select2: Data can no longer be set using `select2("data")`. You ' + +        'should consider setting the value instead using `$element.val()`.' +      ); +    } + +    var data = []; + +    this.dataAdapter.current(function (currentData) { +      data = currentData; +    }); + +    return data; +  }; + +  Select2.prototype.val = function (args) { +    if (this.options.get('debug') && window.console && console.warn) { +      console.warn( +        'Select2: The `select2("val")` method has been deprecated and will be' + +        ' removed in later Select2 versions. Use $element.val() instead.' +      ); +    } + +    if (args == null || args.length === 0) { +      return this.$element.val(); +    } + +    var newVal = args[0]; + +    if ($.isArray(newVal)) { +      newVal = $.map(newVal, function (obj) { +        return obj.toString(); +      }); +    } + +    this.$element.val(newVal).trigger('change'); +  }; + +  Select2.prototype.destroy = function () { +    this.$container.remove(); + +    if (this.$element[0].detachEvent) { +      this.$element[0].detachEvent('onpropertychange', this._syncA); +    } + +    if (this._observer != null) { +      this._observer.disconnect(); +      this._observer = null; +    } else if (this.$element[0].removeEventListener) { +      this.$element[0] +        .removeEventListener('DOMAttrModified', this._syncA, false); +      this.$element[0] +        .removeEventListener('DOMNodeInserted', this._syncS, false); +      this.$element[0] +        .removeEventListener('DOMNodeRemoved', this._syncS, false); +    } + +    this._syncA = null; +    this._syncS = null; + +    this.$element.off('.select2'); +    this.$element.attr('tabindex', this.$element.data('old-tabindex')); + +    this.$element.removeClass('select2-hidden-accessible'); +    this.$element.attr('aria-hidden', 'false'); +    this.$element.removeData('select2'); + +    this.dataAdapter.destroy(); +    this.selection.destroy(); +    this.dropdown.destroy(); +    this.results.destroy(); + +    this.dataAdapter = null; +    this.selection = null; +    this.dropdown = null; +    this.results = null; +  }; + +  Select2.prototype.render = function () { +    var $container = $( +      '<span class="select2 select2-container">' + +        '<span class="selection"></span>' + +        '<span class="dropdown-wrapper" aria-hidden="true"></span>' + +      '</span>' +    ); + +    $container.attr('dir', this.options.get('dir')); + +    this.$container = $container; + +    this.$container.addClass('select2-container--' + this.options.get('theme')); + +    $container.data('element', this.$element); + +    return $container; +  }; + +  return Select2; +}); + +S2.define('jquery-mousewheel',[ +  'jquery' +], function ($) { +  // Used to shim jQuery.mousewheel for non-full builds. +  return $; +}); + +S2.define('jquery.select2',[ +  'jquery', +  'jquery-mousewheel', + +  './select2/core', +  './select2/defaults' +], function ($, _, Select2, Defaults) { +  if ($.fn.select2 == null) { +    // All methods that should return the element +    var thisMethods = ['open', 'close', 'destroy']; + +    $.fn.select2 = function (options) { +      options = options || {}; + +      if (typeof options === 'object') { +        this.each(function () { +          var instanceOptions = $.extend(true, {}, options); + +          var instance = new Select2($(this), instanceOptions); +        }); + +        return this; +      } else if (typeof options === 'string') { +        var ret; +        var args = Array.prototype.slice.call(arguments, 1); + +        this.each(function () { +          var instance = $(this).data('select2'); + +          if (instance == null && window.console && console.error) { +            console.error( +              'The select2(\'' + options + '\') method was called on an ' + +              'element that is not using Select2.' +            ); +          } + +          ret = instance[options].apply(instance, args); +        }); + +        // Check if we should be returning `this` +        if ($.inArray(options, thisMethods) > -1) { +          return this; +        } + +        return ret; +      } else { +        throw new Error('Invalid arguments for Select2: ' + options); +      } +    }; +  } + +  if ($.fn.select2.defaults == null) { +    $.fn.select2.defaults = Defaults; +  } + +  return Select2; +}); + +  // Return the AMD loader configuration so it can be used outside of this file +  return { +    define: S2.define, +    require: S2.require +  }; +}()); + +  // Autoload the jQuery bindings +  // We know that all of the modules exist above this, so we're safe +  var select2 = S2.require('jquery.select2'); + +  // Hold the AMD module references on the jQuery function that was just loaded +  // This allows Select2 to use the internal loader outside of this file, such +  // as in the language files. +  jQuery.fn.select2.amd = S2; + +  // Return the Select2 instance for anyone who is importing it. +  return select2; +})); diff --git a/ishtar_common/static/select2/js/select2.min.js b/ishtar_common/static/select2/js/select2.min.js index b56419e2e..43f0a651e 100644 --- a/ishtar_common/static/select2/js/select2.min.js +++ b/ishtar_common/static/select2/js/select2.min.js @@ -1,23 +1,3 @@ -/* -Copyright 2014 Igor Vaynberg - -Version: 3.5.2 Timestamp: Sat Nov  1 14:43:36 EDT 2014 - -This software is licensed under the Apache License, Version 2.0 (the "Apache License") or the GNU -General Public License version 2 (the "GPL License"). You may choose either license to govern your -use of this software only upon the condition that you accept all of the terms of either the Apache -License or the GPL License. - -You may obtain a copy of the Apache License and the GPL License at: - -http://www.apache.org/licenses/LICENSE-2.0 -http://www.gnu.org/licenses/gpl-2.0.html - -Unless required by applicable law or agreed to in writing, software distributed under the Apache License -or the GPL Licesnse is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, -either express or implied. See the Apache License and the GPL License for the specific language governing -permissions and limitations under the Apache License and the GPL License. -*/ -!function(a){"undefined"==typeof a.fn.each2&&a.extend(a.fn,{each2:function(b){for(var c=a([0]),d=-1,e=this.length;++d<e&&(c.context=c[0]=this[d])&&b.call(c[0],d,c)!==!1;);return this}})}(jQuery),function(a,b){"use strict";function n(b){var c=a(document.createTextNode(""));b.before(c),c.before(b),c.remove()}function o(a){function b(a){return m[a]||a}return a.replace(/[^\u0000-\u007E]/g,b)}function p(a,b){for(var c=0,d=b.length;d>c;c+=1)if(r(a,b[c]))return c;return-1}function q(){var b=a(l);b.appendTo(document.body);var c={width:b.width()-b[0].clientWidth,height:b.height()-b[0].clientHeight};return b.remove(),c}function r(a,c){return a===c?!0:a===b||c===b?!1:null===a||null===c?!1:a.constructor===String?a+""==c+"":c.constructor===String?c+""==a+"":!1}function s(a,b,c){var d,e,f;if(null===a||a.length<1)return[];for(d=a.split(b),e=0,f=d.length;f>e;e+=1)d[e]=c(d[e]);return d}function t(a){return a.outerWidth(!1)-a.width()}function u(c){var d="keyup-change-value";c.on("keydown",function(){a.data(c,d)===b&&a.data(c,d,c.val())}),c.on("keyup",function(){var e=a.data(c,d);e!==b&&c.val()!==e&&(a.removeData(c,d),c.trigger("keyup-change"))})}function v(c){c.on("mousemove",function(c){var d=h;(d===b||d.x!==c.pageX||d.y!==c.pageY)&&a(c.target).trigger("mousemove-filtered",c)})}function w(a,c,d){d=d||b;var e;return function(){var b=arguments;window.clearTimeout(e),e=window.setTimeout(function(){c.apply(d,b)},a)}}function x(a,b){var c=w(a,function(a){b.trigger("scroll-debounced",a)});b.on("scroll",function(a){p(a.target,b.get())>=0&&c(a)})}function y(a){a[0]!==document.activeElement&&window.setTimeout(function(){var d,b=a[0],c=a.val().length;a.focus();var e=b.offsetWidth>0||b.offsetHeight>0;e&&b===document.activeElement&&(b.setSelectionRange?b.setSelectionRange(c,c):b.createTextRange&&(d=b.createTextRange(),d.collapse(!1),d.select()))},0)}function z(b){b=a(b)[0];var c=0,d=0;if("selectionStart"in b)c=b.selectionStart,d=b.selectionEnd-c;else if("selection"in document){b.focus();var e=document.selection.createRange();d=document.selection.createRange().text.length,e.moveStart("character",-b.value.length),c=e.text.length-d}return{offset:c,length:d}}function A(a){a.preventDefault(),a.stopPropagation()}function B(a){a.preventDefault(),a.stopImmediatePropagation()}function C(b){if(!g){var c=b[0].currentStyle||window.getComputedStyle(b[0],null);g=a(document.createElement("div")).css({position:"absolute",left:"-10000px",top:"-10000px",display:"none",fontSize:c.fontSize,fontFamily:c.fontFamily,fontStyle:c.fontStyle,fontWeight:c.fontWeight,letterSpacing:c.letterSpacing,textTransform:c.textTransform,whiteSpace:"nowrap"}),g.attr("class","select2-sizer"),a(document.body).append(g)}return g.text(b.val()),g.width()}function D(b,c,d){var e,g,f=[];e=a.trim(b.attr("class")),e&&(e=""+e,a(e.split(/\s+/)).each2(function(){0===this.indexOf("select2-")&&f.push(this)})),e=a.trim(c.attr("class")),e&&(e=""+e,a(e.split(/\s+/)).each2(function(){0!==this.indexOf("select2-")&&(g=d(this),g&&f.push(g))})),b.attr("class",f.join(" "))}function E(a,b,c,d){var e=o(a.toUpperCase()).indexOf(o(b.toUpperCase())),f=b.length;return 0>e?(c.push(d(a)),void 0):(c.push(d(a.substring(0,e))),c.push("<span class='select2-match'>"),c.push(d(a.substring(e,e+f))),c.push("</span>"),c.push(d(a.substring(e+f,a.length))),void 0)}function F(a){var b={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return String(a).replace(/[&<>"'\/\\]/g,function(a){return b[a]})}function G(c){var d,e=null,f=c.quietMillis||100,g=c.url,h=this;return function(i){window.clearTimeout(d),d=window.setTimeout(function(){var d=c.data,f=g,j=c.transport||a.fn.select2.ajaxDefaults.transport,k={type:c.type||"GET",cache:c.cache||!1,jsonpCallback:c.jsonpCallback||b,dataType:c.dataType||"json"},l=a.extend({},a.fn.select2.ajaxDefaults.params,k);d=d?d.call(h,i.term,i.page,i.context):null,f="function"==typeof f?f.call(h,i.term,i.page,i.context):f,e&&"function"==typeof e.abort&&e.abort(),c.params&&(a.isFunction(c.params)?a.extend(l,c.params.call(h)):a.extend(l,c.params)),a.extend(l,{url:f,dataType:c.dataType,data:d,success:function(a){var b=c.results(a,i.page,i);i.callback(b)},error:function(a,b,c){var d={hasError:!0,jqXHR:a,textStatus:b,errorThrown:c};i.callback(d)}}),e=j.call(h,l)},f)}}function H(b){var d,e,c=b,f=function(a){return""+a.text};a.isArray(c)&&(e=c,c={results:e}),a.isFunction(c)===!1&&(e=c,c=function(){return e});var g=c();return g.text&&(f=g.text,a.isFunction(f)||(d=g.text,f=function(a){return a[d]})),function(b){var g,d=b.term,e={results:[]};return""===d?(b.callback(c()),void 0):(g=function(c,e){var h,i;if(c=c[0],c.children){h={};for(i in c)c.hasOwnProperty(i)&&(h[i]=c[i]);h.children=[],a(c.children).each2(function(a,b){g(b,h.children)}),(h.children.length||b.matcher(d,f(h),c))&&e.push(h)}else b.matcher(d,f(c),c)&&e.push(c)},a(c().results).each2(function(a,b){g(b,e.results)}),b.callback(e),void 0)}}function I(c){var d=a.isFunction(c);return function(e){var f=e.term,g={results:[]},h=d?c(e):c;a.isArray(h)&&(a(h).each(function(){var a=this.text!==b,c=a?this.text:this;(""===f||e.matcher(f,c))&&g.results.push(a?this:{id:this,text:this})}),e.callback(g))}}function J(b,c){if(a.isFunction(b))return!0;if(!b)return!1;if("string"==typeof b)return!0;throw new Error(c+" must be a string, function, or falsy value")}function K(b,c){if(a.isFunction(b)){var d=Array.prototype.slice.call(arguments,2);return b.apply(c,d)}return b}function L(b){var c=0;return a.each(b,function(a,b){b.children?c+=L(b.children):c++}),c}function M(a,c,d,e){var h,i,j,k,l,f=a,g=!1;if(!e.createSearchChoice||!e.tokenSeparators||e.tokenSeparators.length<1)return b;for(;;){for(i=-1,j=0,k=e.tokenSeparators.length;k>j&&(l=e.tokenSeparators[j],i=a.indexOf(l),!(i>=0));j++);if(0>i)break;if(h=a.substring(0,i),a=a.substring(i+l.length),h.length>0&&(h=e.createSearchChoice.call(this,h,c),h!==b&&null!==h&&e.id(h)!==b&&null!==e.id(h))){for(g=!1,j=0,k=c.length;k>j;j++)if(r(e.id(h),e.id(c[j]))){g=!0;break}g||d(h)}}return f!==a?a:void 0}function N(){var b=this;a.each(arguments,function(a,c){b[c].remove(),b[c]=null})}function O(b,c){var d=function(){};return d.prototype=new b,d.prototype.constructor=d,d.prototype.parent=b.prototype,d.prototype=a.extend(d.prototype,c),d}if(window.Select2===b){var c,d,e,f,g,i,j,h={x:0,y:0},k={TAB:9,ENTER:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,SHIFT:16,CTRL:17,ALT:18,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,BACKSPACE:8,DELETE:46,isArrow:function(a){switch(a=a.which?a.which:a){case k.LEFT:case k.RIGHT:case k.UP:case k.DOWN:return!0}return!1},isControl:function(a){var b=a.which;switch(b){case k.SHIFT:case k.CTRL:case k.ALT:return!0}return a.metaKey?!0:!1},isFunctionKey:function(a){return a=a.which?a.which:a,a>=112&&123>=a}},l="<div class='select2-measure-scrollbar'></div>",m={"\u24b6":"A","\uff21":"A","\xc0":"A","\xc1":"A","\xc2":"A","\u1ea6":"A","\u1ea4":"A","\u1eaa":"A","\u1ea8":"A","\xc3":"A","\u0100":"A","\u0102":"A","\u1eb0":"A","\u1eae":"A","\u1eb4":"A","\u1eb2":"A","\u0226":"A","\u01e0":"A","\xc4":"A","\u01de":"A","\u1ea2":"A","\xc5":"A","\u01fa":"A","\u01cd":"A","\u0200":"A","\u0202":"A","\u1ea0":"A","\u1eac":"A","\u1eb6":"A","\u1e00":"A","\u0104":"A","\u023a":"A","\u2c6f":"A","\ua732":"AA","\xc6":"AE","\u01fc":"AE","\u01e2":"AE","\ua734":"AO","\ua736":"AU","\ua738":"AV","\ua73a":"AV","\ua73c":"AY","\u24b7":"B","\uff22":"B","\u1e02":"B","\u1e04":"B","\u1e06":"B","\u0243":"B","\u0182":"B","\u0181":"B","\u24b8":"C","\uff23":"C","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\xc7":"C","\u1e08":"C","\u0187":"C","\u023b":"C","\ua73e":"C","\u24b9":"D","\uff24":"D","\u1e0a":"D","\u010e":"D","\u1e0c":"D","\u1e10":"D","\u1e12":"D","\u1e0e":"D","\u0110":"D","\u018b":"D","\u018a":"D","\u0189":"D","\ua779":"D","\u01f1":"DZ","\u01c4":"DZ","\u01f2":"Dz","\u01c5":"Dz","\u24ba":"E","\uff25":"E","\xc8":"E","\xc9":"E","\xca":"E","\u1ec0":"E","\u1ebe":"E","\u1ec4":"E","\u1ec2":"E","\u1ebc":"E","\u0112":"E","\u1e14":"E","\u1e16":"E","\u0114":"E","\u0116":"E","\xcb":"E","\u1eba":"E","\u011a":"E","\u0204":"E","\u0206":"E","\u1eb8":"E","\u1ec6":"E","\u0228":"E","\u1e1c":"E","\u0118":"E","\u1e18":"E","\u1e1a":"E","\u0190":"E","\u018e":"E","\u24bb":"F","\uff26":"F","\u1e1e":"F","\u0191":"F","\ua77b":"F","\u24bc":"G","\uff27":"G","\u01f4":"G","\u011c":"G","\u1e20":"G","\u011e":"G","\u0120":"G","\u01e6":"G","\u0122":"G","\u01e4":"G","\u0193":"G","\ua7a0":"G","\ua77d":"G","\ua77e":"G","\u24bd":"H","\uff28":"H","\u0124":"H","\u1e22":"H","\u1e26":"H","\u021e":"H","\u1e24":"H","\u1e28":"H","\u1e2a":"H","\u0126":"H","\u2c67":"H","\u2c75":"H","\ua78d":"H","\u24be":"I","\uff29":"I","\xcc":"I","\xcd":"I","\xce":"I","\u0128":"I","\u012a":"I","\u012c":"I","\u0130":"I","\xcf":"I","\u1e2e":"I","\u1ec8":"I","\u01cf":"I","\u0208":"I","\u020a":"I","\u1eca":"I","\u012e":"I","\u1e2c":"I","\u0197":"I","\u24bf":"J","\uff2a":"J","\u0134":"J","\u0248":"J","\u24c0":"K","\uff2b":"K","\u1e30":"K","\u01e8":"K","\u1e32":"K","\u0136":"K","\u1e34":"K","\u0198":"K","\u2c69":"K","\ua740":"K","\ua742":"K","\ua744":"K","\ua7a2":"K","\u24c1":"L","\uff2c":"L","\u013f":"L","\u0139":"L","\u013d":"L","\u1e36":"L","\u1e38":"L","\u013b":"L","\u1e3c":"L","\u1e3a":"L","\u0141":"L","\u023d":"L","\u2c62":"L","\u2c60":"L","\ua748":"L","\ua746":"L","\ua780":"L","\u01c7":"LJ","\u01c8":"Lj","\u24c2":"M","\uff2d":"M","\u1e3e":"M","\u1e40":"M","\u1e42":"M","\u2c6e":"M","\u019c":"M","\u24c3":"N","\uff2e":"N","\u01f8":"N","\u0143":"N","\xd1":"N","\u1e44":"N","\u0147":"N","\u1e46":"N","\u0145":"N","\u1e4a":"N","\u1e48":"N","\u0220":"N","\u019d":"N","\ua790":"N","\ua7a4":"N","\u01ca":"NJ","\u01cb":"Nj","\u24c4":"O","\uff2f":"O","\xd2":"O","\xd3":"O","\xd4":"O","\u1ed2":"O","\u1ed0":"O","\u1ed6":"O","\u1ed4":"O","\xd5":"O","\u1e4c":"O","\u022c":"O","\u1e4e":"O","\u014c":"O","\u1e50":"O","\u1e52":"O","\u014e":"O","\u022e":"O","\u0230":"O","\xd6":"O","\u022a":"O","\u1ece":"O","\u0150":"O","\u01d1":"O","\u020c":"O","\u020e":"O","\u01a0":"O","\u1edc":"O","\u1eda":"O","\u1ee0":"O","\u1ede":"O","\u1ee2":"O","\u1ecc":"O","\u1ed8":"O","\u01ea":"O","\u01ec":"O","\xd8":"O","\u01fe":"O","\u0186":"O","\u019f":"O","\ua74a":"O","\ua74c":"O","\u01a2":"OI","\ua74e":"OO","\u0222":"OU","\u24c5":"P","\uff30":"P","\u1e54":"P","\u1e56":"P","\u01a4":"P","\u2c63":"P","\ua750":"P","\ua752":"P","\ua754":"P","\u24c6":"Q","\uff31":"Q","\ua756":"Q","\ua758":"Q","\u024a":"Q","\u24c7":"R","\uff32":"R","\u0154":"R","\u1e58":"R","\u0158":"R","\u0210":"R","\u0212":"R","\u1e5a":"R","\u1e5c":"R","\u0156":"R","\u1e5e":"R","\u024c":"R","\u2c64":"R","\ua75a":"R","\ua7a6":"R","\ua782":"R","\u24c8":"S","\uff33":"S","\u1e9e":"S","\u015a":"S","\u1e64":"S","\u015c":"S","\u1e60":"S","\u0160":"S","\u1e66":"S","\u1e62":"S","\u1e68":"S","\u0218":"S","\u015e":"S","\u2c7e":"S","\ua7a8":"S","\ua784":"S","\u24c9":"T","\uff34":"T","\u1e6a":"T","\u0164":"T","\u1e6c":"T","\u021a":"T","\u0162":"T","\u1e70":"T","\u1e6e":"T","\u0166":"T","\u01ac":"T","\u01ae":"T","\u023e":"T","\ua786":"T","\ua728":"TZ","\u24ca":"U","\uff35":"U","\xd9":"U","\xda":"U","\xdb":"U","\u0168":"U","\u1e78":"U","\u016a":"U","\u1e7a":"U","\u016c":"U","\xdc":"U","\u01db":"U","\u01d7":"U","\u01d5":"U","\u01d9":"U","\u1ee6":"U","\u016e":"U","\u0170":"U","\u01d3":"U","\u0214":"U","\u0216":"U","\u01af":"U","\u1eea":"U","\u1ee8":"U","\u1eee":"U","\u1eec":"U","\u1ef0":"U","\u1ee4":"U","\u1e72":"U","\u0172":"U","\u1e76":"U","\u1e74":"U","\u0244":"U","\u24cb":"V","\uff36":"V","\u1e7c":"V","\u1e7e":"V","\u01b2":"V","\ua75e":"V","\u0245":"V","\ua760":"VY","\u24cc":"W","\uff37":"W","\u1e80":"W","\u1e82":"W","\u0174":"W","\u1e86":"W","\u1e84":"W","\u1e88":"W","\u2c72":"W","\u24cd":"X","\uff38":"X","\u1e8a":"X","\u1e8c":"X","\u24ce":"Y","\uff39":"Y","\u1ef2":"Y","\xdd":"Y","\u0176":"Y","\u1ef8":"Y","\u0232":"Y","\u1e8e":"Y","\u0178":"Y","\u1ef6":"Y","\u1ef4":"Y","\u01b3":"Y","\u024e":"Y","\u1efe":"Y","\u24cf":"Z","\uff3a":"Z","\u0179":"Z","\u1e90":"Z","\u017b":"Z","\u017d":"Z","\u1e92":"Z","\u1e94":"Z","\u01b5":"Z","\u0224":"Z","\u2c7f":"Z","\u2c6b":"Z","\ua762":"Z","\u24d0":"a","\uff41":"a","\u1e9a":"a","\xe0":"a","\xe1":"a","\xe2":"a","\u1ea7":"a","\u1ea5":"a","\u1eab":"a","\u1ea9":"a","\xe3":"a","\u0101":"a","\u0103":"a","\u1eb1":"a","\u1eaf":"a","\u1eb5":"a","\u1eb3":"a","\u0227":"a","\u01e1":"a","\xe4":"a","\u01df":"a","\u1ea3":"a","\xe5":"a","\u01fb":"a","\u01ce":"a","\u0201":"a","\u0203":"a","\u1ea1":"a","\u1ead":"a","\u1eb7":"a","\u1e01":"a","\u0105":"a","\u2c65":"a","\u0250":"a","\ua733":"aa","\xe6":"ae","\u01fd":"ae","\u01e3":"ae","\ua735":"ao","\ua737":"au","\ua739":"av","\ua73b":"av","\ua73d":"ay","\u24d1":"b","\uff42":"b","\u1e03":"b","\u1e05":"b","\u1e07":"b","\u0180":"b","\u0183":"b","\u0253":"b","\u24d2":"c","\uff43":"c","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\xe7":"c","\u1e09":"c","\u0188":"c","\u023c":"c","\ua73f":"c","\u2184":"c","\u24d3":"d","\uff44":"d","\u1e0b":"d","\u010f":"d","\u1e0d":"d","\u1e11":"d","\u1e13":"d","\u1e0f":"d","\u0111":"d","\u018c":"d","\u0256":"d","\u0257":"d","\ua77a":"d","\u01f3":"dz","\u01c6":"dz","\u24d4":"e","\uff45":"e","\xe8":"e","\xe9":"e","\xea":"e","\u1ec1":"e","\u1ebf":"e","\u1ec5":"e","\u1ec3":"e","\u1ebd":"e","\u0113":"e","\u1e15":"e","\u1e17":"e","\u0115":"e","\u0117":"e","\xeb":"e","\u1ebb":"e","\u011b":"e","\u0205":"e","\u0207":"e","\u1eb9":"e","\u1ec7":"e","\u0229":"e","\u1e1d":"e","\u0119":"e","\u1e19":"e","\u1e1b":"e","\u0247":"e","\u025b":"e","\u01dd":"e","\u24d5":"f","\uff46":"f","\u1e1f":"f","\u0192":"f","\ua77c":"f","\u24d6":"g","\uff47":"g","\u01f5":"g","\u011d":"g","\u1e21":"g","\u011f":"g","\u0121":"g","\u01e7":"g","\u0123":"g","\u01e5":"g","\u0260":"g","\ua7a1":"g","\u1d79":"g","\ua77f":"g","\u24d7":"h","\uff48":"h","\u0125":"h","\u1e23":"h","\u1e27":"h","\u021f":"h","\u1e25":"h","\u1e29":"h","\u1e2b":"h","\u1e96":"h","\u0127":"h","\u2c68":"h","\u2c76":"h","\u0265":"h","\u0195":"hv","\u24d8":"i","\uff49":"i","\xec":"i","\xed":"i","\xee":"i","\u0129":"i","\u012b":"i","\u012d":"i","\xef":"i","\u1e2f":"i","\u1ec9":"i","\u01d0":"i","\u0209":"i","\u020b":"i","\u1ecb":"i","\u012f":"i","\u1e2d":"i","\u0268":"i","\u0131":"i","\u24d9":"j","\uff4a":"j","\u0135":"j","\u01f0":"j","\u0249":"j","\u24da":"k","\uff4b":"k","\u1e31":"k","\u01e9":"k","\u1e33":"k","\u0137":"k","\u1e35":"k","\u0199":"k","\u2c6a":"k","\ua741":"k","\ua743":"k","\ua745":"k","\ua7a3":"k","\u24db":"l","\uff4c":"l","\u0140":"l","\u013a":"l","\u013e":"l","\u1e37":"l","\u1e39":"l","\u013c":"l","\u1e3d":"l","\u1e3b":"l","\u017f":"l","\u0142":"l","\u019a":"l","\u026b":"l","\u2c61":"l","\ua749":"l","\ua781":"l","\ua747":"l","\u01c9":"lj","\u24dc":"m","\uff4d":"m","\u1e3f":"m","\u1e41":"m","\u1e43":"m","\u0271":"m","\u026f":"m","\u24dd":"n","\uff4e":"n","\u01f9":"n","\u0144":"n","\xf1":"n","\u1e45":"n","\u0148":"n","\u1e47":"n","\u0146":"n","\u1e4b":"n","\u1e49":"n","\u019e":"n","\u0272":"n","\u0149":"n","\ua791":"n","\ua7a5":"n","\u01cc":"nj","\u24de":"o","\uff4f":"o","\xf2":"o","\xf3":"o","\xf4":"o","\u1ed3":"o","\u1ed1":"o","\u1ed7":"o","\u1ed5":"o","\xf5":"o","\u1e4d":"o","\u022d":"o","\u1e4f":"o","\u014d":"o","\u1e51":"o","\u1e53":"o","\u014f":"o","\u022f":"o","\u0231":"o","\xf6":"o","\u022b":"o","\u1ecf":"o","\u0151":"o","\u01d2":"o","\u020d":"o","\u020f":"o","\u01a1":"o","\u1edd":"o","\u1edb":"o","\u1ee1":"o","\u1edf":"o","\u1ee3":"o","\u1ecd":"o","\u1ed9":"o","\u01eb":"o","\u01ed":"o","\xf8":"o","\u01ff":"o","\u0254":"o","\ua74b":"o","\ua74d":"o","\u0275":"o","\u01a3":"oi","\u0223":"ou","\ua74f":"oo","\u24df":"p","\uff50":"p","\u1e55":"p","\u1e57":"p","\u01a5":"p","\u1d7d":"p","\ua751":"p","\ua753":"p","\ua755":"p","\u24e0":"q","\uff51":"q","\u024b":"q","\ua757":"q","\ua759":"q","\u24e1":"r","\uff52":"r","\u0155":"r","\u1e59":"r","\u0159":"r","\u0211":"r","\u0213":"r","\u1e5b":"r","\u1e5d":"r","\u0157":"r","\u1e5f":"r","\u024d":"r","\u027d":"r","\ua75b":"r","\ua7a7":"r","\ua783":"r","\u24e2":"s","\uff53":"s","\xdf":"s","\u015b":"s","\u1e65":"s","\u015d":"s","\u1e61":"s","\u0161":"s","\u1e67":"s","\u1e63":"s","\u1e69":"s","\u0219":"s","\u015f":"s","\u023f":"s","\ua7a9":"s","\ua785":"s","\u1e9b":"s","\u24e3":"t","\uff54":"t","\u1e6b":"t","\u1e97":"t","\u0165":"t","\u1e6d":"t","\u021b":"t","\u0163":"t","\u1e71":"t","\u1e6f":"t","\u0167":"t","\u01ad":"t","\u0288":"t","\u2c66":"t","\ua787":"t","\ua729":"tz","\u24e4":"u","\uff55":"u","\xf9":"u","\xfa":"u","\xfb":"u","\u0169":"u","\u1e79":"u","\u016b":"u","\u1e7b":"u","\u016d":"u","\xfc":"u","\u01dc":"u","\u01d8":"u","\u01d6":"u","\u01da":"u","\u1ee7":"u","\u016f":"u","\u0171":"u","\u01d4":"u","\u0215":"u","\u0217":"u","\u01b0":"u","\u1eeb":"u","\u1ee9":"u","\u1eef":"u","\u1eed":"u","\u1ef1":"u","\u1ee5":"u","\u1e73":"u","\u0173":"u","\u1e77":"u","\u1e75":"u","\u0289":"u","\u24e5":"v","\uff56":"v","\u1e7d":"v","\u1e7f":"v","\u028b":"v","\ua75f":"v","\u028c":"v","\ua761":"vy","\u24e6":"w","\uff57":"w","\u1e81":"w","\u1e83":"w","\u0175":"w","\u1e87":"w","\u1e85":"w","\u1e98":"w","\u1e89":"w","\u2c73":"w","\u24e7":"x","\uff58":"x","\u1e8b":"x","\u1e8d":"x","\u24e8":"y","\uff59":"y","\u1ef3":"y","\xfd":"y","\u0177":"y","\u1ef9":"y","\u0233":"y","\u1e8f":"y","\xff":"y","\u1ef7":"y","\u1e99":"y","\u1ef5":"y","\u01b4":"y","\u024f":"y","\u1eff":"y","\u24e9":"z","\uff5a":"z","\u017a":"z","\u1e91":"z","\u017c":"z","\u017e":"z","\u1e93":"z","\u1e95":"z","\u01b6":"z","\u0225":"z","\u0240":"z","\u2c6c":"z","\ua763":"z","\u0386":"\u0391","\u0388":"\u0395","\u0389":"\u0397","\u038a":"\u0399","\u03aa":"\u0399","\u038c":"\u039f","\u038e":"\u03a5","\u03ab":"\u03a5","\u038f":"\u03a9","\u03ac":"\u03b1","\u03ad":"\u03b5","\u03ae":"\u03b7","\u03af":"\u03b9","\u03ca":"\u03b9","\u0390":"\u03b9","\u03cc":"\u03bf","\u03cd":"\u03c5","\u03cb":"\u03c5","\u03b0":"\u03c5","\u03c9":"\u03c9","\u03c2":"\u03c3"};i=a(document),f=function(){var a=1;return function(){return a++}}(),c=O(Object,{bind:function(a){var b=this;return function(){a.apply(b,arguments)}},init:function(c){var d,e,g=".select2-results";this.opts=c=this.prepareOpts(c),this.id=c.id,c.element.data("select2")!==b&&null!==c.element.data("select2")&&c.element.data("select2").destroy(),this.container=this.createContainer(),this.liveRegion=a(".select2-hidden-accessible"),0==this.liveRegion.length&&(this.liveRegion=a("<span>",{role:"status","aria-live":"polite"}).addClass("select2-hidden-accessible").appendTo(document.body)),this.containerId="s2id_"+(c.element.attr("id")||"autogen"+f()),this.containerEventName=this.containerId.replace(/([.])/g,"_").replace(/([;&,\-\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1"),this.container.attr("id",this.containerId),this.container.attr("title",c.element.attr("title")),this.body=a(document.body),D(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.attr("style",c.element.attr("style")),this.container.css(K(c.containerCss,this.opts.element)),this.container.addClass(K(c.containerCssClass,this.opts.element)),this.elementTabIndex=this.opts.element.attr("tabindex"),this.opts.element.data("select2",this).attr("tabindex","-1").before(this.container).on("click.select2",A),this.container.data("select2",this),this.dropdown=this.container.find(".select2-drop"),D(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(K(c.dropdownCssClass,this.opts.element)),this.dropdown.data("select2",this),this.dropdown.on("click",A),this.results=d=this.container.find(g),this.search=e=this.container.find("input.select2-input"),this.queryCount=0,this.resultsPage=0,this.context=null,this.initContainer(),this.container.on("click",A),v(this.results),this.dropdown.on("mousemove-filtered",g,this.bind(this.highlightUnderEvent)),this.dropdown.on("touchstart touchmove touchend",g,this.bind(function(a){this._touchEvent=!0,this.highlightUnderEvent(a)})),this.dropdown.on("touchmove",g,this.bind(this.touchMoved)),this.dropdown.on("touchstart touchend",g,this.bind(this.clearTouchMoved)),this.dropdown.on("click",this.bind(function(){this._touchEvent&&(this._touchEvent=!1,this.selectHighlighted())})),x(80,this.results),this.dropdown.on("scroll-debounced",g,this.bind(this.loadMoreIfNeeded)),a(this.container).on("change",".select2-input",function(a){a.stopPropagation()}),a(this.dropdown).on("change",".select2-input",function(a){a.stopPropagation()}),a.fn.mousewheel&&d.mousewheel(function(a,b,c,e){var f=d.scrollTop();e>0&&0>=f-e?(d.scrollTop(0),A(a)):0>e&&d.get(0).scrollHeight-d.scrollTop()+e<=d.height()&&(d.scrollTop(d.get(0).scrollHeight-d.height()),A(a))}),u(e),e.on("keyup-change input paste",this.bind(this.updateResults)),e.on("focus",function(){e.addClass("select2-focused")}),e.on("blur",function(){e.removeClass("select2-focused")}),this.dropdown.on("mouseup",g,this.bind(function(b){a(b.target).closest(".select2-result-selectable").length>0&&(this.highlightUnderEvent(b),this.selectHighlighted(b))})),this.dropdown.on("click mouseup mousedown touchstart touchend focusin",function(a){a.stopPropagation()}),this.nextSearchTerm=b,a.isFunction(this.opts.initSelection)&&(this.initSelection(),this.monitorSource()),null!==c.maximumInputLength&&this.search.attr("maxlength",c.maximumInputLength);var h=c.element.prop("disabled");h===b&&(h=!1),this.enable(!h);var i=c.element.prop("readonly");i===b&&(i=!1),this.readonly(i),j=j||q(),this.autofocus=c.element.prop("autofocus"),c.element.prop("autofocus",!1),this.autofocus&&this.focus(),this.search.attr("placeholder",c.searchInputPlaceholder)},destroy:function(){var a=this.opts.element,c=a.data("select2"),d=this;this.close(),a.length&&a[0].detachEvent&&d._sync&&a.each(function(){d._sync&&this.detachEvent("onpropertychange",d._sync)}),this.propertyObserver&&(this.propertyObserver.disconnect(),this.propertyObserver=null),this._sync=null,c!==b&&(c.container.remove(),c.liveRegion.remove(),c.dropdown.remove(),a.show().removeData("select2").off(".select2").prop("autofocus",this.autofocus||!1),this.elementTabIndex?a.attr({tabindex:this.elementTabIndex}):a.removeAttr("tabindex"),a.show()),N.call(this,"container","liveRegion","dropdown","results","search")},optionToData:function(a){return a.is("option")?{id:a.prop("value"),text:a.text(),element:a.get(),css:a.attr("class"),disabled:a.prop("disabled"),locked:r(a.attr("locked"),"locked")||r(a.data("locked"),!0)}:a.is("optgroup")?{text:a.attr("label"),children:[],element:a.get(),css:a.attr("class")}:void 0},prepareOpts:function(c){var d,e,g,h,i=this;if(d=c.element,"select"===d.get(0).tagName.toLowerCase()&&(this.select=e=c.element),e&&a.each(["id","multiple","ajax","query","createSearchChoice","initSelection","data","tags"],function(){if(this in c)throw new Error("Option '"+this+"' is not allowed for Select2 when attached to a <select> element.")}),c=a.extend({},{populateResults:function(d,e,g){var h,j=this.opts.id,k=this.liveRegion;h=function(d,e,l){var m,n,o,p,q,r,s,t,u,v;d=c.sortResults(d,e,g);var w=[];for(m=0,n=d.length;n>m;m+=1)o=d[m],q=o.disabled===!0,p=!q&&j(o)!==b,r=o.children&&o.children.length>0,s=a("<li></li>"),s.addClass("select2-results-dept-"+l),s.addClass("select2-result"),s.addClass(p?"select2-result-selectable":"select2-result-unselectable"),q&&s.addClass("select2-disabled"),r&&s.addClass("select2-result-with-children"),s.addClass(i.opts.formatResultCssClass(o)),s.attr("role","presentation"),t=a(document.createElement("div")),t.addClass("select2-result-label"),t.attr("id","select2-result-label-"+f()),t.attr("role","option"),v=c.formatResult(o,t,g,i.opts.escapeMarkup),v!==b&&(t.html(v),s.append(t)),r&&(u=a("<ul></ul>"),u.addClass("select2-result-sub"),h(o.children,u,l+1),s.append(u)),s.data("select2-data",o),w.push(s[0]);e.append(w),k.text(c.formatMatches(d.length))},h(e,d,0)}},a.fn.select2.defaults,c),"function"!=typeof c.id&&(g=c.id,c.id=function(a){return a[g]}),a.isArray(c.element.data("select2Tags"))){if("tags"in c)throw"tags specified as both an attribute 'data-select2-tags' and in options of Select2 "+c.element.attr("id");c.tags=c.element.data("select2Tags")}if(e?(c.query=this.bind(function(a){var f,g,h,c={results:[],more:!1},e=a.term;h=function(b,c){var d;b.is("option")?a.matcher(e,b.text(),b)&&c.push(i.optionToData(b)):b.is("optgroup")&&(d=i.optionToData(b),b.children().each2(function(a,b){h(b,d.children)}),d.children.length>0&&c.push(d))},f=d.children(),this.getPlaceholder()!==b&&f.length>0&&(g=this.getPlaceholderOption(),g&&(f=f.not(g))),f.each2(function(a,b){h(b,c.results)}),a.callback(c)}),c.id=function(a){return a.id}):"query"in c||("ajax"in c?(h=c.element.data("ajax-url"),h&&h.length>0&&(c.ajax.url=h),c.query=G.call(c.element,c.ajax)):"data"in c?c.query=H(c.data):"tags"in c&&(c.query=I(c.tags),c.createSearchChoice===b&&(c.createSearchChoice=function(b){return{id:a.trim(b),text:a.trim(b)}}),c.initSelection===b&&(c.initSelection=function(b,d){var e=[];a(s(b.val(),c.separator,c.transformVal)).each(function(){var b={id:this,text:this},d=c.tags;a.isFunction(d)&&(d=d()),a(d).each(function(){return r(this.id,b.id)?(b=this,!1):void 0}),e.push(b)}),d(e)}))),"function"!=typeof c.query)throw"query function not defined for Select2 "+c.element.attr("id");if("top"===c.createSearchChoicePosition)c.createSearchChoicePosition=function(a,b){a.unshift(b)};else if("bottom"===c.createSearchChoicePosition)c.createSearchChoicePosition=function(a,b){a.push(b)};else if("function"!=typeof c.createSearchChoicePosition)throw"invalid createSearchChoicePosition option must be 'top', 'bottom' or a custom function";return c},monitorSource:function(){var d,c=this.opts.element,e=this;c.on("change.select2",this.bind(function(){this.opts.element.data("select2-change-triggered")!==!0&&this.initSelection()})),this._sync=this.bind(function(){var a=c.prop("disabled");a===b&&(a=!1),this.enable(!a);var d=c.prop("readonly");d===b&&(d=!1),this.readonly(d),this.container&&(D(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.addClass(K(this.opts.containerCssClass,this.opts.element))),this.dropdown&&(D(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(K(this.opts.dropdownCssClass,this.opts.element)))}),c.length&&c[0].attachEvent&&c.each(function(){this.attachEvent("onpropertychange",e._sync)}),d=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver,d!==b&&(this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),this.propertyObserver=new d(function(b){a.each(b,e._sync)}),this.propertyObserver.observe(c.get(0),{attributes:!0,subtree:!1}))},triggerSelect:function(b){var c=a.Event("select2-selecting",{val:this.id(b),object:b,choice:b});return this.opts.element.trigger(c),!c.isDefaultPrevented()},triggerChange:function(b){b=b||{},b=a.extend({},b,{type:"change",val:this.val()}),this.opts.element.data("select2-change-triggered",!0),this.opts.element.trigger(b),this.opts.element.data("select2-change-triggered",!1),this.opts.element.click(),this.opts.blurOnChange&&this.opts.element.blur()},isInterfaceEnabled:function(){return this.enabledInterface===!0},enableInterface:function(){var a=this._enabled&&!this._readonly,b=!a;return a===this.enabledInterface?!1:(this.container.toggleClass("select2-container-disabled",b),this.close(),this.enabledInterface=a,!0)},enable:function(a){a===b&&(a=!0),this._enabled!==a&&(this._enabled=a,this.opts.element.prop("disabled",!a),this.enableInterface())},disable:function(){this.enable(!1)},readonly:function(a){a===b&&(a=!1),this._readonly!==a&&(this._readonly=a,this.opts.element.prop("readonly",a),this.enableInterface())},opened:function(){return this.container?this.container.hasClass("select2-dropdown-open"):!1},positionDropdown:function(){var v,w,x,y,z,b=this.dropdown,c=this.container,d=c.offset(),e=c.outerHeight(!1),f=c.outerWidth(!1),g=b.outerHeight(!1),h=a(window),i=h.width(),k=h.height(),l=h.scrollLeft()+i,m=h.scrollTop()+k,n=d.top+e,o=d.left,p=m>=n+g,q=d.top-g>=h.scrollTop(),r=b.outerWidth(!1),s=function(){return l>=o+r},t=function(){return d.left+l+c.outerWidth(!1)>r},u=b.hasClass("select2-drop-above");u?(w=!0,!q&&p&&(x=!0,w=!1)):(w=!1,!p&&q&&(x=!0,w=!0)),x&&(b.hide(),d=this.container.offset(),e=this.container.outerHeight(!1),f=this.container.outerWidth(!1),g=b.outerHeight(!1),l=h.scrollLeft()+i,m=h.scrollTop()+k,n=d.top+e,o=d.left,r=b.outerWidth(!1),b.show(),this.focusSearch()),this.opts.dropdownAutoWidth?(z=a(".select2-results",b)[0],b.addClass("select2-drop-auto-width"),b.css("width",""),r=b.outerWidth(!1)+(z.scrollHeight===z.clientHeight?0:j.width),r>f?f=r:r=f,g=b.outerHeight(!1)):this.container.removeClass("select2-drop-auto-width"),"static"!==this.body.css("position")&&(v=this.body.offset(),n-=v.top,o-=v.left),!s()&&t()&&(o=d.left+this.container.outerWidth(!1)-r),y={left:o,width:f},w?(y.top=d.top-g,y.bottom="auto",this.container.addClass("select2-drop-above"),b.addClass("select2-drop-above")):(y.top=n,y.bottom="auto",this.container.removeClass("select2-drop-above"),b.removeClass("select2-drop-above")),y=a.extend(y,K(this.opts.dropdownCss,this.opts.element)),b.css(y)},shouldOpen:function(){var b;return this.opened()?!1:this._enabled===!1||this._readonly===!0?!1:(b=a.Event("select2-opening"),this.opts.element.trigger(b),!b.isDefaultPrevented())},clearDropdownAlignmentPreference:function(){this.container.removeClass("select2-drop-above"),this.dropdown.removeClass("select2-drop-above")},open:function(){return this.shouldOpen()?(this.opening(),i.on("mousemove.select2Event",function(a){h.x=a.pageX,h.y=a.pageY}),!0):!1},opening:function(){var f,b=this.containerEventName,c="scroll."+b,d="resize."+b,e="orientationchange."+b;this.container.addClass("select2-dropdown-open").addClass("select2-container-active"),this.clearDropdownAlignmentPreference(),this.dropdown[0]!==this.body.children().last()[0]&&this.dropdown.detach().appendTo(this.body),f=a("#select2-drop-mask"),0===f.length&&(f=a(document.createElement("div")),f.attr("id","select2-drop-mask").attr("class","select2-drop-mask"),f.hide(),f.appendTo(this.body),f.on("mousedown touchstart click",function(b){n(f);var d,c=a("#select2-drop");c.length>0&&(d=c.data("select2"),d.opts.selectOnBlur&&d.selectHighlighted({noFocus:!0}),d.close(),b.preventDefault(),b.stopPropagation())})),this.dropdown.prev()[0]!==f[0]&&this.dropdown.before(f),a("#select2-drop").removeAttr("id"),this.dropdown.attr("id","select2-drop"),f.show(),this.positionDropdown(),this.dropdown.show(),this.positionDropdown(),this.dropdown.addClass("select2-drop-active");var g=this;this.container.parents().add(window).each(function(){a(this).on(d+" "+c+" "+e,function(){g.opened()&&g.positionDropdown()})})},close:function(){if(this.opened()){var b=this.containerEventName,c="scroll."+b,d="resize."+b,e="orientationchange."+b;this.container.parents().add(window).each(function(){a(this).off(c).off(d).off(e)}),this.clearDropdownAlignmentPreference(),a("#select2-drop-mask").hide(),this.dropdown.removeAttr("id"),this.dropdown.hide(),this.container.removeClass("select2-dropdown-open").removeClass("select2-container-active"),this.results.empty(),i.off("mousemove.select2Event"),this.clearSearch(),this.search.removeClass("select2-active"),this.opts.element.trigger(a.Event("select2-close"))}},externalSearch:function(a){this.open(),this.search.val(a),this.updateResults(!1)},clearSearch:function(){},getMaximumSelectionSize:function(){return K(this.opts.maximumSelectionSize,this.opts.element)},ensureHighlightVisible:function(){var c,d,e,f,g,h,i,j,b=this.results;if(d=this.highlight(),!(0>d)){if(0==d)return b.scrollTop(0),void 0;c=this.findHighlightableChoices().find(".select2-result-label"),e=a(c[d]),j=(e.offset()||{}).top||0,f=j+e.outerHeight(!0),d===c.length-1&&(i=b.find("li.select2-more-results"),i.length>0&&(f=i.offset().top+i.outerHeight(!0))),g=b.offset().top+b.outerHeight(!1),f>g&&b.scrollTop(b.scrollTop()+(f-g)),h=j-b.offset().top,0>h&&"none"!=e.css("display")&&b.scrollTop(b.scrollTop()+h)}},findHighlightableChoices:function(){return this.results.find(".select2-result-selectable:not(.select2-disabled):not(.select2-selected)")},moveHighlight:function(b){for(var c=this.findHighlightableChoices(),d=this.highlight();d>-1&&d<c.length;){d+=b; -var e=a(c[d]);if(e.hasClass("select2-result-selectable")&&!e.hasClass("select2-disabled")&&!e.hasClass("select2-selected")){this.highlight(d);break}}},highlight:function(b){var d,e,c=this.findHighlightableChoices();return 0===arguments.length?p(c.filter(".select2-highlighted")[0],c.get()):(b>=c.length&&(b=c.length-1),0>b&&(b=0),this.removeHighlight(),d=a(c[b]),d.addClass("select2-highlighted"),this.search.attr("aria-activedescendant",d.find(".select2-result-label").attr("id")),this.ensureHighlightVisible(),this.liveRegion.text(d.text()),e=d.data("select2-data"),e&&this.opts.element.trigger({type:"select2-highlight",val:this.id(e),choice:e}),void 0)},removeHighlight:function(){this.results.find(".select2-highlighted").removeClass("select2-highlighted")},touchMoved:function(){this._touchMoved=!0},clearTouchMoved:function(){this._touchMoved=!1},countSelectableResults:function(){return this.findHighlightableChoices().length},highlightUnderEvent:function(b){var c=a(b.target).closest(".select2-result-selectable");if(c.length>0&&!c.is(".select2-highlighted")){var d=this.findHighlightableChoices();this.highlight(d.index(c))}else 0==c.length&&this.removeHighlight()},loadMoreIfNeeded:function(){var c,a=this.results,b=a.find("li.select2-more-results"),d=this.resultsPage+1,e=this,f=this.search.val(),g=this.context;0!==b.length&&(c=b.offset().top-a.offset().top-a.height(),c<=this.opts.loadMorePadding&&(b.addClass("select2-active"),this.opts.query({element:this.opts.element,term:f,page:d,context:g,matcher:this.opts.matcher,callback:this.bind(function(c){e.opened()&&(e.opts.populateResults.call(this,a,c.results,{term:f,page:d,context:g}),e.postprocessResults(c,!1,!1),c.more===!0?(b.detach().appendTo(a).html(e.opts.escapeMarkup(K(e.opts.formatLoadMore,e.opts.element,d+1))),window.setTimeout(function(){e.loadMoreIfNeeded()},10)):b.remove(),e.positionDropdown(),e.resultsPage=d,e.context=c.context,this.opts.element.trigger({type:"select2-loaded",items:c}))})})))},tokenize:function(){},updateResults:function(c){function m(){d.removeClass("select2-active"),h.positionDropdown(),e.find(".select2-no-results,.select2-selection-limit,.select2-searching").length?h.liveRegion.text(e.text()):h.liveRegion.text(h.opts.formatMatches(e.find('.select2-result-selectable:not(".select2-selected")').length))}function n(a){e.html(a),m()}var g,i,l,d=this.search,e=this.results,f=this.opts,h=this,j=d.val(),k=a.data(this.container,"select2-last-term");if((c===!0||!k||!r(j,k))&&(a.data(this.container,"select2-last-term",j),c===!0||this.showSearchInput!==!1&&this.opened())){l=++this.queryCount;var o=this.getMaximumSelectionSize();if(o>=1&&(g=this.data(),a.isArray(g)&&g.length>=o&&J(f.formatSelectionTooBig,"formatSelectionTooBig")))return n("<li class='select2-selection-limit'>"+K(f.formatSelectionTooBig,f.element,o)+"</li>"),void 0;if(d.val().length<f.minimumInputLength)return J(f.formatInputTooShort,"formatInputTooShort")?n("<li class='select2-no-results'>"+K(f.formatInputTooShort,f.element,d.val(),f.minimumInputLength)+"</li>"):n(""),c&&this.showSearch&&this.showSearch(!0),void 0;if(f.maximumInputLength&&d.val().length>f.maximumInputLength)return J(f.formatInputTooLong,"formatInputTooLong")?n("<li class='select2-no-results'>"+K(f.formatInputTooLong,f.element,d.val(),f.maximumInputLength)+"</li>"):n(""),void 0;f.formatSearching&&0===this.findHighlightableChoices().length&&n("<li class='select2-searching'>"+K(f.formatSearching,f.element)+"</li>"),d.addClass("select2-active"),this.removeHighlight(),i=this.tokenize(),i!=b&&null!=i&&d.val(i),this.resultsPage=1,f.query({element:f.element,term:d.val(),page:this.resultsPage,context:null,matcher:f.matcher,callback:this.bind(function(g){var i;if(l==this.queryCount){if(!this.opened())return this.search.removeClass("select2-active"),void 0;if(g.hasError!==b&&J(f.formatAjaxError,"formatAjaxError"))return n("<li class='select2-ajax-error'>"+K(f.formatAjaxError,f.element,g.jqXHR,g.textStatus,g.errorThrown)+"</li>"),void 0;if(this.context=g.context===b?null:g.context,this.opts.createSearchChoice&&""!==d.val()&&(i=this.opts.createSearchChoice.call(h,d.val(),g.results),i!==b&&null!==i&&h.id(i)!==b&&null!==h.id(i)&&0===a(g.results).filter(function(){return r(h.id(this),h.id(i))}).length&&this.opts.createSearchChoicePosition(g.results,i)),0===g.results.length&&J(f.formatNoMatches,"formatNoMatches"))return n("<li class='select2-no-results'>"+K(f.formatNoMatches,f.element,d.val())+"</li>"),void 0;e.empty(),h.opts.populateResults.call(this,e,g.results,{term:d.val(),page:this.resultsPage,context:null}),g.more===!0&&J(f.formatLoadMore,"formatLoadMore")&&(e.append("<li class='select2-more-results'>"+f.escapeMarkup(K(f.formatLoadMore,f.element,this.resultsPage))+"</li>"),window.setTimeout(function(){h.loadMoreIfNeeded()},10)),this.postprocessResults(g,c),m(),this.opts.element.trigger({type:"select2-loaded",items:g})}})})}},cancel:function(){this.close()},blur:function(){this.opts.selectOnBlur&&this.selectHighlighted({noFocus:!0}),this.close(),this.container.removeClass("select2-container-active"),this.search[0]===document.activeElement&&this.search.blur(),this.clearSearch(),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus")},focusSearch:function(){y(this.search)},selectHighlighted:function(a){if(this._touchMoved)return this.clearTouchMoved(),void 0;var b=this.highlight(),c=this.results.find(".select2-highlighted"),d=c.closest(".select2-result").data("select2-data");d?(this.highlight(b),this.onSelect(d,a)):a&&a.noFocus&&this.close()},getPlaceholder:function(){var a;return this.opts.element.attr("placeholder")||this.opts.element.attr("data-placeholder")||this.opts.element.data("placeholder")||this.opts.placeholder||((a=this.getPlaceholderOption())!==b?a.text():b)},getPlaceholderOption:function(){if(this.select){var c=this.select.children("option").first();if(this.opts.placeholderOption!==b)return"first"===this.opts.placeholderOption&&c||"function"==typeof this.opts.placeholderOption&&this.opts.placeholderOption(this.select);if(""===a.trim(c.text())&&""===c.val())return c}},initContainerWidth:function(){function c(){var c,d,e,f,g,h;if("off"===this.opts.width)return null;if("element"===this.opts.width)return 0===this.opts.element.outerWidth(!1)?"auto":this.opts.element.outerWidth(!1)+"px";if("copy"===this.opts.width||"resolve"===this.opts.width){if(c=this.opts.element.attr("style"),c!==b)for(d=c.split(";"),f=0,g=d.length;g>f;f+=1)if(h=d[f].replace(/\s/g,""),e=h.match(/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i),null!==e&&e.length>=1)return e[1];return"resolve"===this.opts.width?(c=this.opts.element.css("width"),c.indexOf("%")>0?c:0===this.opts.element.outerWidth(!1)?"auto":this.opts.element.outerWidth(!1)+"px"):null}return a.isFunction(this.opts.width)?this.opts.width():this.opts.width}var d=c.call(this);null!==d&&this.container.css("width",d)}}),d=O(c,{createContainer:function(){var b=a(document.createElement("div")).attr({"class":"select2-container"}).html(["<a href='javascript:void(0)' class='select2-choice' tabindex='-1'>","   <span class='select2-chosen'> </span><abbr class='select2-search-choice-close'></abbr>","   <span class='select2-arrow' role='presentation'><b role='presentation'></b></span>","</a>","<label for='' class='select2-offscreen'></label>","<input class='select2-focusser select2-offscreen' type='text' aria-haspopup='true' role='button' />","<div class='select2-drop select2-display-none'>","   <div class='select2-search'>","       <label for='' class='select2-offscreen'></label>","       <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input' role='combobox' aria-expanded='true'","       aria-autocomplete='list' />","   </div>","   <ul class='select2-results' role='listbox'>","   </ul>","</div>"].join(""));return b},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.focusser.prop("disabled",!this.isInterfaceEnabled())},opening:function(){var c,d,e;this.opts.minimumResultsForSearch>=0&&this.showSearch(!0),this.parent.opening.apply(this,arguments),this.showSearchInput!==!1&&this.search.val(this.focusser.val()),this.opts.shouldFocusInput(this)&&(this.search.focus(),c=this.search.get(0),c.createTextRange?(d=c.createTextRange(),d.collapse(!1),d.select()):c.setSelectionRange&&(e=this.search.val().length,c.setSelectionRange(e,e))),""===this.search.val()&&this.nextSearchTerm!=b&&(this.search.val(this.nextSearchTerm),this.search.select()),this.focusser.prop("disabled",!0).val(""),this.updateResults(!0),this.opts.element.trigger(a.Event("select2-open"))},close:function(){this.opened()&&(this.parent.close.apply(this,arguments),this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus())},focus:function(){this.opened()?this.close():(this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus())},isFocused:function(){return this.container.hasClass("select2-container-active")},cancel:function(){this.parent.cancel.apply(this,arguments),this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus()},destroy:function(){a("label[for='"+this.focusser.attr("id")+"']").attr("for",this.opts.element.attr("id")),this.parent.destroy.apply(this,arguments),N.call(this,"selection","focusser")},initContainer:function(){var b,g,c=this.container,d=this.dropdown,e=f();this.opts.minimumResultsForSearch<0?this.showSearch(!1):this.showSearch(!0),this.selection=b=c.find(".select2-choice"),this.focusser=c.find(".select2-focusser"),b.find(".select2-chosen").attr("id","select2-chosen-"+e),this.focusser.attr("aria-labelledby","select2-chosen-"+e),this.results.attr("id","select2-results-"+e),this.search.attr("aria-owns","select2-results-"+e),this.focusser.attr("id","s2id_autogen"+e),g=a("label[for='"+this.opts.element.attr("id")+"']"),this.opts.element.focus(this.bind(function(){this.focus()})),this.focusser.prev().text(g.text()).attr("for",this.focusser.attr("id"));var h=this.opts.element.attr("title");this.opts.element.attr("title",h||g.text()),this.focusser.attr("tabindex",this.elementTabIndex),this.search.attr("id",this.focusser.attr("id")+"_search"),this.search.prev().text(a("label[for='"+this.focusser.attr("id")+"']").text()).attr("for",this.search.attr("id")),this.search.on("keydown",this.bind(function(a){if(this.isInterfaceEnabled()&&229!=a.keyCode){if(a.which===k.PAGE_UP||a.which===k.PAGE_DOWN)return A(a),void 0;switch(a.which){case k.UP:case k.DOWN:return this.moveHighlight(a.which===k.UP?-1:1),A(a),void 0;case k.ENTER:return this.selectHighlighted(),A(a),void 0;case k.TAB:return this.selectHighlighted({noFocus:!0}),void 0;case k.ESC:return this.cancel(a),A(a),void 0}}})),this.search.on("blur",this.bind(function(){document.activeElement===this.body.get(0)&&window.setTimeout(this.bind(function(){this.opened()&&this.search.focus()}),0)})),this.focusser.on("keydown",this.bind(function(a){if(this.isInterfaceEnabled()&&a.which!==k.TAB&&!k.isControl(a)&&!k.isFunctionKey(a)&&a.which!==k.ESC){if(this.opts.openOnEnter===!1&&a.which===k.ENTER)return A(a),void 0;if(a.which==k.DOWN||a.which==k.UP||a.which==k.ENTER&&this.opts.openOnEnter){if(a.altKey||a.ctrlKey||a.shiftKey||a.metaKey)return;return this.open(),A(a),void 0}return a.which==k.DELETE||a.which==k.BACKSPACE?(this.opts.allowClear&&this.clear(),A(a),void 0):void 0}})),u(this.focusser),this.focusser.on("keyup-change input",this.bind(function(a){if(this.opts.minimumResultsForSearch>=0){if(a.stopPropagation(),this.opened())return;this.open()}})),b.on("mousedown touchstart","abbr",this.bind(function(a){this.isInterfaceEnabled()&&(this.clear(),B(a),this.close(),this.selection&&this.selection.focus())})),b.on("mousedown touchstart",this.bind(function(c){n(b),this.container.hasClass("select2-container-active")||this.opts.element.trigger(a.Event("select2-focus")),this.opened()?this.close():this.isInterfaceEnabled()&&this.open(),A(c)})),d.on("mousedown touchstart",this.bind(function(){this.opts.shouldFocusInput(this)&&this.search.focus()})),b.on("focus",this.bind(function(a){A(a)})),this.focusser.on("focus",this.bind(function(){this.container.hasClass("select2-container-active")||this.opts.element.trigger(a.Event("select2-focus")),this.container.addClass("select2-container-active")})).on("blur",this.bind(function(){this.opened()||(this.container.removeClass("select2-container-active"),this.opts.element.trigger(a.Event("select2-blur")))})),this.search.on("focus",this.bind(function(){this.container.hasClass("select2-container-active")||this.opts.element.trigger(a.Event("select2-focus")),this.container.addClass("select2-container-active")})),this.initContainerWidth(),this.opts.element.hide(),this.setPlaceholder()},clear:function(b){var c=this.selection.data("select2-data");if(c){var d=a.Event("select2-clearing");if(this.opts.element.trigger(d),d.isDefaultPrevented())return;var e=this.getPlaceholderOption();this.opts.element.val(e?e.val():""),this.selection.find(".select2-chosen").empty(),this.selection.removeData("select2-data"),this.setPlaceholder(),b!==!1&&(this.opts.element.trigger({type:"select2-removed",val:this.id(c),choice:c}),this.triggerChange({removed:c}))}},initSelection:function(){if(this.isPlaceholderOptionSelected())this.updateSelection(null),this.close(),this.setPlaceholder();else{var c=this;this.opts.initSelection.call(null,this.opts.element,function(a){a!==b&&null!==a&&(c.updateSelection(a),c.close(),c.setPlaceholder(),c.nextSearchTerm=c.opts.nextSearchTerm(a,c.search.val()))})}},isPlaceholderOptionSelected:function(){var a;return this.getPlaceholder()===b?!1:(a=this.getPlaceholderOption())!==b&&a.prop("selected")||""===this.opts.element.val()||this.opts.element.val()===b||null===this.opts.element.val()},prepareOpts:function(){var b=this.parent.prepareOpts.apply(this,arguments),c=this;return"select"===b.element.get(0).tagName.toLowerCase()?b.initSelection=function(a,b){var d=a.find("option").filter(function(){return this.selected&&!this.disabled});b(c.optionToData(d))}:"data"in b&&(b.initSelection=b.initSelection||function(c,d){var e=c.val(),f=null;b.query({matcher:function(a,c,d){var g=r(e,b.id(d));return g&&(f=d),g},callback:a.isFunction(d)?function(){d(f)}:a.noop})}),b},getPlaceholder:function(){return this.select&&this.getPlaceholderOption()===b?b:this.parent.getPlaceholder.apply(this,arguments)},setPlaceholder:function(){var a=this.getPlaceholder();if(this.isPlaceholderOptionSelected()&&a!==b){if(this.select&&this.getPlaceholderOption()===b)return;this.selection.find(".select2-chosen").html(this.opts.escapeMarkup(a)),this.selection.addClass("select2-default"),this.container.removeClass("select2-allowclear")}},postprocessResults:function(a,b,c){var d=0,e=this;if(this.findHighlightableChoices().each2(function(a,b){return r(e.id(b.data("select2-data")),e.opts.element.val())?(d=a,!1):void 0}),c!==!1&&(b===!0&&d>=0?this.highlight(d):this.highlight(0)),b===!0){var g=this.opts.minimumResultsForSearch;g>=0&&this.showSearch(L(a.results)>=g)}},showSearch:function(b){this.showSearchInput!==b&&(this.showSearchInput=b,this.dropdown.find(".select2-search").toggleClass("select2-search-hidden",!b),this.dropdown.find(".select2-search").toggleClass("select2-offscreen",!b),a(this.dropdown,this.container).toggleClass("select2-with-searchbox",b))},onSelect:function(a,b){if(this.triggerSelect(a)){var c=this.opts.element.val(),d=this.data();this.opts.element.val(this.id(a)),this.updateSelection(a),this.opts.element.trigger({type:"select2-selected",val:this.id(a),choice:a}),this.nextSearchTerm=this.opts.nextSearchTerm(a,this.search.val()),this.close(),b&&b.noFocus||!this.opts.shouldFocusInput(this)||this.focusser.focus(),r(c,this.id(a))||this.triggerChange({added:a,removed:d})}},updateSelection:function(a){var d,e,c=this.selection.find(".select2-chosen");this.selection.data("select2-data",a),c.empty(),null!==a&&(d=this.opts.formatSelection(a,c,this.opts.escapeMarkup)),d!==b&&c.append(d),e=this.opts.formatSelectionCssClass(a,c),e!==b&&c.addClass(e),this.selection.removeClass("select2-default"),this.opts.allowClear&&this.getPlaceholder()!==b&&this.container.addClass("select2-allowclear")},val:function(){var a,c=!1,d=null,e=this,f=this.data();if(0===arguments.length)return this.opts.element.val();if(a=arguments[0],arguments.length>1&&(c=arguments[1]),this.select)this.select.val(a).find("option").filter(function(){return this.selected}).each2(function(a,b){return d=e.optionToData(b),!1}),this.updateSelection(d),this.setPlaceholder(),c&&this.triggerChange({added:d,removed:f});else{if(!a&&0!==a)return this.clear(c),void 0;if(this.opts.initSelection===b)throw new Error("cannot call val() if initSelection() is not defined");this.opts.element.val(a),this.opts.initSelection(this.opts.element,function(a){e.opts.element.val(a?e.id(a):""),e.updateSelection(a),e.setPlaceholder(),c&&e.triggerChange({added:a,removed:f})})}},clearSearch:function(){this.search.val(""),this.focusser.val("")},data:function(a){var c,d=!1;return 0===arguments.length?(c=this.selection.data("select2-data"),c==b&&(c=null),c):(arguments.length>1&&(d=arguments[1]),a?(c=this.data(),this.opts.element.val(a?this.id(a):""),this.updateSelection(a),d&&this.triggerChange({added:a,removed:c})):this.clear(d),void 0)}}),e=O(c,{createContainer:function(){var b=a(document.createElement("div")).attr({"class":"select2-container select2-container-multi"}).html(["<ul class='select2-choices'>","  <li class='select2-search-field'>","    <label for='' class='select2-offscreen'></label>","    <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input'>","  </li>","</ul>","<div class='select2-drop select2-drop-multi select2-display-none'>","   <ul class='select2-results'>","   </ul>","</div>"].join(""));return b},prepareOpts:function(){var b=this.parent.prepareOpts.apply(this,arguments),c=this;return"select"===b.element.get(0).tagName.toLowerCase()?b.initSelection=function(a,b){var d=[];a.find("option").filter(function(){return this.selected&&!this.disabled}).each2(function(a,b){d.push(c.optionToData(b))}),b(d)}:"data"in b&&(b.initSelection=b.initSelection||function(c,d){var e=s(c.val(),b.separator,b.transformVal),f=[];b.query({matcher:function(c,d,g){var h=a.grep(e,function(a){return r(a,b.id(g))}).length;return h&&f.push(g),h},callback:a.isFunction(d)?function(){for(var a=[],c=0;c<e.length;c++)for(var g=e[c],h=0;h<f.length;h++){var i=f[h];if(r(g,b.id(i))){a.push(i),f.splice(h,1);break}}d(a)}:a.noop})}),b},selectChoice:function(a){var b=this.container.find(".select2-search-choice-focus");b.length&&a&&a[0]==b[0]||(b.length&&this.opts.element.trigger("choice-deselected",b),b.removeClass("select2-search-choice-focus"),a&&a.length&&(this.close(),a.addClass("select2-search-choice-focus"),this.opts.element.trigger("choice-selected",a)))},destroy:function(){a("label[for='"+this.search.attr("id")+"']").attr("for",this.opts.element.attr("id")),this.parent.destroy.apply(this,arguments),N.call(this,"searchContainer","selection")},initContainer:function(){var c,b=".select2-choices";this.searchContainer=this.container.find(".select2-search-field"),this.selection=c=this.container.find(b);var d=this;this.selection.on("click",".select2-container:not(.select2-container-disabled) .select2-search-choice:not(.select2-locked)",function(){d.search[0].focus(),d.selectChoice(a(this))}),this.search.attr("id","s2id_autogen"+f()),this.search.prev().text(a("label[for='"+this.opts.element.attr("id")+"']").text()).attr("for",this.search.attr("id")),this.opts.element.focus(this.bind(function(){this.focus()})),this.search.on("input paste",this.bind(function(){this.search.attr("placeholder")&&0==this.search.val().length||this.isInterfaceEnabled()&&(this.opened()||this.open())})),this.search.attr("tabindex",this.elementTabIndex),this.keydowns=0,this.search.on("keydown",this.bind(function(a){if(this.isInterfaceEnabled()){++this.keydowns;var b=c.find(".select2-search-choice-focus"),d=b.prev(".select2-search-choice:not(.select2-locked)"),e=b.next(".select2-search-choice:not(.select2-locked)"),f=z(this.search);if(b.length&&(a.which==k.LEFT||a.which==k.RIGHT||a.which==k.BACKSPACE||a.which==k.DELETE||a.which==k.ENTER)){var g=b;return a.which==k.LEFT&&d.length?g=d:a.which==k.RIGHT?g=e.length?e:null:a.which===k.BACKSPACE?this.unselect(b.first())&&(this.search.width(10),g=d.length?d:e):a.which==k.DELETE?this.unselect(b.first())&&(this.search.width(10),g=e.length?e:null):a.which==k.ENTER&&(g=null),this.selectChoice(g),A(a),g&&g.length||this.open(),void 0}if((a.which===k.BACKSPACE&&1==this.keydowns||a.which==k.LEFT)&&0==f.offset&&!f.length)return this.selectChoice(c.find(".select2-search-choice:not(.select2-locked)").last()),A(a),void 0;if(this.selectChoice(null),this.opened())switch(a.which){case k.UP:case k.DOWN:return this.moveHighlight(a.which===k.UP?-1:1),A(a),void 0;case k.ENTER:return this.selectHighlighted(),A(a),void 0;case k.TAB:return this.selectHighlighted({noFocus:!0}),this.close(),void 0;case k.ESC:return this.cancel(a),A(a),void 0}if(a.which!==k.TAB&&!k.isControl(a)&&!k.isFunctionKey(a)&&a.which!==k.BACKSPACE&&a.which!==k.ESC){if(a.which===k.ENTER){if(this.opts.openOnEnter===!1)return;if(a.altKey||a.ctrlKey||a.shiftKey||a.metaKey)return}this.open(),(a.which===k.PAGE_UP||a.which===k.PAGE_DOWN)&&A(a),a.which===k.ENTER&&A(a)}}})),this.search.on("keyup",this.bind(function(){this.keydowns=0,this.resizeSearch()})),this.search.on("blur",this.bind(function(b){this.container.removeClass("select2-container-active"),this.search.removeClass("select2-focused"),this.selectChoice(null),this.opened()||this.clearSearch(),b.stopImmediatePropagation(),this.opts.element.trigger(a.Event("select2-blur"))})),this.container.on("click",b,this.bind(function(b){this.isInterfaceEnabled()&&(a(b.target).closest(".select2-search-choice").length>0||(this.selectChoice(null),this.clearPlaceholder(),this.container.hasClass("select2-container-active")||this.opts.element.trigger(a.Event("select2-focus")),this.open(),this.focusSearch(),b.preventDefault()))})),this.container.on("focus",b,this.bind(function(){this.isInterfaceEnabled()&&(this.container.hasClass("select2-container-active")||this.opts.element.trigger(a.Event("select2-focus")),this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"),this.clearPlaceholder())})),this.initContainerWidth(),this.opts.element.hide(),this.clearSearch()},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.search.prop("disabled",!this.isInterfaceEnabled())},initSelection:function(){if(""===this.opts.element.val()&&""===this.opts.element.text()&&(this.updateSelection([]),this.close(),this.clearSearch()),this.select||""!==this.opts.element.val()){var c=this;this.opts.initSelection.call(null,this.opts.element,function(a){a!==b&&null!==a&&(c.updateSelection(a),c.close(),c.clearSearch())})}},clearSearch:function(){var a=this.getPlaceholder(),c=this.getMaxSearchWidth();a!==b&&0===this.getVal().length&&this.search.hasClass("select2-focused")===!1?(this.search.val(a).addClass("select2-default"),this.search.width(c>0?c:this.container.css("width"))):this.search.val("").width(10)},clearPlaceholder:function(){this.search.hasClass("select2-default")&&this.search.val("").removeClass("select2-default")},opening:function(){this.clearPlaceholder(),this.resizeSearch(),this.parent.opening.apply(this,arguments),this.focusSearch(),""===this.search.val()&&this.nextSearchTerm!=b&&(this.search.val(this.nextSearchTerm),this.search.select()),this.updateResults(!0),this.opts.shouldFocusInput(this)&&this.search.focus(),this.opts.element.trigger(a.Event("select2-open"))},close:function(){this.opened()&&this.parent.close.apply(this,arguments)},focus:function(){this.close(),this.search.focus()},isFocused:function(){return this.search.hasClass("select2-focused")},updateSelection:function(b){var c=[],d=[],e=this;a(b).each(function(){p(e.id(this),c)<0&&(c.push(e.id(this)),d.push(this))}),b=d,this.selection.find(".select2-search-choice").remove(),a(b).each(function(){e.addSelectedChoice(this)}),e.postprocessResults()},tokenize:function(){var a=this.search.val();a=this.opts.tokenizer.call(this,a,this.data(),this.bind(this.onSelect),this.opts),null!=a&&a!=b&&(this.search.val(a),a.length>0&&this.open())},onSelect:function(a,c){this.triggerSelect(a)&&""!==a.text&&(this.addSelectedChoice(a),this.opts.element.trigger({type:"selected",val:this.id(a),choice:a}),this.nextSearchTerm=this.opts.nextSearchTerm(a,this.search.val()),this.clearSearch(),this.updateResults(),(this.select||!this.opts.closeOnSelect)&&this.postprocessResults(a,!1,this.opts.closeOnSelect===!0),this.opts.closeOnSelect?(this.close(),this.search.width(10)):this.countSelectableResults()>0?(this.search.width(10),this.resizeSearch(),this.getMaximumSelectionSize()>0&&this.val().length>=this.getMaximumSelectionSize()?this.updateResults(!0):this.nextSearchTerm!=b&&(this.search.val(this.nextSearchTerm),this.updateResults(),this.search.select()),this.positionDropdown()):(this.close(),this.search.width(10)),this.triggerChange({added:a}),c&&c.noFocus||this.focusSearch())},cancel:function(){this.close(),this.focusSearch()},addSelectedChoice:function(c){var j,k,d=!c.locked,e=a("<li class='select2-search-choice'>    <div></div>    <a href='#' class='select2-search-choice-close' tabindex='-1'></a></li>"),f=a("<li class='select2-search-choice select2-locked'><div></div></li>"),g=d?e:f,h=this.id(c),i=this.getVal();j=this.opts.formatSelection(c,g.find("div"),this.opts.escapeMarkup),j!=b&&g.find("div").replaceWith(a("<div></div>").html(j)),k=this.opts.formatSelectionCssClass(c,g.find("div")),k!=b&&g.addClass(k),d&&g.find(".select2-search-choice-close").on("mousedown",A).on("click dblclick",this.bind(function(b){this.isInterfaceEnabled()&&(this.unselect(a(b.target)),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus"),A(b),this.close(),this.focusSearch())})).on("focus",this.bind(function(){this.isInterfaceEnabled()&&(this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"))})),g.data("select2-data",c),g.insertBefore(this.searchContainer),i.push(h),this.setVal(i)},unselect:function(b){var d,e,c=this.getVal();if(b=b.closest(".select2-search-choice"),0===b.length)throw"Invalid argument: "+b+". Must be .select2-search-choice";if(d=b.data("select2-data")){var f=a.Event("select2-removing");if(f.val=this.id(d),f.choice=d,this.opts.element.trigger(f),f.isDefaultPrevented())return!1;for(;(e=p(this.id(d),c))>=0;)c.splice(e,1),this.setVal(c),this.select&&this.postprocessResults();return b.remove(),this.opts.element.trigger({type:"select2-removed",val:this.id(d),choice:d}),this.triggerChange({removed:d}),!0}},postprocessResults:function(a,b,c){var d=this.getVal(),e=this.results.find(".select2-result"),f=this.results.find(".select2-result-with-children"),g=this;e.each2(function(a,b){var c=g.id(b.data("select2-data"));p(c,d)>=0&&(b.addClass("select2-selected"),b.find(".select2-result-selectable").addClass("select2-selected"))}),f.each2(function(a,b){b.is(".select2-result-selectable")||0!==b.find(".select2-result-selectable:not(.select2-selected)").length||b.addClass("select2-selected")}),-1==this.highlight()&&c!==!1&&this.opts.closeOnSelect===!0&&g.highlight(0),!this.opts.createSearchChoice&&!e.filter(".select2-result:not(.select2-selected)").length>0&&(!a||a&&!a.more&&0===this.results.find(".select2-no-results").length)&&J(g.opts.formatNoMatches,"formatNoMatches")&&this.results.append("<li class='select2-no-results'>"+K(g.opts.formatNoMatches,g.opts.element,g.search.val())+"</li>")},getMaxSearchWidth:function(){return this.selection.width()-t(this.search)},resizeSearch:function(){var a,b,c,d,e,f=t(this.search);a=C(this.search)+10,b=this.search.offset().left,c=this.selection.width(),d=this.selection.offset().left,e=c-(b-d)-f,a>e&&(e=c-f),40>e&&(e=c-f),0>=e&&(e=a),this.search.width(Math.floor(e))},getVal:function(){var a;return this.select?(a=this.select.val(),null===a?[]:a):(a=this.opts.element.val(),s(a,this.opts.separator,this.opts.transformVal))},setVal:function(b){var c;this.select?this.select.val(b):(c=[],a(b).each(function(){p(this,c)<0&&c.push(this)}),this.opts.element.val(0===c.length?"":c.join(this.opts.separator)))},buildChangeDetails:function(a,b){for(var b=b.slice(0),a=a.slice(0),c=0;c<b.length;c++)for(var d=0;d<a.length;d++)r(this.opts.id(b[c]),this.opts.id(a[d]))&&(b.splice(c,1),c>0&&c--,a.splice(d,1),d--);return{added:b,removed:a}},val:function(c,d){var e,f=this;if(0===arguments.length)return this.getVal();if(e=this.data(),e.length||(e=[]),!c&&0!==c)return this.opts.element.val(""),this.updateSelection([]),this.clearSearch(),d&&this.triggerChange({added:this.data(),removed:e}),void 0;if(this.setVal(c),this.select)this.opts.initSelection(this.select,this.bind(this.updateSelection)),d&&this.triggerChange(this.buildChangeDetails(e,this.data()));else{if(this.opts.initSelection===b)throw new Error("val() cannot be called if initSelection() is not defined");this.opts.initSelection(this.opts.element,function(b){var c=a.map(b,f.id);f.setVal(c),f.updateSelection(b),f.clearSearch(),d&&f.triggerChange(f.buildChangeDetails(e,f.data()))})}this.clearSearch()},onSortStart:function(){if(this.select)throw new Error("Sorting of elements is not supported when attached to <select>. Attach to <input type='hidden'/> instead.");this.search.width(0),this.searchContainer.hide()},onSortEnd:function(){var b=[],c=this;this.searchContainer.show(),this.searchContainer.appendTo(this.searchContainer.parent()),this.resizeSearch(),this.selection.find(".select2-search-choice").each(function(){b.push(c.opts.id(a(this).data("select2-data")))}),this.setVal(b),this.triggerChange()},data:function(b,c){var e,f,d=this;return 0===arguments.length?this.selection.children(".select2-search-choice").map(function(){return a(this).data("select2-data")}).get():(f=this.data(),b||(b=[]),e=a.map(b,function(a){return d.opts.id(a)}),this.setVal(e),this.updateSelection(b),this.clearSearch(),c&&this.triggerChange(this.buildChangeDetails(f,this.data())),void 0)}}),a.fn.select2=function(){var d,e,f,g,h,c=Array.prototype.slice.call(arguments,0),i=["val","destroy","opened","open","close","focus","isFocused","container","dropdown","onSortStart","onSortEnd","enable","disable","readonly","positionDropdown","data","search"],j=["opened","isFocused","container","dropdown"],k=["val","data"],l={search:"externalSearch"};return this.each(function(){if(0===c.length||"object"==typeof c[0])d=0===c.length?{}:a.extend({},c[0]),d.element=a(this),"select"===d.element.get(0).tagName.toLowerCase()?h=d.element.prop("multiple"):(h=d.multiple||!1,"tags"in d&&(d.multiple=h=!0)),e=h?new window.Select2["class"].multi:new window.Select2["class"].single,e.init(d);else{if("string"!=typeof c[0])throw"Invalid arguments to select2 plugin: "+c;if(p(c[0],i)<0)throw"Unknown method: "+c[0];if(g=b,e=a(this).data("select2"),e===b)return;if(f=c[0],"container"===f?g=e.container:"dropdown"===f?g=e.dropdown:(l[f]&&(f=l[f]),g=e[f].apply(e,c.slice(1))),p(c[0],j)>=0||p(c[0],k)>=0&&1==c.length)return!1}}),g===b?this:g},a.fn.select2.defaults={width:"copy",loadMorePadding:0,closeOnSelect:!0,openOnEnter:!0,containerCss:{},dropdownCss:{},containerCssClass:"",dropdownCssClass:"",formatResult:function(a,b,c,d){var e=[];return E(this.text(a),c.term,e,d),e.join("")},transformVal:function(b){return a.trim(b)},formatSelection:function(a,c,d){return a?d(this.text(a)):b},sortResults:function(a){return a},formatResultCssClass:function(a){return a.css},formatSelectionCssClass:function(){return b},minimumResultsForSearch:0,minimumInputLength:0,maximumInputLength:null,maximumSelectionSize:0,id:function(a){return a==b?null:a.id},text:function(b){return b&&this.data&&this.data.text?a.isFunction(this.data.text)?this.data.text(b):b[this.data.text]:b.text -},matcher:function(a,b){return o(""+b).toUpperCase().indexOf(o(""+a).toUpperCase())>=0},separator:",",tokenSeparators:[],tokenizer:M,escapeMarkup:F,blurOnChange:!1,selectOnBlur:!1,adaptContainerCssClass:function(a){return a},adaptDropdownCssClass:function(){return null},nextSearchTerm:function(){return b},searchInputPlaceholder:"",createSearchChoicePosition:"top",shouldFocusInput:function(a){var b="ontouchstart"in window||navigator.msMaxTouchPoints>0;return b?a.opts.minimumResultsForSearch<0?!1:!0:!0}},a.fn.select2.locales=[],a.fn.select2.locales.en={formatMatches:function(a){return 1===a?"One result is available, press enter to select it.":a+" results are available, use up and down arrow keys to navigate."},formatNoMatches:function(){return"No matches found"},formatAjaxError:function(){return"Loading failed"},formatInputTooShort:function(a,b){var c=b-a.length;return"Please enter "+c+" or more character"+(1==c?"":"s")},formatInputTooLong:function(a,b){var c=a.length-b;return"Please delete "+c+" character"+(1==c?"":"s")},formatSelectionTooBig:function(a){return"You can only select "+a+" item"+(1==a?"":"s")},formatLoadMore:function(){return"Loading more results\u2026"},formatSearching:function(){return"Searching\u2026"}},a.extend(a.fn.select2.defaults,a.fn.select2.locales.en),a.fn.select2.ajaxDefaults={transport:a.ajax,params:{type:"GET",cache:!1,dataType:"json"}},window.Select2={query:{ajax:G,local:H,tags:I},util:{debounce:w,markMatch:E,escapeMarkup:F,stripDiacritics:o},"class":{"abstract":c,single:d,multi:e}}}}(jQuery);
\ No newline at end of file +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){var b=function(){if(a&&a.fn&&a.fn.select2&&a.fn.select2.amd)var b=a.fn.select2.amd;var b;return function(){if(!b||!b.requirejs){b?c=b:b={};var a,c,d;!function(b){function e(a,b){return u.call(a,b)}function f(a,b){var c,d,e,f,g,h,i,j,k,l,m,n=b&&b.split("/"),o=s.map,p=o&&o["*"]||{};if(a&&"."===a.charAt(0))if(b){for(a=a.split("/"),g=a.length-1,s.nodeIdCompat&&w.test(a[g])&&(a[g]=a[g].replace(w,"")),a=n.slice(0,n.length-1).concat(a),k=0;k<a.length;k+=1)if(m=a[k],"."===m)a.splice(k,1),k-=1;else if(".."===m){if(1===k&&(".."===a[2]||".."===a[0]))break;k>0&&(a.splice(k-1,2),k-=2)}a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((n||p)&&o){for(c=a.split("/"),k=c.length;k>0;k-=1){if(d=c.slice(0,k).join("/"),n)for(l=n.length;l>0;l-=1)if(e=o[n.slice(0,l).join("/")],e&&(e=e[d])){f=e,h=k;break}if(f)break;!i&&p&&p[d]&&(i=p[d],j=k)}!f&&i&&(f=i,h=j),f&&(c.splice(0,h,f),a=c.join("/"))}return a}function g(a,c){return function(){var d=v.call(arguments,0);return"string"!=typeof d[0]&&1===d.length&&d.push(null),n.apply(b,d.concat([a,c]))}}function h(a){return function(b){return f(b,a)}}function i(a){return function(b){q[a]=b}}function j(a){if(e(r,a)){var c=r[a];delete r[a],t[a]=!0,m.apply(b,c)}if(!e(q,a)&&!e(t,a))throw new Error("No "+a);return q[a]}function k(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function l(a){return function(){return s&&s.config&&s.config[a]||{}}}var m,n,o,p,q={},r={},s={},t={},u=Object.prototype.hasOwnProperty,v=[].slice,w=/\.js$/;o=function(a,b){var c,d=k(a),e=d[0];return a=d[1],e&&(e=f(e,b),c=j(e)),e?a=c&&c.normalize?c.normalize(a,h(b)):f(a,b):(a=f(a,b),d=k(a),e=d[0],a=d[1],e&&(c=j(e))),{f:e?e+"!"+a:a,n:a,pr:e,p:c}},p={require:function(a){return g(a)},exports:function(a){var b=q[a];return"undefined"!=typeof b?b:q[a]={}},module:function(a){return{id:a,uri:"",exports:q[a],config:l(a)}}},m=function(a,c,d,f){var h,k,l,m,n,s,u=[],v=typeof d;if(f=f||a,"undefined"===v||"function"===v){for(c=!c.length&&d.length?["require","exports","module"]:c,n=0;n<c.length;n+=1)if(m=o(c[n],f),k=m.f,"require"===k)u[n]=p.require(a);else if("exports"===k)u[n]=p.exports(a),s=!0;else if("module"===k)h=u[n]=p.module(a);else if(e(q,k)||e(r,k)||e(t,k))u[n]=j(k);else{if(!m.p)throw new Error(a+" missing "+k);m.p.load(m.n,g(f,!0),i(k),{}),u[n]=q[k]}l=d?d.apply(q[a],u):void 0,a&&(h&&h.exports!==b&&h.exports!==q[a]?q[a]=h.exports:l===b&&s||(q[a]=l))}else a&&(q[a]=d)},a=c=n=function(a,c,d,e,f){if("string"==typeof a)return p[a]?p[a](c):j(o(a,c).f);if(!a.splice){if(s=a,s.deps&&n(s.deps,s.callback),!c)return;c.splice?(a=c,c=d,d=null):a=b}return c=c||function(){},"function"==typeof d&&(d=e,e=f),e?m(b,a,c,d):setTimeout(function(){m(b,a,c,d)},4),n},n.config=function(a){return n(a)},a._defined=q,d=function(a,b,c){if("string"!=typeof a)throw new Error("See almond README: incorrect module build, no module name");b.splice||(c=b,b=[]),e(q,a)||e(r,a)||(r[a]=[a,b,c])},d.amd={jQuery:!0}}(),b.requirejs=a,b.require=c,b.define=d}}(),b.define("almond",function(){}),b.define("jquery",[],function(){var b=a||$;return null==b&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),b}),b.define("select2/utils",["jquery"],function(a){function b(a){var b=a.prototype,c=[];for(var d in b){var e=b[d];"function"==typeof e&&"constructor"!==d&&c.push(d)}return c}var c={};c.Extend=function(a,b){function c(){this.constructor=a}var d={}.hasOwnProperty;for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},c.Decorate=function(a,c){function d(){var b=Array.prototype.unshift,d=c.prototype.constructor.length,e=a.prototype.constructor;d>0&&(b.call(arguments,a.prototype.constructor),e=c.prototype.constructor),e.apply(this,arguments)}function e(){this.constructor=d}var f=b(c),g=b(a);c.displayName=a.displayName,d.prototype=new e;for(var h=0;h<g.length;h++){var i=g[h];d.prototype[i]=a.prototype[i]}for(var j=(function(a){var b=function(){};a in d.prototype&&(b=d.prototype[a]);var e=c.prototype[a];return function(){var a=Array.prototype.unshift;return a.call(arguments,b),e.apply(this,arguments)}}),k=0;k<f.length;k++){var l=f[k];d.prototype[l]=j(l)}return d};var d=function(){this.listeners={}};return d.prototype.on=function(a,b){this.listeners=this.listeners||{},a in this.listeners?this.listeners[a].push(b):this.listeners[a]=[b]},d.prototype.trigger=function(a){var b=Array.prototype.slice,c=b.call(arguments,1);this.listeners=this.listeners||{},null==c&&(c=[]),0===c.length&&c.push({}),c[0]._type=a,a in this.listeners&&this.invoke(this.listeners[a],b.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},d.prototype.invoke=function(a,b){for(var c=0,d=a.length;d>c;c++)a[c].apply(this,b)},c.Observable=d,c.generateChars=function(a){for(var b="",c=0;a>c;c++){var d=Math.floor(36*Math.random());b+=d.toString(36)}return b},c.bind=function(a,b){return function(){a.apply(b,arguments)}},c._convertData=function(a){for(var b in a){var c=b.split("-"),d=a;if(1!==c.length){for(var e=0;e<c.length;e++){var f=c[e];f=f.substring(0,1).toLowerCase()+f.substring(1),f in d||(d[f]={}),e==c.length-1&&(d[f]=a[b]),d=d[f]}delete a[b]}}return a},c.hasScroll=function(b,c){var d=a(c),e=c.style.overflowX,f=c.style.overflowY;return e!==f||"hidden"!==f&&"visible"!==f?"scroll"===e||"scroll"===f?!0:d.innerHeight()<c.scrollHeight||d.innerWidth()<c.scrollWidth:!1},c.escapeMarkup=function(a){var b={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return"string"!=typeof a?a:String(a).replace(/[&<>"'\/\\]/g,function(a){return b[a]})},c.appendMany=function(b,c){if("1.7"===a.fn.jquery.substr(0,3)){var d=a();a.map(c,function(a){d=d.add(a)}),c=d}b.append(c)},c}),b.define("select2/results",["jquery","./utils"],function(a,b){function c(a,b,d){this.$element=a,this.data=d,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('<ul class="select2-results__options" role="tree"></ul>');return this.options.get("multiple")&&b.attr("aria-multiselectable","true"),this.$results=b,b},c.prototype.clear=function(){this.$results.empty()},c.prototype.displayMessage=function(b){var c=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var d=a('<li role="treeitem" aria-live="assertive" class="select2-results__option"></li>'),e=this.options.get("translations").get(b.message);d.append(c(e(b.args))),d[0].className+=" select2-results__message",this.$results.append(d)},c.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},c.prototype.append=function(a){this.hideLoading();var b=[];if(null==a.results||0===a.results.length)return void(0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"}));a.results=this.sort(a.results);for(var c=0;c<a.results.length;c++){var d=a.results[c],e=this.option(d);b.push(e)}this.$results.append(b)},c.prototype.position=function(a,b){var c=b.find(".select2-results");c.append(a)},c.prototype.sort=function(a){var b=this.options.get("sorter");return b(a)},c.prototype.highlightFirstItem=function(){var a=this.$results.find(".select2-results__option[aria-selected]"),b=a.filter("[aria-selected=true]");b.length>0?b.first().trigger("mouseenter"):a.first().trigger("mouseenter"),this.ensureHighlightVisible()},c.prototype.setClasses=function(){var b=this;this.data.current(function(c){var d=a.map(c,function(a){return a.id.toString()}),e=b.$results.find(".select2-results__option[aria-selected]");e.each(function(){var b=a(this),c=a.data(this,"data"),e=""+c.id;null!=c.element&&c.element.selected||null==c.element&&a.inArray(e,d)>-1?b.attr("aria-selected","true"):b.attr("aria-selected","false")})})},c.prototype.showLoading=function(a){this.hideLoading();var b=this.options.get("translations").get("searching"),c={disabled:!0,loading:!0,text:b(a)},d=this.option(c);d.className+=" loading-results",this.$results.prepend(d)},c.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},c.prototype.option=function(b){var c=document.createElement("li");c.className="select2-results__option";var d={role:"treeitem","aria-selected":"false"};b.disabled&&(delete d["aria-selected"],d["aria-disabled"]="true"),null==b.id&&delete d["aria-selected"],null!=b._resultId&&(c.id=b._resultId),b.title&&(c.title=b.title),b.children&&(d.role="group",d["aria-label"]=b.text,delete d["aria-selected"]);for(var e in d){var f=d[e];c.setAttribute(e,f)}if(b.children){var g=a(c),h=document.createElement("strong");h.className="select2-results__group";a(h);this.template(b,h);for(var i=[],j=0;j<b.children.length;j++){var k=b.children[j],l=this.option(k);i.push(l)}var m=a("<ul></ul>",{"class":"select2-results__options select2-results__options--nested"});m.append(i),g.append(h),g.append(m)}else this.template(b,c);return a.data(c,"data",b),c},c.prototype.bind=function(b,c){var d=this,e=b.id+"-results";this.$results.attr("id",e),b.on("results:all",function(a){d.clear(),d.append(a.data),b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("results:append",function(a){d.append(a.data),b.isOpen()&&d.setClasses()}),b.on("query",function(a){d.hideMessages(),d.showLoading(a)}),b.on("select",function(){b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("unselect",function(){b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("open",function(){d.$results.attr("aria-expanded","true"),d.$results.attr("aria-hidden","false"),d.setClasses(),d.ensureHighlightVisible()}),b.on("close",function(){d.$results.attr("aria-expanded","false"),d.$results.attr("aria-hidden","true"),d.$results.removeAttr("aria-activedescendant")}),b.on("results:toggle",function(){var a=d.getHighlightedResults();0!==a.length&&a.trigger("mouseup")}),b.on("results:select",function(){var a=d.getHighlightedResults();if(0!==a.length){var b=a.data("data");"true"==a.attr("aria-selected")?d.trigger("close",{}):d.trigger("select",{data:b})}}),b.on("results:previous",function(){var a=d.getHighlightedResults(),b=d.$results.find("[aria-selected]"),c=b.index(a);if(0!==c){var e=c-1;0===a.length&&(e=0);var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top,h=f.offset().top,i=d.$results.scrollTop()+(h-g);0===e?d.$results.scrollTop(0):0>h-g&&d.$results.scrollTop(i)}}),b.on("results:next",function(){var a=d.getHighlightedResults(),b=d.$results.find("[aria-selected]"),c=b.index(a),e=c+1;if(!(e>=b.length)){var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top+d.$results.outerHeight(!1),h=f.offset().top+f.outerHeight(!1),i=d.$results.scrollTop()+h-g;0===e?d.$results.scrollTop(0):h>g&&d.$results.scrollTop(i)}}),b.on("results:focus",function(a){a.element.addClass("select2-results__option--highlighted")}),b.on("results:message",function(a){d.displayMessage(a)}),a.fn.mousewheel&&this.$results.on("mousewheel",function(a){var b=d.$results.scrollTop(),c=d.$results.get(0).scrollHeight-b+a.deltaY,e=a.deltaY>0&&b-a.deltaY<=0,f=a.deltaY<0&&c<=d.$results.height();e?(d.$results.scrollTop(0),a.preventDefault(),a.stopPropagation()):f&&(d.$results.scrollTop(d.$results.get(0).scrollHeight-d.$results.height()),a.preventDefault(),a.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(b){var c=a(this),e=c.data("data");return"true"===c.attr("aria-selected")?void(d.options.get("multiple")?d.trigger("unselect",{originalEvent:b,data:e}):d.trigger("close",{})):void d.trigger("select",{originalEvent:b,data:e})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(b){var c=a(this).data("data");d.getHighlightedResults().removeClass("select2-results__option--highlighted"),d.trigger("results:focus",{data:c,element:a(this)})})},c.prototype.getHighlightedResults=function(){var a=this.$results.find(".select2-results__option--highlighted");return a},c.prototype.destroy=function(){this.$results.remove()},c.prototype.ensureHighlightVisible=function(){var a=this.getHighlightedResults();if(0!==a.length){var b=this.$results.find("[aria-selected]"),c=b.index(a),d=this.$results.offset().top,e=a.offset().top,f=this.$results.scrollTop()+(e-d),g=e-d;f-=2*a.outerHeight(!1),2>=c?this.$results.scrollTop(0):(g>this.$results.outerHeight()||0>g)&&this.$results.scrollTop(f)}},c.prototype.template=function(b,c){var d=this.options.get("templateResult"),e=this.options.get("escapeMarkup"),f=d(b,c);null==f?c.style.display="none":"string"==typeof f?c.innerHTML=e(f):a(c).append(f)},c}),b.define("select2/keys",[],function(){var a={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46};return a}),b.define("select2/selection/base",["jquery","../utils","../keys"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,b.Observable),d.prototype.render=function(){var b=a('<span class="select2-selection" role="combobox"  aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),b.attr("title",this.$element.attr("title")),b.attr("tabindex",this._tabindex),this.$selection=b,b},d.prototype.bind=function(a,b){var d=this,e=(a.id+"-container",a.id+"-results");this.container=a,this.$selection.on("focus",function(a){d.trigger("focus",a)}),this.$selection.on("blur",function(a){d._handleBlur(a)}),this.$selection.on("keydown",function(a){d.trigger("keypress",a),a.which===c.SPACE&&a.preventDefault()}),a.on("results:focus",function(a){d.$selection.attr("aria-activedescendant",a.data._resultId)}),a.on("selection:update",function(a){d.update(a.data)}),a.on("open",function(){d.$selection.attr("aria-expanded","true"),d.$selection.attr("aria-owns",e),d._attachCloseHandler(a)}),a.on("close",function(){d.$selection.attr("aria-expanded","false"),d.$selection.removeAttr("aria-activedescendant"),d.$selection.removeAttr("aria-owns"),d.$selection.focus(),d._detachCloseHandler(a)}),a.on("enable",function(){d.$selection.attr("tabindex",d._tabindex)}),a.on("disable",function(){d.$selection.attr("tabindex","-1")})},d.prototype._handleBlur=function(b){var c=this;window.setTimeout(function(){document.activeElement==c.$selection[0]||a.contains(c.$selection[0],document.activeElement)||c.trigger("blur",b)},1)},d.prototype._attachCloseHandler=function(b){a(document.body).on("mousedown.select2."+b.id,function(b){var c=a(b.target),d=c.closest(".select2"),e=a(".select2.select2-container--open");e.each(function(){var b=a(this);if(this!=d[0]){var c=b.data("element");c.select2("close")}})})},d.prototype._detachCloseHandler=function(b){a(document.body).off("mousedown.select2."+b.id)},d.prototype.position=function(a,b){var c=b.find(".selection");c.append(a)},d.prototype.destroy=function(){this._detachCloseHandler(this.container)},d.prototype.update=function(a){throw new Error("The `update` method must be defined in child classes.")},d}),b.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(a,b,c,d){function e(){e.__super__.constructor.apply(this,arguments)}return c.Extend(e,b),e.prototype.render=function(){var a=e.__super__.render.call(this);return a.addClass("select2-selection--single"),a.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),a},e.prototype.bind=function(a,b){var c=this;e.__super__.bind.apply(this,arguments);var d=a.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",d),this.$selection.attr("aria-labelledby",d),this.$selection.on("mousedown",function(a){1===a.which&&c.trigger("toggle",{originalEvent:a})}),this.$selection.on("focus",function(a){}),this.$selection.on("blur",function(a){}),a.on("focus",function(b){a.isOpen()||c.$selection.focus()}),a.on("selection:update",function(a){c.update(a.data)})},e.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},e.prototype.display=function(a,b){var c=this.options.get("templateSelection"),d=this.options.get("escapeMarkup");return d(c(a,b))},e.prototype.selectionContainer=function(){return a("<span></span>")},e.prototype.update=function(a){if(0===a.length)return void this.clear();var b=a[0],c=this.$selection.find(".select2-selection__rendered"),d=this.display(b,c);c.empty().append(d),c.prop("title",b.title||b.text)},e}),b.define("select2/selection/multiple",["jquery","./base","../utils"],function(a,b,c){function d(a,b){d.__super__.constructor.apply(this,arguments)}return c.Extend(d,b),d.prototype.render=function(){var a=d.__super__.render.call(this);return a.addClass("select2-selection--multiple"),a.html('<ul class="select2-selection__rendered"></ul>'),a},d.prototype.bind=function(b,c){var e=this;d.__super__.bind.apply(this,arguments),this.$selection.on("click",function(a){e.trigger("toggle",{originalEvent:a})}),this.$selection.on("click",".select2-selection__choice__remove",function(b){if(!e.options.get("disabled")){var c=a(this),d=c.parent(),f=d.data("data");e.trigger("unselect",{originalEvent:b,data:f})}})},d.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},d.prototype.display=function(a,b){var c=this.options.get("templateSelection"),d=this.options.get("escapeMarkup");return d(c(a,b))},d.prototype.selectionContainer=function(){var b=a('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">×</span></li>');return b},d.prototype.update=function(a){if(this.clear(),0!==a.length){for(var b=[],d=0;d<a.length;d++){var e=a[d],f=this.selectionContainer(),g=this.display(e,f);f.append(g),f.prop("title",e.title||e.text),f.data("data",e),b.push(f)}var h=this.$selection.find(".select2-selection__rendered");c.appendMany(h,b)}},d}),b.define("select2/selection/placeholder",["../utils"],function(a){function b(a,b,c){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c)}return b.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},b.prototype.createPlaceholder=function(a,b){var c=this.selectionContainer();return c.html(this.display(b)),c.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),c},b.prototype.update=function(a,b){var c=1==b.length&&b[0].id!=this.placeholder.id,d=b.length>1;if(d||c)return a.call(this,b);this.clear();var e=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(e)},b}),b.define("select2/selection/allowClear",["jquery","../keys"],function(a,b){function c(){}return c.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(a){d._handleClear(a)}),b.on("keypress",function(a){d._handleKeyboardClear(a,b)})},c.prototype._handleClear=function(a,b){if(!this.options.get("disabled")){var c=this.$selection.find(".select2-selection__clear");if(0!==c.length){b.stopPropagation();for(var d=c.data("data"),e=0;e<d.length;e++){var f={data:d[e]};if(this.trigger("unselect",f),f.prevented)return}this.$element.val(this.placeholder.id).trigger("change"),this.trigger("toggle",{})}}},c.prototype._handleKeyboardClear=function(a,c,d){d.isOpen()||(c.which==b.DELETE||c.which==b.BACKSPACE)&&this._handleClear(c)},c.prototype.update=function(b,c){if(b.call(this,c),!(this.$selection.find(".select2-selection__placeholder").length>0||0===c.length)){var d=a('<span class="select2-selection__clear">×</span>');d.data("data",c),this.$selection.find(".select2-selection__rendered").prepend(d)}},c}),b.define("select2/selection/search",["jquery","../utils","../keys"],function(a,b,c){function d(a,b,c){a.call(this,b,c)}return d.prototype.render=function(b){var c=a('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>');this.$searchContainer=c,this.$search=c.find("input");var d=b.call(this);return this._transferTabIndex(),d},d.prototype.bind=function(a,b,d){var e=this;a.call(this,b,d),b.on("open",function(){e.$search.trigger("focus")}),b.on("close",function(){e.$search.val(""),e.$search.removeAttr("aria-activedescendant"),e.$search.trigger("focus")}),b.on("enable",function(){e.$search.prop("disabled",!1),e._transferTabIndex()}),b.on("disable",function(){e.$search.prop("disabled",!0)}),b.on("focus",function(a){e.$search.trigger("focus")}),b.on("results:focus",function(a){e.$search.attr("aria-activedescendant",a.id)}),this.$selection.on("focusin",".select2-search--inline",function(a){e.trigger("focus",a)}),this.$selection.on("focusout",".select2-search--inline",function(a){e._handleBlur(a)}),this.$selection.on("keydown",".select2-search--inline",function(a){a.stopPropagation(),e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented();var b=a.which;if(b===c.BACKSPACE&&""===e.$search.val()){var d=e.$searchContainer.prev(".select2-selection__choice");if(d.length>0){var f=d.data("data");e.searchRemoveChoice(f),a.preventDefault()}}});var f=document.documentMode,g=f&&11>=f;this.$selection.on("input.searchcheck",".select2-search--inline",function(a){return g?void e.$selection.off("input.search input.searchcheck"):void e.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(a){if(g&&"input"===a.type)return void e.$selection.off("input.search input.searchcheck");var b=a.which;b!=c.SHIFT&&b!=c.CTRL&&b!=c.ALT&&b!=c.TAB&&e.handleSearch(a)})},d.prototype._transferTabIndex=function(a){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},d.prototype.createPlaceholder=function(a,b){this.$search.attr("placeholder",b.text)},d.prototype.update=function(a,b){var c=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),a.call(this,b),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),c&&this.$search.focus()},d.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var a=this.$search.val();this.trigger("query",{term:a})}this._keyUpPrevented=!1},d.prototype.searchRemoveChoice=function(a,b){this.trigger("unselect",{data:b}),this.$search.val(b.text),this.handleSearch()},d.prototype.resizeSearch=function(){this.$search.css("width","25px");var a="";if(""!==this.$search.attr("placeholder"))a=this.$selection.find(".select2-selection__rendered").innerWidth();else{var b=this.$search.val().length+1;a=.75*b+"em"}this.$search.css("width",a)},d}),b.define("select2/selection/eventRelay",["jquery"],function(a){function b(){}return b.prototype.bind=function(b,c,d){var e=this,f=["open","opening","close","closing","select","selecting","unselect","unselecting"],g=["opening","closing","selecting","unselecting"];b.call(this,c,d),c.on("*",function(b,c){if(-1!==a.inArray(b,f)){c=c||{};var d=a.Event("select2:"+b,{params:c});e.$element.trigger(d),-1!==a.inArray(b,g)&&(c.prevented=d.isDefaultPrevented())}})},b}),b.define("select2/translation",["jquery","require"],function(a,b){function c(a){this.dict=a||{}}return c.prototype.all=function(){return this.dict},c.prototype.get=function(a){return this.dict[a]},c.prototype.extend=function(b){this.dict=a.extend({},b.all(),this.dict)},c._cache={},c.loadPath=function(a){if(!(a in c._cache)){var d=b(a);c._cache[a]=d}return new c(c._cache[a])},c}),b.define("select2/diacritics",[],function(){var a={"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"};return a}),b.define("select2/data/base",["../utils"],function(a){function b(a,c){b.__super__.constructor.call(this)}return a.Extend(b,a.Observable),b.prototype.current=function(a){throw new Error("The `current` method must be defined in child classes.")},b.prototype.query=function(a,b){throw new Error("The `query` method must be defined in child classes.")},b.prototype.bind=function(a,b){},b.prototype.destroy=function(){},b.prototype.generateResultId=function(b,c){var d=b.id+"-result-";return d+=a.generateChars(4),d+=null!=c.id?"-"+c.id.toString():"-"+a.generateChars(4)},b}),b.define("select2/data/select",["./base","../utils","jquery"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,a),d.prototype.current=function(a){var b=[],d=this;this.$element.find(":selected").each(function(){var a=c(this),e=d.item(a);b.push(e)}),a(b)},d.prototype.select=function(a){var b=this;if(a.selected=!0,c(a.element).is("option"))return a.element.selected=!0,void this.$element.trigger("change"); +if(this.$element.prop("multiple"))this.current(function(d){var e=[];a=[a],a.push.apply(a,d);for(var f=0;f<a.length;f++){var g=a[f].id;-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("change")});else{var d=a.id;this.$element.val(d),this.$element.trigger("change")}},d.prototype.unselect=function(a){var b=this;if(this.$element.prop("multiple"))return a.selected=!1,c(a.element).is("option")?(a.element.selected=!1,void this.$element.trigger("change")):void this.current(function(d){for(var e=[],f=0;f<d.length;f++){var g=d[f].id;g!==a.id&&-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("change")})},d.prototype.bind=function(a,b){var c=this;this.container=a,a.on("select",function(a){c.select(a.data)}),a.on("unselect",function(a){c.unselect(a.data)})},d.prototype.destroy=function(){this.$element.find("*").each(function(){c.removeData(this,"data")})},d.prototype.query=function(a,b){var d=[],e=this,f=this.$element.children();f.each(function(){var b=c(this);if(b.is("option")||b.is("optgroup")){var f=e.item(b),g=e.matches(a,f);null!==g&&d.push(g)}}),b({results:d})},d.prototype.addOptions=function(a){b.appendMany(this.$element,a)},d.prototype.option=function(a){var b;a.children?(b=document.createElement("optgroup"),b.label=a.text):(b=document.createElement("option"),void 0!==b.textContent?b.textContent=a.text:b.innerText=a.text),a.id&&(b.value=a.id),a.disabled&&(b.disabled=!0),a.selected&&(b.selected=!0),a.title&&(b.title=a.title);var d=c(b),e=this._normalizeItem(a);return e.element=b,c.data(b,"data",e),d},d.prototype.item=function(a){var b={};if(b=c.data(a[0],"data"),null!=b)return b;if(a.is("option"))b={id:a.val(),text:a.text(),disabled:a.prop("disabled"),selected:a.prop("selected"),title:a.prop("title")};else if(a.is("optgroup")){b={text:a.prop("label"),children:[],title:a.prop("title")};for(var d=a.children("option"),e=[],f=0;f<d.length;f++){var g=c(d[f]),h=this.item(g);e.push(h)}b.children=e}return b=this._normalizeItem(b),b.element=a[0],c.data(a[0],"data",b),b},d.prototype._normalizeItem=function(a){c.isPlainObject(a)||(a={id:a,text:a}),a=c.extend({},{text:""},a);var b={selected:!1,disabled:!1};return null!=a.id&&(a.id=a.id.toString()),null!=a.text&&(a.text=a.text.toString()),null==a._resultId&&a.id&&null!=this.container&&(a._resultId=this.generateResultId(this.container,a)),c.extend({},b,a)},d.prototype.matches=function(a,b){var c=this.options.get("matcher");return c(a,b)},d}),b.define("select2/data/array",["./select","../utils","jquery"],function(a,b,c){function d(a,b){var c=b.get("data")||[];d.__super__.constructor.call(this,a,b),this.addOptions(this.convertToOptions(c))}return b.Extend(d,a),d.prototype.select=function(a){var b=this.$element.find("option").filter(function(b,c){return c.value==a.id.toString()});0===b.length&&(b=this.option(a),this.addOptions(b)),d.__super__.select.call(this,a)},d.prototype.convertToOptions=function(a){function d(a){return function(){return c(this).val()==a.id}}for(var e=this,f=this.$element.find("option"),g=f.map(function(){return e.item(c(this)).id}).get(),h=[],i=0;i<a.length;i++){var j=this._normalizeItem(a[i]);if(c.inArray(j.id,g)>=0){var k=f.filter(d(j)),l=this.item(k),m=c.extend(!0,{},j,l),n=this.option(m);k.replaceWith(n)}else{var o=this.option(j);if(j.children){var p=this.convertToOptions(j.children);b.appendMany(o,p)}h.push(o)}}return h},d}),b.define("select2/data/ajax",["./array","../utils","jquery"],function(a,b,c){function d(a,b){this.ajaxOptions=this._applyDefaults(b.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),d.__super__.constructor.call(this,a,b)}return b.Extend(d,a),d.prototype._applyDefaults=function(a){var b={data:function(a){return c.extend({},a,{q:a.term})},transport:function(a,b,d){var e=c.ajax(a);return e.then(b),e.fail(d),e}};return c.extend({},b,a,!0)},d.prototype.processResults=function(a){return a},d.prototype.query=function(a,b){function d(){var d=f.transport(f,function(d){var f=e.processResults(d,a);e.options.get("debug")&&window.console&&console.error&&(f&&f.results&&c.isArray(f.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),b(f)},function(){d.status&&"0"===d.status||e.trigger("results:message",{message:"errorLoading"})});e._request=d}var e=this;null!=this._request&&(c.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var f=c.extend({type:"GET"},this.ajaxOptions);"function"==typeof f.url&&(f.url=f.url.call(this.$element,a)),"function"==typeof f.data&&(f.data=f.data.call(this.$element,a)),this.ajaxOptions.delay&&null!=a.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(d,this.ajaxOptions.delay)):d()},d}),b.define("select2/data/tags",["jquery"],function(a){function b(b,c,d){var e=d.get("tags"),f=d.get("createTag");void 0!==f&&(this.createTag=f);var g=d.get("insertTag");if(void 0!==g&&(this.insertTag=g),b.call(this,c,d),a.isArray(e))for(var h=0;h<e.length;h++){var i=e[h],j=this._normalizeItem(i),k=this.option(j);this.$element.append(k)}}return b.prototype.query=function(a,b,c){function d(a,f){for(var g=a.results,h=0;h<g.length;h++){var i=g[h],j=null!=i.children&&!d({results:i.children},!0),k=i.text===b.term;if(k||j)return f?!1:(a.data=g,void c(a))}if(f)return!0;var l=e.createTag(b);if(null!=l){var m=e.option(l);m.attr("data-select2-tag",!0),e.addOptions([m]),e.insertTag(g,l)}a.results=g,c(a)}var e=this;return this._removeOldTags(),null==b.term||null!=b.page?void a.call(this,b,c):void a.call(this,b,d)},b.prototype.createTag=function(b,c){var d=a.trim(c.term);return""===d?null:{id:d,text:d}},b.prototype.insertTag=function(a,b,c){b.unshift(c)},b.prototype._removeOldTags=function(b){var c=(this._lastTag,this.$element.find("option[data-select2-tag]"));c.each(function(){this.selected||a(this).remove()})},b}),b.define("select2/data/tokenizer",["jquery"],function(a){function b(a,b,c){var d=c.get("tokenizer");void 0!==d&&(this.tokenizer=d),a.call(this,b,c)}return b.prototype.bind=function(a,b,c){a.call(this,b,c),this.$search=b.dropdown.$search||b.selection.$search||c.find(".select2-search__field")},b.prototype.query=function(b,c,d){function e(b){var c=g._normalizeItem(b),d=g.$element.find("option").filter(function(){return a(this).val()===c.id});if(!d.length){var e=g.option(c);e.attr("data-select2-tag",!0),g._removeOldTags(),g.addOptions([e])}f(c)}function f(a){g.trigger("select",{data:a})}var g=this;c.term=c.term||"";var h=this.tokenizer(c,this.options,e);h.term!==c.term&&(this.$search.length&&(this.$search.val(h.term),this.$search.focus()),c.term=h.term),b.call(this,c,d)},b.prototype.tokenizer=function(b,c,d,e){for(var f=d.get("tokenSeparators")||[],g=c.term,h=0,i=this.createTag||function(a){return{id:a.term,text:a.term}};h<g.length;){var j=g[h];if(-1!==a.inArray(j,f)){var k=g.substr(0,h),l=a.extend({},c,{term:k}),m=i(l);null!=m?(e(m),g=g.substr(h+1)||"",h=0):h++}else h++}return{term:g}},b}),b.define("select2/data/minimumInputLength",[],function(){function a(a,b,c){this.minimumInputLength=c.get("minimumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){return b.term=b.term||"",b.term.length<this.minimumInputLength?void this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:b.term,params:b}}):void a.call(this,b,c)},a}),b.define("select2/data/maximumInputLength",[],function(){function a(a,b,c){this.maximumInputLength=c.get("maximumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){return b.term=b.term||"",this.maximumInputLength>0&&b.term.length>this.maximumInputLength?void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:b.term,params:b}}):void a.call(this,b,c)},a}),b.define("select2/data/maximumSelectionLength",[],function(){function a(a,b,c){this.maximumSelectionLength=c.get("maximumSelectionLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){var d=this;this.current(function(e){var f=null!=e?e.length:0;return d.maximumSelectionLength>0&&f>=d.maximumSelectionLength?void d.trigger("results:message",{message:"maximumSelected",args:{maximum:d.maximumSelectionLength}}):void a.call(d,b,c)})},a}),b.define("select2/dropdown",["jquery","./utils"],function(a,b){function c(a,b){this.$element=a,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('<span class="select2-dropdown"><span class="select2-results"></span></span>');return b.attr("dir",this.options.get("dir")),this.$dropdown=b,b},c.prototype.bind=function(){},c.prototype.position=function(a,b){},c.prototype.destroy=function(){this.$dropdown.remove()},c}),b.define("select2/dropdown/search",["jquery","../utils"],function(a,b){function c(){}return c.prototype.render=function(b){var c=b.call(this),d=a('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" /></span>');return this.$searchContainer=d,this.$search=d.find("input"),c.prepend(d),c},c.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),this.$search.on("keydown",function(a){e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented()}),this.$search.on("input",function(b){a(this).off("keyup")}),this.$search.on("keyup input",function(a){e.handleSearch(a)}),c.on("open",function(){e.$search.attr("tabindex",0),e.$search.focus(),window.setTimeout(function(){e.$search.focus()},0)}),c.on("close",function(){e.$search.attr("tabindex",-1),e.$search.val("")}),c.on("focus",function(){c.isOpen()&&e.$search.focus()}),c.on("results:all",function(a){if(null==a.query.term||""===a.query.term){var b=e.showSearch(a);b?e.$searchContainer.removeClass("select2-search--hide"):e.$searchContainer.addClass("select2-search--hide")}})},c.prototype.handleSearch=function(a){if(!this._keyUpPrevented){var b=this.$search.val();this.trigger("query",{term:b})}this._keyUpPrevented=!1},c.prototype.showSearch=function(a,b){return!0},c}),b.define("select2/dropdown/hidePlaceholder",[],function(){function a(a,b,c,d){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c,d)}return a.prototype.append=function(a,b){b.results=this.removePlaceholder(b.results),a.call(this,b)},a.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},a.prototype.removePlaceholder=function(a,b){for(var c=b.slice(0),d=b.length-1;d>=0;d--){var e=b[d];this.placeholder.id===e.id&&c.splice(d,1)}return c},a}),b.define("select2/dropdown/infiniteScroll",["jquery"],function(a){function b(a,b,c,d){this.lastParams={},a.call(this,b,c,d),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return b.prototype.append=function(a,b){this.$loadingMore.remove(),this.loading=!1,a.call(this,b),this.showLoadingMore(b)&&this.$results.append(this.$loadingMore)},b.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),c.on("query",function(a){e.lastParams=a,e.loading=!0}),c.on("query:append",function(a){e.lastParams=a,e.loading=!0}),this.$results.on("scroll",function(){var b=a.contains(document.documentElement,e.$loadingMore[0]);if(!e.loading&&b){var c=e.$results.offset().top+e.$results.outerHeight(!1),d=e.$loadingMore.offset().top+e.$loadingMore.outerHeight(!1);c+50>=d&&e.loadMore()}})},b.prototype.loadMore=function(){this.loading=!0;var b=a.extend({},{page:1},this.lastParams);b.page++,this.trigger("query:append",b)},b.prototype.showLoadingMore=function(a,b){return b.pagination&&b.pagination.more},b.prototype.createLoadingMore=function(){var b=a('<li class="select2-results__option select2-results__option--load-more"role="treeitem" aria-disabled="true"></li>'),c=this.options.get("translations").get("loadingMore");return b.html(c(this.lastParams)),b},b}),b.define("select2/dropdown/attachBody",["jquery","../utils"],function(a,b){function c(b,c,d){this.$dropdownParent=d.get("dropdownParent")||a(document.body),b.call(this,c,d)}return c.prototype.bind=function(a,b,c){var d=this,e=!1;a.call(this,b,c),b.on("open",function(){d._showDropdown(),d._attachPositioningHandler(b),e||(e=!0,b.on("results:all",function(){d._positionDropdown(),d._resizeDropdown()}),b.on("results:append",function(){d._positionDropdown(),d._resizeDropdown()}))}),b.on("close",function(){d._hideDropdown(),d._detachPositioningHandler(b)}),this.$dropdownContainer.on("mousedown",function(a){a.stopPropagation()})},c.prototype.destroy=function(a){a.call(this),this.$dropdownContainer.remove()},c.prototype.position=function(a,b,c){b.attr("class",c.attr("class")),b.removeClass("select2"),b.addClass("select2-container--open"),b.css({position:"absolute",top:-999999}),this.$container=c},c.prototype.render=function(b){var c=a("<span></span>"),d=b.call(this);return c.append(d),this.$dropdownContainer=c,c},c.prototype._hideDropdown=function(a){this.$dropdownContainer.detach()},c.prototype._attachPositioningHandler=function(c,d){var e=this,f="scroll.select2."+d.id,g="resize.select2."+d.id,h="orientationchange.select2."+d.id,i=this.$container.parents().filter(b.hasScroll);i.each(function(){a(this).data("select2-scroll-position",{x:a(this).scrollLeft(),y:a(this).scrollTop()})}),i.on(f,function(b){var c=a(this).data("select2-scroll-position");a(this).scrollTop(c.y)}),a(window).on(f+" "+g+" "+h,function(a){e._positionDropdown(),e._resizeDropdown()})},c.prototype._detachPositioningHandler=function(c,d){var e="scroll.select2."+d.id,f="resize.select2."+d.id,g="orientationchange.select2."+d.id,h=this.$container.parents().filter(b.hasScroll);h.off(e),a(window).off(e+" "+f+" "+g)},c.prototype._positionDropdown=function(){var b=a(window),c=this.$dropdown.hasClass("select2-dropdown--above"),d=this.$dropdown.hasClass("select2-dropdown--below"),e=null,f=this.$container.offset();f.bottom=f.top+this.$container.outerHeight(!1);var g={height:this.$container.outerHeight(!1)};g.top=f.top,g.bottom=f.top+g.height;var h={height:this.$dropdown.outerHeight(!1)},i={top:b.scrollTop(),bottom:b.scrollTop()+b.height()},j=i.top<f.top-h.height,k=i.bottom>f.bottom+h.height,l={left:f.left,top:g.bottom},m=this.$dropdownParent;"static"===m.css("position")&&(m=m.offsetParent());var n=m.offset();l.top-=n.top,l.left-=n.left,c||d||(e="below"),k||!j||c?!j&&k&&c&&(e="below"):e="above",("above"==e||c&&"below"!==e)&&(l.top=g.top-n.top-h.height),null!=e&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+e),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+e)),this.$dropdownContainer.css(l)},c.prototype._resizeDropdown=function(){var a={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(a.minWidth=a.width,a.position="relative",a.width="auto"),this.$dropdown.css(a)},c.prototype._showDropdown=function(a){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},c}),b.define("select2/dropdown/minimumResultsForSearch",[],function(){function a(b){for(var c=0,d=0;d<b.length;d++){var e=b[d];e.children?c+=a(e.children):c++}return c}function b(a,b,c,d){this.minimumResultsForSearch=c.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),a.call(this,b,c,d)}return b.prototype.showSearch=function(b,c){return a(c.data.results)<this.minimumResultsForSearch?!1:b.call(this,c)},b}),b.define("select2/dropdown/selectOnClose",[],function(){function a(){}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("close",function(a){d._handleSelectOnClose(a)})},a.prototype._handleSelectOnClose=function(a,b){if(b&&null!=b.originalSelect2Event){var c=b.originalSelect2Event;if("select"===c._type||"unselect"===c._type)return}var d=this.getHighlightedResults();if(!(d.length<1)){var e=d.data("data");null!=e.element&&e.element.selected||null==e.element&&e.selected||this.trigger("select",{data:e})}},a}),b.define("select2/dropdown/closeOnSelect",[],function(){function a(){}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("select",function(a){d._selectTriggered(a)}),b.on("unselect",function(a){d._selectTriggered(a)})},a.prototype._selectTriggered=function(a,b){var c=b.originalEvent;c&&c.ctrlKey||this.trigger("close",{originalEvent:c,originalSelect2Event:b})},a}),b.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(a){var b=a.input.length-a.maximum,c="Please delete "+b+" character";return 1!=b&&(c+="s"),c},inputTooShort:function(a){var b=a.minimum-a.input.length,c="Please enter "+b+" or more characters";return c},loadingMore:function(){return"Loading more results…"},maximumSelected:function(a){var b="You can only select "+a.maximum+" item";return 1!=a.maximum&&(b+="s"),b},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),b.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C){function D(){this.reset()}D.prototype.apply=function(l){if(l=a.extend(!0,{},this.defaults,l),null==l.dataAdapter){if(null!=l.ajax?l.dataAdapter=o:null!=l.data?l.dataAdapter=n:l.dataAdapter=m,l.minimumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,r)),l.maximumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,s)),l.maximumSelectionLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,t)),l.tags&&(l.dataAdapter=j.Decorate(l.dataAdapter,p)),(null!=l.tokenSeparators||null!=l.tokenizer)&&(l.dataAdapter=j.Decorate(l.dataAdapter,q)),null!=l.query){var C=b(l.amdBase+"compat/query");l.dataAdapter=j.Decorate(l.dataAdapter,C)}if(null!=l.initSelection){var D=b(l.amdBase+"compat/initSelection");l.dataAdapter=j.Decorate(l.dataAdapter,D)}}if(null==l.resultsAdapter&&(l.resultsAdapter=c,null!=l.ajax&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,x)),null!=l.placeholder&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,w)),l.selectOnClose&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,A))),null==l.dropdownAdapter){if(l.multiple)l.dropdownAdapter=u;else{var E=j.Decorate(u,v);l.dropdownAdapter=E}if(0!==l.minimumResultsForSearch&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,z)),l.closeOnSelect&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,B)),null!=l.dropdownCssClass||null!=l.dropdownCss||null!=l.adaptDropdownCssClass){var F=b(l.amdBase+"compat/dropdownCss");l.dropdownAdapter=j.Decorate(l.dropdownAdapter,F)}l.dropdownAdapter=j.Decorate(l.dropdownAdapter,y)}if(null==l.selectionAdapter){if(l.multiple?l.selectionAdapter=e:l.selectionAdapter=d,null!=l.placeholder&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,f)),l.allowClear&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,g)),l.multiple&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,h)),null!=l.containerCssClass||null!=l.containerCss||null!=l.adaptContainerCssClass){var G=b(l.amdBase+"compat/containerCss");l.selectionAdapter=j.Decorate(l.selectionAdapter,G)}l.selectionAdapter=j.Decorate(l.selectionAdapter,i)}if("string"==typeof l.language)if(l.language.indexOf("-")>0){var H=l.language.split("-"),I=H[0];l.language=[l.language,I]}else l.language=[l.language];if(a.isArray(l.language)){var J=new k;l.language.push("en");for(var K=l.language,L=0;L<K.length;L++){var M=K[L],N={};try{N=k.loadPath(M)}catch(O){try{M=this.defaults.amdLanguageBase+M,N=k.loadPath(M)}catch(P){l.debug&&window.console&&console.warn&&console.warn('Select2: The language file for "'+M+'" could not be automatically loaded. A fallback will be used instead.');continue}}J.extend(N)}l.translations=J}else{var Q=k.loadPath(this.defaults.amdLanguageBase+"en"),R=new k(l.language);R.extend(Q),l.translations=R}return l},D.prototype.reset=function(){function b(a){function b(a){return l[a]||a}return a.replace(/[^\u0000-\u007E]/g,b)}function c(d,e){if(""===a.trim(d.term))return e;if(e.children&&e.children.length>0){for(var f=a.extend(!0,{},e),g=e.children.length-1;g>=0;g--){var h=e.children[g],i=c(d,h);null==i&&f.children.splice(g,1)}return f.children.length>0?f:c(d,f)}var j=b(e.text).toUpperCase(),k=b(d.term).toUpperCase();return j.indexOf(k)>-1?e:null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:j.escapeMarkup,language:C,matcher:c,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(a){return a},templateResult:function(a){return a.text},templateSelection:function(a){return a.text},theme:"default",width:"resolve"}},D.prototype.set=function(b,c){var d=a.camelCase(b),e={};e[d]=c;var f=j._convertData(e);a.extend(this.defaults,f)};var E=new D;return E}),b.define("select2/options",["require","jquery","./defaults","./utils"],function(a,b,c,d){function e(b,e){if(this.options=b,null!=e&&this.fromElement(e),this.options=c.apply(this.options),e&&e.is("input")){var f=a(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=d.Decorate(this.options.dataAdapter,f)}}return e.prototype.fromElement=function(a){var c=["select2"];null==this.options.multiple&&(this.options.multiple=a.prop("multiple")),null==this.options.disabled&&(this.options.disabled=a.prop("disabled")),null==this.options.language&&(a.prop("lang")?this.options.language=a.prop("lang").toLowerCase():a.closest("[lang]").prop("lang")&&(this.options.language=a.closest("[lang]").prop("lang"))),null==this.options.dir&&(a.prop("dir")?this.options.dir=a.prop("dir"):a.closest("[dir]").prop("dir")?this.options.dir=a.closest("[dir]").prop("dir"):this.options.dir="ltr"),a.prop("disabled",this.options.disabled),a.prop("multiple",this.options.multiple),a.data("select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),a.data("data",a.data("select2Tags")),a.data("tags",!0)),a.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),a.attr("ajax--url",a.data("ajaxUrl")),a.data("ajax--url",a.data("ajaxUrl")));var e={};e=b.fn.jquery&&"1."==b.fn.jquery.substr(0,2)&&a[0].dataset?b.extend(!0,{},a[0].dataset,a.data()):a.data();var f=b.extend(!0,{},e);f=d._convertData(f);for(var g in f)b.inArray(g,c)>-1||(b.isPlainObject(this.options[g])?b.extend(this.options[g],f[g]):this.options[g]=f[g]);return this},e.prototype.get=function(a){return this.options[a]},e.prototype.set=function(a,b){this.options[a]=b},e}),b.define("select2/core",["jquery","./options","./utils","./keys"],function(a,b,c,d){var e=function(a,c){null!=a.data("select2")&&a.data("select2").destroy(),this.$element=a,this.id=this._generateId(a),c=c||{},this.options=new b(c,a),e.__super__.constructor.call(this);var d=a.attr("tabindex")||0;a.data("old-tabindex",d),a.attr("tabindex","-1");var f=this.options.get("dataAdapter");this.dataAdapter=new f(a,this.options);var g=this.render();this._placeContainer(g);var h=this.options.get("selectionAdapter");this.selection=new h(a,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,g);var i=this.options.get("dropdownAdapter");this.dropdown=new i(a,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,g);var j=this.options.get("resultsAdapter");this.results=new j(a,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var k=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(a){k.trigger("selection:update",{data:a})}),a.addClass("select2-hidden-accessible"),a.attr("aria-hidden","true"),this._syncAttributes(),a.data("select2",this)};return c.Extend(e,c.Observable),e.prototype._generateId=function(a){var b="";return b=null!=a.attr("id")?a.attr("id"):null!=a.attr("name")?a.attr("name")+"-"+c.generateChars(2):c.generateChars(4),b=b.replace(/(:|\.|\[|\]|,)/g,""),b="select2-"+b},e.prototype._placeContainer=function(a){a.insertAfter(this.$element);var b=this._resolveWidth(this.$element,this.options.get("width"));null!=b&&a.css("width",b)},e.prototype._resolveWidth=function(a,b){var c=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==b){var d=this._resolveWidth(a,"style");return null!=d?d:this._resolveWidth(a,"element")}if("element"==b){var e=a.outerWidth(!1);return 0>=e?"auto":e+"px"}if("style"==b){var f=a.attr("style");if("string"!=typeof f)return null;for(var g=f.split(";"),h=0,i=g.length;i>h;h+=1){var j=g[h].replace(/\s/g,""),k=j.match(c);if(null!==k&&k.length>=1)return k[1]}return null}return b},e.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},e.prototype._registerDomEvents=function(){var b=this;this.$element.on("change.select2",function(){b.dataAdapter.current(function(a){b.trigger("selection:update",{data:a})})}),this.$element.on("focus.select2",function(a){b.trigger("focus",a)}),this._syncA=c.bind(this._syncAttributes,this),this._syncS=c.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var d=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=d?(this._observer=new d(function(c){a.each(c,b._syncA),a.each(c,b._syncS)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",b._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",b._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",b._syncS,!1))},e.prototype._registerDataEvents=function(){var a=this;this.dataAdapter.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerSelectionEvents=function(){var b=this,c=["toggle","focus"];this.selection.on("toggle",function(){b.toggleDropdown()}),this.selection.on("focus",function(a){b.focus(a)}),this.selection.on("*",function(d,e){-1===a.inArray(d,c)&&b.trigger(d,e)})},e.prototype._registerDropdownEvents=function(){var a=this;this.dropdown.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerResultsEvents=function(){var a=this;this.results.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerEvents=function(){var a=this;this.on("open",function(){a.$container.addClass("select2-container--open")}),this.on("close",function(){a.$container.removeClass("select2-container--open")}),this.on("enable",function(){a.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){a.$container.addClass("select2-container--disabled")}),this.on("blur",function(){a.$container.removeClass("select2-container--focus")}),this.on("query",function(b){a.isOpen()||a.trigger("open",{}),this.dataAdapter.query(b,function(c){a.trigger("results:all",{data:c,query:b})})}),this.on("query:append",function(b){this.dataAdapter.query(b,function(c){a.trigger("results:append",{data:c,query:b})})}),this.on("keypress",function(b){var c=b.which;a.isOpen()?c===d.ESC||c===d.TAB||c===d.UP&&b.altKey?(a.close(),b.preventDefault()):c===d.ENTER?(a.trigger("results:select",{}),b.preventDefault()):c===d.SPACE&&b.ctrlKey?(a.trigger("results:toggle",{}),b.preventDefault()):c===d.UP?(a.trigger("results:previous",{}),b.preventDefault()):c===d.DOWN&&(a.trigger("results:next",{}),b.preventDefault()):(c===d.ENTER||c===d.SPACE||c===d.DOWN&&b.altKey)&&(a.open(),b.preventDefault())})},e.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},e.prototype._syncSubtree=function(a,b){var c=!1,d=this;if(!a||!a.target||"OPTION"===a.target.nodeName||"OPTGROUP"===a.target.nodeName){if(b)if(b.addedNodes&&b.addedNodes.length>0)for(var e=0;e<b.addedNodes.length;e++){var f=b.addedNodes[e];f.selected&&(c=!0)}else b.removedNodes&&b.removedNodes.length>0&&(c=!0);else c=!0;c&&this.dataAdapter.current(function(a){d.trigger("selection:update",{data:a})})}},e.prototype.trigger=function(a,b){var c=e.__super__.trigger,d={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===b&&(b={}),a in d){var f=d[a],g={prevented:!1,name:a,args:b};if(c.call(this,f,g),g.prevented)return void(b.prevented=!0)}c.call(this,a,b)},e.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},e.prototype.open=function(){this.isOpen()||this.trigger("query",{})},e.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},e.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},e.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},e.prototype.focus=function(a){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},e.prototype.enable=function(a){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),(null==a||0===a.length)&&(a=[!0]);var b=!a[0];this.$element.prop("disabled",b)},e.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var a=[];return this.dataAdapter.current(function(b){a=b}),a},e.prototype.val=function(b){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==b||0===b.length)return this.$element.val();var c=b[0];a.isArray(c)&&(c=a.map(c,function(a){return a.toString()})),this.$element.val(c).trigger("change")},e.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null; +},e.prototype.render=function(){var b=a('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return b.attr("dir",this.options.get("dir")),this.$container=b,this.$container.addClass("select2-container--"+this.options.get("theme")),b.data("element",this.$element),b},e}),b.define("jquery-mousewheel",["jquery"],function(a){return a}),b.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults"],function(a,b,c,d){if(null==a.fn.select2){var e=["open","close","destroy"];a.fn.select2=function(b){if(b=b||{},"object"==typeof b)return this.each(function(){var d=a.extend(!0,{},b);new c(a(this),d)}),this;if("string"==typeof b){var d,f=Array.prototype.slice.call(arguments,1);return this.each(function(){var c=a(this).data("select2");null==c&&window.console&&console.error&&console.error("The select2('"+b+"') method was called on an element that is not using Select2."),d=c[b].apply(c,f)}),a.inArray(b,e)>-1?this:d}throw new Error("Invalid arguments for Select2: "+b)}}return null==a.fn.select2.defaults&&(a.fn.select2.defaults=d),c}),{define:b.define,require:b.require}}(),c=b.require("jquery.select2");return a.fn.select2.amd=b,c});
\ No newline at end of file diff --git a/ishtar_common/static/select2/js/select2_locale_fr.js b/ishtar_common/static/select2/js/select2_locale_fr.js deleted file mode 100644 index d5485d6be..000000000 --- a/ishtar_common/static/select2/js/select2_locale_fr.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Select2 French translation - */ -(function ($) { -    "use strict"; - -    $.fn.select2.locales['fr'] = { -        formatMatches: function (matches) { return matches + " résultats sont disponibles, utilisez les flèches haut et bas pour naviguer."; }, -        formatNoMatches: function () { return "Aucun résultat trouvé"; }, -        formatInputTooShort: function (input, min) { var n = min - input.length; return "Saisissez " + n + " caractère" + (n == 1? "" : "s") + " supplémentaire" + (n == 1? "" : "s") ; }, -        formatInputTooLong: function (input, max) { var n = input.length - max; return "Supprimez " + n + " caractère" + (n == 1? "" : "s"); }, -        formatSelectionTooBig: function (limit) { return "Vous pouvez seulement sélectionner " + limit + " élément" + (limit == 1 ? "" : "s"); }, -        formatLoadMore: function (pageNumber) { return "Chargement de résultats supplémentaires…"; }, -        formatSearching: function () { return "Recherche en cours…"; } -    }; - -    $.extend($.fn.select2.defaults, $.fn.select2.locales['fr']); -})(jQuery); diff --git a/ishtar_common/templates/base.html b/ishtar_common/templates/base.html index 614a83595..b20cb1ccb 100644 --- a/ishtar_common/templates/base.html +++ b/ishtar_common/templates/base.html @@ -90,15 +90,18 @@          <li id='section-{{section.idx}}'{% if section.css %} class="{{section.css}}"{% endif %}>              {{section.label}}        <ul> -        {% for menu_item in section.childs %}{%if menu_item.available%} -        {% if menu_item.childs %}<li id='subsection-{{menu_item.idx}}'{% if menu_item.css %} class="{{menu_item.css}}"{% endif %}>{{menu_item.label}} +          {% for menu_item in section.childs %}{%if menu_item.available%} +          {% if menu_item.childs %}<li id='subsection-{{menu_item.idx}}'{% if menu_item.css %} class="{{menu_item.css}}"{% endif %}>{{menu_item.label}}              <ul> -                {% for menu_subitem in menu_item.childs %}{%if menu_subitem.available%} -                <li id='{{menu_subitem.idx}}'{% ifequal menu_subitem.idx CURRENT_ACTION %} class='selected'{% endifequal %}><a href='{% url "action" menu_subitem.idx%}'>{{menu_subitem.label}}</a></li> +                {% for menu_subitem in menu_item.childs %}{% if menu_subitem.available %} +                {% url 'action' menu_subitem.idx as item_url %} +                <li id='{{menu_subitem.idx}}'{% if item_url in CURRENT_PATH %} class='selected'{% endif %}><a +                        href='{{item_url}}'>{{menu_subitem.label}}</a></li>              {%endif%}{% endfor %}</ul></li> -        {%else%} +        {% else %} +          {% url 'action' menu_item.idx as item_url %}          <li id='{{menu_item.idx}}' -            class="{% ifequal menu_item.idx CURRENT_ACTION %}selected{% endifequal %} {% if menu_item.css %}{{menu_item.css}}{% endif %}"><a href="{% url 'action' menu_item.idx%}">{{menu_item.label}}</a></li> +            class="{% if item_url in CURRENT_PATH %}selected{% endif %} {% if menu_item.css %}{{menu_item.css}}{% endif %}"><a href="{{item_url}}">{{menu_item.label}}</a></li>          {%endif%}{% endif %}{% endfor %}        </ul>        </li>{%endif%} diff --git a/ishtar_common/templates/ishtar/blocks/advanced_shortcut_menu.html b/ishtar_common/templates/ishtar/blocks/advanced_shortcut_menu.html index 1758bcf54..5cea8b5a7 100644 --- a/ishtar_common/templates/ishtar/blocks/advanced_shortcut_menu.html +++ b/ishtar_common/templates/ishtar/blocks/advanced_shortcut_menu.html @@ -42,5 +42,9 @@  </table>  </fieldset>  </form> -<script type='text/javascript'>var advanced_menu = true;</script> +<script type='text/javascript'> +var advanced_menu = true; +{% if SHORTCUT_SHOW == 'off' %}var shortcut_menu_hide = true; +{% else %}var shortcut_menu_hide = false;{% endif %} +</script>  {% endif %} diff --git a/ishtar_common/templates/ishtar/blocks/shortcut_menu.html b/ishtar_common/templates/ishtar/blocks/shortcut_menu.html index 5973eba3f..c03cb3806 100644 --- a/ishtar_common/templates/ishtar/blocks/shortcut_menu.html +++ b/ishtar_common/templates/ishtar/blocks/shortcut_menu.html @@ -38,5 +38,8 @@  </div>  </fieldset>  </form> -<script type='text/javascript'>var advanced_menu = false;</script> +<script type='text/javascript'>var advanced_menu = false; +{% if SHORTCUT_SHOW == 'off' %}var shortcut_menu_hide = true; +{% else %}var shortcut_menu_hide = false;{% endif %} +</script>  {% endif %} diff --git a/ishtar_common/templates/ishtar/blocks/window_tables/dynamic_documents.html b/ishtar_common/templates/ishtar/blocks/window_tables/dynamic_documents.html index f751cebe3..891cd0f6f 100644 --- a/ishtar_common/templates/ishtar/blocks/window_tables/dynamic_documents.html +++ b/ishtar_common/templates/ishtar/blocks/window_tables/dynamic_documents.html @@ -41,7 +41,7 @@ setTimeout(              alert("{% trans "An error as occured during search. Check your query fields." %}");          }        }); -      {% if large %}jQuery("#grid_{{name}}").jqGrid('setGridHeight', 400);{% endif %} +      {% if large %}jQuery("#grid_{{name}}").jqGrid('setGridHeight', 272);{% endif %}  }, 200);  </script> diff --git a/ishtar_common/templates/ishtar/dashboards/dashboard_main.html b/ishtar_common/templates/ishtar/dashboards/dashboard_main.html index 93e11d604..6a5a67a63 100644 --- a/ishtar_common/templates/ishtar/dashboards/dashboard_main.html +++ b/ishtar_common/templates/ishtar/dashboards/dashboard_main.html @@ -15,7 +15,16 @@  {% endblock %}  {% block content %}   <script> -$(function() { $( "#dash-tabs" ).tabs(); }); +$(function() { + $( "#dash-tabs" ).tabs({ +   beforeActivate: function( event, ui ) { +    $("#progress").show(); +   }, +   load: function( event, ui ) { +    $("#progress").hide(); +   } + }); +});  </script>  <div id='dashboard'>   <div id="dash-tabs"> diff --git a/ishtar_common/templatetags/window_tables.py b/ishtar_common/templatetags/window_tables.py index 05592557a..bf4dd2b1a 100644 --- a/ishtar_common/templatetags/window_tables.py +++ b/ishtar_common/templatetags/window_tables.py @@ -18,7 +18,8 @@ from archaeological_context_records.models import ContextRecord, \      ContextRecordSource, RecordRelationView, \      RecordRelations as CRRecordRelations  from archaeological_finds.models import Find, FindSource, \ -    FindUpstreamTreatments, FindDownstreamTreatments, FindTreatments +    FindUpstreamTreatments, FindDownstreamTreatments, FindTreatments, \ +    TreatmentSource, TreatmentFileSource  from archaeological_warehouse.models import Container  register = template.Library() @@ -59,6 +60,10 @@ ASSOCIATED_MODELS['finds_downstreamtreatments'] = (      FindDownstreamTreatments, 'get-downstreamtreatment', '')  ASSOCIATED_MODELS['treatments'] = (      FindTreatments, 'get-treatment', '') +ASSOCIATED_MODELS['treatments_docs'] = ( +    TreatmentSource, 'get-treatmentsource', '') +ASSOCIATED_MODELS['treatmentfiles_docs'] = ( +    TreatmentFileSource, 'get-treatmentfilesource', '')  ASSOCIATED_MODELS['containers'] = (      Container, 'get-container', '') @@ -66,7 +71,7 @@ ASSOCIATED_MODELS['containers'] = (  @register.simple_tag(takes_context=True)  def dynamic_table_document(          context, caption, associated_model, key, value, -        table_cols='TABLE_COLS', output='html', large=False, +        table_cols='TABLE_COLS', output='html', large=True,          col_prefix=''):      if not table_cols:          table_cols = 'TABLE_COLS' @@ -130,9 +135,9 @@ def dynamic_table_document(  @register.simple_tag(takes_context=True) -def dynamic_table_document_large( +def dynamic_table_document_small(          context, caption, associated_model, key,          value, table_cols='TABLE_COLS', output='html'):      return dynamic_table_document(          context, caption, associated_model, key, -        value, table_cols, output, large=True) +        value, table_cols, output, large=False) diff --git a/ishtar_common/urls.py b/ishtar_common/urls.py index 98bd55106..5abec4215 100644 --- a/ishtar_common/urls.py +++ b/ishtar_common/urls.py @@ -206,6 +206,10 @@ urlpatterns += patterns(          name='activate-advanced-menu'),      url(r'activate-simple-menu/$', 'activate_simple_shortcut_menu',          name='activate-simple-menu'), +    url(r'hide-shortcut-menu/$', 'hide_shortcut_menu', +        name='hide-shortcut-menu'), +    url(r'show-shortcut-menu/$', 'show_shortcut_menu', +        name='show-shortcut-menu'),      url(r'(?P<action_slug>' + actions + r')/$', 'action', name='action'),  ) diff --git a/ishtar_common/views.py b/ishtar_common/views.py index 22591164f..e8a2c9e12 100644 --- a/ishtar_common/views.py +++ b/ishtar_common/views.py @@ -208,6 +208,16 @@ def get_autocomplete_generic(model, extra={'available': True}):      return func +def hide_shortcut_menu(request): +    request.session['SHORTCUT_SHOW'] = 'off' +    return HttpResponse('OK', mimetype='text/plain') + + +def show_shortcut_menu(request): +    request.session['SHORTCUT_SHOW'] = 'on' +    return HttpResponse('OK', mimetype='text/plain') + +  def activate_all_search(request):      request.session['SHORTCUT_SEARCH'] = 'all'      return HttpResponse('OK', mimetype='text/plain') @@ -249,9 +259,13 @@ def shortcut_menu(request):          CURRENT_ITEMS.append((_(u"Treatment"), Treatment))      if hasattr(request.user, 'ishtaruser') and \              request.user.ishtaruser.advanced_shortcut_menu: -        dct = {'current_menu': [], 'menu': [], -               'SHORTCUT_SEARCH': request.session['SHORTCUT_SEARCH'] -               if 'SHORTCUT_SEARCH' in request.session else 'own'} +        dct = { +            'current_menu': [], 'menu': [], +            'SHORTCUT_SEARCH': request.session['SHORTCUT_SEARCH'] +            if 'SHORTCUT_SEARCH' in request.session else 'own', +            'SHORTCUT_SHOW': request.session['SHORTCUT_SHOW'] +            if 'SHORTCUT_SHOW' in request.session else 'on' +        }          for lbl, model in CURRENT_ITEMS:              model_name = model.SLUG @@ -267,7 +281,11 @@ def shortcut_menu(request):          return render_to_response(              'ishtar/blocks/advanced_shortcut_menu.html',              dct, context_instance=RequestContext(request)) -    dct = {'current_menu': []} +    dct = { +        'current_menu': [], +        'SHORTCUT_SHOW': request.session['SHORTCUT_SHOW'] +        if 'SHORTCUT_SHOW' in request.session else 'off' +    }      current_selected_item = {}      for lbl, model in CURRENT_ITEMS:          new_selected_item = None @@ -427,14 +445,13 @@ def autocomplete_person_permissive(request, person_types=None,  def autocomplete_person(request, person_types=None, attached_to=None,                          is_ishtar_user=None, permissive=False): -    if not request.user.has_perm('ishtar_common.view_person', -                                 models.Person) and \ -       not request.user.has_perm('ishtar_common.view_own_person', -                                 models.Person) \ -       and not request.user.ishtaruser.has_right('person_search', -                                                 session=request.session): -        return HttpResponse(mimetype='text/plain') -    if not request.GET.get('term'): +    all_items = request.user.has_perm('ishtar_common.view_person', +                                      models.Person) +    own_items = False +    if not all_items: +        own_items = request.user.has_perm('ishtar_common.view_own_person', +                                          models.Person) +    if not all_items and not own_items or not request.GET.get('term'):          return HttpResponse(mimetype='text/plain')      q = request.GET.get('term')      limit = request.GET.get('limit', 20) @@ -461,6 +478,8 @@ def autocomplete_person(request, person_types=None, attached_to=None,              pass      if is_ishtar_user:          query = query & Q(ishtaruser__isnull=False) +    if own_items: +        query &= models.Person.get_query_owns(request.user)      persons = models.Person.objects.filter(query)[:limit]      data = json.dumps([{'id': person.pk, 'value': unicode(person)}                         for person in persons if person]) @@ -568,22 +587,33 @@ def get_item(model, func_name, default_name, extra_request_keys=[],          # check rights          own = True  # more restrictive by default          allowed = False -        if request.user.is_authenticated() and \ -                request.user.ishtaruser.has_right('administrator', -                                                  session=request.session): +        if specific_perms: +            available_perms = specific_perms[:] +        else: +            available_perms = ['view_' + model.__name__.lower(), +                               'view_own_' + model.__name__.lower()] +        EMPTY = '' +        if 'type' in dct: +            data_type = dct.pop('type') +        if not data_type: +            EMPTY = '[]' +            data_type = 'json' +        if not request.user.is_authenticated(): +            return HttpResponse(EMPTY, mimetype='text/plain') + +        if request.user.ishtaruser.has_right('administrator', +                                             session=request.session):              allowed = True              own = False          else:              for perm, lbl in model._meta.permissions: -                # if not specific any perm is relevant (read right) -                if specific_perms and perm not in specific_perms: +                if perm not in available_perms:                      continue                  cperm = model._meta.app_label + '.' + perm -                if request.user.has_perm(cperm)\ +                if request.user.has_perm(cperm) \                          or cperm in request.user.get_all_permissions() \ -                        or (request.user.is_authenticated() -                            and request.user.ishtaruser.has_right( -                                perm, session=request.session)): +                        or request.user.ishtaruser.has_right( +                            perm, session=request.session):                      allowed = True                      if "_own_" not in perm:                          own = False @@ -593,12 +623,6 @@ def get_item(model, func_name, default_name, extra_request_keys=[],          if full == 'shortcut' and 'SHORTCUT_SEARCH' in request.session and \                  request.session['SHORTCUT_SEARCH'] == 'own':              own = True -        EMPTY = '' -        if 'type' in dct: -            data_type = dct.pop('type') -        if not data_type: -            EMPTY = '[]' -            data_type = 'json'          if not allowed:              return HttpResponse(EMPTY, mimetype='text/plain') @@ -880,7 +904,6 @@ def get_item(model, func_name, default_name, extra_request_keys=[],                      table_cols += model.EXTRA_FULL_FIELDS              else:                  table_cols = model.TABLE_COLS -          query_table_cols = []          for cols in table_cols:              if type(cols) not in (list, tuple): @@ -898,6 +921,7 @@ def get_item(model, func_name, default_name, extra_request_keys=[],                          model.CONTEXTUAL_TABLE_COLS[contxt][col]          if full == 'shortcut':              query_table_cols = ['cached_label'] +            table_cols = ['cached_label']          # manage sort tables          manual_sort_key = None @@ -1085,7 +1109,7 @@ def get_item(model, func_name, default_name, extra_request_keys=[],                          if hasattr(model, 'COL_LINK') and k in model.COL_LINK:                              value = link_ext_template.format(value, value)                          res[k] = value -                if full == 'shortcut': +                if full == 'shortcut' and 'cached_label' in res:                      res['value'] = res.pop('cached_label')                  rows.append(res)              if full == 'shortcut': @@ -1427,6 +1451,9 @@ def dashboard_main(request, dct, obj_id=None, *args, **kwargs):          app_list.append((_(u"Context records"), 'contextrecords'))      if profile.find:          app_list.append((_(u"Finds"), 'finds')) +    if profile.warehouse: +        app_list.append((_(u"Treatment requests"), 'treatmentfiles')) +        app_list.append((_(u"Treatments"), 'treatments'))      dct = {'app_list': app_list}      return render_to_response('ishtar/dashboards/dashboard_main.html', dct,                                context_instance=RequestContext(request)) @@ -1473,18 +1500,27 @@ def dashboard_main_detail(request, item_name):      if item_name == 'files' and profile.files:          lbl, dashboard = (_(u"Archaeological files"),                            models.Dashboard(File, **dashboard_kwargs)) -    if item_name == 'operations': +    elif item_name == 'operations':          from archaeological_operations.models import Operation          lbl, dashboard = (_(u"Operations"),                            models.Dashboard(Operation, **dashboard_kwargs)) -    if item_name == 'contextrecords' and profile.context_record: +    elif item_name == 'contextrecords' and profile.context_record:          lbl, dashboard = (              _(u"Context records"),              models.Dashboard(ContextRecord, slice=slicing, fltr=fltr)) -    if item_name == 'finds' and profile.find: +    elif item_name == 'finds' and profile.find:          lbl, dashboard = (_(u"Finds"), models.Dashboard(Find,                                                          slice=slicing,                                                          fltr=fltr)) +    elif item_name == 'treatmentfiles' and profile.warehouse: +        lbl, dashboard = ( +            _(u"Treatment requests"), +            models.Dashboard(TreatmentFile, slice=slicing, fltr=fltr)) +    elif item_name == 'treatments' and profile.warehouse: +        lbl, dashboard = ( +            _(u"Treatments"), +            models.Dashboard(Treatment, slice=slicing, fltr=fltr, +                             date_source='start'))      if not lbl:          raise Http404      dct = {'lbl': lbl, 'dashboard': dashboard, diff --git a/ishtar_common/widgets.py b/ishtar_common/widgets.py index 3fbf24f29..94709406c 100644 --- a/ishtar_common/widgets.py +++ b/ishtar_common/widgets.py @@ -1,6 +1,6 @@  #!/usr/bin/env python  # -*- coding: utf-8 -*- -# Copyright (C) 2010-2016 Étienne Loks  <etienne.loks_AT_peacefrogsDOTnet> +# Copyright (C) 2010-2017 Étienne Loks  <etienne.loks_AT_peacefrogsDOTnet>  # Copyright (C) 2007  skam <massimo dot scamarcia at gmail.com>  #                          (http://djangosnippets.org/snippets/233/) @@ -45,21 +45,89 @@ reverse_lazy = lazy(reverse, unicode)  class Select2Multiple(forms.SelectMultiple): -    class Media: +    def __init__(self, attrs=None, choices=(), remote=None, model=None, +                 available=None): +        super(Select2Multiple, self).__init__(attrs, choices) +        self.remote = remote +        self.available = available +        self.model = model + +    @property +    def media(self): +        media = super(Select2Multiple, self).media          css = {              'all': ('select2/css/select2.css',)          } -        js = ('select2/js/select2.min.js', -              'select2/js/init.js') +        js = ['select2/js/select2.min.js'] +        for lang_code, lang in settings.LANGUAGES: +            js.append('select2/js/i18n/{}.js'.format(lang_code)) +        media.add_css(css) +        media.add_js(js) +        return media + +    def get_q(self): +        q = self.model.objects +        if self.available: +            q = q.filter(available=True) +        return q + +    def get_choices(self): +        for i in self.get_q().all(): +            yield (i.pk, unicode(i))      def render(self, name, value, attrs=None, choices=()): +        self.remote = unicode(self.remote) +        if self.remote in ('None', 'false'): +            # test on lazy object is buggy... so we have this ugly test +            self.remote = None +        if not choices and not self.remote and self.model: +            choices = self.get_choices()          klass = attrs and attrs.get('class') or ''          klass += ' ' if klass else '' + 'js-select2'          if not attrs:              attrs = {}          attrs['class'] = klass -        return super(Select2Multiple, self).render(name, value, attrs, +        attrs['style'] = "width: 370px" +        options = "" +        if self.remote: +            options = """{ +            ajax: { +                url: '%s', +                delay: 250, +                dataType: 'json', +                minimumInputLength: 2, +                processResults: function (data) { +                 if(!data) return {results: []}; +                 var result = $.map(data, function (item) { +                        return { +                            text: item['value'], +                            id: item['id'] +                        } +                      }); +                 return { +                    results: result +                  } +                } +              } +            }""" % self.remote +            if value: +                choices = [] +                if type(value) not in (list, tuple): +                    value = value.split(',') +                for v in value: +                    try: +                        choices.append((v, self.model.objects.get(pk=v))) +                    except (self.model.DoesNotExist, ValueError): +                        # an old reference ? it should not happen +                        pass +        html = super(Select2Multiple, self).render(name, value, attrs,                                                     choices) +        html += """<script type="text/javascript"> +        $(document).ready(function() {{ +            $("#id_{}").select2({}); +        }});</script> +        """.format(name, options) +        return mark_safe(html)  class CheckboxSelectMultiple(CheckboxSelectMultipleBase): @@ -77,49 +145,35 @@ class CheckboxSelectMultiple(CheckboxSelectMultipleBase):                                                            choices) -class MultipleAutocompleteField(forms.MultipleChoiceField): +class Select2MultipleField(forms.MultipleChoiceField):      def __init__(self, *args, **kwargs): -        self.model = None +        remote = None +        if 'remote' in kwargs: +            remote = kwargs.pop('remote') +        self.model, self.remote = None, None          if 'model' in kwargs:              self.model = kwargs.pop('model') -        if 'choices' not in kwargs and self.model: -            kwargs['choices'] = [] -        new = kwargs.pop('new') if 'new' in kwargs else None -        if 'widget' not in kwargs and self.model: -            kwargs['widget'] = JQueryAutoComplete( -                reverse_lazy('autocomplete-' + self.model.__name__.lower()), -                associated_model=self.model, new=new, -                multiple=True) -        super(MultipleAutocompleteField, self).__init__(*args, **kwargs) - -    def get_choices(self): -        return [(i.pk, unicode(i)) for i in self.model.objects.all()] +            if remote: +                self.remote = reverse_lazy( +                    'autocomplete-' + self.model.__name__.lower()) +        self.available = False +        if 'available' in kwargs: +            self.available = kwargs.pop('available') +        kwargs['widget'] = Select2Multiple(model=self.model, +                                           available=self.available, +                                           remote=self.remote) +        super(Select2MultipleField, self).__init__(*args, **kwargs) + +    def get_q(self): +        q = self.model.objects +        if self.available: +            q = q.filter(available=True) +        return q      def valid_value(self, value):          if not self.model: -            return super(MultipleAutocompleteField, self).valid_value(value) -        return bool(self.model.objects.filter(pk=value).count()) - -    def clean(self, value): -        if value: -            # clean JS messup with values -            try: -                if type(value) not in (list, tuple): -                    value = [int(value)] -                else: -                    val = value -                    value = [] -                    for v in val: -                        v = unicode(v).strip('[').strip(']')\ -                                      .strip('u').strip("'").strip('"') -                        value += [int(va.strip()) -                                  for va in list(set(v.split(','))) -                                  if va.strip()] -            except (TypeError, ValueError): -                value = [] -        else: -            value = [] -        return super(MultipleAutocompleteField, self).clean(value) +            return super(Select2MultipleField, self).valid_value(value) +        return bool(self.get_q().filter(pk=value).count())  class DeleteWidget(forms.CheckboxInput): diff --git a/ishtar_common/wizards.py b/ishtar_common/wizards.py index 874b68eae..8d787d733 100644 --- a/ishtar_common/wizards.py +++ b/ishtar_common/wizards.py @@ -51,10 +51,16 @@ class MultiValueDict(BaseMultiValueDict):              v = v()          if type(v) in (list, tuple) and len(v) > 1:              v = ",".join(v) -        else: +        elif type(v) not in (int, unicode):              v = super(MultiValueDict, self).get(*args, **kwargs)          return v +    def getlist(self, *args, **kwargs): +        lst = super(MultiValueDict, self).getlist(*args, **kwargs) +        if type(lst) not in (tuple, list): +            lst = [lst] +        return lst +  def check_rights(rights=[], redirect_url='/'):      """ @@ -132,6 +138,7 @@ class Wizard(NamedUrlWizardView):      current_object_key = 'pk'      ignore_init_steps = []      file_storage = default_storage +    main_item_select_keys = ('selec-',)      saved_args = {}  # argument to pass on object save @@ -217,8 +224,9 @@ class Wizard(NamedUrlWizardView):          dct = {'current_step_label': self.form_list[current_step].form_label,                 'wizard_label': self.label,                 'current_object': self.get_current_object(), -               'is_search': current_step.startswith('selec-') -               if current_step else False +               'is_search': bool( +                   [k for k in self.main_item_select_keys +                    if current_step.startswith(k)]) if current_step else False                 }          context.update(dct)          if step == current_step: @@ -406,6 +414,8 @@ class Wizard(NamedUrlWizardView):          for form in form_list:              if not form.is_valid():                  return self.render(form) +            if hasattr(form, 'readonly') and form.readonly: +                continue              base_form = hasattr(form, 'forms') and form.forms[0] or form              associated_models = hasattr(base_form, 'associated_models') and \                  base_form.associated_models or {} @@ -815,7 +825,7 @@ class Wizard(NamedUrlWizardView):                  # get a form key                  frm = form.form                  if callable(frm): -                    frm = frm() +                    frm = frm(self.get_form_kwargs(step))                  total_field = 0                  if hasattr(frm, 'count_valid_fields'): @@ -1004,20 +1014,24 @@ class Wizard(NamedUrlWizardView):      def get_current_object(self):          """Get the current object for an instancied wizard"""          current_obj = None -        main_form_key = 'selec-' + self.url_name -        try: -            idx = self.session_get_value(main_form_key, self.current_object_key) -            idx = int(idx) -            current_obj = self.model.objects.get(pk=idx) -        except(TypeError, ValueError, ObjectDoesNotExist): -            pass +        for key in self.main_item_select_keys: +            main_form_key = key + self.url_name +            try: +                idx = int(self.session_get_value(main_form_key, +                                                 self.current_object_key)) +                current_obj = self.model.objects.get(pk=idx) +                break +            except(TypeError, ValueError, ObjectDoesNotExist): +                pass          return current_obj      def get_form_initial(self, step, data=None):          current_obj = self.get_current_object()          current_step = self.steps.current          request = self.request -        if step.startswith('selec-') and step in self.form_list \ +        step_is_main_select = bool([k for k in self.main_item_select_keys +                                    if step.startswith(k)]) +        if step_is_main_select and step in self.form_list \             and 'pk' in self.form_list[step].associated_models:              model_name = self.form_list[step]\                               .associated_models['pk'].__name__.lower() diff --git a/scripts/2017-03-29-missing-rights.py b/scripts/2017-03-29-missing-rights.py new file mode 100644 index 000000000..81a9b86ee --- /dev/null +++ b/scripts/2017-03-29-missing-rights.py @@ -0,0 +1,24 @@ +from django.contrib.auth.models import Group, Permission + +for group in Group.objects.all(): +    if ':' not in group.name or u"rattaché" in group.name: +        continue +    permissions = [] +    for perm in group.permissions.all(): +        codenames = perm.codename.split('_') +        own_codename = codenames[0] + "_own_" + '_'.join(codenames[1:]) +        if Permission.objects.filter(codename=own_codename).count(): +            permissions.append(Permission.objects.get(codename=own_codename)) +    if not permissions: +        print(u'No permission: ' + group.name) +        continue +    names = group.name.split(':') +    if Group.objects.filter(name__startswith=names[0] + u"rattaché", +                            name__endswith=names[1]).count(): +        print(u'Already here: ' + group.name) +        continue +    name = names[0] + u"rattachés " + u":" + names[1] +    new_group = Group.objects.create(name=name) +    for perm in permissions: +        new_group.permissions.add(perm) +    print(u'New: ' + group.name) diff --git a/translations/de/ishtar_common.po b/translations/de/ishtar_common.po index d85d9f550..93bce7079 100644 --- a/translations/de/ishtar_common.po +++ b/translations/de/ishtar_common.po @@ -389,7 +389,7 @@ msgstr ""  msgid "Account"  msgstr "" -#: forms_common.py:577 wizards.py:1333 +#: forms_common.py:577 wizards.py:1339  msgid "New password"  msgstr "" @@ -529,7 +529,7 @@ msgstr ""  msgid "Deletion"  msgstr "" -#: ishtar_menu.py:39 models.py:1277 views.py:1606 +#: ishtar_menu.py:39 models.py:1277 views.py:1608  msgid "Global variables"  msgstr "" @@ -561,15 +561,15 @@ msgstr ""  msgid "Imports"  msgstr "" -#: ishtar_menu.py:112 views.py:1614 +#: ishtar_menu.py:112 views.py:1616  msgid "New import"  msgstr "" -#: ishtar_menu.py:116 views.py:1628 +#: ishtar_menu.py:116 views.py:1630  msgid "Current imports"  msgstr "" -#: ishtar_menu.py:120 views.py:1667 +#: ishtar_menu.py:120 views.py:1669  msgid "Old imports"  msgstr "" @@ -1540,56 +1540,56 @@ msgstr ""  msgid "Treatment"  msgstr "" -#: views.py:1361 views.py:1404 +#: views.py:1363 views.py:1406  msgid "Operation not permitted."  msgstr "" -#: views.py:1363 +#: views.py:1365  #, python-format  msgid "New %s"  msgstr "" -#: views.py:1422 views.py:1472 +#: views.py:1424 views.py:1474  msgid "Archaeological files"  msgstr "" -#: views.py:1423 views.py:1476 +#: views.py:1425 views.py:1478  msgid "Operations"  msgstr "" -#: views.py:1425 views.py:1480 +#: views.py:1427 views.py:1482  msgid "Context records"  msgstr "" -#: views.py:1427 views.py:1483 +#: views.py:1429 views.py:1485  msgid "Finds"  msgstr "" -#: views.py:1681 templates/ishtar/import_list.html:47 +#: views.py:1683 templates/ishtar/import_list.html:47  msgid "Link unmatched items"  msgstr "" -#: views.py:1696 +#: views.py:1698  msgid "Delete import"  msgstr "" -#: views.py:1735 +#: views.py:1737  msgid "Merge persons"  msgstr "" -#: views.py:1759 +#: views.py:1761  msgid "Select the main person"  msgstr "" -#: views.py:1768 +#: views.py:1770  msgid "Merge organization"  msgstr "" -#: views.py:1778 +#: views.py:1780  msgid "Select the main organization"  msgstr "" -#: views.py:1818 views.py:1834 +#: views.py:1820 views.py:1836  msgid "Corporation manager"  msgstr "" @@ -1597,11 +1597,11 @@ msgstr ""  msgid "Search..."  msgstr "" -#: widgets.py:670 templatetags/window_tables.py:91 +#: widgets.py:670 templatetags/window_tables.py:96  msgid "No results"  msgstr "" -#: widgets.py:671 templatetags/window_tables.py:92 +#: widgets.py:671 templatetags/window_tables.py:97  msgid "Loading..."  msgstr "" @@ -1609,15 +1609,15 @@ msgstr ""  msgid "Remove"  msgstr "" -#: wizards.py:372 templates/ishtar/import_delete.html:21 +#: wizards.py:374 templates/ishtar/import_delete.html:21  msgid "Yes"  msgstr "" -#: wizards.py:374 +#: wizards.py:376  msgid "No"  msgstr "" -#: wizards.py:1390 +#: wizards.py:1396  #, python-format  msgid "[%(app_name)s] Account creation/modification"  msgstr "" @@ -1688,11 +1688,7 @@ msgstr ""  #: templates/base.html:84 templates/welcome.html:8 templates/welcome.html.py:9  #: templates/welcome.html:10 templates/welcome.html.py:11 -#: templates/ishtar/manage_basket.html:4 -#: templates/ishtar/blocks/window_field.html:1 -#: templates/ishtar/blocks/window_field_detail.html:1 -#: templates/ishtar/blocks/window_field_multiple.html:1 -#: templates/ishtar/blocks/window_field_url.html:1 +#: templates/ishtar/manage_basket.html:5  msgid ":"  msgstr "" @@ -1981,7 +1977,7 @@ msgid "where the magic happens."  msgstr ""  #: templates/window.html:40 templates/blocks/JQueryJqGrid.html:34 -#: templates/ishtar/manage_basket.html:12 +#: templates/ishtar/manage_basket.html:13  msgid "Add"  msgstr "" @@ -2111,14 +2107,18 @@ msgstr ""  msgid "Control file"  msgstr "" -#: templates/ishtar/manage_basket.html:9 +#: templates/ishtar/manage_basket.html:10  msgid "Checking \"Select all\" only selects the current page."  msgstr "" -#: templates/ishtar/manage_basket.html:13 +#: templates/ishtar/manage_basket.html:14  msgid "Basket content"  msgstr "" +#: templates/ishtar/manage_basket.html:22 templates/ishtar/sheet.html:28 +msgid "Close" +msgstr "" +  #: templates/ishtar/merge.html:5  msgid "Merge"  msgstr "" @@ -2187,10 +2187,6 @@ msgstr ""  msgid "Contact informations"  msgstr "" -#: templates/ishtar/sheet.html:28 -msgid "Close" -msgstr "" -  #: templates/ishtar/sheet.html:34  msgid "Close all windows"  msgstr "" @@ -2328,11 +2324,13 @@ msgid ""  msgstr ""  #: templates/ishtar/blocks/sheet_creation_section.html:3 -msgid "Creation:" +msgctxt "Sheet" +msgid "Creation"  msgstr ""  #: templates/ishtar/blocks/sheet_creation_section.html:12 -msgid "Modification:" +msgctxt "Sheet" +msgid "Modification"  msgstr ""  #: templates/ishtar/blocks/sheet_external_id.html:3 diff --git a/translations/fr/archaeological_context_records.po b/translations/fr/archaeological_context_records.po index 9cdf05399..d9d2f3506 100644 --- a/translations/fr/archaeological_context_records.po +++ b/translations/fr/archaeological_context_records.po @@ -4,23 +4,26 @@  # Étienne Loks <etienne.loks at peacefrogs net>, 2010-2015.  # Valérie-Emma Leroux <emma@iggdrasil.net>, 2016. #zanata  # Valérie-Emma Leroux <emma@iggdrasil.net>, 2017. #zanata +# Étienne Loks <etienne.loks@iggdrasil.net>, 2017. #zanata  msgid ""  msgstr "" -"MIME-Version: 1.0\n" -"Content-Transfer-Encoding: 8bit\n" -"Content-Type: text/plain; charset=UTF-8\n" -"PO-Revision-Date: 2017-03-15 07:09-0400\n" -"Last-Translator: Valérie-Emma Leroux <emma@iggdrasil.net>\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-04-05 12:20+0200\n" +"PO-Revision-Date: 2017-03-21 06:22-0400\n" +"Last-Translator: Étienne Loks <etienne.loks@iggdrasil.net>\n"  "Language-Team: \n"  "Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n"  "Plural-Forms: nplurals=2; plural=n>1;\n"  "X-Generator: Zanata 3.9.6\n" -#: forms.py:47 forms.py:51 models.py:207 models.py:577 wizards.py:77 +#: forms.py:47 forms.py:51 models.py:216 models.py:599 wizards.py:77  msgid "Operation"  msgstr "Opération" -#: forms.py:59 forms.py:138 models.py:209 models.py:545 +#: forms.py:59 forms.py:141 models.py:218 models.py:567  msgid "ID"  msgstr "Identifiant" @@ -44,7 +47,7 @@ msgstr "Entité archéologique"  msgid "Search within related operations"  msgstr "Rechercher parmi les opérations liées" -#: forms.py:77 forms.py:241 models.py:56 +#: forms.py:77 forms.py:254 models.py:56  msgid "Period"  msgstr "Période" @@ -60,7 +63,7 @@ msgstr "Parcelle (section/numéro/domaine public)"  msgid "Search within relations"  msgstr "Rechercher parmi les relations" -#: forms.py:111 forms.py:344 views.py:92 +#: forms.py:111 forms.py:357 views.py:92  msgid "Context record search"  msgstr "Rechercher une Unité d'Enregistrement" @@ -72,56 +75,64 @@ msgstr "Vous devez sélectionner au moins une Unité d'Enregistrement."  msgid "General"  msgstr "Général" -#: forms.py:137 models.py:172 models.py:205 models.py:547 +#: forms.py:140 models.py:181 models.py:214 models.py:569  msgid "Parcel"  msgstr "Parcelle" -#: forms.py:140 models.py:210 models.py:548 +#: forms.py:143 models.py:219 models.py:570  #: templates/ishtar/sheet_contextrecord.html:30  msgid "Description"  msgstr "Description" -#: forms.py:142 models.py:211 +#: forms.py:145 models.py:220  msgid "General comment"  msgstr "Commentaire général" -#: forms.py:145 models.py:255 +#: forms.py:148 models.py:267  msgid "Excavation technique"  msgstr "Méthode de fouille" -#: forms.py:146 models.py:215 +#: forms.py:149 models.py:224  msgid "Length (m)"  msgstr "Taille (m)" -#: forms.py:147 models.py:216 +#: forms.py:150 models.py:225  msgid "Width (m)"  msgstr "Largeur (m)" -#: forms.py:148 models.py:217 +#: forms.py:151 models.py:226  msgid "Thickness (m)"  msgstr "Épaisseur (m)" -#: forms.py:149 models.py:219 +#: forms.py:152 models.py:228 +msgid "Diameter (m)" +msgstr "Diamètre (m)" + +#: forms.py:153 models.py:229  msgid "Depth (m)"  msgstr "Profondeur (m)" -#: forms.py:150 forms.py:363 models.py:227 models.py:546 +#: forms.py:155 models.py:231 +msgid "Depth of appearance (m)" +msgstr "Profondeur d'apparition" + +#: forms.py:156 forms.py:376 models.py:241 models.py:568  msgid "Context record type"  msgstr "Type d'Unité d'Enregistrement" -#: forms.py:151 models.py:229 -msgid "Has furniture?" -msgstr "Contient du mobilier ?" +#: forms.py:159 ishtar_menu.py:48 +msgid "Documentation" +msgstr "Documentation" -#: forms.py:154 models.py:221 +#: forms.py:162 models.py:233  msgid "Location"  msgstr "Lieu" -#: forms.py:157 +#: forms.py:165  msgid "Image"  msgstr "Image" -#: forms.py:158 +#: forms.py:166  #, python-format  msgid ""  "<p>Heavy images are resized to: %(width)dx%(height)d (ratio is preserved).</" @@ -130,112 +141,112 @@ msgstr ""  "<p>Les images trop grandes sont retaillées en : %(width)dx%(height)d (le "  "ratio est conservé).</p>" -#: forms.py:230 +#: forms.py:243  msgid "This ID already exists for this operation."  msgstr "Cet identifiant existe déjà pour cette opération." -#: forms.py:236 forms.py:263 models.py:67 +#: forms.py:249 forms.py:276 models.py:67  msgid "Dating"  msgstr "Datation" -#: forms.py:242 models.py:57 +#: forms.py:255 models.py:57  msgid "Start date"  msgstr "Date de début" -#: forms.py:243 models.py:58 models.py:214 +#: forms.py:256 models.py:58 models.py:223  msgid "End date"  msgstr "Date de fin" -#: forms.py:244 models.py:61 +#: forms.py:257 models.py:61  msgid "Quality"  msgstr "Qualité" -#: forms.py:245 models.py:39 models.py:59 +#: forms.py:258 models.py:39 models.py:59  msgid "Dating type"  msgstr "Type de datation" -#: forms.py:272 ishtar_menu.py:29 models.py:607 +#: forms.py:285 ishtar_menu.py:29 models.py:641  msgid "Context record"  msgstr "Unité d'Enregistrement" -#: forms.py:293 +#: forms.py:306  msgid "Relations"  msgstr "Relations" -#: forms.py:297 forms.py:305 models.py:232 -#: templates/ishtar/sheet_contextrecord.html:42 +#: forms.py:310 forms.py:318 models.py:244 +#: templates/ishtar/sheet_contextrecord.html:44  msgid "Interpretation"  msgstr "Interprétation" -#: forms.py:301 +#: forms.py:314  msgid "Comments on dating"  msgstr "Commentaires sur la datation" -#: forms.py:303 models.py:231 +#: forms.py:316 models.py:243  msgid "Filling"  msgstr "Remplissage" -#: forms.py:307 models.py:252 +#: forms.py:320 models.py:264  msgid "Activity"  msgstr "Activité" -#: forms.py:309 models.py:250 +#: forms.py:322 models.py:262  msgid "Identification"  msgstr "Identification" -#: forms.py:311 models.py:235 +#: forms.py:324 models.py:247  msgid "TAQ"  msgstr "TAQ" -#: forms.py:312 models.py:239 +#: forms.py:325 models.py:251  msgid "Estimated TAQ"  msgstr "TAQ estimé" -#: forms.py:314 models.py:242 +#: forms.py:327 models.py:254  msgid "TPQ"  msgstr "TPQ" -#: forms.py:315 models.py:246 +#: forms.py:328 models.py:258  msgid "Estimated TPQ"  msgstr "TPQ estimé" -#: forms.py:330 +#: forms.py:343  msgid "Operation search"  msgstr "Rechercher une opération" -#: forms.py:332 +#: forms.py:345  msgid "You should select an operation."  msgstr "Vous devez sélectionner une Opération." -#: forms.py:337 +#: forms.py:350  msgid "Would you like to delete this context record?"  msgstr "Voulez-vous supprimer cette Unité d'Enregistrement ?" -#: forms.py:346 +#: forms.py:359  msgid "You should select a context record."  msgstr "Vous devez sélectionner une Unité d'Enregistrement." -#: forms.py:351 +#: forms.py:364  msgid "Year of the operation"  msgstr "Année de l'opération" -#: forms.py:353 +#: forms.py:366  msgid "Numeric reference"  msgstr "Référence numérique" -#: forms.py:359 +#: forms.py:372  msgid "Town of the operation"  msgstr "Commune de l'opération" -#: forms.py:361 +#: forms.py:374  msgid "Period of the context record"  msgstr "Période de l'Unité d'Enregistrement" -#: forms.py:376 +#: forms.py:389  msgid "Documentation search"  msgstr "Rechercher une documentation" -#: forms.py:378 +#: forms.py:391  msgid "You should select a document."  msgstr "Vous devez sélectionner un document." @@ -255,10 +266,6 @@ msgstr "Modification"  msgid "Deletion"  msgstr "Suppression" -#: ishtar_menu.py:48 -msgid "Documentation" -msgstr "Documentation" -  #: models.py:40  msgid "Dating types"  msgstr "Types de datation" @@ -319,51 +326,59 @@ msgstr "Type de méthode de fouille"  msgid "Excavation technique types"  msgstr "Types de méthode de fouille" -#: models.py:163 models.py:549 +#: models.py:134 +msgid "Documentation type" +msgstr "Type de documentation" + +#: models.py:135 +msgid "Documentation types" +msgstr "Types de documentation" + +#: models.py:172 models.py:571  msgid "Periods"  msgstr "Périodes" -#: models.py:164 +#: models.py:173  msgid "Datings (period)"  msgstr "Datations (période)" -#: models.py:165 +#: models.py:174  msgid "Related context records"  msgstr "Unités d'Enregistrement liées" -#: models.py:168 +#: models.py:177  msgid "Parcel (external ID)"  msgstr "Parcelle (identifiant externe)" -#: models.py:169 models.py:170 +#: models.py:178 models.py:179  msgid "Parcel (town)"  msgstr "Parcelle (commune)" -#: models.py:171 +#: models.py:180  msgid "Parcel (year)"  msgstr "Parcelle (année)" -#: models.py:202 +#: models.py:211  msgid "External ID"  msgstr "ID externe" -#: models.py:204 +#: models.py:213  msgid "External ID is set automatically"  msgstr "L'identifiant externe est configuré automatiquement" -#: models.py:212 +#: models.py:221  msgid "Date d'ouverture"  msgstr "Date d'ouverture" -#: models.py:222 +#: models.py:234  msgid "A short description of the location of the context record"  msgstr "Une courte description de la localisation de l'Unité d'Enregistrement" -#: models.py:225 +#: models.py:239  msgid "Comment on datings"  msgstr "Commentaire sur les datations" -#: models.py:236 +#: models.py:248  msgid ""  "\"Terminus Ante Quem\" the context record can't have been created after this "  "date" @@ -371,11 +386,11 @@ msgstr ""  "« Terminus Ante Quem ». L'Unité d'Enregistrement ne peut avoir été créée "  "après cette date." -#: models.py:240 +#: models.py:252  msgid "Estimation of a \"Terminus Ante Quem\""  msgstr "Estimation d'un « Terminus Ante Quem »." -#: models.py:243 +#: models.py:255  msgid ""  "\"Terminus Post Quem\" the context record can't have been created before "  "this date" @@ -383,119 +398,144 @@ msgstr ""  "« Terminus Post Quem ». L'Unité d'Enregistrement ne peut avoir été créée "  "avant cette date." -#: models.py:247 +#: models.py:259  msgid "Estimation of a \"Terminus Post Quem\""  msgstr "Estimation d'un « Terminus Post Quem »." -#: models.py:258 +#: models.py:270  msgid "Point"  msgstr "Point" -#: models.py:259 +#: models.py:271  msgid "Polygon"  msgstr "Polygone" -#: models.py:260 +#: models.py:272  msgid "Cached name"  msgstr "Nom en cache" -#: models.py:264 models.py:265 templates/ishtar/sheet_contextrecord.html:4 +#: models.py:276 models.py:277 templates/ishtar/sheet_contextrecord.html:4  msgid "Context Record"  msgstr "Unité d'Enregistrement" -#: models.py:267 +#: models.py:279  msgid "Can view all Context Records"  msgstr "Peut voir toutes les Unités d'Enregistrement" -#: models.py:269 +#: models.py:281  msgid "Can view own Context Record"  msgstr "Peut voir sa propre Unité d'Enregistrement" -#: models.py:271 +#: models.py:283  msgid "Can add own Context Record"  msgstr "Peut ajouter sa propre Unité d'Enregistrement" -#: models.py:273 +#: models.py:285  msgid "Can change own Context Record"  msgstr "Peut modifier sa propre Unité d'Enregistrement" -#: models.py:275 +#: models.py:287  msgid "Can delete own Context Record"  msgstr "Peut supprimer sa propre Unité d'Enregistrement" -#: models.py:285 +#: models.py:297  msgctxt "short"  msgid "Context record"  msgstr "UE" -#: models.py:479 +#: models.py:501  msgid "Inverse relation"  msgstr "Relation inverse" -#: models.py:483 models.py:506 models.py:544 +#: models.py:505 models.py:528 models.py:566  msgid "Relation type"  msgstr "Type de relation" -#: models.py:484 +#: models.py:506  msgid "Relation types"  msgstr "Types de relation" -#: models.py:501 +#: models.py:523  msgid "ID (left)"  msgstr "ID (gauche)" -#: models.py:502 +#: models.py:524  msgid "Context record type (left)"  msgstr "Type d'UE (gauche)" -#: models.py:503 +#: models.py:525  msgid "Parcel (left)"  msgstr "Parcelle (gauche)" -#: models.py:504 +#: models.py:526  msgid "Description (left)"  msgstr "Description (gauche)" -#: models.py:505 +#: models.py:527  msgid "Periods (left)"  msgstr "Périodes (gauche)" -#: models.py:507 +#: models.py:529  msgid "ID (right)"  msgstr "ID (droit)" -#: models.py:508 +#: models.py:530  msgid "Context record type (right)"  msgstr "Type d'UE (droite)" -#: models.py:509 +#: models.py:531  msgid "Parcel (right)"  msgstr "Parcelle (droite)" -#: models.py:510 +#: models.py:532  msgid "Description (right)"  msgstr "Description (droite)" -#: models.py:511 +#: models.py:533  msgid "Periods (right)"  msgstr "Périodes (droite)" -#: models.py:520 +#: models.py:542  msgid "Record relation"  msgstr "Relation entre Unités d'Enregistrement" -#: models.py:521 +#: models.py:543  msgid "Record relations"  msgstr "Relations entre Unités d'Enregistrement" -#: models.py:604 +#: models.py:626  msgid "Context record documentation"  msgstr "Documentation d'une Unité d'Enregistrement" -#: models.py:605 +#: models.py:627  msgid "Context record documentations"  msgstr "Documentations des Unités d'Enregistrement" +#: models.py:630 +#, fuzzy +msgid "Can view all Context record sources" +msgstr "Peut voir toutes les Unités d'Enregistrement" + +#: models.py:632 +#, fuzzy +msgid "Can view own Context record source" +msgstr "Peut voir sa propre Unité d'Enregistrement" + +#: models.py:634 +#, fuzzy +msgid "Can add own Context record source" +msgstr "Peut ajouter sa propre Unité d'Enregistrement" + +#: models.py:636 +#, fuzzy +msgid "Can change own Context record source" +msgstr "Peut modifier sa propre Unité d'Enregistrement" + +#: models.py:638 +#, fuzzy +msgid "Can delete own Context record source" +msgstr "Peut supprimer sa propre Unité d'Enregistrement" +  #: views.py:102  msgid "New context record"  msgstr "Ajouter une Unité d'Enregistrement" @@ -532,71 +572,71 @@ msgstr "ID complet :"  msgid "Temporary ID:"  msgstr "ID temporaire :" -#: templates/ishtar/sheet_contextrecord.html:54 +#: templates/ishtar/sheet_contextrecord.html:56  msgid "Datations"  msgstr "Datations" -#: templates/ishtar/sheet_contextrecord.html:63 +#: templates/ishtar/sheet_contextrecord.html:65  msgid "Context record relations"  msgstr "Relations entre Unités d'Enregistrement" -#: templates/ishtar/sheet_contextrecord.html:70 +#: templates/ishtar/sheet_contextrecord.html:72  msgid "Operation summary"  msgstr "Résumé de l'opération" -#: templates/ishtar/sheet_contextrecord.html:72 +#: templates/ishtar/sheet_contextrecord.html:74  msgid "Patriarche OA code not yet recorded!"  msgstr "Code d'opération Patriarche non renseigné !" -#: templates/ishtar/sheet_contextrecord.html:76 +#: templates/ishtar/sheet_contextrecord.html:78  msgid "Numerical reference"  msgstr "Référence numérique" -#: templates/ishtar/sheet_contextrecord.html:80 +#: templates/ishtar/sheet_contextrecord.html:82  msgid "State:"  msgstr "État :" -#: templates/ishtar/sheet_contextrecord.html:80 +#: templates/ishtar/sheet_contextrecord.html:82  msgid "Active file"  msgstr "Dossier actif" -#: templates/ishtar/sheet_contextrecord.html:80 +#: templates/ishtar/sheet_contextrecord.html:82  msgid "Closed operation"  msgstr "Opération close" -#: templates/ishtar/sheet_contextrecord.html:82 +#: templates/ishtar/sheet_contextrecord.html:84  msgid "Closing date:"  msgstr "Date de clôture :" -#: templates/ishtar/sheet_contextrecord.html:82 +#: templates/ishtar/sheet_contextrecord.html:84  msgid "by"  msgstr "par" -#: templates/ishtar/sheet_contextrecord.html:90 +#: templates/ishtar/sheet_contextrecord.html:92  msgid "Localisation"  msgstr "Lieu" -#: templates/ishtar/sheet_contextrecord.html:91 +#: templates/ishtar/sheet_contextrecord.html:93  msgid "Towns:"  msgstr "Communes :" -#: templates/ishtar/sheet_contextrecord.html:92 +#: templates/ishtar/sheet_contextrecord.html:94  msgid "Related operation:"  msgstr "Opération associée :" -#: templates/ishtar/sheet_contextrecord.html:94 +#: templates/ishtar/sheet_contextrecord.html:96  msgid "No operation linked to this context unit!"  msgstr "Pas d'opération rattachée à cette UE !" -#: templates/ishtar/sheet_contextrecord.html:97 +#: templates/ishtar/sheet_contextrecord.html:99  msgid "Document from this context record"  msgstr "Document associé à cette Unité d'Enregistrement" -#: templates/ishtar/sheet_contextrecord.html:102 +#: templates/ishtar/sheet_contextrecord.html:104  msgid "Finds"  msgstr "Mobilier" -#: templates/ishtar/sheet_contextrecord.html:107 +#: templates/ishtar/sheet_contextrecord.html:109  msgid "Documents from associated finds"  msgstr "Documents du mobilier associé" diff --git a/translations/fr/archaeological_files.po b/translations/fr/archaeological_files.po index 23d75e0d0..2b2804547 100644 --- a/translations/fr/archaeological_files.po +++ b/translations/fr/archaeological_files.po @@ -8,17 +8,19 @@  # Valérie-Emma Leroux <emma@iggdrasil.net>, 2017. #zanata  msgid ""  msgstr "" -"MIME-Version: 1.0\n" -"Content-Transfer-Encoding: 8bit\n" -"Content-Type: text/plain; charset=UTF-8\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-04-05 12:20+0200\n"  "PO-Revision-Date: 2017-02-05 05:21-0500\n"  "Last-Translator: Valérie-Emma Leroux <emma@iggdrasil.net>\n"  "Language-Team: \n"  "Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n"  "Plural-Forms: nplurals=2; plural=n>1;\n"  "X-Generator: Zanata 3.9.6\n" -#: forms.py:47 forms.py:210 forms.py:255 forms.py:396 forms.py:423 +#: forms.py:47 forms.py:210 forms.py:255 forms.py:394 forms.py:421  #: models.py:108 templates/ishtar/sheet_file.html:144  msgid "Year"  msgstr "Année" @@ -31,15 +33,15 @@ msgstr "Référence numérique"  msgid "Other reference"  msgstr "Autre référence" -#: forms.py:52 forms.py:431 +#: forms.py:52 forms.py:429  msgid "Parcel (section/number/public domain)"  msgstr "Parcelle (section/numéro/domaine public)" -#: forms.py:55 forms.py:407 forms.py:434 models.py:558 +#: forms.py:55 forms.py:405 forms.py:432 models.py:558  msgid "Department"  msgstr "Département" -#: forms.py:56 forms.py:443 +#: forms.py:56 forms.py:441  msgid "File name"  msgstr "Nom du dossier" @@ -63,7 +65,7 @@ msgstr "Type de permis"  msgid "Permit reference"  msgstr "Référence du permis" -#: forms.py:63 forms.py:227 forms.py:364 models.py:180 +#: forms.py:63 forms.py:227 forms.py:362 models.py:180  #: templates/ishtar/sheet_file.html:97  msgid "Comment"  msgstr "Commentaire" @@ -72,19 +74,19 @@ msgstr "Commentaire"  msgid "In charge"  msgstr "Responsable" -#: forms.py:72 forms.py:281 forms.py:445 models.py:126 +#: forms.py:72 forms.py:281 forms.py:443 models.py:126  msgid "General contractor"  msgstr "Aménageur" -#: forms.py:79 forms.py:453 +#: forms.py:79 forms.py:451  msgid "Organization of general contractor"  msgstr "Organisation de l'aménageur" -#: forms.py:87 forms.py:476 +#: forms.py:87 forms.py:474  msgid "Created by"  msgstr "Créé par" -#: forms.py:94 forms.py:484 +#: forms.py:94 forms.py:482  msgid "Modified by"  msgstr "Modifié par" @@ -178,83 +180,83 @@ msgstr "Surface totale aménagée (m2)"  msgid "Research archaeology"  msgstr "Archéologie programmée" -#: forms.py:341 models.py:183 templates/ishtar/sheet_file.html:88 +#: forms.py:340 models.py:183 templates/ishtar/sheet_file.html:88  msgid "Departments"  msgstr "Départements" -#: forms.py:351 models.py:192 +#: forms.py:349 models.py:192  msgid "Scientist in charge"  msgstr "Responsable scientifique" -#: forms.py:353 models.py:186 templates/ishtar/sheet_file.html:90 +#: forms.py:351 models.py:186 templates/ishtar/sheet_file.html:90  msgid "Requested operation type"  msgstr "Type d'opération demandée" -#: forms.py:355 +#: forms.py:353  msgid "Lead organization"  msgstr "Organisation porteuse du projet" -#: forms.py:371 models.py:196 templates/ishtar/sheet_file.html:95 +#: forms.py:369 models.py:196 templates/ishtar/sheet_file.html:95  msgid "Classified area"  msgstr "Au sein d'un site classé" -#: forms.py:373 models.py:198 templates/ishtar/sheet_file.html:96 +#: forms.py:371 models.py:198 templates/ishtar/sheet_file.html:96  msgid "Protected area"  msgstr "Au sein d'un secteur sauvegardé" -#: forms.py:387 +#: forms.py:385  msgid "Would you like to close this archaeological file?"  msgstr "Voulez-vous clore ce dossier archéologique ?" -#: forms.py:392 +#: forms.py:390  msgid "Would you like to delete this archaeological file ?"  msgstr "Voulez-vous supprimer ce dossier archéologique ?" -#: forms.py:397 forms.py:424 forms.py:547 +#: forms.py:395 forms.py:422 forms.py:545  msgid "Index"  msgstr "Index" -#: forms.py:401 forms.py:428 forms.py:533 +#: forms.py:399 forms.py:426 forms.py:531  msgid "Act type"  msgstr "Type d'acte" -#: forms.py:402 +#: forms.py:400  msgid "Object (full text search)"  msgstr "Objet (recherche texte intégral)" -#: forms.py:429 +#: forms.py:427  msgid "Indexed?"  msgstr "Indexé ?" -#: forms.py:435 +#: forms.py:433  msgid "Object"  msgstr "Objet" -#: forms.py:439 +#: forms.py:437  msgid "Signature date after"  msgstr "Date de signature après" -#: forms.py:441 +#: forms.py:439  msgid "Signature date before"  msgstr "Date de signature avant" -#: forms.py:461 +#: forms.py:459  msgid "File numeric reference"  msgstr "Dossier : réf. numérique" -#: forms.py:462 +#: forms.py:460  msgid "File year"  msgstr "Dossier : année" -#: forms.py:464 +#: forms.py:462  msgid "File other reference"  msgstr "Dossier : autre référence" -#: forms.py:466 +#: forms.py:464  msgid "File in charge"  msgstr "Dossier : responsable" -#: forms.py:474 +#: forms.py:472  msgid "File permit reference"  msgstr "Dossier : réf. du permis" diff --git a/translations/fr/archaeological_files_pdl.po b/translations/fr/archaeological_files_pdl.po index 949555adc..6b026d72e 100644 --- a/translations/fr/archaeological_files_pdl.po +++ b/translations/fr/archaeological_files_pdl.po @@ -5,13 +5,15 @@  # Valérie-Emma Leroux <emma@iggdrasil.net>, 2016. #zanata  msgid ""  msgstr "" -"MIME-Version: 1.0\n" -"Content-Transfer-Encoding: 8bit\n" -"Content-Type: text/plain; charset=UTF-8\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-04-05 12:20+0200\n"  "PO-Revision-Date: 2016-11-14 05:33-0500\n"  "Last-Translator: Copied by Zanata <copied-by-zanata@zanata.org>\n"  "Language-Team: \n"  "Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n"  "Plural-Forms: nplurals=2; plural=(n > 1)\n"  "X-Generator: Zanata 3.9.6\n" diff --git a/translations/fr/archaeological_finds.po b/translations/fr/archaeological_finds.po index 8aa993d5d..6446c4f38 100644 --- a/translations/fr/archaeological_finds.po +++ b/translations/fr/archaeological_finds.po @@ -5,181 +5,184 @@  # Valérie-Emma Leroux <emma@iggdrasil.net>, 2016. #zanata  # Étienne Loks <etienne.loks@iggdrasil.net>, 2016. #zanata  # Valérie-Emma Leroux <emma@iggdrasil.net>, 2017. #zanata +# Étienne Loks <etienne.loks@iggdrasil.net>, 2017. #zanata  msgid ""  msgstr "" -"MIME-Version: 1.0\n" -"Content-Transfer-Encoding: 8bit\n" -"Content-Type: text/plain; charset=UTF-8\n" -"PO-Revision-Date: 2017-03-15 07:11-0400\n" -"Last-Translator: Valérie-Emma Leroux <emma@iggdrasil.net>\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-04-05 12:20+0200\n" +"PO-Revision-Date: 2017-03-21 06:23-0400\n" +"Last-Translator: Étienne Loks <etienne.loks@iggdrasil.net>\n"  "Language-Team: \n"  "Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n"  "Plural-Forms: nplurals=2; plural=n>1;\n"  "X-Generator: Zanata 3.9.6\n" -#: forms.py:90 forms.py:94 models_finds.py:505 wizards.py:64 +#: forms.py:93 forms.py:97 models_finds.py:518 wizards.py:64  msgid "Context record"  msgstr "Unité d'Enregistrement" -#: forms.py:123 ishtar_menu.py:32 models_finds.py:664 models_finds.py:1067 -#: models_finds.py:1076 models_treatments.py:281 +#: forms.py:126 ishtar_menu.py:32 models_finds.py:682 models_finds.py:1113 +#: models_finds.py:1134 models_treatments.py:281  #: templates/ishtar/sheet_find.html:5  msgid "Find"  msgstr "Mobilier" -#: forms.py:137 forms.py:330 forms.py:559 models_finds.py:151 -#: models_finds.py:595 +#: forms.py:140 forms.py:337 forms.py:605 models_finds.py:150 +#: models_finds.py:612  msgid "Free ID"  msgstr "ID libre" -#: forms.py:139 models_finds.py:647 +#: forms.py:142 models_finds.py:665  msgid "Previous ID"  msgstr "Identifiant précédent" -#: forms.py:140 forms.py:362 forms_treatments.py:134 models_finds.py:155 -#: models_finds.py:596 models_treatments.py:127 +#: forms.py:143 forms.py:368 forms_treatments.py:134 models_finds.py:154 +#: models_finds.py:613 models_treatments.py:127  msgid "Description"  msgstr "Description" -#: forms.py:143 forms.py:364 models_finds.py:164 +#: forms.py:146 forms.py:370 models_finds.py:163  msgid "Batch/object"  msgstr "Lot/objet" -#: forms.py:145 models_finds.py:624 +#: forms.py:148 models_finds.py:642  msgid "Is complete?"  msgstr "Est complet ?" -#: forms.py:148 forms.py:352 forms.py:563 models_finds.py:51 +#: forms.py:151 forms.py:358 forms.py:609 models_finds.py:50  msgid "Material type"  msgstr "Type de matériau" -#: forms.py:149 forms.py:356 models_finds.py:63 models_finds.py:600 +#: forms.py:154 forms.py:362 models_finds.py:62 models_finds.py:617  msgid "Conservatory state"  msgstr "État sanitaire" -#: forms.py:152 models_finds.py:602 +#: forms.py:157 models_finds.py:619  msgid "Conservatory comment"  msgstr "Commentaire relatif à la conservation" -#: forms.py:155 models_finds.py:113 models_finds.py:627 +#: forms.py:160 models_finds.py:112 models_finds.py:645  msgid "Object types"  msgstr "Types d'objet" -#: forms.py:157 forms.py:355 models_finds.py:72 +#: forms.py:164 forms.py:361 models_finds.py:71  msgid "Preservation type"  msgstr "Type de conservation" -#: forms.py:160 forms.py:358 models_finds.py:629 +#: forms.py:167 forms.py:364 models_finds.py:647  msgid "Integrity / interest"  msgstr "Intégrité / intérêt" -#: forms.py:163 forms.py:360 models_finds.py:632 +#: forms.py:170 forms.py:366 models_finds.py:650  msgid "Remarkability"  msgstr "Remarquabilité" -#: forms.py:166 models_finds.py:169 +#: forms.py:173 models_finds.py:168  msgid "Point of topographic reference"  msgstr "Point de référence topographique" -#: forms.py:169 models_finds.py:171 +#: forms.py:176 models_finds.py:170  msgid "X"  msgstr "X" -#: forms.py:170 models_finds.py:172 +#: forms.py:177 models_finds.py:171  msgid "Y"  msgstr "Y" -#: forms.py:171 models_finds.py:173 +#: forms.py:178 models_finds.py:172  msgid "Z"  msgstr "Z" -#: forms.py:173 models_finds.py:181 +#: forms.py:180 models_finds.py:180  msgid "Spatial Reference System"  msgstr "Système de référence spatiale" -#: forms.py:176 models_finds.py:174 +#: forms.py:183 models_finds.py:173  msgid "Estimated error for X"  msgstr "Erreur estimée pour X" -#: forms.py:178 models_finds.py:176 +#: forms.py:185 models_finds.py:175  msgid "Estimated error for Y"  msgstr "Erreur estimée pour Y" -#: forms.py:180 models_finds.py:178 +#: forms.py:187 models_finds.py:177  msgid "Estimated error for Z"  msgstr "Erreur estimée pour Z" -#: forms.py:181 models_finds.py:636 +#: forms.py:188 models_finds.py:654  msgid "Length (cm)"  msgstr "Longueur (cm)" -#: forms.py:182 models_finds.py:637 +#: forms.py:189 models_finds.py:655  msgid "Width (cm)"  msgstr "Largeur (cm)" -#: forms.py:183 models_finds.py:638 +#: forms.py:190 models_finds.py:656  msgid "Height (cm)"  msgstr "Hauteur (cm)" -#: forms.py:184 models_finds.py:639 +#: forms.py:191 models_finds.py:657  msgid "Diameter (cm)"  msgstr "Diamètre (cm)" -#: forms.py:185 models_finds.py:640 +#: forms.py:192 models_finds.py:658  msgid "Thickness (cm)"  msgstr "Épaisseur (cm)" -#: forms.py:186 forms.py:564 models_finds.py:607 +#: forms.py:193 forms.py:610 models_finds.py:624  msgid "Volume (l)"  msgstr "Volume (l)" -#: forms.py:187 forms.py:565 models_finds.py:608 +#: forms.py:194 forms.py:611 models_finds.py:625  msgid "Weight (g)"  msgstr "Poids (g)" -#: forms.py:189 models_finds.py:641 +#: forms.py:196 models_finds.py:659  msgid "Dimensions comment"  msgstr "Commentaire concernant les dimensions" -#: forms.py:190 forms.py:566 models_finds.py:611 +#: forms.py:197 forms.py:612 models_finds.py:628  msgid "Find number"  msgstr "Mobilier (en nombre)" -#: forms.py:192 models_finds.py:635 +#: forms.py:199 models_finds.py:653  msgid "Minimum number of individuals (MNI)"  msgstr "Nombre minimum d'individus (NMI)" -#: forms.py:193 models_finds.py:643 +#: forms.py:200 models_finds.py:661  msgid "Mark"  msgstr "Marque" -#: forms.py:194 forms.py:365 models_finds.py:649 +#: forms.py:201 forms.py:371 models_finds.py:667  msgid "Check"  msgstr "Vérification" -#: forms.py:196 models_finds.py:651 +#: forms.py:203 models_finds.py:669  msgid "Check date"  msgstr "Date de vérification" -#: forms.py:197 forms_treatments.py:132 forms_treatments.py:434 -#: models_finds.py:156 models_finds.py:644 models_treatments.py:126 +#: forms.py:204 forms_treatments.py:132 forms_treatments.py:434 +#: models_finds.py:155 models_finds.py:662 models_treatments.py:126  #: models_treatments.py:494  msgid "Comment"  msgstr "Commentaires" -#: forms.py:200 models_finds.py:645 +#: forms.py:207 models_finds.py:663  msgid "Comment on dating"  msgstr "Commentaire général sur les datations" -#: forms.py:201 models_finds.py:653 +#: forms.py:208 models_finds.py:671  msgid "Estimated value"  msgstr "Valeur estimée" -#: forms.py:203 forms_treatments.py:151 +#: forms.py:210 forms_treatments.py:151  msgid "Image"  msgstr "Image" -#: forms.py:204 forms_treatments.py:152 +#: forms.py:211 forms_treatments.py:152  #, python-format  msgid ""  "<p>Heavy images are resized to: %(width)dx%(height)d (ratio is preserved).</" @@ -188,166 +191,180 @@ msgstr ""  "<p>Les images trop grandes sont retaillées en : %(width)dx%(height)d (le "  "ratio est conservé).</p>" -#: forms.py:278 -msgid "" -"You should at least provide X, Y and the spatial reference system used." +#: forms.py:285 +msgid "You should at least provide X, Y and the spatial reference system used."  msgstr ""  "Vous devez au minimum fournir X, Y et le système de référence spatiale "  "utilisé." -#: forms.py:287 -msgid "" -"Coordinates are not relevant for the spatial reference system used: {}." +#: forms.py:294 +msgid "Coordinates are not relevant for the spatial reference system used: {}."  msgstr ""  "Les coordonnées ne sont pas pertinentes pour le système de référence "  "spatiale utilisé : {}." -#: forms.py:293 forms.py:324 models_finds.py:619 +#: forms.py:300 forms.py:331 models_finds.py:636  msgid "Dating"  msgstr "Datation" -#: forms.py:298 forms.py:350 +#: forms.py:305 forms.py:357  msgid "Period"  msgstr "Période" -#: forms.py:299 forms_treatments.py:138 forms_treatments.py:436 -#: models_finds.py:1081 models_treatments.py:129 models_treatments.py:292 +#: forms.py:306 forms_treatments.py:138 forms_treatments.py:436 +#: models_finds.py:1139 models_treatments.py:129 models_treatments.py:292  #: templates/ishtar/sheet_find.html:91 templates/ishtar/sheet_find.html:133  msgid "Start date"  msgstr "Date de début" -#: forms.py:301 models_finds.py:1082 models_treatments.py:293 +#: forms.py:308 models_finds.py:1140 models_treatments.py:293  #: templates/ishtar/sheet_find.html:92 templates/ishtar/sheet_find.html:134  msgid "End date"  msgstr "Date de fin" -#: forms.py:302 +#: forms.py:309  msgid "Quality"  msgstr "Qualité" -#: forms.py:304 +#: forms.py:311  msgid "Dating type"  msgstr "Type de datation" -#: forms.py:306 +#: forms.py:313  msgid "Precise dating"  msgstr "Datation précise" -#: forms.py:328 models_finds.py:188 +#: forms.py:335 models_finds.py:187  msgid "Short ID"  msgstr "ID court" -#: forms.py:329 models_finds.py:191 +#: forms.py:336 models_finds.py:190  msgid "Complete ID"  msgstr "ID complet" -#: forms.py:333 forms_treatments.py:54 forms_treatments.py:96 +#: forms.py:340 forms_treatments.py:54 forms_treatments.py:96  #: forms_treatments.py:284 forms_treatments.py:356 forms_treatments.py:406  #: forms_treatments.py:489 models_treatments.py:102 models_treatments.py:466  msgid "Year"  msgstr "Année" -#: forms.py:335 +#: forms.py:342  msgid "Operation's number (index by year)"  msgstr "Numéro de l'opération (index par année)" -#: forms.py:338 +#: forms.py:345  msgid "Code PATRIARCHE"  msgstr "Code PATRIARCHE" -#: forms.py:342 +#: forms.py:349  msgid "Archaeological site"  msgstr "Entité archéologique" -#: forms.py:348 +#: forms.py:355  msgid "Search within related operations"  msgstr "Rechercher parmi les opérations liées" -#: forms.py:353 models_finds.py:112 +#: forms.py:359 models_finds.py:111  msgid "Object type"  msgstr "Type d'objet" -#: forms.py:366 forms_treatments.py:57 +#: forms.py:372 forms_treatments.py:57  msgid "Has an image?"  msgstr "Dispose d'une image ?" -#: forms.py:414 forms.py:427 views.py:130 +#: forms.py:421 +msgid "Warehouse (location)" +msgstr "Dépôt (lieu)" + +#: forms.py:427 +msgid "Warehouse (responsible)" +msgstr "Dépôt (responsable)" + +#: forms.py:432 +msgid "Container ID" +msgstr "Identifiant du contenant" + +#: forms.py:433 +msgid "Container ref." +msgstr "Réf. contenant" + +#: forms.py:437 forms.py:460 views.py:149  msgid "Find search"  msgstr "Rechercher un mobilier" -#: forms.py:441 templates/ishtar/sheet_treatment.html:46 +#: forms.py:485 templates/ishtar/sheet_treatment.html:46  msgid "Upstream finds"  msgstr "Mobilier amont" -#: forms.py:443 models_finds.py:665 +#: forms.py:487 models_finds.py:683  msgid "Finds"  msgstr "Mobilier" -#: forms.py:453 +#: forms.py:499  msgid "You should at least select one archaeological find."  msgstr "Vous devez sélectionner au moins un mobilier archéologique." -#: forms.py:556 +#: forms.py:602  msgid "Resulting find"  msgstr "Mobilier résultant" -#: forms.py:561 +#: forms.py:607  msgid "Precise description"  msgstr "Description précise" -#: forms.py:576 +#: forms.py:622  msgid "Resulting finds"  msgstr "Mobiliers résultants" -#: forms.py:581 +#: forms.py:627  msgid "Would you like to delete this find?"  msgstr "Voulez-vous supprimer ce mobilier ?" -#: forms.py:585 models_treatments.py:90 +#: forms.py:631 models_treatments.py:90  msgid "Upstream find"  msgstr "Mobilier amont" -#: forms.py:598 +#: forms.py:644  msgid "Archaeological find search"  msgstr "Rechercher un mobilier" -#: forms.py:600 +#: forms.py:646  msgid "You should select an archaeological find."  msgstr "Vous devez sélectionner du mobilier." -#: forms.py:605 +#: forms.py:651  msgid "Year of the operation"  msgstr "Année de l'opération" -#: forms.py:607 +#: forms.py:653  msgid "Numeric reference"  msgstr "Référence numérique" -#: forms.py:614 +#: forms.py:660  msgid "Period of the archaeological find"  msgstr "Période du mobilier" -#: forms.py:616 +#: forms.py:662  msgid "Material type of the archaeological find"  msgstr "Type de matériau du mobilier" -#: forms.py:618 +#: forms.py:664  msgid "Description of the archaeological find"  msgstr "Description du mobilier" -#: forms.py:630 forms_treatments.py:590 forms_treatments.py:616 +#: forms.py:676 forms_treatments.py:590 forms_treatments.py:616  msgid "Documentation search"  msgstr "Rechercher une documentation" -#: forms.py:632 forms_treatments.py:592 forms_treatments.py:618 +#: forms.py:678 forms_treatments.py:592 forms_treatments.py:618  msgid "You should select a document."  msgstr "Vous devez sélectionner un document." -#: forms.py:649 +#: forms.py:695  msgid "Another basket already exists with this name."  msgstr "Un autre panier existant utilise déjà ce nom." -#: forms.py:659 forms.py:663 forms_treatments.py:175 ishtar_menu.py:57 +#: forms.py:705 forms.py:709 forms_treatments.py:175 ishtar_menu.py:57  msgid "Basket"  msgstr "Panier" @@ -373,7 +390,7 @@ msgstr "Index"  msgid "Treatment type"  msgstr "Type de traitement" -#: forms_treatments.py:68 forms_treatments.py:560 views.py:360 +#: forms_treatments.py:68 forms_treatments.py:560 views.py:398  msgid "Treatment search"  msgstr "Rechercher un traitement" @@ -469,8 +486,8 @@ msgid "Associated request"  msgstr "Demande associée"  #: forms_treatments.py:266 forms_treatments.py:397 ishtar_menu.py:108 -#: models_treatments.py:499 models_treatments.py:521 models_treatments.py:583 -#: wizards.py:183 templates/ishtar/sheet_treatmentfile.html:5 +#: models_treatments.py:499 models_treatments.py:527 models_treatments.py:602 +#: wizards.py:187 templates/ishtar/sheet_treatmentfile.html:5  msgid "Treatment request"  msgstr "Demande de traitement" @@ -556,7 +573,7 @@ msgstr "Demandeur"  msgid "Applicant organisation"  msgstr "Organisation du demandeur" -#: forms_treatments.py:385 forms_treatments.py:565 views.py:464 +#: forms_treatments.py:385 forms_treatments.py:565 views.py:502  msgid "Treatment request search"  msgstr "Rechercher une demande de traitement" @@ -635,7 +652,7 @@ msgstr "Gestion des éléments"  msgid "Documentation"  msgstr "Documentation" -#: ishtar_menu.py:133 ishtar_menu.py:214 models_finds.py:1078 +#: ishtar_menu.py:133 ishtar_menu.py:214 models_finds.py:1136  msgid "Administrative act"  msgstr "Acte administratif" @@ -649,7 +666,8 @@ msgid "Source"  msgstr "Documentation"  #: ishtar_menu.py:185 models_treatments.py:147 models_treatments.py:283 -#: models_treatments.py:567 templates/ishtar/sheet_treatment.html:5 +#: models_treatments.py:573 models_treatments.py:576 +#: templates/ishtar/sheet_treatment.html:5  msgid "Treatment"  msgstr "Traitement" @@ -657,113 +675,113 @@ msgstr "Traitement"  msgid "Simple treatments"  msgstr "Traitements simples" -#: models_finds.py:44 +#: models_finds.py:43  msgid "Code"  msgstr "Code" -#: models_finds.py:45 +#: models_finds.py:44  msgid "Recommendation"  msgstr "Recommandation" -#: models_finds.py:48 +#: models_finds.py:47  msgid "Parent material"  msgstr "Matériau parent" -#: models_finds.py:52 models_finds.py:525 models_finds.py:598 +#: models_finds.py:51 models_finds.py:538 models_finds.py:615  msgid "Material types"  msgstr "Types de matériau" -#: models_finds.py:60 +#: models_finds.py:59  msgid "Parent conservatory state"  msgstr "État sanitaire - parent" -#: models_finds.py:64 +#: models_finds.py:63  msgid "Conservatory states"  msgstr "États sanitaires" -#: models_finds.py:73 +#: models_finds.py:72  msgid "Preservation types"  msgstr "Types de conservation" -#: models_finds.py:81 +#: models_finds.py:80  msgid "Integrity / interest type"  msgstr "Type d'intégrité / intérêt" -#: models_finds.py:82 +#: models_finds.py:81  msgid "Integrity / interest types"  msgstr "Types d'intégrité / intérêt" -#: models_finds.py:90 +#: models_finds.py:89  msgid "Remarkability type"  msgstr "Type de remarquabilité" -#: models_finds.py:91 +#: models_finds.py:90  msgid "Remarkability types"  msgstr "Types de remarquabilité" -#: models_finds.py:98 models_finds.py:594 models_treatments.py:40 +#: models_finds.py:97 models_finds.py:611 models_treatments.py:40  #: models_treatments.py:287  msgid "Order"  msgstr "Ordre" -#: models_finds.py:100 +#: models_finds.py:99  msgid "Batch type"  msgstr "Type de lot" -#: models_finds.py:101 +#: models_finds.py:100  msgid "Batch types"  msgstr "Types de lot" -#: models_finds.py:109 +#: models_finds.py:108  msgid "Parent"  msgstr "Parent" -#: models_finds.py:152 models_finds.py:591 models_treatments.py:124 +#: models_finds.py:151 models_finds.py:608 models_treatments.py:124  #: models_treatments.py:471  msgid "External ID"  msgstr "ID externe" -#: models_finds.py:154 models_finds.py:593 +#: models_finds.py:153 models_finds.py:610  msgid "External ID is set automatically"  msgstr "L'identifiant externe est configuré automatiquement" -#: models_finds.py:157 +#: models_finds.py:156  msgid "Special interest"  msgstr "Intérêt spécifique" -#: models_finds.py:161 +#: models_finds.py:160  msgid "Context Record"  msgstr "Unité d'Enregistrement" -#: models_finds.py:162 +#: models_finds.py:161  msgid "Discovery date"  msgstr "Date de découverte" -#: models_finds.py:167 +#: models_finds.py:166  msgid "Material index"  msgstr "Index matériel" -#: models_finds.py:183 +#: models_finds.py:182  msgid "Point (2D)"  msgstr "Point (2D)" -#: models_finds.py:184 +#: models_finds.py:183  msgid "Point"  msgstr "Point" -#: models_finds.py:185 +#: models_finds.py:184  msgid "Line"  msgstr "Ligne" -#: models_finds.py:186 +#: models_finds.py:185  msgid "Polygon"  msgstr "Polygon" -#: models_finds.py:189 models_finds.py:192 +#: models_finds.py:188 models_finds.py:191  msgid "Cached value - do not edit"  msgstr "Valeur en cache - ne pas éditer" -#: models_finds.py:197 models_finds.py:589 +#: models_finds.py:197 models_finds.py:606  msgid "Base find"  msgstr "Mobilier de base" @@ -791,149 +809,174 @@ msgstr "Peut modifier son propre Mobilier de base"  msgid "Can delete own Base find"  msgstr "Peut supprimer son propre Mobilier de base" -#: models_finds.py:430 +#: models_finds.py:443  msgid "g"  msgstr "g" -#: models_finds.py:431 +#: models_finds.py:444  msgid "kg"  msgstr "kg" -#: models_finds.py:433 +#: models_finds.py:446  msgid "Not checked"  msgstr "Non vérifié" -#: models_finds.py:434 +#: models_finds.py:447  msgid "Checked but incorrect"  msgstr "Vérifié mais incorrect" -#: models_finds.py:435 +#: models_finds.py:448  msgid "Checked and correct"  msgstr "Vérifié et correct" -#: models_finds.py:506 +#: models_finds.py:519  msgid "Base find - Short ID"  msgstr "Mobilier de base - ID court" -#: models_finds.py:507 +#: models_finds.py:520  msgid "Base find - Complete ID"  msgstr "Mobilier de base - ID complet" -#: models_finds.py:509 +#: models_finds.py:522  msgid "Operation (code)"  msgstr "Opération (code)" -#: models_finds.py:511 +#: models_finds.py:524  msgid "Town"  msgstr "Ville" -#: models_finds.py:513 +#: models_finds.py:526  msgid "Operation (name)"  msgstr "Opération (nom)" -#: models_finds.py:515 +#: models_finds.py:528  msgid "Parcel"  msgstr "Parcelle" -#: models_finds.py:516 +#: models_finds.py:529  msgid "Batch"  msgstr "Lot" -#: models_finds.py:517 +#: models_finds.py:530  msgid "Base find - Comment"  msgstr "Mobilier de base - Commentaires" -#: models_finds.py:518 +#: models_finds.py:531  msgid "Base find - Description"  msgstr "Mobilier de base - Description" -#: models_finds.py:519 +#: models_finds.py:532  msgid "Base find - Topographic localisation"  msgstr "Mobilier de base - Localisation topographique" -#: models_finds.py:521 +#: models_finds.py:534  msgid "Base find - Special interest"  msgstr "Mobilier de base - Intérêt spécifique" -#: models_finds.py:522 +#: models_finds.py:535  msgid "Base find - Discovery date"  msgstr "Mobilier de base - Date de découverte" -#: models_finds.py:523 models_finds.py:622 models_treatments.py:131 +#: models_finds.py:536 models_finds.py:639 models_treatments.py:131  #: models_treatments.py:295 templates/ishtar/sheet_find.html:90  #: templates/ishtar/sheet_find.html:132  msgid "Container"  msgstr "Contenant" -#: models_finds.py:524 +#: models_finds.py:537  msgid "Periods"  msgstr "Périodes" -#: models_finds.py:605 +#: models_finds.py:622  msgid "Type of preservation to consider"  msgstr "Mesures de conservation à envisager" -#: models_finds.py:609 +#: models_finds.py:626  msgid "Weight unit"  msgstr "Unité de poids" -#: models_finds.py:615 templates/ishtar/sheet_find.html:78 +#: models_finds.py:632 templates/ishtar/sheet_find.html:78  msgid "Upstream treatment"  msgstr "Traitement amont" -#: models_finds.py:618 templates/ishtar/sheet_find.html:120 +#: models_finds.py:635 templates/ishtar/sheet_find.html:120  msgid "Downstream treatment"  msgstr "Traitement aval" -#: models_finds.py:656 +#: models_finds.py:674  msgid "Collection"  msgstr "Collection" -#: models_finds.py:658 models_treatments.py:143 models_treatments.py:495 +#: models_finds.py:676 models_treatments.py:143 models_treatments.py:495  msgid "Cached name"  msgstr "Nom en cache" -#: models_finds.py:667 +#: models_finds.py:685  msgid "Can view all Finds"  msgstr "Peut voir tout le Mobilier" -#: models_finds.py:668 +#: models_finds.py:686  msgid "Can view own Find"  msgstr "Peut voir son propre Mobilier" -#: models_finds.py:669 +#: models_finds.py:687  msgid "Can add own Find"  msgstr "Peut ajouter son propre Mobilier" -#: models_finds.py:670 +#: models_finds.py:688  msgid "Can change own Find"  msgstr "Peut modifier son propre Mobilier" -#: models_finds.py:671 +#: models_finds.py:689  msgid "Can delete own Find"  msgstr "Peut supprimer son propre Mobilier" -#: models_finds.py:677 +#: models_finds.py:695  msgid "FIND"  msgstr "MOBILIER" -#: models_finds.py:1065 +#: models_finds.py:1099  msgid "Find documentation"  msgstr "Documentation de mobilier" -#: models_finds.py:1066 +#: models_finds.py:1100  msgid "Find documentations"  msgstr "Documentations de mobilier" -#: models_finds.py:1079 +#: models_finds.py:1103 +#, fuzzy +msgid "Can view all Find sources" +msgstr "Peut voir tout le Mobilier" + +#: models_finds.py:1105 +#, fuzzy +msgid "Can view own Find source" +msgstr "Peut voir son propre Mobilier" + +#: models_finds.py:1107 +#, fuzzy +msgid "Can add own Find source" +msgstr "Peut ajouter son propre Mobilier" + +#: models_finds.py:1109 +#, fuzzy +msgid "Can change own Find source" +msgstr "Peut modifier son propre Mobilier" + +#: models_finds.py:1111 +#, fuzzy +msgid "Can delete own Find source" +msgstr "Peut supprimer son propre Mobilier" + +#: models_finds.py:1137  msgid "Person"  msgstr "Individu" -#: models_finds.py:1085 +#: models_finds.py:1143  msgid "Property"  msgstr "Propriété" -#: models_finds.py:1086 +#: models_finds.py:1144  msgid "Properties"  msgstr "Propriétés" @@ -1008,7 +1051,7 @@ msgid "Target a basket"  msgstr "Appliquer à un panier"  #: models_treatments.py:148 templates/ishtar/sheet_find.html:75 -#: templates/ishtar/sheet_treatmentfile.html:45 +#: templates/ishtar/sheet_treatmentfile.html:46  msgid "Treatments"  msgstr "Traitements" @@ -1074,158 +1117,242 @@ msgid "Can view all Treatment requests"  msgstr "Peut voir toutes les Demandes de traitement"  #: models_treatments.py:506 +#, fuzzy +msgid "Can add Treatment request" +msgstr "Peut ajouter sa propre Demande de traitement" + +#: models_treatments.py:508 +#, fuzzy +msgid "Can change Treatment request" +msgstr "Peut modifier sa propre Demande de traitement" + +#: models_treatments.py:510 +#, fuzzy +msgid "Can delete Treatment request" +msgstr "Peut supprimer sa propre Demande de traitement" + +#: models_treatments.py:512  msgid "Can view own Treatment request"  msgstr "Peut voir sa propre Demande de traitement" -#: models_treatments.py:508 +#: models_treatments.py:514  msgid "Can add own Treatment request"  msgstr "Peut ajouter sa propre Demande de traitement" -#: models_treatments.py:510 +#: models_treatments.py:516  msgid "Can change own Treatment request"  msgstr "Peut modifier sa propre Demande de traitement" -#: models_treatments.py:512 +#: models_treatments.py:518  msgid "Can delete own Treatment request"  msgstr "Peut supprimer sa propre Demande de traitement" -#: models_treatments.py:573 +#: models_treatments.py:580  msgid "Treatment documentation"  msgstr "Documentation de traitement" -#: models_treatments.py:574 +#: models_treatments.py:581  msgid "Treament documentations"  msgstr "Documentations de traitement" +#: models_treatments.py:584 +#, fuzzy +msgid "Can view all Treatment source" +msgstr "Peut voir tous les Traitements" + +#: models_treatments.py:586 +#, fuzzy +msgid "Can view own Treatment source" +msgstr "Peut voir son propre Traitement" + +#: models_treatments.py:588 +#, fuzzy +msgid "Can add own Treatment source" +msgstr "Peut ajouter son propre Traitement" +  #: models_treatments.py:590 +#, fuzzy +msgid "Can change own Treatment source" +msgstr "Peut modifier son propre Traitement" + +#: models_treatments.py:592 +#, fuzzy +msgid "Can delete own Treatment source" +msgstr "Peut supprimer son propre Traitement" + +#: models_treatments.py:606 +msgid "Treatment file" +msgstr "Dossier de traitement" + +#: models_treatments.py:610  msgid "Treatment request documentation"  msgstr "Documentation de demande de traitement" -#: models_treatments.py:591 +#: models_treatments.py:611  msgid "Treatment request documentations"  msgstr "Documentations de demande de traitement" -#: views.py:125 +#: models_treatments.py:614 +#, fuzzy +msgid "Can view all Treatment request source" +msgstr "Peut voir toutes les Demandes de traitement" + +#: models_treatments.py:616 +#, fuzzy +msgid "Can add Treatment request source" +msgstr "Documentation de demande de traitement" + +#: models_treatments.py:618 +#, fuzzy +msgid "Can change Treatment request source" +msgstr "Peut modifier sa propre Demande de traitement" + +#: models_treatments.py:620 +#, fuzzy +msgid "Can delete Treatment request source" +msgstr "Peut supprimer sa propre Demande de traitement" + +#: models_treatments.py:622 +#, fuzzy +msgid "Can view own Treatment request source" +msgstr "Peut voir sa propre Demande de traitement" + +#: models_treatments.py:624 +#, fuzzy +msgid "Can add own Treatment request source" +msgstr "Peut ajouter sa propre Demande de traitement" + +#: models_treatments.py:626 +#, fuzzy +msgid "Can change own Treatment request source" +msgstr "Peut modifier sa propre Demande de traitement" + +#: models_treatments.py:628 +#, fuzzy +msgid "Can delete own Treatment request source" +msgstr "Peut supprimer sa propre Demande de traitement" + +#: views.py:138  msgid "New find"  msgstr "Ajouter un mobilier" -#: views.py:139 +#: views.py:167  msgid "Find modification"  msgstr "Modifier un mobilier" -#: views.py:154 +#: views.py:189  msgid "Find deletion"  msgstr "Supprimer un mobilier" -#: views.py:159 +#: views.py:194  msgid "Find: source search"  msgstr "Mobilier : rechercher une documentation associée" -#: views.py:167 +#: views.py:202  msgid "Find: new source"  msgstr "Mobilier : ajouter une documentation associée" -#: views.py:175 +#: views.py:210  msgid "Find: source modification"  msgstr "Mobilier : modifier une documentation associée" -#: views.py:190 +#: views.py:225  msgid "Find: source deletion"  msgstr "Mobilier : supprimer un mobilier associé" -#: views.py:204 +#: views.py:239  msgid "New basket"  msgstr "Ajouter un panier" -#: views.py:223 +#: views.py:258  msgid "Manage items in basket"  msgstr "Gérer les éléments dans un panier" -#: views.py:243 +#: views.py:278  msgid "Manage basket"  msgstr "Gérer un panier" -#: views.py:331 +#: views.py:369  msgid "Delete basket"  msgstr "Supprimer un panier" -#: views.py:381 +#: views.py:419  msgid "New treatment"  msgstr "Ajouter un traitement" -#: views.py:389 views.py:481 +#: views.py:427 views.py:519  msgid "Modify"  msgstr "Modifier" -#: views.py:406 +#: views.py:444  msgid "Treatment deletion"  msgstr "Supprimer un traitement" -#: views.py:413 +#: views.py:451  msgid "Treatment: search administrative act"  msgstr "Traitement : rechercher un acte administratif" -#: views.py:422 +#: views.py:460  msgid "Treatment: new administrative act"  msgstr "Traitement : ajouter un acte administratif" -#: views.py:432 +#: views.py:470  msgid "Treatment: administrative act modification"  msgstr "Traitement : modifier un acte administratif" -#: views.py:441 +#: views.py:479  msgid "Treatment: administrative act deletion"  msgstr "Traitement : supprimer un acte administratif" -#: views.py:474 +#: views.py:512  msgid "New treatment request"  msgstr "Ajouter une demande de traitement" -#: views.py:497 +#: views.py:535  msgid "Treatment request deletion"  msgstr "Supprimer une demande de traitement" -#: views.py:504 +#: views.py:542  msgid "Treatment request: search administrative act"  msgstr "Demande de traitement : rechercher un acte administratif" -#: views.py:514 +#: views.py:552  msgid "Treatment request: new administrative act"  msgstr "Demande de traitement : ajouter un acte administratif" -#: views.py:524 +#: views.py:562  msgid "Treatment request: administrative act modification"  msgstr "Demande de traitement : modifier un acte administratif" -#: views.py:533 +#: views.py:571  msgid "Treatment request: administrative act deletion"  msgstr "Demande de traitement : supprimer un acte administratif" -#: views.py:559 +#: views.py:597  msgid "Treatment: source search"  msgstr "Traitement : rechercher une documentation associée" -#: views.py:574 +#: views.py:612  msgid "Treatment: source modification"  msgstr "Traitement : modifier une documentation associée" -#: views.py:589 +#: views.py:627  msgid "Treatment: source deletion"  msgstr "Traitement : supprimer une documentation associée" -#: views.py:602 +#: views.py:640  msgid "Treatment request: source search"  msgstr "Demande de traitement : rechercher une documentation associée" -#: views.py:618 +#: views.py:656  msgid "Treatment request: source modification"  msgstr "Demande de traitement : modifier une documentation associée" -#: views.py:636 +#: views.py:674  msgid "Treatment request: source deletion"  msgstr "Demande de traitement : supprimer une documentation associée" -#: wizards.py:63 wizards.py:195 +#: wizards.py:63 wizards.py:199  msgid "Operation"  msgstr "Opération" @@ -1323,6 +1450,16 @@ msgstr "Mobilier  aval"  msgid "Related operations"  msgstr "Opérations associées" +#: templates/ishtar/sheet_treatment.html:60 +#: templates/ishtar/sheet_treatmentfile.html:51 +msgid "Associated documents" +msgstr "Documents associés" + +#: templates/ishtar/sheet_treatment.html:65 +#: templates/ishtar/sheet_treatmentfile.html:56 +msgid "Administrative acts" +msgstr "Actes administratifs" +  #: templates/ishtar/sheet_treatmentfile.html:16  msgctxt "Treatment request"  msgid "Closed" diff --git a/translations/fr/archaeological_operations.po b/translations/fr/archaeological_operations.po index af55782dc..67c09a4fb 100644 --- a/translations/fr/archaeological_operations.po +++ b/translations/fr/archaeological_operations.po @@ -9,23 +9,25 @@  # Étienne Loks <etienne.loks@iggdrasil.net>, 2017. #zanata  msgid ""  msgstr "" -"MIME-Version: 1.0\n" -"Content-Transfer-Encoding: 8bit\n" -"Content-Type: text/plain; charset=UTF-8\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-04-05 12:20+0200\n"  "PO-Revision-Date: 2017-03-16 05:04-0400\n"  "Last-Translator: Étienne Loks <etienne.loks@iggdrasil.net>\n"  "Language-Team: \n"  "Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n"  "Plural-Forms: nplurals=2; plural=n>1;\n"  "X-Generator: Zanata 3.9.6\n" -#: forms.py:69 forms.py:371 forms.py:1013 forms.py:1035 forms.py:1039 -#: models.py:1247 templates/ishtar/sheet_operation.html:151 +#: forms.py:69 forms.py:371 forms.py:1047 forms.py:1069 forms.py:1073 +#: models.py:1252 templates/ishtar/sheet_operation.html:153  #: templates/ishtar/blocks/window_tables/parcels.html:10  msgid "Parcels"  msgstr "Parcelles" -#: forms.py:72 forms.py:205 forms.py:989 models.py:1233 +#: forms.py:72 forms.py:205 forms.py:1023 models.py:1238  #: templates/ishtar/blocks/window_tables/parcels.html:7  #: templates/ishtar/dashboards/dashboard_operation.html:432  #: templates/ishtar/dashboards/dashboard_operation.html:446 @@ -34,22 +36,22 @@ msgstr "Parcelles"  msgid "Town"  msgstr "Commune" -#: forms.py:74 forms.py:455 forms.py:756 forms.py:1259 models.py:272 -#: models.py:1039 models.py:1231 +#: forms.py:74 forms.py:481 forms.py:783 forms.py:1293 models.py:276 +#: models.py:1044 models.py:1236  #: templates/ishtar/blocks/window_tables/parcels.html:8  msgid "Year"  msgstr "Année" -#: forms.py:77 models.py:1234 +#: forms.py:77 models.py:1239  #: templates/ishtar/blocks/window_tables/parcels.html:9  msgid "Section"  msgstr "Section" -#: forms.py:80 models.py:1236 +#: forms.py:80 models.py:1241  msgid "Parcel number"  msgstr "Numéro de parcelle" -#: forms.py:82 models.py:1238 models.py:1255 models.py:1304 +#: forms.py:82 models.py:1243 models.py:1260 models.py:1309  msgid "Public domain"  msgstr "Domaine public" @@ -85,45 +87,49 @@ msgstr "Il y a des parcelles identiques."  msgid "Relation type"  msgstr "Type de relation" -#: forms.py:383 ishtar_menu.py:30 models.py:368 models.py:849 models.py:884 -#: models.py:917 models.py:1021 models.py:1230 wizards.py:344 wizards.py:355 +#: forms.py:383 ishtar_menu.py:30 models.py:372 models.py:847 models.py:882 +#: models.py:922 models.py:1026 models.py:1235 wizards.py:353 wizards.py:364  #: templates/ishtar/sheet_operation.html:4  msgid "Operation"  msgstr "Opération" -#: forms.py:403 +#: forms.py:406  msgid ":"  msgstr ": " -#: forms.py:411 forms.py:607 forms.py:1224 +#: forms.py:414 forms.py:633 forms.py:1258  msgid "You should select an operation."  msgstr "Vous devez sélectionner une opération." -#: forms.py:415 +#: forms.py:418  msgid "You should select a relation type."  msgstr "Vous devez sélectionner un type de relation." -#: forms.py:445 +#: forms.py:421 +msgid "An operation cannot be related to herself." +msgstr "" + +#: forms.py:451  msgid "Current relations"  msgstr "Relations actuelles" -#: forms.py:447 +#: forms.py:453  msgid "Deleted relations"  msgstr "Relations supprimées" -#: forms.py:451 templates/ishtar/sheet_operation.html:85 +#: forms.py:477 templates/ishtar/sheet_operation.html:86  msgid "Relations"  msgstr "Relations" -#: forms.py:456 forms.py:1230 models.py:273 +#: forms.py:482 forms.py:1264 models.py:277  msgid "Numeric reference"  msgstr "Identifiant numérique" -#: forms.py:462 forms.py:1270 +#: forms.py:488 forms.py:1304  msgid "Parcel (section/number/public domain)"  msgstr "Parcelle (section/numéro/domaine public)" -#: forms.py:465 forms.py:1273 models.py:850 +#: forms.py:491 forms.py:1307 models.py:848  #: templates/ishtar/dashboards/dashboard_operation.html:390  #: templates/ishtar/dashboards/dashboard_operation.html:411  #: templates/ishtar/dashboards/dashboard_operation.html:643 @@ -132,253 +138,257 @@ msgstr "Parcelle (section/numéro/domaine public)"  msgid "Department"  msgstr "Département" -#: forms.py:466 forms.py:1101 models.py:86 +#: forms.py:492 forms.py:1135 models.py:86  #: templates/ishtar/sheet_operation.html:22  #: templates/ishtar/blocks/window_tables/archaeologicalsites.html:8  msgid "Name"  msgstr "Nom" -#: forms.py:468 forms.py:752 models.py:334 +#: forms.py:494 forms.py:779 models.py:338  msgid "Address / Locality"  msgstr "Adresse / Lieu-dit" -#: forms.py:470 forms.py:674 forms.py:754 forms.py:1236 models.py:280 +#: forms.py:496 forms.py:700 forms.py:781 forms.py:1270 models.py:284  msgid "Operation type"  msgstr "Type d'opération" -#: forms.py:472 +#: forms.py:498  msgid "Is open?"  msgstr "Est ouvert ?" -#: forms.py:480 forms.py:786 models.py:269 +#: forms.py:506 forms.py:813 models.py:269  msgid "In charge"  msgstr "Responsable du suivi scientifique" -#: forms.py:487 models.py:1015 +#: forms.py:513 models.py:1020  msgid "Scientist in charge"  msgstr "Responsable scientifique" -#: forms.py:489 forms.py:676 forms.py:776 models.py:267 +#: forms.py:515 forms.py:702 forms.py:803 models.py:267  msgid "Operator"  msgstr "Opérateur" -#: forms.py:498 forms.py:1106 models.py:90 models.py:282 +#: forms.py:524 forms.py:1140 models.py:90 models.py:286  #: templates/ishtar/blocks/window_tables/archaeologicalsites.html:10  msgid "Remains"  msgstr "Vestiges" -#: forms.py:499 forms.py:1084 forms.py:1103 models.py:88 models.py:288 +#: forms.py:525 forms.py:1118 forms.py:1137 models.py:88 models.py:292  #: templates/ishtar/blocks/window_tables/archaeologicalsites.html:9  msgid "Periods"  msgstr "Périodes" -#: forms.py:500 +#: forms.py:526  msgid "Started before"  msgstr "Commencé avant" -#: forms.py:502 +#: forms.py:528  msgid "Started after"  msgstr "Commencé après" -#: forms.py:504 +#: forms.py:530  msgid "Ended before"  msgstr "Terminé avant" -#: forms.py:506 +#: forms.py:532  msgid "Ended after"  msgstr "Terminé après" -#: forms.py:509 +#: forms.py:535  msgid "Search within relations"  msgstr "Rechercher parmi les relations" -#: forms.py:511 forms.py:841 +#: forms.py:537 forms.py:867  msgid "Comment"  msgstr "Commentaire" -#: forms.py:512 +#: forms.py:538  msgid "Abstract (full text search)"  msgstr "Résumé (recherche texte intégral)" -#: forms.py:514 forms.py:844 models.py:337 +#: forms.py:540 forms.py:870 models.py:341  msgid "Comment about scientific documentation"  msgstr "Commentaire concernant la documentation scientifique" -#: forms.py:515 forms.py:846 models.py:349 +#: forms.py:541 forms.py:872 models.py:353  msgid "Record quality"  msgstr "Qualité d'enregistrement" -#: forms.py:516 forms.py:811 models.py:300 +#: forms.py:542 forms.py:837 models.py:304  msgid "Report processing"  msgstr "Traitement du rapport" -#: forms.py:518 forms.py:849 models.py:344 +#: forms.py:544 forms.py:875 models.py:348  msgid "Virtual operation"  msgstr "Opération virtuelle" -#: forms.py:520 forms.py:1146 forms.py:1150 models.py:94 +#: forms.py:546 forms.py:1180 forms.py:1184 models.py:94  msgid "Archaeological site"  msgstr "Entité archéologique" -#: forms.py:526 forms.py:1277 +#: forms.py:552 forms.py:1311  msgid "Created by"  msgstr "Créé par" -#: forms.py:532 forms.py:1283 +#: forms.py:558 forms.py:1317  msgid "Modified by"  msgstr "Modifié par" -#: forms.py:539 +#: forms.py:565  msgid "Documentation deadline before"  msgstr "Date limite de rendu de la documentation avant" -#: forms.py:541 +#: forms.py:567  msgid "Documentation deadline after"  msgstr "Date limite de rendu de la documentation après" -#: forms.py:543 forms.py:834 models.py:356 +#: forms.py:569 forms.py:860 models.py:360  msgid "Documentation received"  msgstr "Documentation reçue" -#: forms.py:545 +#: forms.py:571  msgid "Finds deadline before"  msgstr "Date limite de rendu du mobilier avant" -#: forms.py:547 +#: forms.py:573  msgid "Finds deadline after"  msgstr "Date limite de rendu du mobilier après" -#: forms.py:549 forms.py:839 models.py:360 +#: forms.py:575 forms.py:865 models.py:364  msgid "Finds received"  msgstr "Mobilier reçu" -#: forms.py:594 forms.py:1222 views.py:168 +#: forms.py:620 forms.py:1256 views.py:168  msgid "Operation search"  msgstr "Rechercher une opération" -#: forms.py:638 +#: forms.py:664  msgid "Associated file"  msgstr "Dossier associé" -#: forms.py:642 forms.py:937 models.py:516 models.py:916 models.py:1026 +#: forms.py:668 forms.py:971 models.py:520 models.py:921 models.py:1031  #: wizards.py:80  msgid "Archaeological file"  msgstr "Dossier archéologique" -#: forms.py:649 forms.py:651 models.py:351 +#: forms.py:675 forms.py:677 models.py:355  msgid "Abstract"  msgstr "Résumé" -#: forms.py:654 +#: forms.py:680  msgid "months"  msgstr "mois" -#: forms.py:654 +#: forms.py:680  msgid "years"  msgstr "années" -#: forms.py:656 models.py:253 +#: forms.py:682 models.py:253  msgid "Creation date"  msgstr "Date de création" -#: forms.py:657 +#: forms.py:683  msgid "Start of field work"  msgstr "Début du travail de terrain" -#: forms.py:659 +#: forms.py:685  msgid "All"  msgstr "Tout" -#: forms.py:660 +#: forms.py:686  msgid "Preventive"  msgstr "Préventif" -#: forms.py:661 +#: forms.py:687  msgid "Research"  msgstr "Programmé" -#: forms.py:665 +#: forms.py:691  msgid "Slicing"  msgstr "Découpage" -#: forms.py:668 +#: forms.py:694  msgid "Department detail"  msgstr "Détail par département" -#: forms.py:670 +#: forms.py:696  msgid "Date get from"  msgstr "Date obtenue depuis" -#: forms.py:672 +#: forms.py:698  msgid "Preventive/Research"  msgstr "Préventif/Programmé" -#: forms.py:678 +#: forms.py:704  msgid "Date after"  msgstr "Date après" -#: forms.py:680 +#: forms.py:706  msgid "Date before"  msgstr "Date avant" -#: forms.py:682 +#: forms.py:708  msgid "With reports"  msgstr "Avec un rapport" -#: forms.py:683 +#: forms.py:709  msgid "With finds"  msgstr "Avec du mobilier" -#: forms.py:735 forms.py:1331 templates/ishtar/sheet_administrativeact.html:20 +#: forms.py:761 forms.py:1365 templates/ishtar/sheet_administrativeact.html:20  #: templates/ishtar/sheet_operation.html:26  msgid "General"  msgstr "Général" -#: forms.py:750 models.py:333 +#: forms.py:777 models.py:337  msgid "Generic name"  msgstr "Nom générique" -#: forms.py:761 models.py:302 +#: forms.py:788 models.py:306  msgid "Old code"  msgstr "Ancien code" -#: forms.py:764 +#: forms.py:791  msgid "Head scientist"  msgstr "Responsable scientifique" -#: forms.py:783 models.py:332 +#: forms.py:810 models.py:336  msgid "Operator reference"  msgstr "Référence de l'opérateur" -#: forms.py:797 +#: forms.py:823 models.py:273 +msgid "Collaborators" +msgstr "" + +#: forms.py:826  msgid "Total surface (m2)"  msgstr "Surface totale (m2)" -#: forms.py:804 models.py:54 models.py:256 models.py:1443 +#: forms.py:830 models.py:54 models.py:256 models.py:1448  msgid "Start date"  msgstr "Date de début" -#: forms.py:806 models.py:258 +#: forms.py:832 models.py:258  msgid "Excavation end date"  msgstr "Date de fin de chantier" -#: forms.py:809 models.py:259 +#: forms.py:835 models.py:259  msgid "Report delivery date"  msgstr "Date de livraison du rapport" -#: forms.py:831 models.py:353 +#: forms.py:857 models.py:357  msgid "Deadline for submission of the documentation"  msgstr "Date limite de rendu de la documentation" -#: forms.py:836 models.py:358 +#: forms.py:862 models.py:362  msgid "Deadline for submission of the finds"  msgstr "Date limite de rendu du mobilier" -#: forms.py:851 +#: forms.py:877  msgid "Image"  msgstr "Image" -#: forms.py:852 +#: forms.py:878  #, python-format  msgid ""  "<p>Heavy images are resized to: %(width)dx%(height)d (ratio is preserved).</" @@ -387,19 +397,18 @@ msgstr ""  "<p>Les images trop grandes sont retaillées en : %(width)dx%(height)d (le "  "ratio est conservé).</p>" -#: forms.py:890 +#: forms.py:924  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:895 +#: forms.py:929  msgid "The excavation end date cannot be before the start date." -msgstr "" -"La date de fin de chantier ne peut être antérieure à la date de début." +msgstr "La date de fin de chantier ne peut être antérieure à la date de début." -#: forms.py:923 +#: forms.py:957  #, python-format  msgid ""  "Operation code already exists for year: %(year)d - use a value bigger than " @@ -408,106 +417,106 @@ 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:927 +#: forms.py:961  msgid "Bad operation code"  msgstr "Mauvais code d'opération" -#: forms.py:933 models.py:531 models.py:879 +#: forms.py:967 models.py:535 models.py:877  msgid "Operation code"  msgstr "Code de l'opération" -#: forms.py:959 +#: forms.py:993  msgid "Preventive informations - excavation"  msgstr "Information archéologie préventive - fouille" -#: forms.py:960 models.py:286 +#: forms.py:994 models.py:290  #: templates/ishtar/dashboards/dashboard_operation.html:701  msgid "Cost (euros)"  msgstr "Coût (euros)" -#: forms.py:961 models.py:291 +#: forms.py:995 models.py:295  msgid "Scheduled man-days"  msgstr "Jours-hommes prévus" -#: forms.py:963 models.py:294 +#: forms.py:997 models.py:298  msgid "Optional man-days"  msgstr "Jours-hommes optionnels" -#: forms.py:965 models.py:297 +#: forms.py:999 models.py:301  msgid "Effective man-days"  msgstr "Jours-hommes effectifs" -#: forms.py:975 +#: forms.py:1009  msgid "Preventive informations - diagnostic"  msgstr "Information archéologie préventive - diagnostic" -#: forms.py:978 models.py:316 +#: forms.py:1012 models.py:320  msgid "Prescription on zoning"  msgstr "Prescription sur zonage" -#: forms.py:980 models.py:319 +#: forms.py:1014 models.py:323  msgid "Prescription on large area"  msgstr "Prescription sur une vaste surface" -#: forms.py:983 models.py:321 +#: forms.py:1017 models.py:325  msgid "Prescription on geoarchaeological context"  msgstr "Prescription sur un contexte géoarchéologique" -#: forms.py:987 forms.py:1009 models.py:284 models.py:1049 +#: forms.py:1021 forms.py:1043 models.py:288 models.py:1054  msgid "Towns"  msgstr "Communes" -#: forms.py:1016 models.py:1246 models.py:1441 +#: forms.py:1050 models.py:1251 models.py:1446  msgid "Parcel"  msgstr "Parcelle" -#: forms.py:1068 models.py:46 +#: forms.py:1102 models.py:46  msgid "Remain types"  msgstr "Types de vestige" -#: forms.py:1072 models.py:45 +#: forms.py:1106 models.py:45  msgid "Remain type"  msgstr "Type de vestige" -#: forms.py:1088 templates/ishtar/sheet_operation.html:171 -#: templates/ishtar/sheet_operation.html:202 +#: forms.py:1122 templates/ishtar/sheet_operation.html:173 +#: templates/ishtar/sheet_operation.html:204  msgid "Period"  msgstr "Période" -#: forms.py:1100 models.py:85 +#: forms.py:1134 models.py:85  msgid "Reference"  msgstr "Référence" -#: forms.py:1129 +#: forms.py:1163  msgid "This reference already exists."  msgstr "Cette référence existe déjà." -#: forms.py:1161 models.py:95 models.py:341 -#: templates/ishtar/sheet_operation.html:96 +#: forms.py:1195 models.py:95 models.py:345 +#: templates/ishtar/sheet_operation.html:97  msgid "Archaeological sites"  msgstr "Entités archéologiques" -#: forms.py:1165 +#: forms.py:1199  msgid "Associated archaeological sites"  msgstr "Entités archéologiques associées" -#: forms.py:1171 ishtar_menu.py:34 ishtar_menu.py:64 ishtar_menu.py:93 +#: forms.py:1205 ishtar_menu.py:34 ishtar_menu.py:64 ishtar_menu.py:93  msgid "Search"  msgstr "Recherche" -#: forms.py:1176 +#: forms.py:1210  msgid "Would you like to close this operation?"  msgstr "Voulez-vous clore cette opération ?" -#: forms.py:1181 +#: forms.py:1215  msgid "Would you like to delete this operation?"  msgstr "Voulez-vous supprimer cette opération ?" -#: forms.py:1190 forms.py:1260 forms.py:1396 models.py:886 models.py:1006 +#: forms.py:1224 forms.py:1294 forms.py:1430 models.py:884 models.py:1011  msgid "Index"  msgstr "Index" -#: forms.py:1216 +#: forms.py:1250  #, python-format  msgid ""  "Index already exists for operation: %(operation)s - use a value bigger than " @@ -516,48 +525,48 @@ msgstr ""  "Cet index existe déjà pour l'opération : %(operation)s, utilisez une valeur "  "plus grande que %(last_val)d" -#: forms.py:1228 +#: forms.py:1262  msgid "Operation's year"  msgstr "Année de l'opération" -#: forms.py:1235 +#: forms.py:1269  msgid "Operation's town"  msgstr "Commune de l'opération" -#: forms.py:1248 +#: forms.py:1282  msgid "Documentation search"  msgstr "Rechercher une documentation" -#: forms.py:1250 +#: forms.py:1284  msgid "You should select a document."  msgstr "Vous devez sélectionner un document." -#: forms.py:1267 forms.py:1334 models.py:930 models.py:1000 +#: forms.py:1301 forms.py:1368 models.py:935 models.py:1005  msgid "Act type"  msgstr "Type d'acte" -#: forms.py:1268 forms.py:1466 +#: forms.py:1302 forms.py:1500  msgid "Indexed?"  msgstr "Indexé ?" -#: forms.py:1274 forms.py:1339 models.py:1040 +#: forms.py:1308 forms.py:1373 models.py:1045  #: templates/ishtar/blocks/window_tables/administrativacts.html:10  msgid "Object"  msgstr "Objet" -#: forms.py:1311 views.py:333 +#: forms.py:1345 views.py:348  msgid "Administrative act search"  msgstr "Rechercher un acte administratif" -#: forms.py:1326 forms.py:1424 forms.py:1491 +#: forms.py:1360 forms.py:1458 forms.py:1525  msgid "You should select an administrative act."  msgstr "Vous devez sélectionner un acte administratif." -#: forms.py:1342 models.py:1037 +#: forms.py:1376 models.py:1042  msgid "Signature date"  msgstr "Date de signature" -#: forms.py:1384 +#: forms.py:1418  #, python-format  msgid ""  "This index already exists for year: %(year)d - use a value bigger than " @@ -566,31 +575,31 @@ msgstr ""  "Cet index existe déjà pour l'année : %(year)d, utilisez une valeur plus "  "grande que %(last_val)d" -#: forms.py:1388 +#: forms.py:1422  msgid "Bad index"  msgstr "Mauvais index" -#: forms.py:1401 +#: forms.py:1435  msgid "Would you like to delete this administrative act?"  msgstr "Voulez-vous supprimer cet acte administratif ?" -#: forms.py:1406 +#: forms.py:1440  msgid "Template"  msgstr "Patron" -#: forms.py:1430 forms.py:1434 +#: forms.py:1464 forms.py:1468  msgid "This document is not intended for this type of act."  msgstr "Ce document n'est pas destiné à ce type d'acte." -#: forms.py:1452 +#: forms.py:1486  msgid "Doc generation"  msgstr "Génération de document" -#: forms.py:1454 +#: forms.py:1488  msgid "Generate the associated doc?"  msgstr "Générer le document associé ?" -#: forms.py:1475 ishtar_menu.py:123 views.py:386 +#: forms.py:1509 ishtar_menu.py:123 views.py:401  msgctxt "admin act register"  msgid "Register"  msgstr "Registre" @@ -611,7 +620,7 @@ msgstr "Clôture"  msgid "Deletion"  msgstr "Suppression" -#: ishtar_menu.py:59 models.py:1056 +#: ishtar_menu.py:59 models.py:1061  #: templates/ishtar/sheet_administrativeact.html:4  msgid "Administrative act"  msgstr "Acte administratif" @@ -636,16 +645,16 @@ msgstr "Tableau de bord"  msgid "General informations"  msgstr "Informations générales" -#: ishtar_menu.py:139 models.py:369 +#: ishtar_menu.py:139 models.py:373  #: templates/ishtar/dashboards/dashboard_operation.html:8  msgid "Operations"  msgstr "Opérations" -#: models.py:53 models.py:71 models.py:1913 +#: models.py:53 models.py:71 models.py:1918  msgid "Order"  msgstr "Ordre" -#: models.py:55 models.py:1444 +#: models.py:55 models.py:1449  msgid "End date"  msgstr "Date de fin" @@ -761,359 +770,359 @@ msgstr "Date de clôture"  msgid "In charge scientist"  msgstr "Responsable du suivi scientifique" -#: models.py:277 models.py:1226 +#: models.py:281 models.py:1231  msgid "File"  msgstr "Dossier" -#: models.py:281 +#: models.py:285  msgid "Surface (m2)"  msgstr "Surface (m2)" -#: models.py:335 +#: models.py:339  msgid "General comment"  msgstr "Commentaire général" -#: models.py:338 +#: models.py:342  msgid "Cached name"  msgstr "Nom en cache" -#: models.py:346 +#: models.py:350  msgid ""  "If checked, it means that this operation have not been officialy registered."  msgstr ""  "Si coché, cela signifie que cette opération n'a pas été officiellement "  "enregistrée." -#: models.py:362 +#: models.py:366  msgid "Point"  msgstr "Point" -#: models.py:363 +#: models.py:367  msgid "Multi polygon"  msgstr "Polygones multi-parties" -#: models.py:371 +#: models.py:375  msgid "Can view all Operations"  msgstr "Peut voir toutes les Opérations" -#: models.py:372 +#: models.py:376  msgid "Can view own Operation"  msgstr "Peut voir sa propre Opération" -#: models.py:373 +#: models.py:377  msgid "Can add own Operation"  msgstr "Peut ajouter sa propre Opération" -#: models.py:374 +#: models.py:378  msgid "Can change own Operation"  msgstr "Peut modifier sa propre Opération" -#: models.py:375 +#: models.py:379  msgid "Can delete own Operation"  msgstr "Peut supprimer sa propre Opération" -#: models.py:376 +#: models.py:380  msgid "Can close Operation"  msgstr "Peut clore une Opération" -#: models.py:405 +#: models.py:409  msgid "OPE"  msgstr "OPE" -#: models.py:479 +#: models.py:483  msgid "Intercommunal"  msgstr "Intercommunal" -#: models.py:517 +#: models.py:521  msgid "Code patriarche"  msgstr "Code patriarche" -#: models.py:557 +#: models.py:561  msgid "This operation code already exists for this year"  msgstr "Ce code d'opération existe déjà pour cette année." -#: models.py:582 +#: models.py:588  msgid "Number of parcels"  msgstr "Nombre de parcelles" -#: models.py:600 +#: models.py:598  msgid "Number of administrative acts"  msgstr "Nombre d'actes administratifs" -#: models.py:608 +#: models.py:606  msgid "Number of indexed administrative acts"  msgstr "Nombre d'actes administratifs indexés" -#: models.py:616 +#: models.py:614  msgid "Number of context records"  msgstr "Nombre d'Unités d'Enregistrement" -#: models.py:652 +#: models.py:650  msgid "Number of finds"  msgstr "Nombre d'éléments de mobilier" -#: models.py:697 +#: models.py:695  msgid "No type"  msgstr "Pas de type" -#: models.py:728 +#: models.py:726  msgid "Number of sources"  msgstr "Nombre de documents" -#: models.py:770 templates/ishtar/dashboards/dashboard_operation.html:309 +#: models.py:768 templates/ishtar/dashboards/dashboard_operation.html:309  #: templates/ishtar/dashboards/dashboard_operation.html:575  #: templates/ishtar/dashboards/dashboard_operation.html:611  msgid "Mean"  msgstr "Moyenne" -#: models.py:820 +#: models.py:818  msgid "Inverse relation"  msgstr "Relation inverse" -#: models.py:824 +#: models.py:822  msgid "Operation relation type"  msgstr "Type de relation entre opérations" -#: models.py:825 +#: models.py:823  msgid "Operation relation types"  msgstr "Types de relation entre opérations" -#: models.py:838 +#: models.py:836  msgid "Operation record relation"  msgstr "Relation entre opérations" -#: models.py:839 +#: models.py:837  msgid "Operation record relations"  msgstr "Relations entre opérations" -#: models.py:878 +#: models.py:876  msgid "Operation year"  msgstr "Année de l'opération" -#: models.py:880 +#: models.py:878  msgid "Document code"  msgstr "Code du document" -#: models.py:890 +#: models.py:888  msgid "Operation documentation"  msgstr "Documentation d'une opération" -#: models.py:891 +#: models.py:889  msgid "Operation documentations"  msgstr "Documentations des opérations" -#: models.py:894 +#: models.py:892  msgid "Can view all Operation sources"  msgstr "Peut voir toutes les Documentations d'opération" -#: models.py:896 +#: models.py:894  msgid "Can view own Operation source"  msgstr "Peut voir sa propre Documentation d'opération" -#: models.py:898 +#: models.py:896  msgid "Can add own Operation source"  msgstr "Peut ajouter sa propre Documentation d'opération" -#: models.py:900 +#: models.py:898  msgid "Can change own Operation source"  msgstr "Peut modifier sa propre Documentation d'opération" -#: models.py:902 +#: models.py:900  msgid "Can delete own Operation source"  msgstr "Peut supprimer sa propre Documentation d'opération" -#: models.py:918 models.py:1031 +#: models.py:923 models.py:1036  msgid "Treatment request"  msgstr "Demande de traitement" -#: models.py:919 models.py:1036 +#: models.py:924 models.py:1041  msgid "Treatment"  msgstr "Traitement" -#: models.py:921 +#: models.py:926  msgid "Intended to"  msgstr "Destiné à" -#: models.py:923 +#: models.py:928  msgid "Code"  msgstr "Code" -#: models.py:926 +#: models.py:931  msgid "Associated template"  msgstr "Patron associé" -#: models.py:927 +#: models.py:932  msgid "Indexed"  msgstr "Indexé" -#: models.py:931 +#: models.py:936  msgid "Act types"  msgstr "Types d'acte" -#: models.py:997 models.py:1077 +#: models.py:1002 models.py:1082  #: templates/ishtar/blocks/window_tables/administrativacts.html:7  #: templates/ishtar/blocks/window_tables/archaeologicalsites.html:7  msgid "Ref."  msgstr "Réf." -#: models.py:1004 +#: models.py:1009  msgid "Person in charge of the operation"  msgstr "Responsable d'opération" -#: models.py:1010 +#: models.py:1015  msgid "Archaeological preventive operator"  msgstr "Opérateur d'archéologie préventive" -#: models.py:1018 +#: models.py:1023  msgid "Signatory"  msgstr "Signataire" -#: models.py:1046 +#: models.py:1051  msgid "Departments"  msgstr "Départements" -#: models.py:1047 +#: models.py:1052  msgid "Cached values get from associated departments"  msgstr "Valeur en cache des départements associés" -#: models.py:1050 +#: models.py:1055  msgid "Cached values get from associated towns"  msgstr "Valeur en cache des communes associées" -#: models.py:1057 templates/ishtar/sheet_operation.html:104 -#: templates/ishtar/sheet_operation.html:145 +#: models.py:1062 templates/ishtar/sheet_operation.html:105 +#: templates/ishtar/sheet_operation.html:147  msgid "Administrative acts"  msgstr "Actes administratifs" -#: models.py:1060 +#: models.py:1065  msgid "Can view all Administrative acts"  msgstr "Peut voir tous les Actes administratifs" -#: models.py:1062 +#: models.py:1067  msgid "Can view own Administrative act"  msgstr "Peut voir son propre Acte administratif" -#: models.py:1064 +#: models.py:1069  msgid "Can add own Administrative act"  msgstr "Peut ajouter son propre Acte administratif" -#: models.py:1066 +#: models.py:1071  msgid "Can change own Administrative act"  msgstr "Peut modifier son propre Acte administratif" -#: models.py:1068 +#: models.py:1073  msgid "Can delete own Administrative act"  msgstr "Peut supprimer son propre Acte administratif" -#: models.py:1171 +#: models.py:1176  msgid "This index already exists for this year"  msgstr "Cet index existe déjà pour cette année." -#: models.py:1239 +#: models.py:1244  msgid "External ID"  msgstr "ID externe" -#: models.py:1242 +#: models.py:1247  msgid "External ID is set automatically"  msgstr "L'identifiant externe est configuré automatiquement" -#: models.py:1243 +#: models.py:1248  msgid "Address - Locality"  msgstr "Adresse - Lieu-dit" -#: models.py:1439 +#: models.py:1444  msgid "Owner"  msgstr "Propriétaire" -#: models.py:1447 +#: models.py:1452  msgid "Parcel owner"  msgstr "Propriétaire de parcelle" -#: models.py:1448 +#: models.py:1453  msgid "Parcel owners"  msgstr "Propriétaires de parcelle" -#: models.py:1474 +#: models.py:1479  msgid "Recorded"  msgstr "Enregistré" -#: models.py:1475 +#: models.py:1480  msgid "Effective"  msgstr "Effectif" -#: models.py:1476 +#: models.py:1481  msgid "Active"  msgstr "Actif" -#: models.py:1477 +#: models.py:1482  msgid "Field completed"  msgstr "Terrain achevé" -#: models.py:1478 +#: models.py:1483  msgid "Associated report"  msgstr "Rapport associé" -#: models.py:1479 +#: models.py:1484  msgid "Closed"  msgstr "Clos" -#: models.py:1480 +#: models.py:1485  msgid "Documented and closed"  msgstr "Documenté et clos" -#: models.py:1914 +#: models.py:1919  msgid "Is preventive"  msgstr "Préventif" -#: models.py:1917 +#: models.py:1922  msgid "Operation type old"  msgstr "Type d'opération - ancien" -#: models.py:1918 +#: models.py:1923  msgid "Operation types old"  msgstr "Types d'opération - ancien" -#: views.py:214 +#: views.py:223  msgid "New operation"  msgstr "Ajouter une opération" -#: views.py:237 +#: views.py:267  msgid "Operation modification"  msgstr "Modifier une opération" -#: views.py:280 +#: views.py:295  msgid "Operation closing"  msgstr "Clôturer une opération" -#: views.py:291 +#: views.py:306  msgid "Operation deletion"  msgstr "Supprimer une opération" -#: views.py:296 +#: views.py:311  msgid "Operation: source search"  msgstr "Opération : rechercher une documentation associée" -#: views.py:304 +#: views.py:319  msgid "Operation: source creation"  msgstr "Opération : ajouter une documentation associée" -#: views.py:312 +#: views.py:327  msgid "Operation: source modification"  msgstr "Opération : modifier une documentation associée" -#: views.py:327 +#: views.py:342  msgid "Operation: source deletion"  msgstr "Opération : supprimer une documentation associée" -#: views.py:346 +#: views.py:361  msgid "Operation: new administrative act"  msgstr "Opération : ajouter un acte administratif" -#: views.py:356 +#: views.py:371  msgid "Operation: administrative act modification"  msgstr "Opération : modification d'un acte administratif" -#: views.py:380 +#: views.py:395  msgid "Operation: administrative act deletion"  msgstr "Opération : supprimer un acte administratif" @@ -1130,7 +1139,7 @@ msgstr ""  "oubli, définissez-le à la première étape."  #: templates/ishtar/sheet_administrativeact.html:36 -#: templates/ishtar/sheet_operation.html:40 +#: templates/ishtar/sheet_operation.html:41  msgid "Surface:"  msgstr "Surface :" @@ -1150,92 +1159,96 @@ msgstr "Adresse"  msgid "Begining date"  msgstr "Date de début" -#: templates/ishtar/sheet_operation.html:36 +#: templates/ishtar/sheet_operation.html:37  msgid "State:"  msgstr "État :" -#: templates/ishtar/sheet_operation.html:36 +#: templates/ishtar/sheet_operation.html:37  msgid "Active file"  msgstr "Dossier actif" -#: templates/ishtar/sheet_operation.html:37 +#: templates/ishtar/sheet_operation.html:38  msgid "Closed operation"  msgstr "Opération close" -#: templates/ishtar/sheet_operation.html:38 +#: templates/ishtar/sheet_operation.html:39  msgid "Closing date:"  msgstr "Date de clôture :" -#: templates/ishtar/sheet_operation.html:38 +#: templates/ishtar/sheet_operation.html:39  msgid "by"  msgstr "par" -#: templates/ishtar/sheet_operation.html:41 +#: templates/ishtar/sheet_operation.html:42  msgid "Cost:"  msgstr "Coût :" -#: templates/ishtar/sheet_operation.html:42 +#: templates/ishtar/sheet_operation.html:43  msgid "Duration:"  msgstr "Durée :" -#: templates/ishtar/sheet_operation.html:42 +#: templates/ishtar/sheet_operation.html:43  msgid "Day"  msgstr "Jour" -#: templates/ishtar/sheet_operation.html:75 +#: templates/ishtar/sheet_operation.html:76  msgid "Localisation"  msgstr "Localisation" -#: templates/ishtar/sheet_operation.html:100 +#: templates/ishtar/sheet_operation.html:101  msgid "Associated parcels"  msgstr "Parcelles associées" -#: templates/ishtar/sheet_operation.html:108 +#: templates/ishtar/sheet_operation.html:109  msgid "Document from this operation"  msgstr "Documents de cette opération" -#: templates/ishtar/sheet_operation.html:114 -#: templates/ishtar/sheet_operation.html:156 +#: templates/ishtar/sheet_operation.html:115 +#: templates/ishtar/sheet_operation.html:158  msgid "Context records"  msgstr "Unités d'Enregistrement" -#: templates/ishtar/sheet_operation.html:119 +#: templates/ishtar/sheet_operation.html:120  msgid "Context record relations"  msgstr "Relations entre Unités d'Enregistrement" -#: templates/ishtar/sheet_operation.html:124 +#: templates/ishtar/sheet_operation.html:125  msgid "Documents from associated context records"  msgstr "Documents des Unités d'Enregistrement associées" -#: templates/ishtar/sheet_operation.html:129 -#: templates/ishtar/sheet_operation.html:179 +#: templates/ishtar/sheet_operation.html:130 +#: templates/ishtar/sheet_operation.html:181  msgid "Finds"  msgstr "Mobilier" -#: templates/ishtar/sheet_operation.html:134 +#: templates/ishtar/sheet_operation.html:135  msgid "Documents from associated finds"  msgstr "Documents du mobilier associé" -#: templates/ishtar/sheet_operation.html:139 +#: templates/ishtar/sheet_operation.html:140  msgid "Associated containers"  msgstr "Contenants associés" -#: templates/ishtar/sheet_operation.html:143 +#: templates/ishtar/sheet_operation.html:144  msgid "Statistics"  msgstr "Statistiques" -#: templates/ishtar/sheet_operation.html:163 -#: templates/ishtar/sheet_operation.html:217 +#: templates/ishtar/sheet_operation.html:145 +msgid "Theses number are updated hourly" +msgstr "" + +#: templates/ishtar/sheet_operation.html:165 +#: templates/ishtar/sheet_operation.html:219  #: templates/ishtar/blocks/window_tables/administrativacts.html:8  msgid "Type"  msgstr "Type" -#: templates/ishtar/sheet_operation.html:163 -#: templates/ishtar/sheet_operation.html:171 -#: templates/ishtar/sheet_operation.html:186 -#: templates/ishtar/sheet_operation.html:194 -#: templates/ishtar/sheet_operation.html:202 -#: templates/ishtar/sheet_operation.html:217 +#: templates/ishtar/sheet_operation.html:165 +#: templates/ishtar/sheet_operation.html:173 +#: templates/ishtar/sheet_operation.html:188 +#: templates/ishtar/sheet_operation.html:196 +#: templates/ishtar/sheet_operation.html:204 +#: templates/ishtar/sheet_operation.html:219  #: templates/ishtar/dashboards/dashboard_operation.html:18  #: templates/ishtar/dashboards/dashboard_operation.html:164  #: templates/ishtar/dashboards/dashboard_operation.html:432 @@ -1244,19 +1257,19 @@ msgstr "Type"  msgid "Number"  msgstr "Nombre" -#: templates/ishtar/sheet_operation.html:186 +#: templates/ishtar/sheet_operation.html:188  msgid "Material type"  msgstr "Type de matériau" -#: templates/ishtar/sheet_operation.html:194 +#: templates/ishtar/sheet_operation.html:196  msgid "Object type"  msgstr "Type d'objet" -#: templates/ishtar/sheet_operation.html:210 +#: templates/ishtar/sheet_operation.html:212  msgid "Sources"  msgstr "Documents" -#: templates/ishtar/sheet_operation.html:226 +#: templates/ishtar/sheet_operation.html:228  msgid "Finds by context records"  msgstr "Mobilier par Unités d'Enregistrement" diff --git a/translations/fr/archaeological_warehouse.po b/translations/fr/archaeological_warehouse.po index 689d122df..0356ebec7 100644 --- a/translations/fr/archaeological_warehouse.po +++ b/translations/fr/archaeological_warehouse.po @@ -4,149 +4,169 @@  # Étienne Loks <etienne.loks at peacefrogs net>, 2010-2011.  # Valérie-Emma Leroux <emma@iggdrasil.net>, 2016. #zanata  # Valérie-Emma Leroux <emma@iggdrasil.net>, 2017. #zanata +# Étienne Loks <etienne.loks@iggdrasil.net>, 2017. #zanata  msgid ""  msgstr "" -"MIME-Version: 1.0\n" -"Content-Transfer-Encoding: 8bit\n" -"Content-Type: text/plain; charset=UTF-8\n" -"PO-Revision-Date: 2017-03-15 07:06-0400\n" -"Last-Translator: Valérie-Emma Leroux <emma@iggdrasil.net>\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-04-05 12:20+0200\n" +"PO-Revision-Date: 2017-03-21 06:24-0400\n" +"Last-Translator: Étienne Loks <etienne.loks@iggdrasil.net>\n"  "Language-Team: \n"  "Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n"  "Plural-Forms: nplurals=2; plural=n>1;\n"  "X-Generator: Zanata 3.9.6\n" -#: forms.py:35 forms.py:91 ishtar_menu.py:40 models.py:63 models.py:103 +#: forms.py:36 forms.py:99 ishtar_menu.py:40 models.py:66 models.py:202  #: templates/ishtar/sheet_warehouse.html:4  msgid "Warehouse"  msgstr "Dépôt" -#: forms.py:44 forms.py:49 models.py:280 +#: forms.py:45 forms.py:50 models.py:387  msgid "Division"  msgstr "Division" -#: forms.py:51 models.py:127 +#: forms.py:52 models.py:226  msgid "Order"  msgstr "Ordre" -#: forms.py:62 models.py:53 +#: forms.py:66 +msgid "There are identical divisions." +msgstr "Il y a des divisions identiques" + +#: forms.py:70 models.py:56  msgid "Divisions"  msgstr "Divisions" -#: forms.py:66 forms.py:95 models.py:45 models.py:100 +#: forms.py:74 forms.py:103 models.py:48 models.py:199  msgid "Name"  msgstr "Nom" -#: forms.py:67 forms.py:97 models.py:36 models.py:47 +#: forms.py:75 forms.py:105 models.py:39 models.py:50  msgid "Warehouse type"  msgstr "Type de dépôt" -#: forms.py:68 forms.py:114 +#: forms.py:76 forms.py:122  msgid "Town"  msgstr "Commune" -#: forms.py:79 views.py:100 +#: forms.py:87 views.py:100  msgid "Warehouse search"  msgstr "Rechercher un dépôt" -#: forms.py:100 models.py:50 +#: forms.py:108 models.py:53  msgid "Person in charge"  msgstr "Responsable" -#: forms.py:106 forms.py:168 models.py:51 models.py:180 +#: forms.py:114 forms.py:184 models.py:54 models.py:280  msgid "Comment"  msgstr "Commentaires" -#: forms.py:108 +#: forms.py:116  msgid "Address"  msgstr "Adresse" -#: forms.py:110 +#: forms.py:118  msgid "Address complement"  msgstr "Complément d'adresse" -#: forms.py:112 +#: forms.py:120  msgid "Postal code"  msgstr "Code postal" -#: forms.py:115 +#: forms.py:123  msgid "Country"  msgstr "Pays" -#: forms.py:117 +#: forms.py:125  msgid "Phone"  msgstr "Téléphone" -#: forms.py:118 +#: forms.py:126  msgid "Mobile phone"  msgstr "Téléphone mobile" -#: forms.py:145 forms.py:146 +#: forms.py:153 forms.py:154  msgid "Would you like to delete this warehouse?"  msgstr "Voulez-vous supprimer ce dépôt ?" -#: forms.py:150 models.py:191 models.py:278 +#: forms.py:158 models.py:291 models.py:384  #: templates/ishtar/sheet_container.html:4  msgid "Container"  msgstr "Contenant" -#: forms.py:154 forms.py:221 models.py:142 +#: forms.py:163 forms.py:237 models.py:241  msgid "Ref."  msgstr "Réf." -#: forms.py:155 forms.py:220 models.py:145 models.py:178 +#: forms.py:164 forms.py:236 models.py:244 models.py:278  msgid "Container type"  msgstr "Type de contenant" -#: forms.py:157 +#: forms.py:166  msgid "Current location (warehouse)"  msgstr "Lieu actuel (dépôt)" -#: forms.py:163 models.py:175 +#: forms.py:172 models.py:275  msgid "Responsible warehouse"  msgstr "Dépôt responsable" -#: forms.py:195 -msgid "Index" -msgstr "Index" +#: forms.py:178 +msgid "Image" +msgstr "Image" -#: forms.py:213 +#: forms.py:179 +#, python-format +msgid "" +"<p>Heavy images are resized to: %(width)dx%(height)d (ratio is preserved).</" +"p>" +msgstr "" +"<p>Les images trop grandes sont retaillées en : %(width)dx%(height)d (le " +"ratio est conservé).</p>" + +#: forms.py:211 +msgid "ID" +msgstr "Identifiant" + +#: forms.py:229  msgid "This ID already exists for this warehouse."  msgstr "Cet identifiant existe déjà pour ce dépôt." -#: forms.py:231 forms.py:237 views.py:142 +#: forms.py:247 forms.py:253 views.py:142  msgid "Container search"  msgstr "Rechercher un contenant" -#: forms.py:233 forms.py:239 +#: forms.py:249 forms.py:255  msgid "You should select a container."  msgstr "Vous devez sélectionner un contenant." -#: forms.py:234 +#: forms.py:250  msgid "Add a new container"  msgstr "Ajouter un nouveau contenant" -#: forms.py:244 ishtar_menu.py:36 views.py:95 +#: forms.py:260 ishtar_menu.py:36 views.py:95  msgid "Packaging"  msgstr "Conditionnement" -#: forms.py:250 +#: forms.py:266  msgid "Packager"  msgstr "Personne assurant le conditionnement" -#: forms.py:256 +#: forms.py:272  msgid "Date"  msgstr "Date" -#: forms.py:260 +#: forms.py:276  msgid "Packaged finds"  msgstr "Mobilier conditionné" -#: forms.py:264 models.py:181 +#: forms.py:280 models.py:281  msgid "Localisation"  msgstr "Localisation" -#: forms.py:289 forms.py:290 +#: forms.py:305 forms.py:306  msgid "Would you like to delete this container?"  msgstr "Voulez-vous supprimer ce contenant ?" @@ -170,115 +190,116 @@ msgstr "Modification"  msgid "Deletion"  msgstr "Suppression" -#: ishtar_menu.py:57 models.py:192 templates/ishtar/sheet_warehouse.html:20 +#: ishtar_menu.py:57 models.py:292 templates/ishtar/sheet_warehouse.html:20 +#: templates/ishtar/sheet_warehouse.html:53  msgid "Containers"  msgstr "Contenants" -#: models.py:37 +#: models.py:40  msgid "Warehouse types"  msgstr "Types de dépôt" -#: models.py:56 models.py:186 +#: models.py:59 models.py:286  msgid "External ID"  msgstr "ID externe" -#: models.py:58 models.py:188 +#: models.py:61 models.py:288  msgid "External ID is set automatically"  msgstr "L'ID externe est attribué automatiquement" -#: models.py:64 +#: models.py:67  msgid "Warehouses"  msgstr "Dépôts" -#: models.py:66 +#: models.py:69  msgid "Can view all Warehouses"  msgstr "Peut voir tous les Dépôts" -#: models.py:67 +#: models.py:70  msgid "Can view own Warehouse"  msgstr "Peut voir son propre Dépôt" -#: models.py:68 +#: models.py:71  msgid "Can add own Warehouse"  msgstr "Peut ajouter son propre Dépôt" -#: models.py:69 +#: models.py:72  msgid "Can change own Warehouse"  msgstr "Peut modifier son propre Dépôt" -#: models.py:70 +#: models.py:73  msgid "Can delete own Warehouse"  msgstr "Peut supprimer son propre Dépôt" -#: models.py:102 +#: models.py:201  msgid "Description"  msgstr "Description" -#: models.py:107 models.py:108 +#: models.py:206 models.py:207  msgid "Collection"  msgstr "Collection" -#: models.py:117 +#: models.py:216  msgid "Warehouse division type"  msgstr "Type de division de dépôt" -#: models.py:118 +#: models.py:217  msgid "Warehouse division types"  msgstr "Types de division de dépôt" -#: models.py:138 +#: models.py:237  msgid "Length (mm)"  msgstr "Longueur (mm)" -#: models.py:139 +#: models.py:238  msgid "Width (mm)"  msgstr "Largeur (mm)" -#: models.py:140 +#: models.py:239  msgid "Height (mm)"  msgstr "Hauteur (mm)" -#: models.py:141 +#: models.py:240  msgid "Volume (l)"  msgstr "Volume (l)" -#: models.py:146 +#: models.py:245  msgid "Container types"  msgstr "Types de contenant" -#: models.py:164 +#: models.py:264  msgid "Location - index"  msgstr "Lieu - index" -#: models.py:165 +#: models.py:265  msgid "Precise localisation"  msgstr "Localisation précise" -#: models.py:166 +#: models.py:266  msgid "Type"  msgstr "Type" -#: models.py:172 +#: models.py:272  msgid "Location (warehouse)"  msgstr "Lieu (dépôt)" -#: models.py:179 +#: models.py:279  msgid "Container ref."  msgstr "Réf. du contenant" -#: models.py:183 +#: models.py:283  msgid "Cached location"  msgstr "Lieu - en cache" -#: models.py:281 +#: models.py:388  msgid "Reference"  msgstr "Référence" -#: models.py:284 +#: models.py:391  msgid "Container localisation"  msgstr "Localisation de contenant" -#: models.py:285 +#: models.py:392  msgid "Container localisations"  msgstr "Localisations de contenant" @@ -306,7 +327,7 @@ msgstr "Modifier un contenant"  msgid "Container deletion"  msgstr "Supprimer un contenant" -#: templates/ishtar/sheet_container.html:22 +#: templates/ishtar/sheet_container.html:27  msgid "Content"  msgstr "Contenu" @@ -314,10 +335,38 @@ msgstr "Contenu"  msgid "Attached containers"  msgstr "Contenants associés" -#: templates/ishtar/wizard/wizard_containerlocalisation.html:5 +#: templates/ishtar/sheet_warehouse.html:29 +msgid "Statistics" +msgstr "" + +#: templates/ishtar/sheet_warehouse.html:30 +msgid "Theses number are updated hourly" +msgstr "" + +#: templates/ishtar/sheet_warehouse.html:32 +msgid "Finds" +msgstr "" + +#: templates/ishtar/sheet_warehouse.html:39 +#, fuzzy +msgid "Finds by location in the warehouse" +msgstr "Lieu actuel (dépôt)" + +#: templates/ishtar/sheet_warehouse.html:59 +#, fuzzy +msgid "Containers by location in the warehouse" +msgstr "Lieu actuel (dépôt)" + +#: templates/ishtar/wizard/wizard_containerlocalisation.html:8 +msgid "" +"No division set for this warehouse. Define at least one division to localise " +"containers in this warehouse." +msgstr "" +"Pas de division configurée pour ce dépôt. Définissez au moins une division " +"pour localiser les contenants dans ce dépôt." + +#: templates/ishtar/wizard/wizard_warehouse_divisions.html:8  msgid "" -"No division set for this warehouse. Define it to localise container in this " -"warehouse." +"Containers with localisation are associated to this warehouse. You cannot " +"change divisions."  msgstr "" -"Pas de division configurée pour ce dépôt. Définissez une division pour " -"localiser un contenant dans ce dépôt." diff --git a/translations/fr/ishtar_common.po b/translations/fr/ishtar_common.po index ceea3df26..0c4c94036 100644 --- a/translations/fr/ishtar_common.po +++ b/translations/fr/ishtar_common.po @@ -8,13 +8,15 @@  # Valérie-Emma Leroux <emma@iggdrasil.net>, 2017. #zanata  msgid ""  msgstr "" -"MIME-Version: 1.0\n" -"Content-Transfer-Encoding: 8bit\n" -"Content-Type: text/plain; charset=UTF-8\n" -"PO-Revision-Date: 2017-03-15 07:13-0400\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-04-05 12:20+0200\n" +"PO-Revision-Date: 2017-03-21 01:54-0400\n"  "Last-Translator: Valérie-Emma Leroux <emma@iggdrasil.net>\n"  "Language-Team: \n"  "Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n"  "Plural-Forms: nplurals=2; plural=n>1;\n"  "X-Generator: Zanata 3.9.6\n" @@ -168,40 +170,40 @@ msgstr "résultat"  msgid "\"%(value)s\" not in %(values)s"  msgstr "\"%(value)s\" n'est pas dans %(values)s" -#: forms.py:73 +#: forms.py:74  msgid "Enter a valid name consisting of letters, spaces and hyphens."  msgstr "Entrez un nom correct composé de lettres, espaces et tirets." -#: forms.py:89 forms_common.py:626 +#: forms.py:90 forms_common.py:626  msgid "Confirm"  msgstr "Confirmer" -#: forms.py:94 +#: forms.py:95  msgid "Are you sure you want to delete?"  msgstr "Êtes-vous sûr de vouloir supprimer ?" -#: forms.py:103 +#: forms.py:129  msgid "There are identical items."  msgstr "Il y a des éléments identiques." -#: forms.py:141 forms.py:142 +#: forms.py:176 forms.py:177  msgid "Closing date"  msgstr "Date de clôture" -#: forms.py:155 +#: forms.py:190  msgid "You should select an item."  msgstr "Vous devez sélectionner un élément." -#: forms.py:156 +#: forms.py:191  msgid "Add a new item"  msgstr "Ajouter un nouvel élément" -#: forms.py:262 models.py:1482 +#: forms.py:297 models.py:1501  msgid "Template"  msgstr "Patron"  #: forms_common.py:41 forms_common.py:59 forms_common.py:184 -#: forms_common.py:408 models.py:1548 models.py:2989 +#: forms_common.py:408 models.py:1567 models.py:3033  #: templates/blocks/JQueryAdvancedTown.html:19  #: templates/ishtar/sheet_organization.html:13  msgid "Town" @@ -224,8 +226,8 @@ 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:68 forms_common.py:863 ishtar_menu.py:47 models.py:2610 -#: models.py:2791 models.py:2856 templates/ishtar/sheet_person.html:4 +#: forms_common.py:68 forms_common.py:863 ishtar_menu.py:47 models.py:2629 +#: models.py:2822 models.py:2888 templates/ishtar/sheet_person.html:4  msgid "Person"  msgstr "Personne" @@ -238,64 +240,64 @@ msgstr ""  "pas possible."  #: forms_common.py:172 forms_common.py:329 forms_common.py:453 -#: ishtar_menu.py:75 models.py:2493 models.py:2584 +#: ishtar_menu.py:75 models.py:2512 models.py:2603  #: templates/ishtar/sheet_organization.html:4  msgid "Organization"  msgstr "Organisation"  #: forms_common.py:175 forms_common.py:212 forms_common.py:324 -#: forms_common.py:378 forms_common.py:448 models.py:1103 models.py:1481 -#: models.py:1750 models.py:1766 models.py:2003 models.py:2279 models.py:2487 -#: models.py:2596 models.py:2975 templates/ishtar/import_list.html:13 +#: forms_common.py:378 forms_common.py:448 models.py:1109 models.py:1500 +#: models.py:1769 models.py:1785 models.py:2022 models.py:2298 models.py:2506 +#: models.py:2615 models.py:3019 templates/ishtar/import_list.html:13  #: templates/ishtar/sheet_organization.html:8  #: templates/ishtar/sheet_organization.html:21  msgid "Name"  msgstr "Nom" -#: forms_common.py:176 models.py:1703 models.py:2134 +#: forms_common.py:176 models.py:1722 models.py:2153  msgid "Organization type"  msgstr "Type d'organisation" -#: forms_common.py:178 forms_common.py:402 models.py:1543 +#: forms_common.py:178 forms_common.py:402 models.py:1562  #: templates/ishtar/sheet_organization.html:10  msgid "Address"  msgstr "Adresse" -#: forms_common.py:180 forms_common.py:405 models.py:1544 +#: forms_common.py:180 forms_common.py:405 models.py:1563  #: templates/ishtar/sheet_organization.html:11  msgid "Address complement"  msgstr "Complément d'adresse" -#: forms_common.py:182 forms_common.py:406 models.py:1546 +#: forms_common.py:182 forms_common.py:406 models.py:1565  #: templates/ishtar/sheet_organization.html:12  msgid "Postal code"  msgstr "Code postal" -#: forms_common.py:185 forms_common.py:409 models.py:1549 +#: forms_common.py:185 forms_common.py:409 models.py:1568  msgid "Country"  msgstr "Pays"  #: forms_common.py:187 forms_common.py:326 forms_common.py:382 -#: forms_common.py:450 forms_common.py:574 models.py:1576 +#: forms_common.py:450 forms_common.py:574 models.py:1595  msgid "Email"  msgstr "Courriel" -#: forms_common.py:188 forms_common.py:385 models.py:1561 +#: forms_common.py:188 forms_common.py:385 models.py:1580  #: templates/ishtar/sheet_organization.html:14  #: templates/ishtar/sheet_person.html:21  #: templates/ishtar/wizard/wizard_person.html:17  msgid "Phone"  msgstr "Téléphone" -#: forms_common.py:189 forms_common.py:394 models.py:1573 +#: forms_common.py:189 forms_common.py:394 models.py:1592  #: templates/ishtar/sheet_organization.html:15  #: templates/ishtar/sheet_person.html:39  #: templates/ishtar/wizard/wizard_person.html:35  msgid "Mobile phone"  msgstr "Téléphone portable" -#: forms_common.py:213 forms_common.py:327 forms_common.py:451 models.py:2170 -#: models.py:2489 models.py:2910 templates/sheet_ope.html:85 +#: forms_common.py:213 forms_common.py:327 forms_common.py:451 models.py:2189 +#: models.py:2508 models.py:2954 templates/sheet_ope.html:85  #: templates/sheet_ope.html.py:105 templates/sheet_ope.html:126  #: templates/ishtar/import_list.html:14  #: templates/ishtar/sheet_organization.html:23 @@ -319,7 +321,7 @@ msgstr "Fusionner tous les éléments dans"  msgid "Organization to merge"  msgstr "Organisation à fusionner" -#: forms_common.py:325 forms_common.py:376 forms_common.py:449 models.py:2594 +#: forms_common.py:325 forms_common.py:376 forms_common.py:449 models.py:2613  #: templates/ishtar/sheet_organization.html:22  msgid "Surname"  msgstr "Prénom" @@ -337,25 +339,25 @@ msgstr "Personne à fusionner"  msgid "Identity"  msgstr "Identité" -#: forms_common.py:373 forms_common.py:781 forms_common.py:830 models.py:2135 -#: models.py:2588 models.py:2590 models.py:2907 templates/sheet_ope.html:104 +#: forms_common.py:373 forms_common.py:781 forms_common.py:830 models.py:2154 +#: models.py:2607 models.py:2609 models.py:2951 templates/sheet_ope.html:104  #: templates/ishtar/blocks/window_tables/documents.html:7  msgid "Title"  msgstr "Titre" -#: forms_common.py:374 models.py:2592 +#: forms_common.py:374 models.py:2611  msgid "Salutation"  msgstr "Formule d'appel" -#: forms_common.py:380 models.py:2598 +#: forms_common.py:380 models.py:2617  msgid "Raw name"  msgstr "Nom brut" -#: forms_common.py:383 models.py:1562 +#: forms_common.py:383 models.py:1581  msgid "Phone description"  msgstr "Type de téléphone" -#: forms_common.py:386 models.py:1564 models.py:1566 +#: forms_common.py:386 models.py:1583 models.py:1585  msgid "Phone description 2"  msgstr "Type de téléphone 2" @@ -363,11 +365,11 @@ msgstr "Type de téléphone 2"  msgid "Phone 2"  msgstr "Téléphone 2" -#: forms_common.py:390 models.py:1570 +#: forms_common.py:390 models.py:1589  msgid "Phone description 3"  msgstr "Type de téléphone 3" -#: forms_common.py:392 models.py:1568 +#: forms_common.py:392 models.py:1587  msgid "Phone 3"  msgstr "Téléphone 3" @@ -375,23 +377,23 @@ msgstr "Téléphone 3"  msgid "Current organization"  msgstr "Organisation actuelle" -#: forms_common.py:411 models.py:1551 +#: forms_common.py:411 models.py:1570  msgid "Other address: address"  msgstr "Autre adresse : adresse" -#: forms_common.py:414 models.py:1554 +#: forms_common.py:414 models.py:1573  msgid "Other address: address complement"  msgstr "Autre adresse : complément d'adresse" -#: forms_common.py:416 models.py:1555 +#: forms_common.py:416 models.py:1574  msgid "Other address: postal code"  msgstr "Autre adresse : code postal" -#: forms_common.py:418 models.py:1557 +#: forms_common.py:418 models.py:1576  msgid "Other address: town"  msgstr "Autre adresse : ville" -#: forms_common.py:420 models.py:1559 +#: forms_common.py:420 models.py:1578  msgid "Other address: country"  msgstr "Autre adresse : pays" @@ -407,7 +409,7 @@ msgstr "Nom d'utilisateur"  msgid "Account search"  msgstr "Rechercher un compte" -#: forms_common.py:512 forms_common.py:552 forms_common.py:556 models.py:2541 +#: forms_common.py:512 forms_common.py:552 forms_common.py:556 models.py:2560  msgid "Person type"  msgstr "Type de personne" @@ -415,7 +417,7 @@ msgstr "Type de personne"  msgid "Account"  msgstr "Compte" -#: forms_common.py:577 wizards.py:1333 +#: forms_common.py:577 wizards.py:1347  msgid "New password"  msgstr "Nouveau mot de passe" @@ -439,7 +441,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:636 forms_common.py:649 models.py:2990 +#: forms_common.py:636 forms_common.py:649 models.py:3034  msgid "Towns"  msgstr "Communes" @@ -455,7 +457,7 @@ msgstr "Seul un choix peut être coché."  msgid "Documentation informations"  msgstr "Information sur le document" -#: forms_common.py:783 forms_common.py:831 models.py:2136 models.py:2882 +#: forms_common.py:783 forms_common.py:831 models.py:2155 models.py:2926  msgid "Source type"  msgstr "Type de document" @@ -467,37 +469,37 @@ msgstr "Référence"  msgid "Internal reference"  msgstr "Référence interne" -#: forms_common.py:791 models.py:2921 +#: forms_common.py:791 models.py:2965  msgid "Numerical ressource (web address)"  msgstr "Ressource numérique (adresse web)" -#: forms_common.py:792 models.py:2923 +#: forms_common.py:792 models.py:2967  msgid "Receipt date"  msgstr "Date de réception" -#: forms_common.py:794 models.py:2304 models.py:2925 +#: forms_common.py:794 models.py:2323 models.py:2969  msgid "Creation date"  msgstr "Date de création" -#: forms_common.py:797 models.py:2928 +#: forms_common.py:797 models.py:2972  msgid "Receipt date in documentation"  msgstr "Date de réception en documentation" -#: forms_common.py:799 forms_common.py:835 models.py:379 models.py:696 -#: models.py:2030 models.py:2602 models.py:2935 +#: forms_common.py:799 forms_common.py:835 models.py:381 models.py:698 +#: models.py:2049 models.py:2621 models.py:2979  msgid "Comment"  msgstr "Commentaire" -#: forms_common.py:801 forms_common.py:834 models.py:1105 models.py:1770 -#: models.py:1957 models.py:2004 models.py:2934 templates/sheet_ope.html:128 +#: forms_common.py:801 forms_common.py:834 models.py:1111 models.py:1789 +#: models.py:1976 models.py:2023 models.py:2978 templates/sheet_ope.html:128  msgid "Description"  msgstr "Description" -#: forms_common.py:804 models.py:2936 +#: forms_common.py:804 models.py:2980  msgid "Additional information"  msgstr "Information supplémentaire" -#: forms_common.py:806 forms_common.py:838 models.py:2938 +#: forms_common.py:806 forms_common.py:838 models.py:2982  msgid "Has a duplicate"  msgstr "Existe en doublon" @@ -514,7 +516,7 @@ msgstr ""  "<p>Les images trop grandes sont retaillées en : %(width)dx%(height)d (le "  "ratio est conservé).</p>" -#: forms_common.py:827 forms_common.py:856 forms_common.py:890 models.py:2861 +#: forms_common.py:827 forms_common.py:856 forms_common.py:890 models.py:2893  #: templates/ishtar/wizard/wizard_person_deletion.html:124  msgid "Author"  msgstr "Auteur" @@ -527,7 +529,7 @@ msgstr "Informations supplémentaires"  msgid "Would you like to delete this documentation?"  msgstr "Voulez-vous supprimer ce document ?" -#: forms_common.py:864 models.py:2137 models.py:2848 models.py:2858 +#: forms_common.py:864 models.py:2156 models.py:2880 models.py:2890  msgid "Author type"  msgstr "Type d'auteur" @@ -539,7 +541,7 @@ msgstr "Sélection d'auteur"  msgid "There are identical authors."  msgstr "Il y a des auteurs identiques." -#: forms_common.py:901 models.py:2862 models.py:2917 +#: forms_common.py:901 models.py:2894 models.py:2961  #: templates/sheet_ope.html:106  #: templates/ishtar/blocks/window_tables/documents.html:9  msgid "Authors" @@ -557,7 +559,7 @@ msgstr "Ajout/modification"  msgid "Deletion"  msgstr "Suppression" -#: ishtar_menu.py:39 models.py:1277 views.py:1606 +#: ishtar_menu.py:39 models.py:1283 views.py:1632  msgid "Global variables"  msgstr "Variables globales" @@ -585,19 +587,19 @@ msgstr "Fusion automatique"  msgid "Manual merge"  msgstr "Fusion manuelle" -#: ishtar_menu.py:109 models.py:2315 +#: ishtar_menu.py:109 models.py:2334  msgid "Imports"  msgstr "Imports" -#: ishtar_menu.py:112 views.py:1614 +#: ishtar_menu.py:112 views.py:1640  msgid "New import"  msgstr "Nouvel import" -#: ishtar_menu.py:116 views.py:1628 +#: ishtar_menu.py:116 views.py:1654  msgid "Current imports"  msgstr "Imports en cours" -#: ishtar_menu.py:120 views.py:1667 +#: ishtar_menu.py:120 views.py:1693  msgid "Old imports"  msgstr "Anciens imports" @@ -605,127 +607,127 @@ msgstr "Anciens imports"  msgid "Not a valid item."  msgstr "Élément invalide." -#: models.py:199 +#: models.py:201  msgid "A selected item is not a valid item."  msgstr "Un élément sélectionné n'est pas valide." -#: models.py:210 +#: models.py:212  msgid "This item already exists."  msgstr "Cet élément existe déjà." -#: models.py:375 models.py:695 models.py:1516 models.py:1528 models.py:1954 +#: models.py:377 models.py:697 models.py:1535 models.py:1547 models.py:1973  msgid "Label"  msgstr "Libellé" -#: models.py:377 +#: models.py:379  msgid "Textual ID"  msgstr "Identifiant textuel" -#: models.py:380 models.py:698 models.py:1485 +#: models.py:382 models.py:700 models.py:1504  msgid "Available"  msgstr "Disponible" -#: models.py:722 models.py:2076 +#: models.py:724 models.py:2095  msgid "Key"  msgstr "Clé" -#: models.py:728 +#: models.py:730  msgid "Specific key to an import"  msgstr "Clé spécifique à un import" -#: models.py:820 +#: models.py:826  msgid "Last editor"  msgstr "Dernier éditeur" -#: models.py:823 +#: models.py:829  msgid "Creator"  msgstr "Créateur" -#: models.py:965 models.py:2846 models.py:3001 models.py:3057 +#: models.py:971 models.py:2877 models.py:3045 models.py:3101  msgid "Order"  msgstr "Ordre" -#: models.py:966 +#: models.py:972  msgid "Symmetrical"  msgstr "Symétrique" -#: models.py:967 +#: models.py:973  msgid "Tiny label"  msgstr "Libellé court" -#: models.py:981 +#: models.py:987  msgid "Cannot have symmetrical and an inverse_relation"  msgstr "Ne peut pas être symétrique et avoir une relation inverse" -#: models.py:1097 +#: models.py:1103  msgid "Euro"  msgstr "Euro" -#: models.py:1098 +#: models.py:1104  msgid "US dollar"  msgstr "Dollar US" -#: models.py:1104 models.py:1768 +#: models.py:1110 models.py:1787  msgid "Slug"  msgstr "Identifiant texte" -#: models.py:1107 +#: models.py:1113  msgid "CSS color code for base module"  msgstr "Code couleur CSS pour le tronc commun" -#: models.py:1109 +#: models.py:1115  msgid "Files module"  msgstr "Module Dossiers" -#: models.py:1111 +#: models.py:1117  msgid "CSS color code for files module"  msgstr "Code couleur CSS pour le module Dossier" -#: models.py:1113 +#: models.py:1119  msgid "Context records module"  msgstr "Module Unités d'Enregistrement" -#: models.py:1116 +#: models.py:1122  msgid "CSS color code for context record module"  msgstr "Code couleur CSS pour le module Unité d'Enregistrement" -#: models.py:1118 +#: models.py:1124  msgid "Finds module"  msgstr "Module Mobilier" -#: models.py:1119 +#: models.py:1125  msgid "Need context records module"  msgstr "Nécessite le module Unités d'Enregistrement" -#: models.py:1121 +#: models.py:1127  msgid "CSS color code for find module"  msgstr "Code couleur CSS pour le module Mobilier" -#: models.py:1124 +#: models.py:1130  msgid "Warehouses module"  msgstr "Module Dépôts" -#: models.py:1125 +#: models.py:1131  msgid "Need finds module"  msgstr "Nécessite le module mobilier" -#: models.py:1127 +#: models.py:1133  msgid "CSS code for warehouse module"  msgstr "Code couleur CSS pour le module Dépôt" -#: models.py:1129 +#: models.py:1135  msgid "Mapping module"  msgstr "Module cartographique" -#: models.py:1131 +#: models.py:1137  msgid "CSS code for mapping module"  msgstr "Code couleur CSS pour le module cartographique" -#: models.py:1134 +#: models.py:1140  msgid "Home page"  msgstr "Page d'accueil" -#: models.py:1135 +#: models.py:1141  #, python-brace-format  msgid ""  "Homepage of Ishtar - if not defined a default homepage will appear. Use the " @@ -735,11 +737,11 @@ msgstr ""  "défaut apparaît. Utiliser la syntaxe Markdown. {random_image} peut être "  "utilisé pour afficher une image au hasard." -#: models.py:1139 +#: models.py:1145  msgid "File external id"  msgstr "Identifiant externe de fichier" -#: models.py:1141 +#: models.py:1147  msgid ""  "Formula to manage file external ID. Change this with care. With incorrect "  "formula, the application might be unusable and import of external data can " @@ -749,11 +751,11 @@ msgstr ""  "précaution. Une formule incorrecte peut rendre l'application inutilisable et "  "l'import de données externes peut alors être destructif." -#: models.py:1146 +#: models.py:1152  msgid "Parcel external id"  msgstr "Identifiant externe de parcelle" -#: models.py:1149 +#: models.py:1155  msgid ""  "Formula to manage parcel external ID. Change this with care. With incorrect "  "formula, the application might be unusable and import of external data can " @@ -763,11 +765,11 @@ msgstr ""  "précaution. Une formule incorrecte peut rendre l'application inutilisable et "  "l'import de données externes peut alors être destructif." -#: models.py:1154 +#: models.py:1160  msgid "Context record external id"  msgstr "Identifiant externe d'unité d'enregistrement" -#: models.py:1156 +#: models.py:1162  msgid ""  "Formula to manage context record external ID. Change this with care. With "  "incorrect formula, the application might be unusable and import of external " @@ -777,11 +779,11 @@ msgstr ""  "manipuler avec précaution. Une formule incorrecte peut rendre l'application "  "inutilisable et l'import de données externes peut alors être destructif." -#: models.py:1161 +#: models.py:1167  msgid "Base find external id"  msgstr "Identifiant externe de mobilier de base" -#: models.py:1163 +#: models.py:1169  msgid ""  "Formula to manage base find external ID. Change this with care. With "  "incorrect formula, the application might be unusable and import of external " @@ -791,11 +793,11 @@ msgstr ""  "manipuler avec précaution. Une formule incorrecte peut rendre l'application "  "inutilisable et l'import de données externes peut alors être destructif." -#: models.py:1168 +#: models.py:1174  msgid "Find external id"  msgstr "Identifiant externe de mobilier" -#: models.py:1170 +#: models.py:1176  msgid ""  "Formula to manage find external ID. Change this with care. With incorrect "  "formula, the application might be unusable and import of external data can " @@ -805,11 +807,11 @@ msgstr ""  "précaution. Une formule incorrecte peut rendre l'application inutilisable et "  "l'import de données externes peut alors être destructif." -#: models.py:1175 +#: models.py:1181  msgid "Container external id"  msgstr "ID externe du contenant" -#: models.py:1177 +#: models.py:1183  msgid ""  "Formula to manage container external ID. Change this with care. With "  "incorrect formula, the application might be unusable and import of external " @@ -819,11 +821,11 @@ msgstr ""  "précaution. Une formule incorrecte peut rendre l'application inutilisable et "  "l'import de données externes peut alors être destructif." -#: models.py:1182 +#: models.py:1188  msgid "Warehouse external id"  msgstr "ID externe du dépôt" -#: models.py:1184 +#: models.py:1190  msgid ""  "Formula to manage warehouse external ID. Change this with care. With "  "incorrect formula, the application might be unusable and import of external " @@ -833,11 +835,11 @@ msgstr ""  "précaution. Une formule incorrecte peut rendre l'application inutilisable et "  "l'import de données externes peut alors être destructif." -#: models.py:1189 +#: models.py:1195  msgid "Raw name for person"  msgstr "Nom brut pour une personne" -#: models.py:1191 +#: models.py:1197  msgid ""  "Formula to manage person raw_name. Change this with care. With incorrect "  "formula, the application might be unusable and import of external data can " @@ -847,43 +849,43 @@ msgstr ""  "Une formule incorrecte peut rendre l'application inutilisable et l'import de "  "données externes peut alors être destructif." -#: models.py:1195 +#: models.py:1201  msgid "Current active"  msgstr "Actuellement utilisé" -#: models.py:1196 +#: models.py:1202  msgid "Currency"  msgstr "Devise" -#: models.py:1200 +#: models.py:1206  msgid "Ishtar site profile"  msgstr "Profil d'instance Ishtar" -#: models.py:1201 +#: models.py:1207  msgid "Ishtar site profiles"  msgstr "Profils d'instance Ishtar" -#: models.py:1270 +#: models.py:1276  msgid "Variable name"  msgstr "Nom de la variable" -#: models.py:1271 +#: models.py:1277  msgid "Description of the variable"  msgstr "Description de la variable" -#: models.py:1273 models.py:2077 +#: models.py:1279 models.py:2096  msgid "Value"  msgstr "Valeur" -#: models.py:1276 +#: models.py:1282  msgid "Global variable"  msgstr "Variable globale" -#: models.py:1386 models.py:1416 +#: models.py:1405 models.py:1435  msgid "Total"  msgstr "Total" -#: models.py:1393 models.py:1517 models.py:1529 +#: models.py:1412 models.py:1536 models.py:1548  #: templates/ishtar/sheet_person.html:24  #: templates/ishtar/dashboards/dashboard_main_detail.html:141  #: templates/ishtar/dashboards/dashboard_main_detail_users.html:26 @@ -891,135 +893,135 @@ msgstr "Total"  msgid "Number"  msgstr "Nombre" -#: models.py:1480 +#: models.py:1499  msgid "Administrative Act"  msgstr "Acte administratif" -#: models.py:1484 +#: models.py:1503  msgid "Associated object"  msgstr "Objet associé" -#: models.py:1488 +#: models.py:1507  msgid "Document template"  msgstr "Patron de document" -#: models.py:1489 +#: models.py:1508  msgid "Document templates"  msgstr "Patrons de document" -#: models.py:1520 models.py:1530 models.py:2299 +#: models.py:1539 models.py:1549 models.py:2318  msgid "State"  msgstr "État" -#: models.py:1534 templates/blocks/JQueryAdvancedTown.html:12 +#: models.py:1553 templates/blocks/JQueryAdvancedTown.html:12  msgid "Department"  msgstr "Département" -#: models.py:1535 +#: models.py:1554  msgid "Departments"  msgstr "Départements" -#: models.py:1572 +#: models.py:1591  msgid "Raw phone"  msgstr "Téléphone brut" -#: models.py:1578 +#: models.py:1597  msgid "Alternative address is prefered"  msgstr "L'adresse alternative est préférée" -#: models.py:1617 +#: models.py:1636  msgid "Tel: "  msgstr "Tél :" -#: models.py:1621 +#: models.py:1640  msgid "Mobile: "  msgstr "Mobile :" -#: models.py:1625 +#: models.py:1644  msgid "Email: "  msgstr "Courriel :" -#: models.py:1630 +#: models.py:1649  msgid "Merge key"  msgstr "Clé de fusion" -#: models.py:1704 +#: models.py:1723  msgid "Organization types"  msgstr "Types d'organisation" -#: models.py:1751 +#: models.py:1770  msgid "Class name"  msgstr "Nom de la classe" -#: models.py:1754 +#: models.py:1773  msgid "Importer - Model"  msgstr "Importeur - Modèle" -#: models.py:1755 +#: models.py:1774  msgid "Importer - Models"  msgstr "Importeur - Modèles" -#: models.py:1772 templates/ishtar/dashboards/dashboard_main.html:25 +#: models.py:1791 templates/ishtar/dashboards/dashboard_main.html:25  msgid "Users"  msgstr "Utilisateurs" -#: models.py:1775 +#: models.py:1794  msgid "Associated model"  msgstr "Modèle associé" -#: models.py:1778 +#: models.py:1797  msgid "Models that can accept new items"  msgstr "Modèles qui peuvent accepter de nouveaux éléments" -#: models.py:1779 +#: models.py:1798  msgid "Leave blank for no restrictions"  msgstr "Laissez vide pour aucune restriction" -#: models.py:1781 +#: models.py:1800  msgid "Is template"  msgstr "Est un patron" -#: models.py:1782 +#: models.py:1801  msgid "Unicity keys (separator \";\")"  msgstr "Clés d'unicité (séparateur « ; »)" -#: models.py:1786 +#: models.py:1805  msgid "Importer - Type"  msgstr "Importeur - Type" -#: models.py:1787 +#: models.py:1806  msgid "Importer - Types"  msgstr "Importeur - Types" -#: models.py:1886 +#: models.py:1905  msgid "Importer - Default"  msgstr "Importeur - Par défaut" -#: models.py:1887 +#: models.py:1906  msgid "Importer - Defaults"  msgstr "Importeur - Par défaut" -#: models.py:1922 +#: models.py:1941  msgid "Importer - Default value"  msgstr "Importeur - Valeur par défaut" -#: models.py:1923 +#: models.py:1942  msgid "Importer - Default values"  msgstr "Importeur - Valeurs par défaut" -#: models.py:1956 +#: models.py:1975  msgid "Column number"  msgstr "Numéro de colonne" -#: models.py:1959 +#: models.py:1978  msgid "Required"  msgstr "Requis" -#: models.py:1961 +#: models.py:1980  msgid "Export field name"  msgstr "Exporter le nom du champ" -#: models.py:1962 +#: models.py:1981  msgid ""  "Fill this field if the field name is ambiguous for export. For instance: "  "concatenated fields." @@ -1027,511 +1029,536 @@ msgstr ""  "Remplir ce champ si le nom du champ est ambigu pour l'export, par exemple "  "dans le cas de champs concaténés." -#: models.py:1967 +#: models.py:1986  msgid "Importer - Column"  msgstr "Importeur - Colonne" -#: models.py:1968 +#: models.py:1987  msgid "Importer - Columns"  msgstr "Importeur - Colonnes" -#: models.py:1988 +#: models.py:2007  msgid "Field name"  msgstr "Nom du champ" -#: models.py:1990 models.py:2024 +#: models.py:2009 models.py:2043  msgid "Force creation of new items"  msgstr "Forcer la création de nouveaux éléments" -#: models.py:1992 models.py:2026 +#: models.py:2011 models.py:2045  msgid "Concatenate with existing"  msgstr "Concaténer avec l'existant" -#: models.py:1994 models.py:2028 +#: models.py:2013 models.py:2047  msgid "Concatenate character"  msgstr "Caractère de concaténation" -#: models.py:1998 +#: models.py:2017  msgid "Importer - Duplicate field"  msgstr "Importeur - Champ dupliqué" -#: models.py:1999 +#: models.py:2018  msgid "Importer - Duplicate fields"  msgstr "Importeur - Champs dupliqués" -#: models.py:2006 +#: models.py:2025  msgid "Regular expression"  msgstr "Expression régulière" -#: models.py:2009 +#: models.py:2028  msgid "Importer - Regular expression"  msgstr "Importeur - Expression régulière" -#: models.py:2010 +#: models.py:2029  msgid "Importer - Regular expressions"  msgstr "Importeur - Expressions régulières" -#: models.py:2033 +#: models.py:2052  msgid "Importer - Target"  msgstr "Importeur - Cible" -#: models.py:2034 +#: models.py:2053  msgid "Importer - Targets"  msgstr "Importeur - Cibles" -#: models.py:2058 views.py:549 +#: models.py:2077 views.py:568  msgid "True"  msgstr "Oui" -#: models.py:2059 views.py:551 +#: models.py:2078 views.py:570  msgid "False"  msgstr "Non" -#: models.py:2078 +#: models.py:2097  msgid "Is set"  msgstr "Est défini" -#: models.py:2085 +#: models.py:2104  msgid "Importer - Target key"  msgstr "Importeur - Clé de rapprochement" -#: models.py:2086 +#: models.py:2105  msgid "Importer - Targets keys"  msgstr "Importeur - Clés de rapprochement" -#: models.py:2138 models.py:2913 +#: models.py:2157 models.py:2957  msgid "Format"  msgstr "Format" -#: models.py:2139 models.py:3005 +#: models.py:2158 models.py:3049  msgid "Operation type"  msgstr "Type d'opération" -#: models.py:2140 +#: models.py:2159  msgid "Period"  msgstr "Période" -#: models.py:2141 +#: models.py:2160  msgid "Report state"  msgstr "État de rapport" -#: models.py:2142 +#: models.py:2161  msgid "Remain type"  msgstr "Type de vestige" -#: models.py:2143 +#: models.py:2162  msgid "Unit"  msgstr "Unité" -#: models.py:2144 +#: models.py:2163  msgid "Activity type"  msgstr "Type d'activité" -#: models.py:2145 +#: models.py:2164  msgid "Material"  msgstr "Matériau" -#: models.py:2147 +#: models.py:2166  msgid "Conservatory state"  msgstr "État de conservation" -#: models.py:2148 +#: models.py:2167  msgid "Container type"  msgstr "Type de contenant" -#: models.py:2149 +#: models.py:2168  msgid "Preservation type"  msgstr "Type de conservation" -#: models.py:2150 +#: models.py:2169  msgid "Object type"  msgstr "Type d'objet" -#: models.py:2151 +#: models.py:2170  msgid "Integrity type"  msgstr "Type d'intégrité" -#: models.py:2152 +#: models.py:2171  msgid "Remarkability type"  msgstr "Type de remarquabilité" -#: models.py:2153 +#: models.py:2172  msgid "Batch type"  msgstr "Type de lot" -#: models.py:2155 +#: models.py:2174  msgid "Identification type"  msgstr "Type d'identification" -#: models.py:2157 +#: models.py:2176  msgid "Context record relation type"  msgstr "Type de relations entre Unités d'Enregistrement" -#: models.py:2158 models.py:3063 +#: models.py:2177 models.py:3107  msgid "Spatial reference system"  msgstr "Système de référence spatiale" -#: models.py:2159 models.py:2891 +#: models.py:2178 models.py:2935  msgid "Support type"  msgstr "Type de support" -#: models.py:2160 models.py:2553 +#: models.py:2179 models.py:2572  msgid "Title type"  msgstr "Type de titre" -#: models.py:2166 +#: models.py:2185  msgid "Integer"  msgstr "Entier" -#: models.py:2167 +#: models.py:2186  msgid "Float"  msgstr "Nombre à virgule" -#: models.py:2168 +#: models.py:2187  msgid "String"  msgstr "Chaîne de caractères" -#: models.py:2169 templates/sheet_ope.html:86 +#: models.py:2188 templates/sheet_ope.html:86  msgid "Date"  msgstr "Date" -#: models.py:2171 templates/sheet_ope.html:61 templates/sheet_ope.html.py:83 +#: models.py:2190 templates/sheet_ope.html:61 templates/sheet_ope.html.py:83  #: templates/ishtar/dashboards/dashboard_main_detail.html:126  msgid "Year"  msgstr "Année" -#: models.py:2172 +#: models.py:2191  msgid "String to boolean"  msgstr "Chaîne de caractères vers booléen" -#: models.py:2173 +#: models.py:2192  msgctxt "filesystem"  msgid "File"  msgstr "Fichier" -#: models.py:2174 +#: models.py:2193  msgid "Unknow type"  msgstr "Type inconnu" -#: models.py:2190 +#: models.py:2209  msgid "4 digit year. e.g.: \"2015\""  msgstr "Année sur 4 chiffres. Exemple : « 2015 »" -#: models.py:2191 +#: models.py:2210  msgid "4 digit year/month/day. e.g.: \"2015/02/04\""  msgstr "Année sur 4 chiffres/mois/jour. Exemple : « 2015/02/04 »" -#: models.py:2192 +#: models.py:2211  msgid "Day/month/4 digit year. e.g.: \"04/02/2015\""  msgstr "Jour/mois/année sur 4 chiffres. Exemple : « 04/02/2015 »" -#: models.py:2202 +#: models.py:2221  msgid "Options"  msgstr "Options" -#: models.py:2204 +#: models.py:2223  msgid "Split character(s)"  msgstr "Caractère(s) de séparation" -#: models.py:2208 +#: models.py:2227  msgid "Importer - Formater type"  msgstr "Importeur - Type de mise en forme" -#: models.py:2209 +#: models.py:2228  msgid "Importer - Formater types"  msgstr "Importeur - Types de mise en forme" -#: models.py:2261 templates/ishtar/dashboards/dashboard_main_detail.html:63 +#: models.py:2280 templates/ishtar/dashboards/dashboard_main_detail.html:63  msgid "Created"  msgstr "Créé" -#: models.py:2262 +#: models.py:2281  msgid "Analyse in progress"  msgstr "Analyse en cours" -#: models.py:2263 +#: models.py:2282  msgid "Analysed"  msgstr "Analysé" -#: models.py:2264 +#: models.py:2283  msgid "Import pending"  msgstr "Import en attente" -#: models.py:2265 +#: models.py:2284  msgid "Import in progress"  msgstr "Import en cours" -#: models.py:2266 +#: models.py:2285  msgid "Finished with errors"  msgstr "Terminé avec des erreurs" -#: models.py:2267 +#: models.py:2286  msgid "Finished"  msgstr "Terminé" -#: models.py:2268 +#: models.py:2287  msgid "Archived"  msgstr "Archivé" -#: models.py:2283 +#: models.py:2302  msgid "Imported file"  msgstr "Fichier importé" -#: models.py:2285 +#: models.py:2304  msgid "Associated images (zip file)"  msgstr "Images associées (fichier zip)" -#: models.py:2287 +#: models.py:2306  msgid "Encoding"  msgstr "Codage" -#: models.py:2289 +#: models.py:2308  msgid "Skip lines"  msgstr "Nombre de lignes d'entête" -#: models.py:2290 templates/ishtar/import_list.html:51 +#: models.py:2309 templates/ishtar/import_list.html:51  msgid "Error file"  msgstr "Fichier erreur" -#: models.py:2293 +#: models.py:2312  msgid "Result file"  msgstr "Fichier résultant" -#: models.py:2296 templates/ishtar/import_list.html:57 +#: models.py:2315 templates/ishtar/import_list.html:57  msgid "Match file"  msgstr "Fichier de correspondance" -#: models.py:2302 +#: models.py:2321  msgid "Conservative import"  msgstr "Import conservateur" -#: models.py:2307 +#: models.py:2326  msgid "End date"  msgstr "Date de fin" -#: models.py:2309 +#: models.py:2328  msgid "Remaining seconds"  msgstr "Secondes restantes" -#: models.py:2314 +#: models.py:2333  msgid "Import"  msgstr "Import" -#: models.py:2343 +#: models.py:2362  msgid "Analyse"  msgstr "Analyser" -#: models.py:2345 models.py:2348 +#: models.py:2364 models.py:2367  msgid "Re-analyse"  msgstr "Analyser de nouveau " -#: models.py:2346 +#: models.py:2365  msgid "Launch import"  msgstr "Lancer l'import" -#: models.py:2349 +#: models.py:2368  msgid "Re-import"  msgstr "Ré-importer" -#: models.py:2350 +#: models.py:2369  msgid "Archive"  msgstr "Archiver" -#: models.py:2352 +#: models.py:2371  msgid "Unarchive"  msgstr "Désarchiver" -#: models.py:2353 widgets.py:130 templates/ishtar/form_delete.html:11 +#: models.py:2372 widgets.py:184 templates/ishtar/form_delete.html:11  msgid "Delete"  msgstr "Supprimer" -#: models.py:2494 +#: models.py:2513  msgid "Organizations"  msgstr "Organisations" -#: models.py:2496 +#: models.py:2515  msgid "Can view all Organizations"  msgstr "Peut voir toutes les Organisations" -#: models.py:2497 +#: models.py:2516  msgid "Can view own Organization"  msgstr "Peut voir sa propre Organisation" -#: models.py:2498 +#: models.py:2517  msgid "Can add own Organization"  msgstr "Peut ajouter sa propre Organisation" -#: models.py:2500 +#: models.py:2519  msgid "Can change own Organization"  msgstr "Peut modifier sa propre Organisation" -#: models.py:2502 +#: models.py:2521  msgid "Can delete own Organization"  msgstr "Peut supprimer sa propre Organisation" -#: models.py:2537 +#: models.py:2556  msgid "Groups"  msgstr "Groupes" -#: models.py:2542 +#: models.py:2561  msgid "Person types"  msgstr "Types de personne" -#: models.py:2554 +#: models.py:2573  msgid "Title types"  msgstr "Types de titre" -#: models.py:2563 +#: models.py:2582  msgid "Mr"  msgstr "M." -#: models.py:2564 +#: models.py:2583  msgid "Miss"  msgstr "Mlle" -#: models.py:2565 +#: models.py:2584  msgid "Mr and Mrs"  msgstr "M. et Mme" -#: models.py:2566 +#: models.py:2585  msgid "Mrs"  msgstr "Mme" -#: models.py:2567 +#: models.py:2586  msgid "Doctor"  msgstr "Dr." -#: models.py:2600 +#: models.py:2619  msgid "Contact type"  msgstr "Type de contact" -#: models.py:2603 models.py:2667 +#: models.py:2622 models.py:2686  msgid "Types"  msgstr "Types" -#: models.py:2606 +#: models.py:2625  msgid "Is attached to"  msgstr "Est rattaché à" -#: models.py:2611 +#: models.py:2630  msgid "Persons"  msgstr "Personnes" -#: models.py:2613 +#: models.py:2632  msgid "Can view all Persons"  msgstr "Peut voir toutes les Personnes" -#: models.py:2614 +#: models.py:2633  msgid "Can view own Person"  msgstr "Peut voir sa propre Personne" -#: models.py:2615 +#: models.py:2634  msgid "Can add own Person"  msgstr "Peut ajouter sa propre Personne" -#: models.py:2616 +#: models.py:2635  msgid "Can change own Person"  msgstr "Peut modifier sa propre Personne" -#: models.py:2617 +#: models.py:2636  msgid "Can delete own Person"  msgstr "Peut supprimer sa propre Personne" -#: models.py:2794 +#: models.py:2825  msgid "Advanced shortcut menu"  msgstr "Menu de raccourci (avancé)" -#: models.py:2797 +#: models.py:2828  msgid "Ishtar user"  msgstr "Utilisateur d'Ishtar" -#: models.py:2798 +#: models.py:2829  msgid "Ishtar users"  msgstr "Utilisateurs d'Ishtar" -#: models.py:2842 +#: models.py:2873  msgid "To modify the password use the form in Auth > User"  msgstr ""  "Pour modifier le mot de passe, utilisez le formulaire dans Authentification "  "> Utilisateurs" -#: models.py:2849 +#: models.py:2881  msgid "Author types"  msgstr "Types d'auteur" -#: models.py:2883 +#: models.py:2898 +#, fuzzy +msgid "Can view all Authors" +msgstr "Peut voir toutes les Personnes" + +#: models.py:2900 +#, fuzzy +msgid "Can view own Author" +msgstr "Peut voir sa propre Personne" + +#: models.py:2902 +#, fuzzy +msgid "Can add own Author" +msgstr "Peut ajouter sa propre Personne" + +#: models.py:2904 +#, fuzzy +msgid "Can change own Author" +msgstr "Peut modifier sa propre Personne" + +#: models.py:2906 +#, fuzzy +msgid "Can delete own Author" +msgstr "Peut supprimer sa propre Personne" + +#: models.py:2927  msgid "Source types"  msgstr "Types de document" -#: models.py:2892 +#: models.py:2936  msgid "Support types"  msgstr "Types de support" -#: models.py:2899 +#: models.py:2943  msgid "Format type"  msgstr "Type de format" -#: models.py:2900 +#: models.py:2944  msgid "Format types"  msgstr "Types de format" -#: models.py:2908 +#: models.py:2952  msgid "External ID"  msgstr "Identifiant externe" -#: models.py:2911 +#: models.py:2955  msgid "Support"  msgstr "Support" -#: models.py:2915 +#: models.py:2959  msgid "Scale"  msgstr "Échelle" -#: models.py:2929 +#: models.py:2973  msgid "Item number"  msgstr "Numéro d'élément" -#: models.py:2930 +#: models.py:2974  msgid "Ref."  msgstr "Réf." -#: models.py:2933 +#: models.py:2977  msgid "Internal ref."  msgstr "Réf. interne" -#: models.py:2976 +#: models.py:3020  msgid "Surface (m2)"  msgstr "Surface (m2)" -#: models.py:2977 templates/sheet_ope.html:46 templates/sheet_ope.html.py:107 +#: models.py:3021 templates/sheet_ope.html:46 templates/sheet_ope.html.py:107  msgid "Localisation"  msgstr "Localisation" -#: models.py:3002 +#: models.py:3046  msgid "Is preventive"  msgstr "Est du préventif" -#: models.py:3006 +#: models.py:3050  msgid "Operation types"  msgstr "Types d'opération" -#: models.py:3035 +#: models.py:3079  msgid "Preventive"  msgstr "Préventif" -#: models.py:3036 +#: models.py:3080  msgid "Research"  msgstr "Programmé" -#: models.py:3059 +#: models.py:3103  msgid "Authority name"  msgstr "Registre" -#: models.py:3060 +#: models.py:3104  msgid "Authority SRID"  msgstr "SRID" -#: models.py:3064 +#: models.py:3108  msgid "Spatial reference systems"  msgstr "Systèmes de référence spatiale" @@ -1575,108 +1602,108 @@ msgstr "Gérer les comptes"  msgid "Account deletion"  msgstr "Supprimer un compte" -#: views.py:241 +#: views.py:251  msgid "Archaeological file"  msgstr "Dossier" -#: views.py:242 +#: views.py:252  msgid "Operation"  msgstr "Opération" -#: views.py:244 +#: views.py:254  msgid "Context record"  msgstr "Unité d'Enregistrement" -#: views.py:246 +#: views.py:256  msgid "Find"  msgstr "Mobilier" -#: views.py:248 +#: views.py:258  msgid "Treatment request"  msgstr "Demande de traitement" -#: views.py:249 +#: views.py:259  msgid "Treatment"  msgstr "Traitement" -#: views.py:1361 views.py:1404 +#: views.py:1387 views.py:1430  msgid "Operation not permitted."  msgstr "Opération non permise." -#: views.py:1363 +#: views.py:1389  #, python-format  msgid "New %s"  msgstr "Nouveau %s" -#: views.py:1422 views.py:1472 +#: views.py:1448 views.py:1498  msgid "Archaeological files"  msgstr "Dossiers" -#: views.py:1423 views.py:1476 +#: views.py:1449 views.py:1502  msgid "Operations"  msgstr "Opérations" -#: views.py:1425 views.py:1480 +#: views.py:1451 views.py:1506  msgid "Context records"  msgstr "Unités d'Enregistrement" -#: views.py:1427 views.py:1483 +#: views.py:1453 views.py:1509  msgid "Finds"  msgstr "Mobilier" -#: views.py:1681 templates/ishtar/import_list.html:47 +#: views.py:1707 templates/ishtar/import_list.html:47  msgid "Link unmatched items"  msgstr "Associer les éléments non rapprochés" -#: views.py:1696 +#: views.py:1722  msgid "Delete import"  msgstr "Supprimer un import" -#: views.py:1735 +#: views.py:1761  msgid "Merge persons"  msgstr "Fusionner des personnes" -#: views.py:1759 +#: views.py:1785  msgid "Select the main person"  msgstr "Choisir la personne principale" -#: views.py:1768 +#: views.py:1794  msgid "Merge organization"  msgstr "Fusionner des organisations" -#: views.py:1778 +#: views.py:1804  msgid "Select the main organization"  msgstr "Sélectionner l'organisation principale" -#: views.py:1818 views.py:1834 +#: views.py:1844 views.py:1860  msgid "Corporation manager"  msgstr "Représentant de la personne morale" -#: widgets.py:259 widgets.py:366 widgets.py:481 +#: widgets.py:313 widgets.py:420 widgets.py:535  msgid "Search..."  msgstr "Recherche..." -#: widgets.py:670 templatetags/window_tables.py:91 +#: widgets.py:724 templatetags/window_tables.py:96  msgid "No results"  msgstr "Pas de résultats" -#: widgets.py:671 templatetags/window_tables.py:92 +#: widgets.py:725 templatetags/window_tables.py:97  msgid "Loading..."  msgstr "Chargement..." -#: widgets.py:672 +#: widgets.py:726  msgid "Remove"  msgstr "Enlever" -#: wizards.py:372 templates/ishtar/import_delete.html:21 +#: wizards.py:380 templates/ishtar/import_delete.html:21  msgid "Yes"  msgstr "Oui" -#: wizards.py:374 +#: wizards.py:382  msgid "No"  msgstr "Non" -#: wizards.py:1390 +#: wizards.py:1404  #, python-format  msgid "[%(app_name)s] Account creation/modification"  msgstr "[%(app_name)s] Création/modification du compte" @@ -1717,8 +1744,7 @@ msgstr "L'équipe %(app_name)s"  #: templates/base.html:41  msgid "Searches in the shortcut menu deal with all items." -msgstr "" -"Les recherches dans le menu de raccourci concernent tous les éléments." +msgstr "Les recherches dans le menu de raccourci concernent tous les éléments."  #: templates/base.html:42  msgid "Searches in the shortcut menu deal with only your items." @@ -1749,27 +1775,23 @@ msgstr "Éléments courants"  #: templates/base.html:84 templates/welcome.html:8 templates/welcome.html.py:9  #: templates/welcome.html:10 templates/welcome.html.py:11 -#: templates/ishtar/manage_basket.html:4 -#: templates/ishtar/blocks/window_field.html:1 -#: templates/ishtar/blocks/window_field_detail.html:1 -#: templates/ishtar/blocks/window_field_multiple.html:1 -#: templates/ishtar/blocks/window_field_url.html:1 +#: templates/ishtar/manage_basket.html:5  msgid ":"  msgstr " :" -#: templates/base.html:120 +#: templates/base.html:123  msgid "Processing..."  msgstr "En traitement..." -#: templates/base.html:121 +#: templates/base.html:124  msgid "This can be long."  msgstr "Cela peut être long." -#: templates/base.html:122 +#: templates/base.html:125  msgid "Time to take a coffee?"  msgstr "Il est peut-être temps de prendre un café ?" -#: templates/base.html:123 +#: templates/base.html:126  msgid "Time to take another coffee?"  msgstr "Pourquoi pas un autre café ?" @@ -2046,7 +2068,7 @@ msgid "where the magic happens."  msgstr "c'est là que la magie opère."  #: templates/window.html:40 templates/blocks/JQueryJqGrid.html:34 -#: templates/ishtar/manage_basket.html:12 +#: templates/ishtar/manage_basket.html:13  msgid "Add"  msgstr "Ajouter" @@ -2178,14 +2200,18 @@ msgstr "Fichier source"  msgid "Control file"  msgstr "Fichier de contrôle" -#: templates/ishtar/manage_basket.html:9 +#: templates/ishtar/manage_basket.html:10  msgid "Checking \"Select all\" only selects the current page."  msgstr "Cocher « Tout sélectionner » sélectionne seulement la page courante." -#: templates/ishtar/manage_basket.html:13 +#: templates/ishtar/manage_basket.html:14  msgid "Basket content"  msgstr "Contenu du panier" +#: templates/ishtar/manage_basket.html:22 templates/ishtar/sheet.html:28 +msgid "Close" +msgstr "Fermer" +  #: templates/ishtar/merge.html:5  msgid "Merge"  msgstr "Fusionner" @@ -2254,10 +2280,6 @@ msgstr "Identification"  msgid "Contact informations"  msgstr "Coordonnées" -#: templates/ishtar/sheet.html:28 -msgid "Close" -msgstr "Fermer" -  #: templates/ishtar/sheet.html:34  msgid "Close all windows"  msgstr "Fermer toutes les fenêtres" @@ -2398,16 +2420,18 @@ msgid ""  "Powered by <a href=\"https://ishtar-archeo.net/\">Ishtar</a> v%(VERSION)s - "  "a free software under AGPL v3 license."  msgstr "" -"Propulsé par <a href=\"https://ishtar-archeo.net/\">Ishtar</a> v%(VERSION)s -" -" logiciel libre sous licence AGPL v3." +"Propulsé par <a href=\"https://ishtar-archeo.net/\">Ishtar</a> v%(VERSION)s " +"- logiciel libre sous licence AGPL v3."  #: templates/ishtar/blocks/sheet_creation_section.html:3 -msgid "Creation:" -msgstr "Création :" +msgctxt "Sheet" +msgid "Creation" +msgstr "Création"  #: templates/ishtar/blocks/sheet_creation_section.html:12 -msgid "Modification:" -msgstr "Modification :" +msgctxt "Sheet" +msgid "Modification" +msgstr "Modification"  #: templates/ishtar/blocks/sheet_external_id.html:3  msgid "Internal ID" diff --git a/version.py b/version.py index 82ee5cd03..6e7c2786c 100644 --- a/version.py +++ b/version.py @@ -1,4 +1,4 @@ -VERSION = (0, 99, 15, 2) +VERSION = (0, 99, 16, 3)  def get_version():  | 
