Update of /cvsroot/mailmanager/mailmanager/www In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8390/www Modified Files: Tag: db-backend AccountSettings.zpt Create.zpt CustomerSettings.zpt FilterSettings.zpt GenerateMail.zpt GroupSettings.zpt Reports.zpt Search.zpt SystemSettings.zpt Tickets.zpt UserSettings.zpt index_html.zpt master.zpt ticket_index_html.zpt Log Message: MailManager now works a bit more reliably. In particular conflicts with the OSS and any other products that may happen to use the same variable names we use have are no longer an issue. Rather than calling here/sql/listAccounts or similar and then assuming that none of the arguments in listAccounts.sql will be found either in the REQUEST or through acquisition we know call python:here.sql.listAccounts(email='') to explicity set the arguments to being none. In the case of here/sql/listUsers I've changed to here/acl_users/getUserNames which will ease the adoption of LDAPUserFolders or any other user folder we may want to use in the future. Index: Reports.zpt =================================================================== RCS file: /cvsroot/mailmanager/mailmanager/www/Reports.zpt,v retrieving revision 1.22.2.7 retrieving revision 1.22.2.8 diff -u -d -r1.22.2.7 -r1.22.2.8 --- Reports.zpt 21 Apr 2005 10:35:28 -0000 1.22.2.7 +++ Reports.zpt 23 Apr 2005 08:52:00 -0000 1.22.2.8 @@ -790,7 +790,7 @@ " i18n:translate="currently_overdue">Currently<br />Overdue</td> </tr> - <tr tal:repeat="acc python:here.sql.listAccounts()" + <tr tal:repeat="acc python:here.sql.listAccounts(email='')" tal:attributes="bgcolor python:test(path('repeat/acc/odd'), '#d0cfe5', None)"> <td tal:content="acc/email">te...@ex...</td> Index: CustomerSettings.zpt =================================================================== RCS file: /cvsroot/mailmanager/mailmanager/www/CustomerSettings.zpt,v retrieving revision 1.9.2.2 retrieving revision 1.9.2.3 diff -u -d -r1.9.2.2 -r1.9.2.3 --- CustomerSettings.zpt 23 Apr 2005 08:25:05 -0000 1.9.2.2 +++ CustomerSettings.zpt 23 Apr 2005 08:52:00 -0000 1.9.2.3 @@ -64,7 +64,7 @@ <td class="white" i18n:translate="username_heading">Username</td> <td class="white" align="center" i18n:translate="action">Action</td> </tr> - <tr tal:repeat="item here/sql/listCustomers" + <tr tal:repeat="item python:here.sql.listCustomers(username='')" tal:attributes="bgcolor python:test(repeat['item'].odd(), '#d0cfe5', None)"> <td> @@ -86,7 +86,7 @@ </a> </td> </tr> - <tr tal:condition="not:here/sql/listCustomers"> + <tr tal:condition="python:not here.sql.listCustomers(username='')"> <td i18n:translate="no_customers"> There are no customers set up. </td> Index: master.zpt =================================================================== RCS file: /cvsroot/mailmanager/mailmanager/www/master.zpt,v retrieving revision 1.30.2.4 retrieving revision 1.30.2.5 diff -u -d -r1.30.2.4 -r1.30.2.5 --- master.zpt 6 Apr 2005 21:26:50 -0000 1.30.2.4 +++ master.zpt 23 Apr 2005 08:52:01 -0000 1.30.2.5 @@ -39,10 +39,10 @@ <option value=""> Show All </option> - <option tal:repeat="item here/sql/listUsers" - tal:attributes="value item/username; - selected python:item.username == assigned" - tal:content="item/username"> + <option tal:repeat="name here/acl_users/getUserNames" + tal:attributes="value name; + selected python:name == assigned" + tal:content="name"> username </option> </select> @@ -73,7 +73,7 @@ <option value=""> Show All </option> - <option tal:repeat="acc here/sql/listAccounts" + <option tal:repeat="acc python:here.sql.listAccounts(email='')" tal:attributes="value acc/email; selected python:acc.email == acc_id" tal:content="acc/email"> @@ -102,7 +102,7 @@ <tr class="nav_two"> <!-- Get Ticket box --> - <td> + <td> <form action="getTicket" method="post" tal:condition="python:user.has_role('Tickets')"> <table cellpadding="0" cellspacing="0" border="0"> Index: SystemSettings.zpt =================================================================== RCS file: /cvsroot/mailmanager/mailmanager/www/SystemSettings.zpt,v retrieving revision 1.28.2.3 retrieving revision 1.28.2.4 diff -u -d -r1.28.2.3 -r1.28.2.4 --- SystemSettings.zpt 21 Apr 2005 09:00:01 -0000 1.28.2.3 +++ SystemSettings.zpt 23 Apr 2005 08:52:00 -0000 1.28.2.4 @@ -75,7 +75,7 @@ <td><b i18n:translate="account_label">Account:</b></td> <td> <select name="account_id"> - <option tal:repeat="acc here/sql/listAccounts" + <option tal:repeat="acc python:here.sql.listAccounts(email='')" tal:attributes="value acc/id" tal:content="acc/email">te...@ex...</option> </select> Index: GenerateMail.zpt =================================================================== RCS file: /cvsroot/mailmanager/mailmanager/www/GenerateMail.zpt,v retrieving revision 1.1.6.1 retrieving revision 1.1.6.2 diff -u -d -r1.1.6.1 -r1.1.6.2 --- GenerateMail.zpt 14 Apr 2005 14:25:14 -0000 1.1.6.1 +++ GenerateMail.zpt 23 Apr 2005 08:52:00 -0000 1.1.6.2 @@ -1,21 +1,21 @@ <html> <form action="generateMail" method="post" - tal:condition="here/sql/listAccounts"> + tal:condition="python:here.sql.listAccounts(email='')"> Account: <select name="account_name"> - <option tal:repeat="acc here/sql/listAccounts" - tal:content="acc/email">te...@ex...</option> + <option tal:repeat="acc python:here.sql.listAccounts(email='')" + tal:content="acc/email">te...@ex...</option> </select> <br /> Quantity: <select name="quantity:int"> <option tal:repeat="num python:range(10,510,10)" - tal:content="num">100</option> + tal:content="num">100</option> </select> <br /> <input type="submit" value="ok" /> </form> - <p tal:condition="not:here/sql/listAccounts"> + <p tal:condition="not:python:here.sql.listAccounts(email='')"> You must set up at least one Account first. </p> </html> Index: Tickets.zpt =================================================================== RCS file: /cvsroot/mailmanager/mailmanager/www/Tickets.zpt,v retrieving revision 1.40.2.11 retrieving revision 1.40.2.12 diff -u -d -r1.40.2.11 -r1.40.2.12 --- Tickets.zpt 21 Apr 2005 12:17:15 -0000 1.40.2.11 +++ Tickets.zpt 23 Apr 2005 08:52:00 -0000 1.40.2.12 @@ -346,9 +346,9 @@ <select name="assigned"> <option value="" i18n:translate="no_change">No Change</option> - <option tal:repeat="item here/sql/listUsers" - tal:attributes="value item/username" - tal:content="item/username">me</option> + <option tal:repeat="name here/acl_users/getUserNames" + tal:attributes="value name" + tal:content="name">me</option> </select> </td> <td> Index: Search.zpt =================================================================== RCS file: /cvsroot/mailmanager/mailmanager/www/Search.zpt,v retrieving revision 1.15.2.5 retrieving revision 1.15.2.6 diff -u -d -r1.15.2.5 -r1.15.2.6 --- Search.zpt 21 Apr 2005 15:41:16 -0000 1.15.2.5 +++ Search.zpt 23 Apr 2005 08:52:00 -0000 1.15.2.6 @@ -40,7 +40,7 @@ <td> <select name="account_id"> <option value="" i18n:translate="any">Any</option> - <option tal:repeat="item here/sql/listAccounts" + <option tal:repeat="item python:here.sql.listAccounts(email='')" tal:attributes="value item/email" tal:content="item/email">te...@ex...</option> </select> @@ -108,9 +108,9 @@ <td> <select name="assigned"> <option value="" i18n:translate="any">Any</option> - <option tal:repeat="item here/sql/listUsers" - tal:attributes="value item/username" - tal:content="item/username">admin</option> + <option tal:repeat="name here/acl_users/getUserNames" + tal:attributes="value name" + tal:content="name">admin</option> </select> </td> </tr> Index: UserSettings.zpt =================================================================== RCS file: /cvsroot/mailmanager/mailmanager/www/UserSettings.zpt,v retrieving revision 1.16.2.3 retrieving revision 1.16.2.4 diff -u -d -r1.16.2.3 -r1.16.2.4 --- UserSettings.zpt 22 Apr 2005 13:40:41 -0000 1.16.2.3 +++ UserSettings.zpt 23 Apr 2005 08:52:01 -0000 1.16.2.4 @@ -67,7 +67,7 @@ <td class="white" align="center" i18n:translate="action">Action</td> </tr> - <tr tal:repeat="key python:here.sql.listUsers()" + <tr tal:repeat="key python:here.sql.listUsers(username='')" tal:attributes="bgcolor python:test(repeat['key'].odd(), '#d0cfe5', None)"> <td> Index: index_html.zpt =================================================================== RCS file: /cvsroot/mailmanager/mailmanager/www/index_html.zpt,v retrieving revision 1.25.2.2 retrieving revision 1.25.2.3 diff -u -d -r1.25.2.2 -r1.25.2.3 --- index_html.zpt 14 Mar 2005 09:14:57 -0000 1.25.2.2 +++ index_html.zpt 23 Apr 2005 08:52:01 -0000 1.25.2.3 @@ -98,7 +98,7 @@ <td tal:content="item/overdue" class="red" align="center">42</td> </tr> - <tr tal:condition="not:here/sql/listAccounts"> + <tr tal:condition="not:python:here.sql.listAccounts(email='')"> <td colspan="4"> To receive mail you must set up an Account for each e-mail address at which people will contact you. Visit the Index: AccountSettings.zpt =================================================================== RCS file: /cvsroot/mailmanager/mailmanager/www/AccountSettings.zpt,v retrieving revision 1.28.2.5 retrieving revision 1.28.2.6 diff -u -d -r1.28.2.5 -r1.28.2.6 --- AccountSettings.zpt 20 Apr 2005 16:15:46 -0000 1.28.2.5 +++ AccountSettings.zpt 23 Apr 2005 08:52:00 -0000 1.28.2.6 @@ -93,7 +93,7 @@ <td class="white" align="center" i18n:translate="action">Action</td> </tr> - <tr tal:repeat="acc here/sql/listAccounts" + <tr tal:repeat="acc python:here.sql.listAccounts(email='')" tal:attributes="bgcolor python:test(path('repeat/acc/odd'), '#d0cfe5', '')"> <td> @@ -127,7 +127,7 @@ </td> </tr> - <tr tal:condition="not:here/sql/listAccounts"> + <tr tal:condition="not:python:here.sql.listAccounts(email='')"> <td colspan="3" i18n:translate="no_accounts"> There are no accounts set up on the system. </td> @@ -184,10 +184,10 @@ <select name="assign_user" tal:define="assign_user acc_or_req/assign_user | nothing"> <option value="" i18n:translate="none">None</option> - <option tal:repeat="item here/sql/listUsers" - tal:attributes="value item/username; - selected python:assign_user == item.username" - tal:content="item/real_name"> + <option tal:repeat="name here/acl_users/getUserNames" + tal:attributes="value name; + selected python:assign_user == name" + tal:content="name"> Administrator </option> </select> Index: ticket_index_html.zpt =================================================================== RCS file: /cvsroot/mailmanager/mailmanager/www/ticket_index_html.zpt,v retrieving revision 1.75.2.24 retrieving revision 1.75.2.25 diff -u -d -r1.75.2.24 -r1.75.2.25 --- ticket_index_html.zpt 21 Apr 2005 10:55:27 -0000 1.75.2.24 +++ ticket_index_html.zpt 23 Apr 2005 08:52:01 -0000 1.75.2.25 @@ -174,10 +174,10 @@ tal:content="here/assigned">assigned</td> <td tal:condition="exists:request/details"> <select name="assigned"> - <option tal:repeat="item here/sql/listUsers" - tal:attributes="value item/username; - selected python:item.username == here.assigned" - tal:content="item/username">me</option> + <option tal:repeat="name here/acl_users/getUserNames" + tal:attributes="value name; + selected python:name == here.assigned" + tal:content="name">me</option> </select> </td> </tr> Index: GroupSettings.zpt =================================================================== RCS file: /cvsroot/mailmanager/mailmanager/www/GroupSettings.zpt,v retrieving revision 1.15.2.1 retrieving revision 1.15.2.2 diff -u -d -r1.15.2.1 -r1.15.2.2 --- GroupSettings.zpt 28 Mar 2005 15:07:11 -0000 1.15.2.1 +++ GroupSettings.zpt 23 Apr 2005 08:52:00 -0000 1.15.2.2 @@ -118,13 +118,11 @@ class="red">Users:</span></b> </td> <td> - <div tal:repeat="item here/sql/listUsers" + <div tal:repeat="name here/acl_users/getUserNames" tal:omit-tag=""> - <input tal:attributes="value item/username" + <input tal:attributes="value name" type="checkbox" name="agents:list" /> - <span tal:replace="item/real_name"> - Administrator - </span> + <span tal:replace="name">Administrator</span> <br /> </div> </td> Index: Create.zpt =================================================================== RCS file: /cvsroot/mailmanager/mailmanager/www/Create.zpt,v retrieving revision 1.21.2.2 retrieving revision 1.21.2.3 diff -u -d -r1.21.2.2 -r1.21.2.3 --- Create.zpt 15 Apr 2005 13:40:48 -0000 1.21.2.2 +++ Create.zpt 23 Apr 2005 08:52:00 -0000 1.21.2.3 @@ -196,7 +196,7 @@ </td> <td> <select name="account_name"> - <option tal:repeat="acc here/sql/listAccounts" + <option tal:repeat="acc python:here.sql.listAccounts(email='')" tal:content="acc/email">te...@ex... </option> </select> Index: FilterSettings.zpt =================================================================== RCS file: /cvsroot/mailmanager/mailmanager/www/FilterSettings.zpt,v retrieving revision 1.22.2.2 retrieving revision 1.22.2.3 diff -u -d -r1.22.2.2 -r1.22.2.3 --- FilterSettings.zpt 19 Apr 2005 22:02:10 -0000 1.22.2.2 +++ FilterSettings.zpt 23 Apr 2005 08:52:00 -0000 1.22.2.3 @@ -192,9 +192,9 @@ <td> <select name="assign_user"> <option value="" i18n:translate="default">Default</option> - <option tal:repeat="person here/sql/listUsers" - tal:attributes="value person/username" - tal:content="person/username"> + <option tal:repeat="name here/acl_users/getUserNames" + tal:attributes="value name" + tal:content="name"> Administrator </option> </select> |