Changeset 12068 for main/waeup.ikoba/trunk/src
- Timestamp:
- 27 Nov 2014, 07:48:15 (10 years ago)
- Location:
- main/waeup.ikoba/trunk/src/waeup/ikoba
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/permissions.py
r12065 r12068 78 78 grok.title(u'Owner') 79 79 grok.permissions('waeup.editUser') 80 81 class ProductManager(grok.Role): 82 grok.name('waeup.local.ProductManager') 83 grok.title(u'Product Manager') 84 grok.permissions('waeup.manageProducts', 85 'waeup.viewProducts', 86 'waeup.exportData') 80 87 81 88 # Site Roles -
main/waeup.ikoba/trunk/src/waeup/ikoba/permissions.txt
r11958 r12068 42 42 43 43 >>> len(list(get_waeup_roles(also_local=True))) 44 1 544 16 45 45 46 46 -
main/waeup.ikoba/trunk/src/waeup/ikoba/products/browser.py
r12067 r12068 92 92 taboneactions = [_('Save'),_('Cancel')] 93 93 tabtwoactions = [_('Add product'), _('Remove selected'),_('Cancel')] 94 tabthreeactions1 = [_('Remove selected local roles')]95 tabthreeactions2 = [_('Add local role')]96 94 97 95 @jsaction(_('Remove selected')) … … 117 115 self.redirect(self.url(self.context, '@@addproduct')) 118 116 return 119 120 @action(_('Add local role'), validator=NullValidator)121 def addLocalRole(self, **data):122 return add_local_role(self,3,**data)123 124 @action(_('Remove selected local roles'))125 def delLocalRoles(self, **data):126 return del_local_roles(self,3,**data)127 117 128 118 -
main/waeup.ikoba/trunk/src/waeup/ikoba/products/browser_templates/containermanagepage.pt
r12067 r12068 11 11 <span i18n:translate="">Products 12 12 </span> </a> 13 </li>14 <li>15 <a href="#tab3" data-toggle="tab">16 <span i18n:translate="">Local Roles17 </span></a>18 13 </li> 19 14 </ul> … … 63 58 </div> 64 59 </div> 65 <div id="tab3" class="tab-pane"> <br />66 <table class="ikoba-data-table dataTableManage">67 <thead>68 <tr>69 <th> 70 </th>71 <th i18n:translate="">User Id72 </th>73 <th i18n:translate="">Name74 </th>75 <th i18n:translate="">Local Role76 </th>77 </tr>78 </thead>79 <tbody>80 <tr tal:repeat="entry view/getUsersWithLocalRoles">81 <td>82 <input type="checkbox" name="role_id"83 tal:attributes="value python: entry['user_name']+'|'+entry['local_role']" /> </td>84 <td tal:content="entry/user_name"> USERNAME </td>85 <td tal:content="entry/user_title"> USERTITLE </td>86 <td tal:content="entry/local_role_title"> LOCAL ROLE </td>87 </tr>88 </tbody>89 </table>90 <div tal:condition="view/availableActions">91 <span tal:repeat="action view/actions" tal:omit-tag="">92 <input tal:condition="python:action.label in view.tabthreeactions1"93 tal:replace="structure action/render"/>94 </span>95 </div><br /><br />96 <div class="form-inline">97 <br />98 <div class="form-group">99 <select id="user" name="user" class="form-control">100 <option tal:repeat="user view/getUsers"101 tal:attributes="value user/name">102 <span tal:replace="user/val/title">USERTITLE103 </span>104 </option>105 </select>106 </div>107 <div class="form-group">108 <select id="local_role" name="local_role" class="form-control">109 <option tal:repeat="localrole view/getLocalRoles"110 tal:attributes="value localrole/name">111 <span tal:replace="localrole/title">LOCALROLETITLE112 </span>113 </option>114 </select>115 </div>116 <div class="form-group" tal:condition="view/availableActions">117 <span tal:repeat="action view/actions" tal:omit-tag="">118 <input tal:condition="python:action.label in view.tabthreeactions2"119 tal:replace="structure action/render"/>120 </span>121 </div>122 </div>123 124 </div>125 60 </div> 126 61 </form> -
main/waeup.ikoba/trunk/src/waeup/ikoba/products/product.py
r12066 r12068 39 39 grok.implements(IProduct) 40 40 grok.provides(IProduct) 41 grok.baseclass() 41 #grok.baseclass() 42 43 local_roles = [ 44 'waeup.local.ProductManager', 45 ] 42 46 43 47 Product = attrs_to_fields(Product)
Note: See TracChangeset for help on using the changeset viewer.