[Mpuls-commits] r1980 - wasko/branches/2.0/mpulsweb/templates/casemanagement

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Mar 17 10:20:48 CET 2010


Author: torsten
Date: 2010-03-17 10:20:47 +0100 (Wed, 17 Mar 2010)
New Revision: 1980

Modified:
   wasko/branches/2.0/mpulsweb/templates/casemanagement/search.mako
Log:
* mpulsweb/templates/casemanagement/search.mako: Reordered fields in
Search. Use css-style "display:none" to hide search option in not
extended mode of search instead of using hidden fields


Modified: wasko/branches/2.0/mpulsweb/templates/casemanagement/search.mako
===================================================================
--- wasko/branches/2.0/mpulsweb/templates/casemanagement/search.mako	2010-03-16 15:07:22 UTC (rev 1979)
+++ wasko/branches/2.0/mpulsweb/templates/casemanagement/search.mako	2010-03-17 09:20:47 UTC (rev 1980)
@@ -8,80 +8,86 @@
         <td class="label">${_('Search')}</td>
         <td><input type="text" size="30" name="search_str" maxlength="256"></td>
       </tr>
-      % if c.extended_search:
-        <tr>
-          <td class="label">${_('Status')}</td>
+      % if h.hasRole(['admin_ka']):
+      <tr style="${not c.extended_search and 'display:none' or ''}">
+        <td class="label">${_('Responsibility')}</td>
+        <td>
+          <select name="editor" id="editor">
+            <option value="-1">Alle Benutzer</option>
+          % for user in c.userlist:
+            <option value="${user.id}">${user.last_name | h}, ${user.first_name | h}</option>
+          % endfor
+          </select>
+        </td>
+      </tr>
+      % endif
+      % if h.hasRole(['cm_ka']):
+        <tr style="${not c.extended_search and 'display:none' or ''}">
+          <td class="label">${_('Responsibility')}</td>
           <td>
-            <input type="checkbox" name="show_open" id="show_open" value="1" checked="checked">
-            <label for="show_open">
-              <img title="Bearbeitbare Fallakten" alt="Bearbeitbare" src="/images/icons/work_in_progress_grey.gif">Bearbeitbare Fallakten</label><br>
-            % if h.hasRole(['admin_ka']):
-              <input type="checkbox" name="show_markdelete" id="show_markdelete" value="1" checked="checked">
-              <label for="show_markdelete">
-                <img title="Zu löschende Fallakten" alt="Schwebend Gelöscht" src="/images/icons/delete_grey.gif">Schwebend gelöscht (${c.count_del})
-              </label><br>
-              <input type="checkbox" name="show_markanonymize" id="show_markanonymize" value="1" checked="checked">
-              <label for="show_markanonymize">
-                <img title="Schwebend anonymisierte Fallakten" alt="Schwebend anonymisiert" src="/images/icons/anonym.gif">Schwebend anonymisiert (${c.count_markanon})
-              </label><br>
-            % endif
-              <input type="checkbox" name="show_anonymized" id="show_anonymized" value="1" checked="checked">
-            <label for="show_anonymized">
-              <img title="Anonymisierte Fallakten" alt="Anonymisiert" src="/images/icons/anonym.gif">Anonymisiert (${c.count_anon})
+            <input type="checkbox" name="own" id="show_own" value="1" checked="checked">
+            <label for="show_own">
+              <img title="Eigene Fallakten" alt="Bearbeiter"  src="/images/icons/editor_grey.gif">Eigene (${c.count_own})
+            </label><br>
+            <input type="checkbox" name="standin" id="show_other" value="1" checked="checked">
+            <label for="show_other">
+              <img title="Vertreter Fallakten" alt="Vertreter"  src="/images/icons/stand-in_grey.gif">Vertretung (${c.count_standin})
             </label>
           </td>
         </tr>
