[Mpuls-commits] r24 - in trunk/waskaweb: controllers i18n i18n/de/LC_MESSAGES model public/styles templates/casemanagement
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Wed Aug 13 15:06:40 CEST 2008
Author: thomas
Date: 2008-08-13 15:06:39 +0200 (Wed, 13 Aug 2008)
New Revision: 24
Modified:
trunk/waskaweb/controllers/administration.py
trunk/waskaweb/controllers/case_overview.py
trunk/waskaweb/controllers/document.py
trunk/waskaweb/i18n/de/LC_MESSAGES/waskaweb.po
trunk/waskaweb/i18n/waskaweb.pot
trunk/waskaweb/model/case.py
trunk/waskaweb/public/styles/all.css
trunk/waskaweb/public/styles/color3.css
trunk/waskaweb/public/styles/screen.css
trunk/waskaweb/templates/casemanagement/overview.mako
Log:
Load 311324c508e9 into trunk.
Modified: trunk/waskaweb/controllers/administration.py
===================================================================
--- trunk/waskaweb/controllers/administration.py 2008-08-13 13:06:15 UTC (rev 23)
+++ trunk/waskaweb/controllers/administration.py 2008-08-13 13:06:39 UTC (rev 24)
@@ -155,7 +155,7 @@
# he is an editor then raise a dialog which allows the user to
# transfer the cases.
overview = CaseOverview()
- overview.search('bearbeiter:%s' % uo.id)
+ overview.search('editor:%s;state:1;state:2;state:3;state:4;state:5' % uo.id)
if overview.getDatasets():
list = UserListObject()
filter = [u.id for u in list.getAdminList()]
Modified: trunk/waskaweb/controllers/case_overview.py
===================================================================
--- trunk/waskaweb/controllers/case_overview.py 2008-08-13 13:06:15 UTC (rev 23)
+++ trunk/waskaweb/controllers/case_overview.py 2008-08-13 13:06:39 UTC (rev 24)
@@ -52,7 +52,7 @@
user = session['USER_AUTHORIZED']
# editor or standin setting will be ignored for admin users. They will
# be overwritten in case-controller
- default_search_options = ['editor:%s' % user.id, 'state:1']
+ default_search_options = ['own:%s' % user.id, 'state:1']
c.cases.search(";".join(default_search_options))
c.cases.sortByLastname()
c.form_defaults = {'show_own': 1, 'show_other': 0, 'show_open': 1, 'show_closed': 0, 'show_markdelete': 0}
@@ -72,7 +72,7 @@
# editor or standin setting will be ignored for admin users. They will
# be overwritten in case-controller
if c.form_result.get('show_own') == '1':
- search_str.append('editor:%s' % user.id)
+ search_str.append('own:%s' % user.id)
if c.form_result.get('show_other') == '1':
search_str.append('standin:%s' % user.id)
Modified: trunk/waskaweb/controllers/document.py
===================================================================
--- trunk/waskaweb/controllers/document.py 2008-08-13 13:06:15 UTC (rev 23)
+++ trunk/waskaweb/controllers/document.py 2008-08-13 13:06:39 UTC (rev 24)
@@ -159,8 +159,8 @@
return self.globalOverview()
else:
c.context = "../main.mako"
- c.confirm_for = u'Löschen Dokument'
- c.question = u'Wollen Sie das Dokument wirklich löschen und die Daten unwiederbringlich verlieren?'
+ c.confirm_for = u'Dokument wirklich löschen?'
+ c.question = u'Wollen Sie das Dokument wirklich löschen und die Daten unwiederbringlich verlieren?'
c.url_yes = "/document/globalDelete/%d/1" % id
c.url_no = "/document/globalOverview/"
return render('/documents/dialogs/confirm.mako')
Modified: trunk/waskaweb/i18n/de/LC_MESSAGES/waskaweb.po
===================================================================
--- trunk/waskaweb/i18n/de/LC_MESSAGES/waskaweb.po 2008-08-13 13:06:15 UTC (rev 23)
+++ trunk/waskaweb/i18n/de/LC_MESSAGES/waskaweb.po 2008-08-13 13:06:39 UTC (rev 24)
@@ -7,7 +7,7 @@
msgstr ""
"Project-Id-Version: waskaweb 0.0.0\n"
"Report-Msgid-Bugs-To: EMAIL at ADDRESS\n"
-"POT-Creation-Date: 2008-01-24 14:49+0100\n"
+"POT-Creation-Date: 2008-01-25 10:39+0100\n"
"PO-Revision-Date: 2007-10-14 20:33+0200\n"
"Last-Translator: Torsten Irländer<torsten.irlaender at intevation.de>\n"
"Language-Team: de <LL at li.org>\n"
@@ -139,27 +139,27 @@
msgid "cm_rg_aid_overview_legend_new_offer"
msgstr "Neues Angebot hinzufügen"
-#: waskaweb/model/case.py:871
+#: waskaweb/model/case.py:848
#: waskaweb/templates/casemanagement/caselist.mako:37
-#: waskaweb/templates/casemanagement/caselist.mako:72
+#: waskaweb/templates/casemanagement/caselist.mako:74
msgid "case_state_label_open"
msgstr "Offen"
-#: waskaweb/model/case.py:872
+#: waskaweb/model/case.py:849
#: waskaweb/templates/casemanagement/caselist.mako:39
-#: waskaweb/templates/casemanagement/caselist.mako:74
+#: waskaweb/templates/casemanagement/caselist.mako:76
msgid "case_state_label_closed"
msgstr "Geschlossen"
-#: waskaweb/model/case.py:873
+#: waskaweb/model/case.py:850
msgid "case_state_label_outstanding_delete"
msgstr "Schwebend gelöscht"
-#: waskaweb/model/case.py:874
+#: waskaweb/model/case.py:851
msgid "case_state_label_outstanding_anon"
msgstr "Schwebend anonymisiert"
-#: waskaweb/model/case.py:875
+#: waskaweb/model/case.py:852
msgid "case_state_label_anon"
msgstr "Anonymisiert"
@@ -280,7 +280,7 @@
#: waskaweb/templates/main.mako:173
msgid "footer_version"
-msgstr "14.01.2008 | Beta 14"
+msgstr "25.01.2008 | Beta 16"
#: waskaweb/templates/main_login.mako:38
#: waskaweb/templates/start/responsible.mako:71
@@ -609,8 +609,8 @@
#: waskaweb/templates/administration/overview_user.mako:36
#: waskaweb/templates/administration/overview_user.mako:46
-#: waskaweb/templates/casemanagement/caselist.mako:43
-#: waskaweb/templates/casemanagement/caselist.mako:78
+#: waskaweb/templates/casemanagement/caselist.mako:45
+#: waskaweb/templates/casemanagement/caselist.mako:82
#: waskaweb/templates/documents/case_overview.mako:42
#: waskaweb/templates/documents/case_overview.mako:51
#: waskaweb/templates/documents/global_overview.mako:39
@@ -622,10 +622,10 @@
#: waskaweb/templates/administration/overview_user.mako:37
#: waskaweb/templates/administration/overview_user.mako:47
-#: waskaweb/templates/casemanagement/caselist.mako:45
-#: waskaweb/templates/casemanagement/caselist.mako:48
-#: waskaweb/templates/casemanagement/caselist.mako:80
-#: waskaweb/templates/casemanagement/caselist.mako:83
+#: waskaweb/templates/casemanagement/caselist.mako:47
+#: waskaweb/templates/casemanagement/caselist.mako:50
+#: waskaweb/templates/casemanagement/caselist.mako:84
+#: waskaweb/templates/casemanagement/caselist.mako:87
#: waskaweb/templates/documents/case_overview.mako:43
#: waskaweb/templates/documents/case_overview.mako:52
#: waskaweb/templates/documents/global_overview.mako:42
@@ -1031,21 +1031,26 @@
msgstr "Aktionen"
#: waskaweb/templates/casemanagement/caselist.mako:31
-#: waskaweb/templates/casemanagement/caselist.mako:66
+#: waskaweb/templates/casemanagement/caselist.mako:68
msgid "cm_overview_img_editor"
msgstr "Bearbeiter"
#: waskaweb/templates/casemanagement/caselist.mako:33
-#: waskaweb/templates/casemanagement/caselist.mako:68
+#: waskaweb/templates/casemanagement/caselist.mako:70
msgid "cm_overview_img_standin"
msgstr "Vertreter"
-#: waskaweb/templates/casemanagement/caselist.mako:46
-#: waskaweb/templates/casemanagement/caselist.mako:81
+#: waskaweb/templates/casemanagement/caselist.mako:41
+#: waskaweb/templates/casemanagement/caselist.mako:78
+msgid "case_state_label_delete"
+msgstr "Gelöscht"
+
+#: waskaweb/templates/casemanagement/caselist.mako:48
+#: waskaweb/templates/casemanagement/caselist.mako:85
msgid "cm_overview_a_restore"
msgstr "Fallakte wiederherstellen"
-#: waskaweb/templates/casemanagement/caselist.mako:93
+#: waskaweb/templates/casemanagement/caselist.mako:97
msgid "cm_overview_tbl_no_data_found"
msgstr "Es wurden keine Datensätze gefunden."
@@ -1563,11 +1568,7 @@
msgstr ""
"Hier wird eine Auflistung der Fälle des angemeldeten Benutzers angezeigt"
-#: waskaweb/templates/casemanagement/overview.mako:17
-msgid "cm_header_search"
-msgstr "Suche"
-
-#: waskaweb/templates/casemanagement/overview.mako:22
+#: waskaweb/templates/casemanagement/overview.mako:21
msgid "cm_form_overview_search_submit"
msgstr "Suchen"
@@ -1726,17 +1727,17 @@
#: waskaweb/templates/documents/dialogs/confirm.mako:5
msgid "doc_np_delete"
-msgstr "Dokument lösschen"
+msgstr "Dokument löschen"
#: waskaweb/templates/documents/dialogs/failed_attachment.mako:6
#: waskaweb/templates/documents/dialogs/failed_document.mako:6
msgid "cm_np_doc_failed"
-msgstr ""
+msgstr "Es ist ein Fehler bei dem Hinzufügen des Dokuments aufgetreten"
#: waskaweb/templates/documents/dialogs/success_attachment.mako:6
#: waskaweb/templates/documents/dialogs/success_documents.mako:6
msgid "cm_np_doc_success"
-msgstr ""
+msgstr "Das Dokument wurde erfolgreich hinzugefügt"
#: waskaweb/templates/start/responsible.mako:4
msgid "responsible_info_sponsorship"
@@ -1936,6 +1937,9 @@
msgid "usersettings_p_overview_personal_data"
msgstr "Hier sehen sie eine Übersicht Ihrer persönlichen Daten."
+#~ msgid "cm_header_search"
+#~ msgstr "Suche"
+
#~ msgid "dialog_header_notification"
#~ msgstr "Hinweis"
Modified: trunk/waskaweb/i18n/waskaweb.pot
===================================================================
--- trunk/waskaweb/i18n/waskaweb.pot 2008-08-13 13:06:15 UTC (rev 23)
+++ trunk/waskaweb/i18n/waskaweb.pot 2008-08-13 13:06:39 UTC (rev 24)
@@ -8,7 +8,7 @@
msgstr ""
"Project-Id-Version: waskaweb 0.0.0\n"
"Report-Msgid-Bugs-To: EMAIL at ADDRESS\n"
-"POT-Creation-Date: 2008-01-24 14:49+0100\n"
+"POT-Creation-Date: 2008-01-25 10:39+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
"Language-Team: LANGUAGE <LL at li.org>\n"
@@ -131,25 +131,25 @@
msgid "cm_rg_aid_overview_legend_new_offer"
msgstr ""
-#: waskaweb/model/case.py:871 waskaweb/templates/casemanagement/caselist.mako:37
-#: waskaweb/templates/casemanagement/caselist.mako:72
+#: waskaweb/model/case.py:848 waskaweb/templates/casemanagement/caselist.mako:37
+#: waskaweb/templates/casemanagement/caselist.mako:74
msgid "case_state_label_open"
msgstr ""
-#: waskaweb/model/case.py:872 waskaweb/templates/casemanagement/caselist.mako:39
-#: waskaweb/templates/casemanagement/caselist.mako:74
+#: waskaweb/model/case.py:849 waskaweb/templates/casemanagement/caselist.mako:39
+#: waskaweb/templates/casemanagement/caselist.mako:76
msgid "case_state_label_closed"
msgstr ""
-#: waskaweb/model/case.py:873
+#: waskaweb/model/case.py:850
msgid "case_state_label_outstanding_delete"
msgstr ""
-#: waskaweb/model/case.py:874
+#: waskaweb/model/case.py:851
msgid "case_state_label_outstanding_anon"
msgstr ""
-#: waskaweb/model/case.py:875
+#: waskaweb/model/case.py:852
msgid "case_state_label_anon"
msgstr ""
@@ -589,8 +589,8 @@
#: waskaweb/templates/administration/overview_user.mako:36
#: waskaweb/templates/administration/overview_user.mako:46
-#: waskaweb/templates/casemanagement/caselist.mako:43
-#: waskaweb/templates/casemanagement/caselist.mako:78
+#: waskaweb/templates/casemanagement/caselist.mako:45
+#: waskaweb/templates/casemanagement/caselist.mako:82
#: waskaweb/templates/documents/case_overview.mako:42
#: waskaweb/templates/documents/case_overview.mako:51
#: waskaweb/templates/documents/global_overview.mako:39
@@ -602,10 +602,10 @@
#: waskaweb/templates/administration/overview_user.mako:37
#: waskaweb/templates/administration/overview_user.mako:47
-#: waskaweb/templates/casemanagement/caselist.mako:45
-#: waskaweb/templates/casemanagement/caselist.mako:48
-#: waskaweb/templates/casemanagement/caselist.mako:80
-#: waskaweb/templates/casemanagement/caselist.mako:83
+#: waskaweb/templates/casemanagement/caselist.mako:47
+#: waskaweb/templates/casemanagement/caselist.mako:50
+#: waskaweb/templates/casemanagement/caselist.mako:84
+#: waskaweb/templates/casemanagement/caselist.mako:87
#: waskaweb/templates/documents/case_overview.mako:43
#: waskaweb/templates/documents/case_overview.mako:52
#: waskaweb/templates/documents/global_overview.mako:42
@@ -1009,21 +1009,26 @@
msgstr ""
#: waskaweb/templates/casemanagement/caselist.mako:31
-#: waskaweb/templates/casemanagement/caselist.mako:66
+#: waskaweb/templates/casemanagement/caselist.mako:68
msgid "cm_overview_img_editor"
msgstr ""
#: waskaweb/templates/casemanagement/caselist.mako:33
-#: waskaweb/templates/casemanagement/caselist.mako:68
+#: waskaweb/templates/casemanagement/caselist.mako:70
msgid "cm_overview_img_standin"
msgstr ""
-#: waskaweb/templates/casemanagement/caselist.mako:46
-#: waskaweb/templates/casemanagement/caselist.mako:81
+#: waskaweb/templates/casemanagement/caselist.mako:41
+#: waskaweb/templates/casemanagement/caselist.mako:78
+msgid "case_state_label_delete"
+msgstr ""
+
+#: waskaweb/templates/casemanagement/caselist.mako:48
+#: waskaweb/templates/casemanagement/caselist.mako:85
msgid "cm_overview_a_restore"
msgstr ""
-#: waskaweb/templates/casemanagement/caselist.mako:93
+#: waskaweb/templates/casemanagement/caselist.mako:97
msgid "cm_overview_tbl_no_data_found"
msgstr ""
@@ -1520,11 +1525,7 @@
msgid "cm_overview_con_list_dossiers_cm"
msgstr ""
-#: waskaweb/templates/casemanagement/overview.mako:17
-msgid "cm_header_search"
-msgstr ""
-
-#: waskaweb/templates/casemanagement/overview.mako:22
+#: waskaweb/templates/casemanagement/overview.mako:21
msgid "cm_form_overview_search_submit"
msgstr ""
Modified: trunk/waskaweb/model/case.py
===================================================================
--- trunk/waskaweb/model/case.py 2008-08-13 13:06:15 UTC (rev 23)
+++ trunk/waskaweb/model/case.py 2008-08-13 13:06:39 UTC (rev 24)
@@ -44,6 +44,7 @@
AND st.status IN (%s)
AND %s
AND %s
+ AND %s
ORDER by m.name_1"""
LOAD_CASESTATE_SQL = """SELECT id, status, zugriff from ka_status_tbl_view WHERE master_id = %(id)s"""
@@ -171,7 +172,7 @@
def _parse_options(self, s):
# TODO This is a very very simple approach. We should defentiley
# implement some searchengine here
- self.VALID_OPTIONS = ['editor', 'standin', 'state']
+ self.VALID_OPTIONS = ['editor', 'own', 'standin', 'state']
search = []
allowed_states = [-1]
options = {}
@@ -180,12 +181,12 @@
if s:
s = SAVE_SEARCH.sub(u'', s)
option_list = [o.strip() for o in s.split(';')]
- print option_list
for option in option_list:
if option.find(":") > 0:
try:
key, value = [x.strip() for x in option.split(":")]
if key in self.VALID_OPTIONS:
+ print key
if key == 'state':
allowed_states.append(int(value))
else:
@@ -198,15 +199,16 @@
ee = h.hasRole(['cm_ka']) and "m.einverstaendniserklaerung <> 0" or "TRUE"
which_user = 0
allowed_viewer = "FALSE"
- if options.has_key('editor'): which_user += 2
+ if options.has_key('own'): which_user += 2
if options.has_key('standin'): which_user += 1
if which_user == 1: allowed_viewer = "m.bearbeiter_id <> %s" % options.get('standin')
- if which_user == 2: allowed_viewer = "m.bearbeiter_id = %s" % options.get('editor')
+ if which_user == 2: allowed_viewer = "m.bearbeiter_id = %s" % options.get('own')
if which_user == 3: allowed_viewer = "TRUE"
allowed_viewer = h.hasRole(['admin_ka']) and "TRUE" or allowed_viewer
+ editor = options.has_key('editor') and "m.bearbeiter_id = %s" % options.get('editor') or "TRUE"
fields['needle'] = " ".join(search)
- SQL = SEARCH_CASE_OVERVIEW_SQL % (",".join([str(x) for x in allowed_states]), ee, allowed_viewer)
+ SQL = SEARCH_CASE_OVERVIEW_SQL % (",".join([str(x) for x in allowed_states]), ee, allowed_viewer, editor)
return (SQL, fields)
def sortByLastname(self):
@@ -219,15 +221,12 @@
def search(self, search_str=None):
self.ds_list = []
- print search_str
SQL, fields = self._parse_options(search_str)
con, cur = None, None
try:
con = db.getConnection()
cur = con.cursor(cursor_factory=psycopg2.extras.DictCursor)
- print SQL
cur.execute(SQL, fields)
- print cur.query
rows = cur.fetchall()
factory = CaseFactory()
for row in rows:
Modified: trunk/waskaweb/public/styles/all.css
===================================================================
--- trunk/waskaweb/public/styles/all.css 2008-08-13 13:06:15 UTC (rev 23)
+++ trunk/waskaweb/public/styles/all.css 2008-08-13 13:06:39 UTC (rev 24)
@@ -332,6 +332,3 @@
clear:both;
}
-label{
- margin-left:0.3em;
-}
Modified: trunk/waskaweb/public/styles/color3.css
===================================================================
--- trunk/waskaweb/public/styles/color3.css 2008-08-13 13:06:15 UTC (rev 23)
+++ trunk/waskaweb/public/styles/color3.css 2008-08-13 13:06:39 UTC (rev 24)
@@ -156,3 +156,10 @@
background-color: #ffffff;
}
+/*------------------*/
+/* 6. Search */
+/*------------------*/
+
+#search_field {
+ background:#CFD1D1;
+}
Modified: trunk/waskaweb/public/styles/screen.css
===================================================================
--- trunk/waskaweb/public/styles/screen.css 2008-08-13 13:06:15 UTC (rev 23)
+++ trunk/waskaweb/public/styles/screen.css 2008-08-13 13:06:39 UTC (rev 24)
@@ -616,15 +616,31 @@
/* Suche */
+label img {
+ padding-right:0.1em;
+}
+
#search_criteria {
margin:0.2em 0 1em 0em;
}
+#search_criteria label{
+ margin:0 0.4em 0 0.2em;
+}
+
#search_field {
- margin:0.4em 0 0 0;
+ margin:1em 2.5em 0.25em 0.25em !important;
+ margin:1em 2.8em 0.25em 0.25em;
+ padding:1em 1em 0.2em !important;
+ padding:1em 1em 0.2em 1em;
+
}
-#show_own, #show_closed {
+#show_own, #show_closed, #show_other, #show_open {
margin:0 0 0.3em 0 !important;
margin:0;
}
+
+#search_field_input {
+ margin: 0 0 0 2em;
+}
Modified: trunk/waskaweb/templates/casemanagement/overview.mako
===================================================================
--- trunk/waskaweb/templates/casemanagement/overview.mako 2008-08-13 13:06:15 UTC (rev 23)
+++ trunk/waskaweb/templates/casemanagement/overview.mako 2008-08-13 13:06:39 UTC (rev 24)
@@ -14,7 +14,6 @@
% if h.hasRole(['cm_ka']):
<!-- <p>${_('cm_overview_con_list_dossiers_cm')}</p>-->
%endif
-<h2>${_('cm_header_search')}</h2>
<div id="search_field">
<form name="case_search" action="/case_overview/search/">
<div>
More information about the Mpuls-commits
mailing list