summaryrefslogtreecommitdiff
path: root/archaeological_files
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2016-10-11 19:00:29 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2016-10-11 19:00:29 +0200
commit72de941ef9ec59b282e056c28339a414c2b8b162 (patch)
tree3db3213d2e87cfcdeb7d1245fe239ec3188eb01e /archaeological_files
parent3120af6c41157b71561d6fd5a68fc6022f6dbadf (diff)
parentf9e0e0518c087febb5bf0eb89eac34f685559970 (diff)
downloadIshtar-72de941ef9ec59b282e056c28339a414c2b8b162.tar.bz2
Ishtar-72de941ef9ec59b282e056c28339a414c2b8b162.zip
Merge branch 'master' into v0.9
Diffstat (limited to 'archaeological_files')
-rw-r--r--archaeological_files/locale/django.pot124
-rw-r--r--archaeological_files/models.py4
-rw-r--r--archaeological_files/urls.py3
-rw-r--r--archaeological_files/views.py1
4 files changed, 68 insertions, 64 deletions
diff --git a/archaeological_files/locale/django.pot b/archaeological_files/locale/django.pot
index 90cecbb4f..239526e90 100644
--- a/archaeological_files/locale/django.pot
+++ b/archaeological_files/locale/django.pot
@@ -9,11 +9,11 @@ msgid ""
msgstr ""
#: forms.py:52 forms.py:212 forms.py:257 forms.py:404 forms.py:431
-#: models.py:78 templates/ishtar/sheet_file.html:146
+#: models.py:84 templates/ishtar/sheet_file.html:146
msgid "Year"
msgstr ""
-#: forms.py:53 forms.py:217 forms.py:259 models.py:81
+#: forms.py:53 forms.py:217 forms.py:259 models.py:87
msgid "Numeric reference"
msgstr ""
@@ -25,7 +25,7 @@ msgstr ""
msgid "Parcel (section/number/public domain)"
msgstr ""
-#: forms.py:60 forms.py:415 forms.py:442 models.py:514
+#: forms.py:60 forms.py:415 forms.py:442 models.py:519
msgid "Department"
msgstr ""
@@ -33,7 +33,7 @@ msgstr ""
msgid "File name"
msgstr ""
-#: forms.py:62 forms.py:158 forms.py:223 models.py:89
+#: forms.py:62 forms.py:158 forms.py:223 models.py:95
msgid "File type"
msgstr ""
@@ -45,15 +45,15 @@ msgstr ""
msgid "Saisine type"
msgstr ""
-#: forms.py:65 forms.py:311 models.py:58 models.py:120
+#: forms.py:65 forms.py:311 models.py:60 models.py:126
msgid "Permit type"
msgstr ""
-#: forms.py:67 forms.py:314 models.py:121
+#: forms.py:67 forms.py:314 models.py:127
msgid "Permit reference"
msgstr ""
-#: forms.py:68 forms.py:229 forms.py:372 models.py:150
+#: forms.py:68 forms.py:229 forms.py:372 models.py:156
#: templates/ishtar/sheet_file.html:99
msgid "Comment"
msgstr ""
@@ -62,7 +62,7 @@ msgstr ""
msgid "In charge"
msgstr ""
-#: forms.py:77 forms.py:289 forms.py:453 models.py:96
+#: forms.py:77 forms.py:289 forms.py:453 models.py:102
msgid "General contractor"
msgstr ""
@@ -86,11 +86,11 @@ msgstr ""
msgid "You should select a file."
msgstr ""
-#: forms.py:146 forms.py:221 models.py:129
+#: forms.py:146 forms.py:221 models.py:135
msgid "Creation date"
msgstr ""
-#: forms.py:147 forms.py:324 models.py:131
+#: forms.py:147 forms.py:324 models.py:137
msgid "Reception date"
msgstr ""
@@ -118,23 +118,23 @@ msgstr ""
msgid "General"
msgstr ""
-#: forms.py:206 models.py:91
+#: forms.py:206 models.py:97
msgid "Person in charge"
msgstr ""
-#: forms.py:220 models.py:88
+#: forms.py:220 models.py:94
msgid "Name"
msgstr ""
-#: forms.py:225 models.py:133
+#: forms.py:225 models.py:139
msgid "Related file"
msgstr ""
-#: forms.py:233 models.py:141
+#: forms.py:233 models.py:147
msgid "Total surface (m2)"
msgstr ""
-#: forms.py:236 models.py:147
+#: forms.py:236 models.py:153
msgid "Main address"
msgstr ""
@@ -155,11 +155,11 @@ msgstr ""
msgid "Preventive informations"
msgstr ""
-#: forms.py:301 models.py:108
+#: forms.py:301 models.py:114
msgid "Responsible for town planning service"
msgstr ""
-#: forms.py:317 models.py:144
+#: forms.py:317 models.py:150
msgid "Total developed surface (m2)"
msgstr ""
@@ -168,15 +168,15 @@ msgstr ""
msgid "Research archaeology"
msgstr ""
-#: forms.py:348 models.py:153 templates/ishtar/sheet_file.html:90
+#: forms.py:348 models.py:159 templates/ishtar/sheet_file.html:90
msgid "Departments"
msgstr ""
-#: forms.py:359 models.py:162
+#: forms.py:359 models.py:168
msgid "Scientist in charge"
msgstr ""
-#: forms.py:361 models.py:156 templates/ishtar/sheet_file.html:92
+#: forms.py:361 models.py:162 templates/ishtar/sheet_file.html:92
msgid "Requested operation type"
msgstr ""
@@ -184,11 +184,11 @@ msgstr ""
msgid "Lead organization"
msgstr ""
-#: forms.py:379 models.py:166 templates/ishtar/sheet_file.html:97
+#: forms.py:379 models.py:172 templates/ishtar/sheet_file.html:97
msgid "Classified area"
msgstr ""
-#: forms.py:381 models.py:168 templates/ishtar/sheet_file.html:98
+#: forms.py:381 models.py:174 templates/ishtar/sheet_file.html:98
msgid "Protected area"
msgstr ""
@@ -248,7 +248,7 @@ msgstr ""
msgid "File permit reference"
msgstr ""
-#: ishtar_menu.py:33 models.py:190 templates/ishtar/sheet_file.html:4
+#: ishtar_menu.py:33 models.py:196 templates/ishtar/sheet_file.html:4
msgid "Archaeological file"
msgstr ""
@@ -292,7 +292,7 @@ msgstr ""
msgid "General informations"
msgstr ""
-#: ishtar_menu.py:87 models.py:191
+#: ishtar_menu.py:87 models.py:197
#: templates/ishtar/dashboards/dashboard_file.html:7
msgid "Archaeological files"
msgstr ""
@@ -305,155 +305,155 @@ msgstr ""
msgid "Archaeological file types"
msgstr ""
-#: models.py:59
+#: models.py:61
msgid "Permit types"
msgstr ""
-#: models.py:64
+#: models.py:68
msgid "Delay (in days)"
msgstr ""
-#: models.py:82
+#: models.py:88
msgid "Internal reference"
msgstr ""
-#: models.py:84
+#: models.py:90
msgid "External ID"
msgstr ""
-#: models.py:87
+#: models.py:93
msgid "External ID is set automatically"
msgstr ""
-#: models.py:99
+#: models.py:105
msgid "General contractor (raw)"
msgstr ""
-#: models.py:103
+#: models.py:109
msgid "General contractor organization"
msgstr ""
-#: models.py:111
+#: models.py:117
msgid "Town planning service (raw)"
msgstr ""
-#: models.py:117
+#: models.py:123
msgid "Town planning service organization"
msgstr ""
-#: models.py:123
+#: models.py:129
msgid "Closing date"
msgstr ""
-#: models.py:124
+#: models.py:130
msgid "Town"
msgstr ""
-#: models.py:126
+#: models.py:132
msgid "Towns"
msgstr ""
-#: models.py:139
+#: models.py:145
msgid "Instruction deadline"
msgstr ""
-#: models.py:145
+#: models.py:151
msgid "Locality"
msgstr ""
-#: models.py:148
+#: models.py:154
msgid "Main address - postal code"
msgstr ""
-#: models.py:158 templates/ishtar/sheet_file.html:93
+#: models.py:164 templates/ishtar/sheet_file.html:93
msgid "Organization"
msgstr ""
-#: models.py:163
+#: models.py:169
msgid "Research archaeology comment"
msgstr ""
-#: models.py:177
+#: models.py:183
msgid "Cached name"
msgstr ""
-#: models.py:178
+#: models.py:184
msgid "Imported line"
msgstr ""
-#: models.py:193
+#: models.py:199
msgid "Can view all Archaelogical files"
msgstr ""
-#: models.py:194
+#: models.py:200
msgid "Can view own Archaelogical file"
msgstr ""
-#: models.py:195
+#: models.py:201
msgid "Can add own Archaelogical file"
msgstr ""
-#: models.py:197
+#: models.py:203
msgid "Can change own Archaelogical file"
msgstr ""
-#: models.py:199
+#: models.py:205
msgid "Can delete own Archaelogical file"
msgstr ""
-#: models.py:200
+#: models.py:206
msgid "Can close File"
msgstr ""
-#: models.py:206
+#: models.py:212
msgid "FILE"
msgstr ""
-#: models.py:375
+#: models.py:380
msgid "Multi-town"
msgstr ""
-#: models.py:381
+#: models.py:386
msgid "No town"
msgstr ""
-#: models.py:513
+#: models.py:518
msgid "File"
msgstr ""
-#: views.py:159
+#: views.py:160
msgid "File search"
msgstr ""
-#: views.py:168
+#: views.py:169
msgid "New file"
msgstr ""
-#: views.py:187
+#: views.py:188
msgid "File modification"
msgstr ""
-#: views.py:210
+#: views.py:211
msgid "File closing"
msgstr ""
-#: views.py:215
+#: views.py:216
msgid "File deletion"
msgstr ""
-#: views.py:222
+#: views.py:223
msgid "File: search administrative act"
msgstr ""
-#: views.py:231
+#: views.py:232
msgid "File: new administrative act"
msgstr ""
-#: views.py:241
+#: views.py:242
msgid "File: administrative act modification"
msgstr ""
-#: views.py:265
+#: views.py:266
msgid "File: administrative act deletion"
msgstr ""
diff --git a/archaeological_files/models.py b/archaeological_files/models.py
index b116d1f1c..3721e4d3d 100644
--- a/archaeological_files/models.py
+++ b/archaeological_files/models.py
@@ -340,8 +340,8 @@ class File(ClosedItem, BaseHistorizedItem, OwnPerms, ValueGetter,
return cls
@classmethod
- def get_owns(cls, user, menu_filtr=None):
- owns = super(File, cls).get_owns(user)
+ def get_owns(cls, user, menu_filtr=None, limit=None):
+ owns = super(File, cls).get_owns(user, limit=limit)
return sorted(owns, key=lambda x: x.cached_label)
def get_values(self, prefix=''):
diff --git a/archaeological_files/urls.py b/archaeological_files/urls.py
index c6b932fec..b762a54b3 100644
--- a/archaeological_files/urls.py
+++ b/archaeological_files/urls.py
@@ -75,6 +75,9 @@ urlpatterns += patterns(
name='get-file'),
url(r'get-file-full/(?P<type>.+)?$', 'get_file',
name='get-file-full', kwargs={'full': True}),
+ url(r'get-file-shortcut/(?P<type>.+)?$',
+ 'get_file', name='get-file-shortcut',
+ kwargs={'full': 'shortcut'}),
url(r'get-administrativeactfile/(?P<type>.+)?$',
'get_administrativeactfile', name='get-administrativeactfile'),
url(r'show-file(?:/(?P<pk>.+))?/(?P<type>.+)?$', 'show_file',
diff --git a/archaeological_files/views.py b/archaeological_files/views.py
index e457c2ce7..a8053214f 100644
--- a/archaeological_files/views.py
+++ b/archaeological_files/views.py
@@ -91,6 +91,7 @@ get_file = get_item(
'towns__numero_insee__startswith':
'towns__numero_insee__startswith',
'name': 'name__icontains',
+ 'cached_label': 'cached_label__icontains',
'comment': 'comment__icontains',
'permit_reference': 'permit_reference__icontains',
'general_contractor__attached_to':