]> asedeno.scripts.mit.edu Git - bluechips.git/commitdiff
Removed 'Delete' links from lists of expenditures / transfers
authorRay Speth <speth@mit.edu>
Fri, 19 Mar 2010 03:36:25 +0000 (23:36 -0400)
committerAlejandro R. Sedeño <asedeno@mit.edu>
Wed, 23 Feb 2011 02:39:20 +0000 (21:39 -0500)
Instead, there is now a 'Delete' button on the 'edit' page for
individual expenditures and transfers.

bluechips/public/css/main.css
bluechips/templates/base.mako
bluechips/templates/spend/index.mako
bluechips/templates/transfer/index.mako

index 63b82aaf324333c558dd14aa96978e0fd5e07c2d..acaa339ddf47f5349a9056e9545cb6a9ede40256 100644 (file)
@@ -82,6 +82,9 @@ table.list td.share {
     width: 90px;
     text-align: right;
 }
+table.list td.editlink {
+    width: 30px;
+}
 #totals {
     margin-bottom: 10px;
 }
index 0fa65cf7c75abc4cd275cc6ca74a437bfaef4241..888255cbb085affec730b973cd462278eb439625 100644 (file)
@@ -93,7 +93,6 @@
       <th class="amount">Amount</th>
       <th class="share">My Share</th>
       <th class="editlink"></th>
-      <th class="deletelink"></th>
     </tr>
     % for e in es:
       <%
         <td class="amount">${e.amount}</td>
         <td class="share">${e.share(request.environ['user'])}</td>
         <td class="editlink">${h.link_to('Edit', h.url_for(controller='spend', action='edit', id=e.id))}</td>
-        <td class="deletelink">${h.link_to('Delete', h.url_for(controller='spend', action='delete', id=e.id))}</td>
       </tr>
     % endfor
   </table>
       <th class="description">Description</th>
       <th class="amount">Amount</th>
       <th class="editlink"></th>
-      <th class="deletelink"></th>
     </tr>
     % for t in ts:
       <%
         <td class="description">${t.description}</td>
         <td class="amount">${t.amount}</td>
         <td class="editlink">${h.link_to('Edit', h.url_for(controller='transfer', action='edit', id=t.id))}</td>
-        <td class="deletelink">${h.link_to('Delete', h.url_for(controller='transfer', action='delete', id=t.id))}</td>
       </tr>
     % endfor
   </table>
index 5d2ee103e8922dc2d68c42fe0924d2d9c3c9bd11..9db5cb8804bd12041f658486f2b8488554507dc2 100644 (file)
       </tr>
     % endfor
     <tr>
+      <td></td>
       <td colspan="2">
         ${h.submit(None, 'Submit', class_="submitbutton")}
+        %if c.expenditure.id:
+       <input type="button" value="Delete" onClick="window.location.href='${h.url_for(controller='spend', action='delete', id=c.expenditure.id)}'">
+       %endif
       </td>
     </tr>
   </table>
index 7c3daa925f2d2a0fd1b28354ccd58344b43e48e3..0ef4c8dcdce4632e9e18e72ae7cb77e833ca1524 100644 (file)
       <td>${h.text('description', c.transfer.description, size=64)}</td>
     </tr>
     <tr>
+      <td></td>
       <td colspan="2">
         <input type="submit" value="Submit" />
+        %if c.transfer.id:
+       <input type="button" value="Delete" onClick="window.location.href='${h.url_for(controller='transfer', action='delete', id=c.transfer.id)}'">
+       %endif
       </td>
     </tr>
   </table>