Edgewall Software

Ticket #3921: perm-display-grouping-genshi3.patch

File perm-display-grouping-genshi3.patch, 1.2 KB (added by awbacker@…, 2 years ago)

Genshi final. v2 was the wrong file! Only diff is the .JS file

  • webadmin/templates/admin_perm.html

     
    4242  <form method="post"> 
    4343    <table class="listing" id="permlist"> 
    4444      <thead> 
    45         <tr><th class="sel">&nbsp;</th><th>Subject</th><th>Action</th></tr> 
     45        <tr><th class="sel">&nbsp;</th><th>Subject</th></tr> 
    4646      </thead> 
    4747      <tbody> 
    48         <tr py:for="perm in perms"> 
    49           <td><input type="checkbox" name="sel" value="$perm.key" /></td> 
    50           <td>$perm.subject</td> 
    51           <td>$perm.action</td> 
    52         </tr> 
     48        <py:for each="subject, permGroup in groupby(perms, lambda tmp: tmp.subject)"> 
     49          <tr> 
     50            <td>${subject}</td> 
     51            <td> 
     52              <py:for each="p in permGroup"> 
     53                <div style="width:160px;float:left;"> 
     54                  <input type="checkbox" name="sel" value="$p.key" id="$p.key"/> 
     55                  <label for="$p.key">$p.action</label> 
     56                </div> 
     57              </py:for> 
     58            </td> 
     59          </tr> 
     60        </py:for> 
    5361      </tbody> 
    5462    </table> 
    5563    <div class="buttons">