-        % if h.hasRole(['cm_ka']):
-          <tr>
-            <td class="label">${_('Responsibility')}</td>
-            <td>
-              <input type="checkbox" name="show_own" id="show_own" value="1" checked="checked">
-              <label for="show_own">
-                <img title="Eigene Fallakten" alt="Bearbeiter"  src="/images/icons/editor_grey.gif">Eigene (${c.count_own})
-              </label><br>
-              <input type="checkbox" name="show_other" id="show_other" value="1" checked="checked">
-              <label for="show_other">
-                <img title="Vertreter Fallakten" alt="Vertreter"  src="/images/icons/stand-in_grey.gif">Vertretung (${c.count_standin})
+      % endif
+      <tr style="${not c.extended_search and 'display:none' or ''}">
+        <td class="label">${_('Status')}</td>
+        <td>
+          <input type="checkbox" name="state" id="show_open" value="1">
+          <label for="show_open">
+            <img title="Bearbeitbare Fallakten" alt="Bearbeitbare" src="/images/icons/work_in_progress_grey.gif">Bearbeitbare Fallakten</label><br>
+          % if h.hasRole(['admin_ka']):
+            <input type="checkbox" name="state" id="show_markdelete" value="3" checked="checked">
+            <label for="show_markdelete">
+              <img title="Zu löschende Fallakten" alt="Schwebend Gelöscht" src="/images/icons/delete_grey.gif">Schwebend gelöscht (${c.count_del})
+            </label><br>
+            <input type="checkbox" name="state" id="show_markanonymize" value="4" checked="checked">
+            <label for="show_markanonymize">
+              <img title="Schwebend anonymisierte Fallakten" alt="Schwebend anonymisiert" src="/images/icons/anonym.gif">Schwebend anonymisiert (${c.count_markanon})
+            </label><br>
+          % endif
+            <input type="checkbox" name="state" id="show_anonymized" value="5" checked="checked">
+          <label for="show_anonymized">
+            <img title="Anonymisierte Fallakten" alt="Anonymisiert" src="/images/icons/anonym.gif">Anonymisiert (${c.count_anon})
+          </label>
+        </td>
+      </tr>
+      <tr style="${not c.extended_search and 'display:none' or ''}">
+        <td class="label">${_('Phase')}</td>
+        <td>
+          <input type="checkbox" name="phase" value="-1"> ${_('Unknown')}<br>
+          % for n,p in enumerate(g.mpuls_config.get('phases', 'phases')):
+            <input type="checkbox" name="phase" id="phase_${n}" value="${p}"> 
+              <label for="phase_${n}">
+                ${g.mpuls_config.get('phases', 'description')[0].get(p)}<br>
               </label>
-            </td>
-          </tr>
-        % endif
-        ##<tr>
-        ##  <td class="label">${_('Phase')}</td>
-        ##  <td>
-        ##    <input type="checkbox" name="phase" value="-1"> ${_('Unknown')}<br>
-        ##    % for p in g.mpuls_config.get('phases', 'phases'):
-        ##      <input type="checkbox" name="phase" value="${p}"> ${g.mpuls_config.get('phases', 'description')[0].get(p)}<br>
-        ##    % endfor
-        ##  </td>
-        ##</tr>
-        ##<tr>
-        ##  <td class="label">${_('Start date')}</td>
-        ##  <td>
-        ##    <input type="text" name="sdate" value="">
-        ##  </td>
-        ##</tr>
-        ##<tr>
-        ##  <td class="label">${_('End date')}</td>
-        ##  <td>
-        ##    <input type="text" name="edate" value="">
-        ##  </td>
-        ##</tr>
-        <tr>
-          <td class=""></td>
-          <td></td>
-        </tr>
-      % else:
-        <tr>
-          <td class=""></td>
-          <td>
-            <input type="hidden" name="show_own" value="1">
-            <input type="hidden" name="show_open" value="1">
-          </td>
-        </tr>
-      % endif
+          % endfor
+        </td>
+      </tr>
+      <tr style="${not c.extended_search and 'display:none' or ''}">
+        <td class="label">${_('Start date')}</td>
+        <td>
+          <input type="text" name="sdate" value="">
+        </td>
+      </tr>
+      <tr style="${not c.extended_search and 'display:none' or ''}">
+        <td class="label">${_('End date')}</td>
+        <td>
+          <input type="text" name="edate" value="">
+        </td>
+      </tr>
       <tr>
         <td class=""></td>
+        <td></td>
+      </tr>
+      <tr>
+        <td class=""></td>
         <td>
           <input type="submit" value="${_('cm_form_overview_search_submit')}">
           % if c.extended_search:
@@ -90,7 +96,6 @@
             <a href="/case_overview/overview_extended/">Erweiterte Suche einblenden</a>
           % endif
           ${h.getHelp('extended_search')}
-
         </td>
       </tr>
     </table>



More information about the Mpuls-commits mailing list