diff options
Diffstat (limited to 'ishtar_common')
| -rw-r--r-- | ishtar_common/locale/django.pot | 610 | ||||
| -rw-r--r-- | ishtar_common/migrations/0063_auto__add_field_ishtaruser_advanced_shortcut_menu.py | 464 | ||||
| -rw-r--r-- | ishtar_common/models.py | 9 | ||||
| -rw-r--r-- | ishtar_common/static/js/ishtar.js | 91 | ||||
| -rw-r--r-- | ishtar_common/static/media/style.css | 44 | ||||
| -rw-r--r-- | ishtar_common/templates/base.html | 10 | ||||
| -rw-r--r-- | ishtar_common/templates/ishtar/blocks/advanced_shortcut_menu.html | 38 | ||||
| -rw-r--r-- | ishtar_common/templates/ishtar/blocks/shortcut_menu.html | 5 | ||||
| -rw-r--r-- | ishtar_common/urls.py | 8 | ||||
| -rw-r--r-- | ishtar_common/views.py | 107 |
10 files changed, 1080 insertions, 306 deletions
diff --git a/ishtar_common/locale/django.pot b/ishtar_common/locale/django.pot index 9ec7eb939..8a0b6b389 100644 --- a/ishtar_common/locale/django.pot +++ b/ishtar_common/locale/django.pot @@ -155,12 +155,12 @@ msgstr "" msgid "Add a new item" msgstr "" -#: forms.py:245 models.py:1278 +#: forms.py:245 models.py:1307 msgid "Template" msgstr "" #: forms_common.py:41 forms_common.py:59 forms_common.py:182 -#: forms_common.py:406 models.py:1344 models.py:2658 +#: forms_common.py:406 models.py:1373 models.py:2722 #: templates/blocks/JQueryAdvancedTown.html:19 #: templates/ishtar/sheet_organization.html:13 msgid "Town" @@ -176,8 +176,8 @@ msgid "" "french town Saint-Denis in the Seine-Saint-Denis department.</p>" msgstr "" -#: forms_common.py:68 forms_common.py:855 ishtar_menu.py:47 models.py:1512 -#: models.py:2326 models.py:2480 models.py:2538 +#: forms_common.py:68 forms_common.py:855 ishtar_menu.py:47 models.py:1543 +#: models.py:2361 models.py:2530 models.py:2592 #: templates/ishtar/sheet_person.html:4 msgid "Person" msgstr "" @@ -189,63 +189,63 @@ msgid "" msgstr "" #: forms_common.py:170 forms_common.py:327 forms_common.py:451 -#: ishtar_menu.py:75 models.py:1513 models.py:2231 +#: ishtar_menu.py:75 models.py:1544 models.py:2262 #: templates/ishtar/sheet_organization.html:4 msgid "Organization" msgstr "" #: forms_common.py:173 forms_common.py:210 forms_common.py:322 -#: forms_common.py:376 forms_common.py:446 models.py:945 models.py:1277 -#: models.py:1558 models.py:1776 models.py:2225 models.py:2312 models.py:2644 +#: forms_common.py:376 forms_common.py:446 models.py:974 models.py:1306 +#: models.py:1589 models.py:1807 models.py:2256 models.py:2347 models.py:2708 #: templates/ishtar/sheet_organization.html:8 #: templates/ishtar/sheet_organization.html:21 msgid "Name" msgstr "" -#: forms_common.py:174 models.py:1499 models.py:1907 +#: forms_common.py:174 models.py:1528 models.py:1938 msgid "Organization type" msgstr "" -#: forms_common.py:176 forms_common.py:400 models.py:1339 +#: forms_common.py:176 forms_common.py:400 models.py:1368 #: templates/ishtar/sheet_organization.html:10 msgid "Address" msgstr "" -#: forms_common.py:178 forms_common.py:403 models.py:1340 +#: forms_common.py:178 forms_common.py:403 models.py:1369 #: templates/ishtar/sheet_organization.html:11 msgid "Address complement" msgstr "" -#: forms_common.py:180 forms_common.py:404 models.py:1342 +#: forms_common.py:180 forms_common.py:404 models.py:1371 #: templates/ishtar/sheet_organization.html:12 msgid "Postal code" msgstr "" -#: forms_common.py:183 forms_common.py:407 models.py:1345 +#: forms_common.py:183 forms_common.py:407 models.py:1374 msgid "Country" msgstr "" #: forms_common.py:185 forms_common.py:324 forms_common.py:380 -#: forms_common.py:448 forms_common.py:572 models.py:1372 +#: forms_common.py:448 forms_common.py:572 models.py:1401 msgid "Email" msgstr "" -#: forms_common.py:186 forms_common.py:383 models.py:1357 +#: forms_common.py:186 forms_common.py:383 models.py:1386 #: templates/ishtar/sheet_organization.html:14 #: templates/ishtar/sheet_person.html:19 #: templates/ishtar/wizard/wizard_person.html:17 msgid "Phone" msgstr "" -#: forms_common.py:187 forms_common.py:392 models.py:1369 +#: forms_common.py:187 forms_common.py:392 models.py:1398 #: templates/ishtar/sheet_organization.html:15 #: templates/ishtar/sheet_person.html:37 #: templates/ishtar/wizard/wizard_person.html:35 msgid "Mobile phone" msgstr "" -#: forms_common.py:211 forms_common.py:325 forms_common.py:449 models.py:1935 -#: models.py:2227 models.py:2579 templates/sheet_ope.html:85 +#: forms_common.py:211 forms_common.py:325 forms_common.py:449 models.py:1966 +#: models.py:2258 models.py:2643 templates/sheet_ope.html:85 #: templates/sheet_ope.html.py:105 templates/sheet_ope.html:126 #: templates/ishtar/import_list.html:13 #: templates/ishtar/sheet_organization.html:23 @@ -253,7 +253,7 @@ msgstr "" msgid "Type" msgstr "" -#: forms_common.py:220 views.py:137 +#: forms_common.py:220 views.py:139 msgid "Organization search" msgstr "" @@ -269,12 +269,12 @@ msgstr "" msgid "Organization to merge" msgstr "" -#: forms_common.py:323 forms_common.py:374 forms_common.py:447 models.py:2310 +#: forms_common.py:323 forms_common.py:374 forms_common.py:447 models.py:2345 #: templates/ishtar/sheet_organization.html:22 msgid "Surname" msgstr "" -#: forms_common.py:339 forms_common.py:434 views.py:102 +#: forms_common.py:339 forms_common.py:434 views.py:104 msgid "Person search" msgstr "" @@ -287,25 +287,25 @@ msgstr "" msgid "Identity" msgstr "" -#: forms_common.py:371 forms_common.py:773 forms_common.py:822 models.py:1908 -#: models.py:2304 models.py:2306 models.py:2576 templates/sheet_ope.html:104 +#: forms_common.py:371 forms_common.py:773 forms_common.py:822 models.py:1939 +#: models.py:2339 models.py:2341 models.py:2640 templates/sheet_ope.html:104 #: templates/ishtar/blocks/window_tables/documents.html:7 msgid "Title" msgstr "" -#: forms_common.py:372 models.py:2308 +#: forms_common.py:372 models.py:2343 msgid "Salutation" msgstr "" -#: forms_common.py:378 models.py:2314 +#: forms_common.py:378 models.py:2349 msgid "Raw name" msgstr "" -#: forms_common.py:381 models.py:1358 +#: forms_common.py:381 models.py:1387 msgid "Phone description" msgstr "" -#: forms_common.py:384 models.py:1360 models.py:1362 +#: forms_common.py:384 models.py:1389 models.py:1391 msgid "Phone description 2" msgstr "" @@ -313,11 +313,11 @@ msgstr "" msgid "Phone 2" msgstr "" -#: forms_common.py:388 models.py:1366 +#: forms_common.py:388 models.py:1395 msgid "Phone description 3" msgstr "" -#: forms_common.py:390 models.py:1364 +#: forms_common.py:390 models.py:1393 msgid "Phone 3" msgstr "" @@ -325,23 +325,23 @@ msgstr "" msgid "Current organization" msgstr "" -#: forms_common.py:409 models.py:1347 +#: forms_common.py:409 models.py:1376 msgid "Other address: address" msgstr "" -#: forms_common.py:412 models.py:1350 +#: forms_common.py:412 models.py:1379 msgid "Other address: address complement" msgstr "" -#: forms_common.py:414 models.py:1351 +#: forms_common.py:414 models.py:1380 msgid "Other address: postal code" msgstr "" -#: forms_common.py:416 models.py:1353 +#: forms_common.py:416 models.py:1382 msgid "Other address: town" msgstr "" -#: forms_common.py:418 models.py:1355 +#: forms_common.py:418 models.py:1384 msgid "Other address: country" msgstr "" @@ -357,7 +357,7 @@ msgstr "" msgid "Account search" msgstr "" -#: forms_common.py:510 forms_common.py:550 forms_common.py:554 models.py:2279 +#: forms_common.py:510 forms_common.py:550 forms_common.py:554 models.py:2310 msgid "Person type" msgstr "" @@ -389,7 +389,7 @@ msgstr "" msgid "Send the new password by email?" msgstr "" -#: forms_common.py:628 forms_common.py:641 models.py:2659 +#: forms_common.py:628 forms_common.py:641 models.py:2723 msgid "Towns" msgstr "" @@ -405,7 +405,7 @@ msgstr "" msgid "Documentation informations" msgstr "" -#: forms_common.py:775 forms_common.py:823 models.py:1909 models.py:2559 +#: forms_common.py:775 forms_common.py:823 models.py:1940 models.py:2617 msgid "Source type" msgstr "" @@ -417,37 +417,37 @@ msgstr "" msgid "Internal reference" msgstr "" -#: forms_common.py:783 models.py:2590 +#: forms_common.py:783 models.py:2654 msgid "Numerical ressource (web address)" msgstr "" -#: forms_common.py:784 models.py:2592 +#: forms_common.py:784 models.py:2656 msgid "Receipt date" msgstr "" -#: forms_common.py:786 models.py:2062 models.py:2594 +#: forms_common.py:786 models.py:2093 models.py:2658 msgid "Creation date" msgstr "" -#: forms_common.py:789 models.py:2597 +#: forms_common.py:789 models.py:2661 msgid "Receipt date in documentation" msgstr "" -#: forms_common.py:791 forms_common.py:827 models.py:289 models.py:548 -#: models.py:1803 models.py:2318 models.py:2604 +#: forms_common.py:791 forms_common.py:827 models.py:317 models.py:577 +#: models.py:1834 models.py:2353 models.py:2668 msgid "Comment" msgstr "" -#: forms_common.py:793 forms_common.py:826 models.py:947 models.py:1562 -#: models.py:1735 models.py:1777 models.py:2603 templates/sheet_ope.html:128 +#: forms_common.py:793 forms_common.py:826 models.py:976 models.py:1593 +#: models.py:1766 models.py:1808 models.py:2667 templates/sheet_ope.html:128 msgid "Description" msgstr "" -#: forms_common.py:796 models.py:2605 +#: forms_common.py:796 models.py:2669 msgid "Additional information" msgstr "" -#: forms_common.py:798 forms_common.py:830 models.py:2607 +#: forms_common.py:798 forms_common.py:830 models.py:2671 msgid "Has a duplicate" msgstr "" @@ -462,7 +462,7 @@ msgid "" "p>" msgstr "" -#: forms_common.py:819 forms_common.py:848 forms_common.py:882 models.py:2543 +#: forms_common.py:819 forms_common.py:848 forms_common.py:882 models.py:2597 #: templates/ishtar/wizard/wizard_person_deletion.html:124 msgid "Author" msgstr "" @@ -475,7 +475,7 @@ msgstr "" msgid "Would you like to delete this documentation?" msgstr "" -#: forms_common.py:856 models.py:1910 models.py:2533 models.py:2540 +#: forms_common.py:856 models.py:1941 models.py:2585 models.py:2594 msgid "Author type" msgstr "" @@ -487,7 +487,7 @@ msgstr "" msgid "There are identical authors." msgstr "" -#: forms_common.py:893 models.py:2544 models.py:2586 +#: forms_common.py:893 models.py:2598 models.py:2650 #: templates/sheet_ope.html:106 #: templates/ishtar/blocks/window_tables/documents.html:9 msgid "Authors" @@ -505,7 +505,7 @@ msgstr "" msgid "Deletion" msgstr "" -#: ishtar_menu.py:39 models.py:1073 views.py:1377 +#: ishtar_menu.py:39 models.py:1102 views.py:1450 msgid "Global variables" msgstr "" @@ -533,20 +533,20 @@ msgstr "" msgid "Manual merge" msgstr "" -#: ishtar_menu.py:70 ishtar_menu.py:101 models.py:2099 widgets.py:110 +#: ishtar_menu.py:70 ishtar_menu.py:101 models.py:2130 widgets.py:110 #: templates/ishtar/form_delete.html:11 msgid "Delete" msgstr "" -#: ishtar_menu.py:109 models.py:2073 +#: ishtar_menu.py:109 models.py:2104 msgid "Imports" msgstr "" -#: ishtar_menu.py:112 views.py:1385 +#: ishtar_menu.py:112 views.py:1458 msgid "New import" msgstr "" -#: ishtar_menu.py:116 views.py:1399 +#: ishtar_menu.py:116 views.py:1472 msgid "Current imports" msgstr "" @@ -566,200 +566,200 @@ msgstr "" msgid "This item already exists." msgstr "" -#: models.py:285 models.py:547 models.py:1312 models.py:1324 +#: models.py:313 models.py:576 models.py:1341 models.py:1353 msgid "Label" msgstr "" -#: models.py:287 +#: models.py:315 msgid "Textual ID" msgstr "" -#: models.py:290 models.py:550 models.py:1281 +#: models.py:318 models.py:579 models.py:1310 msgid "Available" msgstr "" -#: models.py:569 models.py:1849 +#: models.py:598 models.py:1880 msgid "Key" msgstr "" -#: models.py:575 +#: models.py:604 msgid "Specific key to an import" msgstr "" -#: models.py:666 +#: models.py:695 msgid "Last editor" msgstr "" -#: models.py:669 +#: models.py:698 msgid "Creator" msgstr "" -#: models.py:809 models.py:2670 +#: models.py:838 models.py:2734 msgid "Order" msgstr "" -#: models.py:810 +#: models.py:839 msgid "Symmetrical" msgstr "" -#: models.py:811 +#: models.py:840 msgid "Tiny label" msgstr "" -#: models.py:825 +#: models.py:854 msgid "Cannot have symmetrical and an inverse_relation" msgstr "" -#: models.py:939 +#: models.py:968 msgid "Euro" msgstr "" -#: models.py:940 +#: models.py:969 msgid "US dollar" msgstr "" -#: models.py:946 models.py:1560 +#: models.py:975 models.py:1591 msgid "Slug" msgstr "" -#: models.py:948 +#: models.py:977 msgid "Files module" msgstr "" -#: models.py:949 +#: models.py:978 msgid "Context records module" msgstr "" -#: models.py:951 +#: models.py:980 msgid "Finds module" msgstr "" -#: models.py:952 +#: models.py:981 msgid "Need context records module" msgstr "" -#: models.py:954 +#: models.py:983 msgid "Warehouses module" msgstr "" -#: models.py:955 +#: models.py:984 msgid "Need finds module" msgstr "" -#: models.py:957 +#: models.py:986 msgid "Home page" msgstr "" -#: models.py:958 +#: models.py:987 #, 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:962 +#: models.py:991 msgid "File external id" msgstr "" -#: models.py:964 +#: models.py:993 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:969 +#: models.py:998 msgid "Parcel external id" msgstr "" -#: models.py:972 +#: models.py:1001 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:977 +#: models.py:1006 msgid "Context record external id" msgstr "" -#: models.py:979 +#: models.py:1008 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:984 +#: models.py:1013 msgid "Base find external id" msgstr "" -#: models.py:986 +#: models.py:1015 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:991 +#: models.py:1020 msgid "Find external id" msgstr "" -#: models.py:993 +#: models.py:1022 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:998 +#: models.py:1027 msgid "Raw name for person" msgstr "" -#: models.py:1000 +#: models.py:1029 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:1004 +#: models.py:1033 msgid "Current active" msgstr "" -#: models.py:1005 +#: models.py:1034 msgid "Currency" msgstr "" -#: models.py:1009 +#: models.py:1038 msgid "Ishtar site profile" msgstr "" -#: models.py:1010 +#: models.py:1039 msgid "Ishtar site profiles" msgstr "" -#: models.py:1066 +#: models.py:1095 msgid "Variable name" msgstr "" -#: models.py:1067 +#: models.py:1096 msgid "Description of the variable" msgstr "" -#: models.py:1069 models.py:1850 +#: models.py:1098 models.py:1881 msgid "Value" msgstr "" -#: models.py:1072 +#: models.py:1101 msgid "Global variable" msgstr "" -#: models.py:1182 models.py:1212 +#: models.py:1211 models.py:1241 msgid "Total" msgstr "" -#: models.py:1189 models.py:1313 models.py:1325 +#: models.py:1218 models.py:1342 models.py:1354 #: templates/ishtar/sheet_person.html:22 #: templates/ishtar/dashboards/dashboard_main_detail.html:141 #: templates/ishtar/dashboards/dashboard_main_detail_users.html:26 @@ -767,686 +767,690 @@ msgstr "" msgid "Number" msgstr "" -#: models.py:1276 +#: models.py:1305 msgid "Administrative Act" msgstr "" -#: models.py:1280 +#: models.py:1309 msgid "Associated object" msgstr "" -#: models.py:1284 +#: models.py:1313 msgid "Document template" msgstr "" -#: models.py:1285 +#: models.py:1314 msgid "Document templates" msgstr "" -#: models.py:1316 models.py:1326 models.py:2057 +#: models.py:1345 models.py:1355 models.py:2088 msgid "State" msgstr "" -#: models.py:1330 templates/blocks/JQueryAdvancedTown.html:12 +#: models.py:1359 templates/blocks/JQueryAdvancedTown.html:12 msgid "Department" msgstr "" -#: models.py:1331 +#: models.py:1360 msgid "Departments" msgstr "" -#: models.py:1368 +#: models.py:1397 msgid "Raw phone" msgstr "" -#: models.py:1374 +#: models.py:1403 msgid "Alternative address is prefered" msgstr "" -#: models.py:1413 +#: models.py:1442 msgid "Tel: " msgstr "" -#: models.py:1417 +#: models.py:1446 msgid "Mobile: " msgstr "" -#: models.py:1421 +#: models.py:1450 msgid "Email: " msgstr "" -#: models.py:1426 +#: models.py:1455 msgid "Merge key" msgstr "" -#: models.py:1500 +#: models.py:1529 msgid "Organization types" msgstr "" -#: models.py:1514 views.py:211 +#: models.py:1545 views.py:234 msgid "Operation" msgstr "" -#: models.py:1516 +#: models.py:1547 msgid "Archaeological site" msgstr "" -#: models.py:1517 +#: models.py:1548 msgid "Parcels" msgstr "" -#: models.py:1519 +#: models.py:1550 msgid "Operation source" msgstr "" -#: models.py:1522 views.py:1192 views.py:1243 +#: models.py:1553 views.py:1265 views.py:1316 msgid "Archaeological files" msgstr "" -#: models.py:1524 views.py:1195 views.py:1251 +#: models.py:1555 views.py:1268 views.py:1324 msgid "Context records" msgstr "" -#: models.py:1526 +#: models.py:1557 msgid "Context record relations" msgstr "" -#: models.py:1528 views.py:1197 views.py:1254 +#: models.py:1559 views.py:1270 views.py:1327 msgid "Finds" msgstr "" -#: models.py:1564 templates/ishtar/dashboards/dashboard_main.html:25 +#: models.py:1595 templates/ishtar/dashboards/dashboard_main.html:25 msgid "Users" msgstr "" -#: models.py:1566 +#: models.py:1597 msgid "Associated model" msgstr "" -#: models.py:1569 +#: models.py:1600 msgid "Is template" msgstr "" -#: models.py:1570 +#: models.py:1601 msgid "Unicity keys (separator \";\")" msgstr "" -#: models.py:1574 +#: models.py:1605 msgid "Importer - Type" msgstr "" -#: models.py:1575 +#: models.py:1606 msgid "Importer - Types" msgstr "" -#: models.py:1665 +#: models.py:1696 msgid "Importer - Default" msgstr "" -#: models.py:1666 +#: models.py:1697 msgid "Importer - Defaults" msgstr "" -#: models.py:1701 +#: models.py:1732 msgid "Importer - Default value" msgstr "" -#: models.py:1702 +#: models.py:1733 msgid "Importer - Default values" msgstr "" -#: models.py:1734 +#: models.py:1765 msgid "Column number" msgstr "" -#: models.py:1737 +#: models.py:1768 msgid "Required" msgstr "" -#: models.py:1740 +#: models.py:1771 msgid "Importer - Column" msgstr "" -#: models.py:1741 +#: models.py:1772 msgid "Importer - Columns" msgstr "" -#: models.py:1761 +#: models.py:1792 msgid "Field name" msgstr "" -#: models.py:1763 models.py:1797 +#: models.py:1794 models.py:1828 msgid "Force creation of new items" msgstr "" -#: models.py:1765 models.py:1799 +#: models.py:1796 models.py:1830 msgid "Concatenate with existing" msgstr "" -#: models.py:1767 models.py:1801 +#: models.py:1798 models.py:1832 msgid "Concatenate character" msgstr "" -#: models.py:1771 +#: models.py:1802 msgid "Importer - Duplicate field" msgstr "" -#: models.py:1772 +#: models.py:1803 msgid "Importer - Duplicate fields" msgstr "" -#: models.py:1779 +#: models.py:1810 msgid "Regular expression" msgstr "" -#: models.py:1782 +#: models.py:1813 msgid "Importer - Regular expression" msgstr "" -#: models.py:1783 +#: models.py:1814 msgid "Importer - Regular expressions" msgstr "" -#: models.py:1806 +#: models.py:1837 msgid "Importer - Target" msgstr "" -#: models.py:1807 +#: models.py:1838 msgid "Importer - Targets" msgstr "" -#: models.py:1831 views.py:476 +#: models.py:1862 views.py:518 msgid "True" msgstr "" -#: models.py:1832 views.py:478 +#: models.py:1863 views.py:520 msgid "False" msgstr "" -#: models.py:1851 +#: models.py:1882 msgid "Is set" msgstr "" -#: models.py:1858 +#: models.py:1889 msgid "Importer - Target key" msgstr "" -#: models.py:1859 +#: models.py:1890 msgid "Importer - Targets keys" msgstr "" -#: models.py:1911 models.py:2571 models.py:2582 +#: models.py:1942 models.py:2633 models.py:2646 msgid "Format" msgstr "" -#: models.py:1912 models.py:2674 +#: models.py:1943 models.py:2738 msgid "Operation type" msgstr "" -#: models.py:1913 +#: models.py:1944 msgid "Period" msgstr "" -#: models.py:1914 +#: models.py:1945 msgid "Report state" msgstr "" -#: models.py:1915 +#: models.py:1946 msgid "Unit" msgstr "" -#: models.py:1916 +#: models.py:1947 msgid "Material" msgstr "" -#: models.py:1918 +#: models.py:1949 msgid "Conservatory state" msgstr "" -#: models.py:1919 +#: models.py:1950 msgid "Preservation type" msgstr "" -#: models.py:1920 +#: models.py:1951 msgid "Object type" msgstr "" -#: models.py:1922 +#: models.py:1953 msgid "Identification type" msgstr "" -#: models.py:1924 +#: models.py:1955 msgid "Context record relation type" msgstr "" -#: models.py:1925 models.py:2565 +#: models.py:1956 models.py:2625 msgid "Support type" msgstr "" -#: models.py:1931 +#: models.py:1962 msgid "Integer" msgstr "" -#: models.py:1932 +#: models.py:1963 msgid "Float" msgstr "" -#: models.py:1933 +#: models.py:1964 msgid "String" msgstr "" -#: models.py:1934 templates/sheet_ope.html:86 +#: models.py:1965 templates/sheet_ope.html:86 msgid "Date" msgstr "" -#: models.py:1936 templates/sheet_ope.html:61 templates/sheet_ope.html.py:83 +#: models.py:1967 templates/sheet_ope.html:61 templates/sheet_ope.html.py:83 #: templates/ishtar/dashboards/dashboard_main_detail.html:126 msgid "Year" msgstr "" -#: models.py:1937 +#: models.py:1968 msgid "String to boolean" msgstr "" -#: models.py:1938 +#: models.py:1969 msgctxt "filesystem" msgid "File" msgstr "" -#: models.py:1939 +#: models.py:1970 msgid "Unknow type" msgstr "" -#: models.py:1955 +#: models.py:1986 msgid "4 digit year. e.g.: \"2015\"" msgstr "" -#: models.py:1956 +#: models.py:1987 msgid "4 digit year/month/day. e.g.: \"2015/02/04\"" msgstr "" -#: models.py:1957 +#: models.py:1988 msgid "Day/month/4 digit year. e.g.: \"04/02/2015\"" msgstr "" -#: models.py:1967 +#: models.py:1998 msgid "Options" msgstr "" -#: models.py:1969 +#: models.py:2000 msgid "Split character(s)" msgstr "" -#: models.py:1973 +#: models.py:2004 msgid "Importer - Formater type" msgstr "" -#: models.py:1974 +#: models.py:2005 msgid "Importer - Formater types" msgstr "" -#: models.py:2021 templates/ishtar/dashboards/dashboard_main_detail.html:63 +#: models.py:2052 templates/ishtar/dashboards/dashboard_main_detail.html:63 msgid "Created" msgstr "" -#: models.py:2022 +#: models.py:2053 msgid "Analyse in progress" msgstr "" -#: models.py:2023 +#: models.py:2054 msgid "Analysed" msgstr "" -#: models.py:2024 +#: models.py:2055 msgid "Import pending" msgstr "" -#: models.py:2025 +#: models.py:2056 msgid "Import in progress" msgstr "" -#: models.py:2026 +#: models.py:2057 msgid "Finished with errors" msgstr "" -#: models.py:2027 +#: models.py:2058 msgid "Finished" msgstr "" -#: models.py:2028 +#: models.py:2059 msgid "Archived" msgstr "" -#: models.py:2040 +#: models.py:2071 msgid "Imported file" msgstr "" -#: models.py:2043 +#: models.py:2074 msgid "Associated images (zip file)" msgstr "" -#: models.py:2045 +#: models.py:2076 msgid "Encoding" msgstr "" -#: models.py:2047 +#: models.py:2078 msgid "Skip lines" msgstr "" -#: models.py:2048 templates/ishtar/import_list.html:47 +#: models.py:2079 templates/ishtar/import_list.html:47 msgid "Error file" msgstr "" -#: models.py:2051 +#: models.py:2082 msgid "Result file" msgstr "" -#: models.py:2054 templates/ishtar/import_list.html:53 +#: models.py:2085 templates/ishtar/import_list.html:53 msgid "Match file" msgstr "" -#: models.py:2060 +#: models.py:2091 msgid "Conservative import" msgstr "" -#: models.py:2065 +#: models.py:2096 msgid "End date" msgstr "" -#: models.py:2067 +#: models.py:2098 msgid "Remaining seconds" msgstr "" -#: models.py:2072 +#: models.py:2103 msgid "Import" msgstr "" -#: models.py:2089 +#: models.py:2120 msgid "Analyse" msgstr "" -#: models.py:2091 models.py:2094 +#: models.py:2122 models.py:2125 msgid "Re-analyse" msgstr "" -#: models.py:2092 +#: models.py:2123 msgid "Launch import" msgstr "" -#: models.py:2095 +#: models.py:2126 msgid "Re-import" msgstr "" -#: models.py:2096 +#: models.py:2127 msgid "Archive" msgstr "" -#: models.py:2098 +#: models.py:2129 msgid "Unarchive" msgstr "" -#: models.py:2232 +#: models.py:2263 msgid "Organizations" msgstr "" -#: models.py:2234 +#: models.py:2265 msgid "Can view all Organizations" msgstr "" -#: models.py:2235 +#: models.py:2266 msgid "Can view own Organization" msgstr "" -#: models.py:2236 +#: models.py:2267 msgid "Can add own Organization" msgstr "" -#: models.py:2238 +#: models.py:2269 msgid "Can change own Organization" msgstr "" -#: models.py:2240 +#: models.py:2271 msgid "Can delete own Organization" msgstr "" -#: models.py:2275 +#: models.py:2306 msgid "Groups" msgstr "" -#: models.py:2280 +#: models.py:2311 msgid "Person types" msgstr "" -#: models.py:2286 +#: models.py:2319 msgid "Title type" msgstr "" -#: models.py:2287 +#: models.py:2320 msgid "Title types" msgstr "" -#: models.py:2294 +#: models.py:2329 msgid "Mr" msgstr "" -#: models.py:2295 +#: models.py:2330 msgid "Miss" msgstr "" -#: models.py:2296 +#: models.py:2331 msgid "Mr and Mrs" msgstr "" -#: models.py:2297 +#: models.py:2332 msgid "Mrs" msgstr "" -#: models.py:2298 +#: models.py:2333 msgid "Doctor" msgstr "" -#: models.py:2316 +#: models.py:2351 msgid "Contact type" msgstr "" -#: models.py:2319 models.py:2368 +#: models.py:2354 models.py:2418 msgid "Types" msgstr "" -#: models.py:2322 +#: models.py:2357 msgid "Is attached to" msgstr "" -#: models.py:2327 +#: models.py:2362 msgid "Persons" msgstr "" -#: models.py:2329 +#: models.py:2364 msgid "Can view all Persons" msgstr "" -#: models.py:2330 +#: models.py:2365 msgid "Can view own Person" msgstr "" -#: models.py:2331 +#: models.py:2366 msgid "Can add own Person" msgstr "" -#: models.py:2332 +#: models.py:2367 msgid "Can change own Person" msgstr "" -#: models.py:2333 +#: models.py:2368 msgid "Can delete own Person" msgstr "" -#: models.py:2484 +#: models.py:2533 +msgid "Advanced shortcut menu" +msgstr "" + +#: models.py:2536 msgid "Ishtar user" msgstr "" -#: models.py:2485 +#: models.py:2537 msgid "Ishtar users" msgstr "" -#: models.py:2528 +#: models.py:2580 msgid "To modify the password use the form in Auth > User" msgstr "" -#: models.py:2534 +#: models.py:2586 msgid "Author types" msgstr "" -#: models.py:2560 +#: models.py:2618 msgid "Source types" msgstr "" -#: models.py:2566 +#: models.py:2626 msgid "Support types" msgstr "" -#: models.py:2572 +#: models.py:2634 msgid "Formats" msgstr "" -#: models.py:2577 +#: models.py:2641 msgid "External ID" msgstr "" -#: models.py:2580 +#: models.py:2644 msgid "Support" msgstr "" -#: models.py:2584 +#: models.py:2648 msgid "Scale" msgstr "" -#: models.py:2598 +#: models.py:2662 msgid "Item number" msgstr "" -#: models.py:2599 +#: models.py:2663 msgid "Ref." msgstr "" -#: models.py:2602 +#: models.py:2666 msgid "Internal ref." msgstr "" -#: models.py:2645 +#: models.py:2709 msgid "Surface (m2)" msgstr "" -#: models.py:2646 templates/sheet_ope.html:46 templates/sheet_ope.html.py:107 +#: models.py:2710 templates/sheet_ope.html:46 templates/sheet_ope.html.py:107 msgid "Localisation" msgstr "" -#: models.py:2671 +#: models.py:2735 msgid "Is preventive" msgstr "" -#: models.py:2675 +#: models.py:2739 msgid "Operation types" msgstr "" -#: models.py:2704 +#: models.py:2768 msgid "Preventive" msgstr "" -#: models.py:2705 +#: models.py:2769 msgid "Research" msgstr "" -#: utils.py:56 +#: utils.py:64 msgid " (...)" msgstr "" -#: utils.py:89 +#: utils.py:97 msgid "Load another random image?" msgstr "" -#: views.py:109 +#: views.py:111 msgid "New person" msgstr "" -#: views.py:117 +#: views.py:119 msgid "Person modification" msgstr "" -#: views.py:132 +#: views.py:134 msgid "Person deletion" msgstr "" -#: views.py:143 +#: views.py:145 msgid "New organization" msgstr "" -#: views.py:150 +#: views.py:152 msgid "Organization modification" msgstr "" -#: views.py:166 +#: views.py:168 msgid "Organization deletion" msgstr "" -#: views.py:173 +#: views.py:175 msgid "Account management" msgstr "" -#: views.py:179 +#: views.py:181 msgid "Account deletion" msgstr "" -#: views.py:210 +#: views.py:233 msgid "Archaeological file" msgstr "" -#: views.py:213 +#: views.py:236 msgid "Context record" msgstr "" -#: views.py:215 +#: views.py:238 msgid "Find" msgstr "" -#: views.py:1105 views.py:1174 +#: views.py:1178 views.py:1247 msgid "Operation not permitted." msgstr "" -#: views.py:1107 +#: views.py:1180 #, python-format msgid "New %s" msgstr "" -#: views.py:1193 views.py:1247 +#: views.py:1266 views.py:1320 msgid "Operations" msgstr "" -#: views.py:1446 templates/ishtar/import_list.html:43 +#: views.py:1519 templates/ishtar/import_list.html:43 msgid "Link unmatched items" msgstr "" -#: views.py:1461 +#: views.py:1534 msgid "Delete import" msgstr "" -#: views.py:1500 +#: views.py:1573 msgid "Merge persons" msgstr "" -#: views.py:1524 +#: views.py:1597 msgid "Select the main person" msgstr "" -#: views.py:1533 +#: views.py:1606 msgid "Merge organization" msgstr "" -#: views.py:1543 +#: views.py:1616 msgid "Select the main organization" msgstr "" -#: views.py:1583 views.py:1599 +#: views.py:1656 views.py:1672 msgid "Corporation manager" msgstr "" @@ -1514,28 +1518,36 @@ msgid "The %(app_name)s team" msgstr "" #: templates/base.html:41 -msgid "Logged in" +msgid "Searches in the shortcut menu deals with all items." msgstr "" #: templates/base.html:42 +msgid "Searches in the shortcut menu deals with only your items." +msgstr "" + +#: templates/base.html:49 +msgid "Logged in" +msgstr "" + +#: templates/base.html:50 msgid "Log out" msgstr "" -#: templates/base.html:43 +#: templates/base.html:51 msgid "Change password" msgstr "" -#: templates/base.html:45 templates/registration/activate.html:10 +#: templates/base.html:53 templates/registration/activate.html:10 #: templates/registration/login.html:8 templates/registration/login.html:10 #: templates/registration/password_reset_complete.html:8 msgid "Log in" msgstr "" -#: templates/base.html:51 +#: templates/base.html:59 msgid "Lang" msgstr "" -#: templates/base.html:51 templates/base.html.py:75 templates/welcome.html:8 +#: templates/base.html:59 templates/base.html.py:83 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 @@ -1545,23 +1557,23 @@ msgstr "" msgid ":" msgstr "" -#: templates/base.html:73 +#: templates/base.html:81 msgid "Current items" msgstr "" -#: templates/base.html:107 +#: templates/base.html:115 msgid "Processing..." msgstr "" -#: templates/base.html:108 +#: templates/base.html:116 msgid "This can be long." msgstr "" -#: templates/base.html:109 +#: templates/base.html:117 msgid "Time to take a coffee?" msgstr "" -#: templates/base.html:110 +#: templates/base.html:118 msgid "Time to take another coffee?" msgstr "" @@ -1833,7 +1845,7 @@ msgstr "" msgid "where the magic happens." msgstr "" -#: templates/window.html:38 templates/blocks/JQueryJqGrid.html:25 +#: templates/window.html:40 templates/blocks/JQueryJqGrid.html:25 #: templates/ishtar/manage_basket.html:9 msgid "Add" msgstr "" @@ -2112,14 +2124,50 @@ msgstr "" msgid "Documents associated to finds" msgstr "" -#: templates/ishtar/blocks/shortcut_menu.html:6 +#: templates/ishtar/blocks/advanced_shortcut_menu.html:7 +#: templates/ishtar/blocks/shortcut_menu.html:7 +msgid "" +"Simple menu limited to your own items. Be careful only the last 100 items " +"are displayed." +msgstr "" + +#: templates/ishtar/blocks/advanced_shortcut_menu.html:7 +#: templates/ishtar/blocks/shortcut_menu.html:7 +msgid "simple" +msgstr "" + +#: templates/ishtar/blocks/advanced_shortcut_menu.html:8 +#: templates/ishtar/blocks/shortcut_menu.html:8 +msgid "Advanced menu." +msgstr "" + +#: templates/ishtar/blocks/advanced_shortcut_menu.html:8 +#: templates/ishtar/blocks/shortcut_menu.html:8 +msgid "advanced" +msgstr "" + +#: templates/ishtar/blocks/advanced_shortcut_menu.html:11 +#: templates/ishtar/blocks/shortcut_menu.html:10 msgid "" "Pin an item in order to constrain default searches with this item. By " "default only your items are displayed. New created and modified items are " "auto-pin." msgstr "" -#: templates/ishtar/blocks/shortcut_menu.html:18 +#: templates/ishtar/blocks/advanced_shortcut_menu.html:13 +msgid "Search within my items" +msgstr "" + +#: templates/ishtar/blocks/advanced_shortcut_menu.html:14 +msgid "Search within all items" +msgstr "" + +#: templates/ishtar/blocks/advanced_shortcut_menu.html:17 +msgid "Refresh menu" +msgstr "" + +#: templates/ishtar/blocks/advanced_shortcut_menu.html:28 +#: templates/ishtar/blocks/shortcut_menu.html:22 msgid "Unpin" msgstr "" diff --git a/ishtar_common/migrations/0063_auto__add_field_ishtaruser_advanced_shortcut_menu.py b/ishtar_common/migrations/0063_auto__add_field_ishtaruser_advanced_shortcut_menu.py new file mode 100644 index 000000000..19a076913 --- /dev/null +++ b/ishtar_common/migrations/0063_auto__add_field_ishtaruser_advanced_shortcut_menu.py @@ -0,0 +1,464 @@ +# -*- 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 'IshtarUser.advanced_shortcut_menu' + db.add_column('ishtar_common_ishtaruser', 'advanced_shortcut_menu', + self.gf('django.db.models.fields.BooleanField')(default=False), + keep_default=False) + + + def backwards(self, orm): + # Deleting field 'IshtarUser.advanced_shortcut_menu' + db.delete_column('ishtar_common_ishtaruser', 'advanced_shortcut_menu') + + + models = { + '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': {'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': {'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'}), + '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': {'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.formatertype': { + 'Meta': {'ordering': "('formater_type', 'options')", 'unique_together': "(('formater_type', 'options', 'many_split'),)", 'object_name': 'FormaterType'}, + 'formater_type': ('django.db.models.fields.CharField', [], {'max_length': '20'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'many_split': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), + 'options': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}) + }, + 'ishtar_common.globalvar': { + 'Meta': {'ordering': "['slug']", 'object_name': 'GlobalVar'}, + 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}), + 'value': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}) + }, + 'ishtar_common.historicalorganization': { + 'Meta': {'ordering': "('-history_date', '-history_id')", 'object_name': 'HistoricalOrganization'}, + '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_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'}), + '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_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + '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.historicalperson': { + 'Meta': {'ordering': "('-history_date', '-history_id')", 'object_name': 'HistoricalPerson'}, + '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_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + '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_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'}), + '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'}), + '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_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + 'town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}) + }, + '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': '100', 'null': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'imported_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}), + 'imported_images': ('django.db.models.fields.files.FileField', [], {'max_length': '100', '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': '100', 'null': 'True', 'blank': 'True'}), + 'result_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', '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.importercolumn': { + 'Meta': {'ordering': "('importer_type', 'col_number')", 'unique_together': "(('importer_type', 'col_number'),)", 'object_name': 'ImporterColumn'}, + 'col_number': ('django.db.models.fields.IntegerField', [], {'default': '1'}), + 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'importer_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'columns'", 'to': "orm['ishtar_common.ImporterType']"}), + 'regexp_pre_filter': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Regexp']", 'null': 'True', 'blank': 'True'}), + 'required': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) + }, + 'ishtar_common.importerdefault': { + 'Meta': {'object_name': 'ImporterDefault'}, + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'importer_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'defaults'", 'to': "orm['ishtar_common.ImporterType']"}), + 'target': ('django.db.models.fields.CharField', [], {'max_length': '500'}) + }, + 'ishtar_common.importerdefaultvalues': { + 'Meta': {'object_name': 'ImporterDefaultValues'}, + 'default_target': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'default_values'", 'to': "orm['ishtar_common.ImporterDefault']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'target': ('django.db.models.fields.CharField', [], {'max_length': '500'}), + 'value': ('django.db.models.fields.CharField', [], {'max_length': '500'}) + }, + 'ishtar_common.importerduplicatefield': { + 'Meta': {'object_name': 'ImporterDuplicateField'}, + 'column': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'duplicate_fields'", 'to': "orm['ishtar_common.ImporterColumn']"}), + 'concat': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'concat_str': ('django.db.models.fields.CharField', [], {'max_length': '5', 'null': 'True', 'blank': 'True'}), + 'field_name': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), + 'force_new': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) + }, + 'ishtar_common.importertype': { + 'Meta': {'object_name': 'ImporterType'}, + 'associated_models': ('django.db.models.fields.CharField', [], {'max_length': '200'}), + '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.importtarget': { + 'Meta': {'object_name': 'ImportTarget'}, + 'column': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'targets'", 'to': "orm['ishtar_common.ImporterColumn']"}), + 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'concat': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'concat_str': ('django.db.models.fields.CharField', [], {'max_length': '5', 'null': 'True', 'blank': 'True'}), + 'force_new': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'formater_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.FormaterType']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'regexp_filter': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Regexp']", 'null': 'True', 'blank': 'True'}), + 'target': ('django.db.models.fields.CharField', [], {'max_length': '500'}) + }, + 'ishtar_common.ishtarsiteprofile': { + 'Meta': {'ordering': "['label']", 'object_name': 'IshtarSiteProfile'}, + 'active': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'base_find_external_id': ('django.db.models.fields.TextField', [], {'default': "'{context_record__external_id}-{label}'"}), + 'context_record': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'context_record_external_id': ('django.db.models.fields.TextField', [], {'default': "'{parcel__external_id}-{label}'"}), + 'currency': ('django.db.models.fields.CharField', [], {'default': "u'\\u20ac'", 'max_length': "'5'"}), + 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'file_external_id': ('django.db.models.fields.TextField', [], {'default': "'{year}-{numeric_reference}'"}), + 'files': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'find': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'find_external_id': ('django.db.models.fields.TextField', [], {'default': "'{get_first_base_find__context_record__external_id}-{label}'"}), + 'homepage': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'label': ('django.db.models.fields.TextField', [], {}), + 'parcel_external_id': ('django.db.models.fields.TextField', [], {'default': "'{associated_file__external_id}{operation__code_patriarche}-{town__numero_insee}-{section}{parcel_number}'"}), + 'person_raw_name': ('django.db.models.fields.TextField', [], {'default': "'{name|upper} {surname}'"}), + 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}), + 'warehouse': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) + }, + '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.itemkey': { + 'Meta': {'object_name': 'ItemKey'}, + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'importer': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Import']", 'null': 'True', 'blank': 'True'}), + 'key': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {}) + }, + '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.regexp': { + 'Meta': {'object_name': 'Regexp'}, + 'description': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'regexp': ('django.db.models.fields.CharField', [], {'max_length': '500'}) + }, + 'ishtar_common.sourcetype': { + 'Meta': {'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.targetkey': { + 'Meta': {'unique_together': "(('target', 'key', 'associated_user', 'associated_import'),)", 'object_name': 'TargetKey'}, + 'associated_import': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Import']", 'null': 'True', 'blank': 'True'}), + 'associated_user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.IshtarUser']", 'null': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_set': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'key': ('django.db.models.fields.TextField', [], {}), + 'target': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'keys'", 'to': "orm['ishtar_common.ImportTarget']"}), + 'value': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}) + }, + '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 = ['ishtar_common']
\ No newline at end of file diff --git a/ishtar_common/models.py b/ishtar_common/models.py index 95d995a91..ba3d51172 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -235,7 +235,7 @@ class OwnPerms: return cls.objects.filter(query).count() @classmethod - def get_owns(cls, user, replace_query={}): + def get_owns(cls, user, replace_query={}, limit=None): """ Get Own items """ @@ -252,7 +252,10 @@ class OwnPerms: q = cls.objects.filter(query) if replace_query: q = cls.objects.filter(**replace_query) - items += list(q.order_by(*cls._meta.ordering).all()) + if limit: + items += list(q.order_by('-pk')[:limit]) + else: + items += list(q.order_by(*cls._meta.ordering).all()) return items @@ -2526,6 +2529,8 @@ class IshtarUser(User): 'person__attached_to') person = models.ForeignKey(Person, verbose_name=_(u"Person"), unique=True, related_name='ishtaruser') + advanced_shortcut_menu = models.BooleanField( + _(u"Advanced shortcut menu"), default=False) class Meta: verbose_name = _(u"Ishtar user") diff --git a/ishtar_common/static/js/ishtar.js b/ishtar_common/static/js/ishtar.js index fecefe0a9..6017aed64 100644 --- a/ishtar_common/static/js/ishtar.js +++ b/ishtar_common/static/js/ishtar.js @@ -23,8 +23,6 @@ beforeSend: function(xhr, settings) { } }}); -var shortcut_url = ''; - function manage_async_link(event){ event.preventDefault(); var url = $(this).attr('href'); @@ -38,10 +36,36 @@ function manage_async_link(event){ function get_next_table_id(){} function get_previous_table_id(){} +var shortcut_url = ''; +var advanced_menu = 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/'; + + function init_shortcut_menu(html){ $("#progress").hide(); $("#context_menu").html(html); $(".chosen-select").chosen(); + if (advanced_menu) { + init_advanced_shortcut_fields(); + } else { + init_shortcut_fields(); + } + $("#short-menu-advanced").click(function(){ + $.get(url_path + activate_advanced_url, + load_shortcut_menu + ); + }); + $("#short-menu-simple").click(function(){ + $.get(url_path + activate_simple_url, + load_shortcut_menu + ); + }); +} + +function init_shortcut_fields(){ $("#current_file").change(function(){ $.post('/' + url_path + 'update-current-item/', {item:'file', value:$("#current_file").val()}, @@ -68,6 +92,41 @@ function init_shortcut_menu(html){ }); } +function init_advanced_shortcut_fields(){ + $('#id_file-shortcut').change(function(){ + $("#id_select_file-shortcut").attr( + 'title', $('#id_select_file-shortcut').val()); + $.post('/' + url_path + 'update-current-item/', + {item: "file", value:$("#id_file-shortcut").val()}, + load_shortcut_menu + ); + }); + $('#id_operation-shortcut').change(function(){ + $("#id_select_operation-shortcut").attr( + 'title', $('#id_select_operation-shortcut').val()); + $.post('/' + url_path + 'update-current-item/', + {item: "operation", value:$("#id_operation-shortcut").val()}, + load_shortcut_menu + ); + }); + $('#id_contextrecord-shortcut').change(function(){ + $("#id_select_contextrecord-shortcut").attr( + 'title', $('#id_select_contextrecord-shortcut').val()); + $.post('/' + url_path + 'update-current-item/', + {item: "contextrecord", value:$("#id_contextrecord-shortcut").val()}, + load_shortcut_menu + ); + }); + $('#id_find-shortcut').change(function(){ + $("#id_select_find-shortcut").attr( + 'title', $('#id_select_find-shortcut').val()); + $.post('/' + url_path + 'update-current-item/', + {item: "find", value:$("#id_find-shortcut").val()}, + load_shortcut_menu + ); + }); +} + function display_info(msg){ $('#message .information .content').html(msg); $('#message').fadeIn('slow'); @@ -191,7 +250,12 @@ function load_window(url, speed, on_success){ } function load_current_window(url, model_name){ - var id = $("#current_" + model_name).val(); + var id; + if (advanced_menu){ + id = $("#id_" + model_name + "-shortcut").val(); + } else { + id = $("#current_" + model_name).val(); + } if (!id) return; url = url.split('/'); url[url.length - 1] = id; @@ -267,3 +331,24 @@ function show_hide_flex(id){ $(id).hide(); } } + +var activate_all_search_msg = "Searches in the shortcut menu deals with all items."; +var activate_own_search_msg = "Searches in the shortcut menu deals with only your items."; + +function activate_all_search(){ + $('.activate_all_search').removeClass('disabled'); + $('.activate_own_search').addClass('disabled'); + $.get(activate_all_search_url, function(data) { + display_info(activate_all_search_msg); + }); + return false; +} + +function activate_own_search(){ + $('.activate_own_search').removeClass('disabled'); + $('.activate_all_search').addClass('disabled'); + $.get(activate_own_search_url, function(data) { + display_info(activate_own_search_msg); + }); + return false; +} diff --git a/ishtar_common/static/media/style.css b/ishtar_common/static/media/style.css index aab5063e4..8aac9e2a2 100644 --- a/ishtar_common/static/media/style.css +++ b/ishtar_common/static/media/style.css @@ -29,6 +29,16 @@ a, a.remove { color:#D14; } +span.disabled, +a.disabled { + color:#ccc; +} + +span.disabled:hover, +a.disabled:hover { + color:#DB5C7C; +} + .badge, a.add-button, #reset_wizards, @@ -56,6 +66,10 @@ a.add-button, font-family: 'FontAwesome', Arial, Helvetica, sans-serif; } +#context_menu .chosen-select{ + width: 400px; +} + #context_menu option.basket{ color:#000; } @@ -229,6 +243,7 @@ button, input[type=submit], button.submit{ -webkit-border-radius:4px; } +button.btn-selected, button:hover, input[type=submit]:hover{ cursor:pointer; color:#922; @@ -409,6 +424,16 @@ div#language_form_div label{ display:inline; }*/ +.btn-group .btn{ + padding: 0; + margin: 0; +} + +.short-menu-buttons{ + position: absolute; + margin-top: -20px; +} + div#context_menu{ height:110px; margin-right:10px; @@ -418,6 +443,7 @@ div#context_menu{ } div#context_menu fieldset{ + margin-top: 8px; background-color:#f1f2f6; border:0 solid #CCC; -moz-border-radius: 0; @@ -425,13 +451,25 @@ div#context_menu fieldset{ border-radius: 0; } +div#action_current_items{ + display: inline-block; + vertical-align: top; + width: 70px; +} + +div#action_current_items p{ + padding: 0; + margin: 0; + text-align: center; +} + div#context_menu table{ display: inline; vertical-align: top; } div#context_menu .icon{ - padding: 0.6em 0.5em; + padding: 0.2em 0.3em; } div#context_menu ul{ @@ -792,7 +830,9 @@ table.confirm tr.spacer td:last-child{ /* jquery widget customizations */ .ui-autocomplete{ - font-size:0.7em + font-size:0.7em; + z-index:10000 !important; + width:350px; } .ui-autocomplete-loading { diff --git a/ishtar_common/templates/base.html b/ishtar_common/templates/base.html index 695edd758..7101ed7de 100644 --- a/ishtar_common/templates/base.html +++ b/ishtar_common/templates/base.html @@ -32,6 +32,14 @@ {% endblock %} <script type='text/javascript'> var shortcut_url = '{% url "shortcut-menu" %}'; + var get_file_url = '{% url "get-file-shortcut" %}'; + var get_operation_url = '{% url "get-operation-shortcut" %}'; + var get_contextrecord_url = '{% url "get-contextrecord-shortcut" %}'; + var get_find_url = '{% url "get-find-shortcut" %}'; + var activate_all_search_url = '{% url "activate-all-search" %}'; + var activate_own_search_url = '{% url "activate-own-search" %}'; + var activate_all_search_msg = "{% trans 'Searches in the shortcut menu deals with all items.' %}"; + var activate_own_search_msg = "{% trans 'Searches in the shortcut menu deals with only your items.' %}"; </script> </head> <body{% if current_theme%} id='{{current_theme}}'{%endif%}> @@ -50,7 +58,7 @@ {% csrf_token %} <label for='language_selector'>{% trans "Lang" %}{% trans ":"%} </label> <select name="language" id='language_selector'> - <option value="">-------</option> + <option value="">----------</option> {% for lang in LANGUAGES %} <option value="{{ lang.0 }}"{% ifequal LANGUAGE_CODE lang.0 %} selected='selected'{% endifequal %}>{{ lang.1 }}</option> {% endfor %} diff --git a/ishtar_common/templates/ishtar/blocks/advanced_shortcut_menu.html b/ishtar_common/templates/ishtar/blocks/advanced_shortcut_menu.html new file mode 100644 index 000000000..581381e82 --- /dev/null +++ b/ishtar_common/templates/ishtar/blocks/advanced_shortcut_menu.html @@ -0,0 +1,38 @@ +{% load i18n %} +{% load url from future%} +{% if menu %} +<form method="post" action="{% url 'update-current-item' %}"> +<fieldset> +<div class="short-menu-buttons btn-group" role="group"> + <button type="button" class="btn" id='short-menu-simple' title="{% trans 'Simple menu limited to your own items. Be careful only the last 100 items are displayed.' %}">{% trans "simple" %}</button> + <button type="button" class="btn btn-selected" id='short-menu-advanced' title="{% trans 'Advanced menu.' %}">{% trans "advanced" %}</button> +</div> +<div id='action_current_items'> +<p><i class="icon fa fa-thumb-tack fa-2x" aria-hidden="true" title="{% trans 'Pin an item in order to constrain default searches with this item. By default only your items are displayed. New created and modified items are auto-pin.' %}"></i></p> +<p> +<a href='' onclick='return activate_own_search();' class='activate_own_search{% if SHORTCUT_SEARCH == 'all' %} disabled{% endif %}'><i class="icon fa fa-user" aria-hidden="true" title="{% trans 'Search within my items' %}"></i></a> +<a href='' class='activate_all_search{% if SHORTCUT_SEARCH == 'own' %} disabled{% endif %}' onclick='return activate_all_search();'><i class="icon fa fa-users" aria-hidden="true" title="{% trans 'Search within all items' %}"></i></a> +</p> +<p> +<a href='' onclick='return load_shortcut_menu();' class='disabled'><i class="icon fa fa-2x fa-refresh" aria-hidden="true" title="{% trans 'Refresh menu' %}"></i></a> +</p> +</div> +<table id='current_items'> +{% for lbl, model_name, current, widget in menu %} +<tr> + <td><label for="current_{{model_name}}">{{lbl}}</label></td> + <td> + {{widget|safe}} + </td>{% with 'show-'|add:model_name as model_url%} + <td><a href='#' onclick='load_current_window("{% url model_url current %}", "{{model_name}}");' class='display_details'><i class="fa fa-info-circle" aria-hidden="true"></i></a></td> + <td><span class='disabled pin-action' onclick='$.get("{% url 'unpin' model_name %}", function(){load_shortcut_menu();});' title="{% trans 'Unpin' %}"> + <i class="fa fa-times"></i> + </span></td> + {% endwith %} +</tr> +{% endfor %} +</table> +</fieldset> +</form> +<script type='text/javascript'>var advanced_menu = true;</script> +{% endif %} diff --git a/ishtar_common/templates/ishtar/blocks/shortcut_menu.html b/ishtar_common/templates/ishtar/blocks/shortcut_menu.html index c1100ae01..5a0463c30 100644 --- a/ishtar_common/templates/ishtar/blocks/shortcut_menu.html +++ b/ishtar_common/templates/ishtar/blocks/shortcut_menu.html @@ -3,6 +3,10 @@ {% if current_menu %} <form method="post" action="{% url 'update-current-item' %}"> <fieldset> +<div class="short-menu-buttons btn-group" role="group"> + <button type="button" class="btn btn-selected" id='short-menu-simple' title="{% trans 'Simple menu limited to your own items. Be careful only the last 100 items are displayed.' %}">{% trans "simple" %}</button> + <button type="button" class="btn" id='short-menu-advanced' title="{% trans 'Advanced menu.' %}">{% trans "advanced" %}</button> +</div> <i class="icon fa fa-thumb-tack fa-2x" aria-hidden="true" title="{% trans 'Pin an item in order to constrain default searches with this item. By default only your items are displayed. New created and modified items are auto-pin.' %}"></i> <table id='current_items'> {% for lbl, model_name, main_cls, items in current_menu %} @@ -24,4 +28,5 @@ </table> </fieldset> </form> +<script type='text/javascript'>var advanced_menu = false;</script> {% endif %} diff --git a/ishtar_common/urls.py b/ishtar_common/urls.py index 27078dd9e..22a09a052 100644 --- a/ishtar_common/urls.py +++ b/ishtar_common/urls.py @@ -192,6 +192,14 @@ urlpatterns += patterns( views.OrgaManualMergeItems.as_view(), name='orga_manual_merge_items'), url(r'reset/$', 'reset_wizards', name='reset_wizards'), + url(r'activate-all-search/$', 'activate_all_search', + name='activate-all-search'), + url(r'activate-own-search/$', 'activate_own_search', + name='activate-own-search'), + url(r'activate-advanced-menu/$', 'activate_advanced_shortcut_menu', + name='activate-advanced-menu'), + url(r'activate-simple-menu/$', 'activate_simple_shortcut_menu', + name='activate-simple-menu'), url(r'(?P<action_slug>' + actions + r')/$', 'action', name='action'), ) diff --git a/ishtar_common/views.py b/ishtar_common/views.py index 5f3e80c77..3406cf7af 100644 --- a/ishtar_common/views.py +++ b/ishtar_common/views.py @@ -55,6 +55,7 @@ from xhtml2odt import xhtml2odt from menus import menu from archaeological_files.models import File +from archaeological_operations.models import Operation from archaeological_context_records.models import ContextRecord from archaeological_finds.models import Find @@ -62,6 +63,7 @@ from archaeological_operations.forms import DashboardForm as DashboardFormOpe from archaeological_files.forms import DashboardForm as DashboardFormFile from ishtar_common.forms import FinalForm, FinalDeleteForm +from ishtar_common.widgets import JQueryAutoComplete from ishtar_common.utils import get_random_item_image_link, shortify from ishtar_common import forms_common as forms from ishtar_common import wizards @@ -198,12 +200,33 @@ def get_autocomplete_generic(model, extra={'available': True}): return func -def shortcut_menu(request): - from archaeological_operations.models import Operation - from archaeological_files.models import File - from archaeological_context_records.models import ContextRecord - from archaeological_finds.models import Find +def activate_all_search(request): + request.session['SHORTCUT_SEARCH'] = 'all' + return HttpResponse('OK', mimetype='text/plain') + + +def activate_own_search(request): + request.session['SHORTCUT_SEARCH'] = 'own' + return HttpResponse('OK', mimetype='text/plain') + + +def activate_advanced_shortcut_menu(request): + if not hasattr(request.user, 'ishtaruser'): + return HttpResponse('KO', mimetype='text/plain') + request.user.ishtaruser.advanced_shortcut_menu = True + request.user.ishtaruser.save() + return HttpResponse('OK', mimetype='text/plain') + + +def activate_simple_shortcut_menu(request): + if not hasattr(request.user, 'ishtaruser'): + return HttpResponse('KO', mimetype='text/plain') + request.user.ishtaruser.advanced_shortcut_menu = False + request.user.ishtaruser.save() + return HttpResponse('OK', mimetype='text/plain') + +def shortcut_menu(request): profile = get_current_profile() CURRENT_ITEMS = [] if profile.files: @@ -213,6 +236,27 @@ def shortcut_menu(request): CURRENT_ITEMS.append((_(u"Context record"), ContextRecord)) if profile.find: CURRENT_ITEMS.append((_(u"Find"), Find)) + 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'} + + for lbl, model in CURRENT_ITEMS: + model_name = model.SLUG + current = model_name in request.session \ + and request.session[model_name] + + dct['menu'].append(( + lbl, model_name, current or 0, + JQueryAutoComplete( + reverse('get-' + model.SLUG + '-shortcut'), + model).render( + model.SLUG + '-shortcut', value=current, + attrs={'id': 'current_' + model.SLUG}))) + return render_to_response( + 'ishtar/blocks/advanced_shortcut_menu.html', + dct, context_instance=RequestContext(request)) dct = {'current_menu': []} current_selected_item = None for lbl, model in CURRENT_ITEMS: @@ -222,7 +266,8 @@ def shortcut_menu(request): current = model_name in request.session and request.session[model_name] items = [] for item in model.get_owns(request.user, - menu_filtr=current_selected_item): + menu_filtr=current_selected_item, + limit=100): pk = unicode(item.pk) if item.IS_BASKET: pk = "basket-" + pk @@ -249,10 +294,6 @@ def shortcut_menu(request): def get_current_items(request): - from archaeological_files.models import File - from archaeological_operations.models import Operation - from archaeological_context_records.models import ContextRecord - from archaeological_finds.models import Find currents = {} for key, model in (('file', File), ('operation', Operation), @@ -290,6 +331,7 @@ def update_current_item(request, item_type=None, pk=None): request.session[item_type] = request.POST['value'] else: request.session[item_type] = str(pk) + request.session['SHORTCUT_SEARCH'] = 'all' currents = get_current_items(request) # reinit when descending item are not relevant @@ -516,6 +558,9 @@ def get_item(model, func_name, default_name, extra_request_keys=[], break # max right reach if force_own: own = True + 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') @@ -544,6 +589,8 @@ def get_item(model, func_name, default_name, extra_request_keys=[], request_items = request.method == 'POST' and request.POST \ or request.GET dct = base_request.copy() + if full == 'shortcut': + dct['cached_label__icontains'] = request.GET.get('term', None) and_reqs, or_reqs = [], [] try: old = 'old' in request_items and int(request_items['old']) @@ -577,7 +624,7 @@ def get_item(model, func_name, default_name, extra_request_keys=[], q = Q(**{req_key: val}) reqs = reqs | q and_reqs.append(reqs) - if 'submited' not in request_items: + if 'submited' not in request_items and full != 'shortcut': # default search # an item is selected in the default menu if default_name in request.session and \ @@ -706,6 +753,22 @@ def get_item(model, func_name, default_name, extra_request_keys=[], for and_req in and_reqs: query = query & and_req + # manage hierarchic in shortcut menu + if full == 'shortcut': + ASSOCIATED_ITEMS = { + Operation: (File, 'associated_file__pk'), + ContextRecord: (Operation, 'operation__pk'), + Find: (ContextRecord, 'base_finds__context_record__pk'), + } + if model in ASSOCIATED_ITEMS: + upper_model, upper_key = ASSOCIATED_ITEMS[model] + model_name = upper_model.SLUG + current = model_name in request.session \ + and request.session[model_name] + if current: + dct = {upper_key: current} + query = query & Q(**dct) + items = model.objects.filter(query).distinct() # print(items.query) q = request_items.get('sidx') @@ -731,6 +794,8 @@ def get_item(model, func_name, default_name, extra_request_keys=[], for idx, col in enumerate(table_cols): if col in model.CONTEXTUAL_TABLE_COLS[contxt]: table_cols[idx] = model.CONTEXTUAL_TABLE_COLS[contxt][col] + if full == 'shortcut': + table_cols = ['cached_label'] # manage sort tables manual_sort_key = None @@ -773,6 +838,9 @@ def get_item(model, func_name, default_name, extra_request_keys=[], pass start = (page_nb - 1) * row_nb end = page_nb * row_nb + if full == 'shortcut': + start = 0 + end = 20 items_nb = items.count() if manual_sort_key: items = items.all() @@ -887,13 +955,18 @@ 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': + res['value'] = res.pop('cached_label') rows.append(res) - data = json.dumps({ - "records": items_nb, - "rows": rows, - "page": page_nb, - "total": (items_nb / row_nb + 1) if row_nb else items_nb, - }) + if full == 'shortcut': + data = json.dumps(rows) + else: + data = json.dumps({ + "records": items_nb, + "rows": rows, + "page": page_nb, + "total": (items_nb / row_nb + 1) if row_nb else items_nb, + }) return HttpResponse(data, mimetype='text/plain') elif data_type == "csv": response = HttpResponse(mimetype='text/csv') |
