[Jifty-commit] r5915 - in JiftyX-ExpenseApp/trunk: . lib/Jifty/Plugin/ExpenseApp
Jifty commits
jifty-commit at lists.jifty.org
Fri Oct 10 12:48:13 EDT 2008
Author: gugod
Date: Fri Oct 10 12:48:13 2008
New Revision: 5915
Modified:
JiftyX-ExpenseApp/trunk/ (props changed)
JiftyX-ExpenseApp/trunk/lib/Jifty/Plugin/ExpenseApp/View.pm
JiftyX-ExpenseApp/trunk/share/web/static/css/jiftyx_expenseapp.css
Log:
r24486 at yra: gugod | 2008-10-10 12:04:28 +0800
Add a delete button (as link) for each row of expense records.
Modified: JiftyX-ExpenseApp/trunk/lib/Jifty/Plugin/ExpenseApp/View.pm
==============================================================================
--- JiftyX-ExpenseApp/trunk/lib/Jifty/Plugin/ExpenseApp/View.pm (original)
+++ JiftyX-ExpenseApp/trunk/lib/Jifty/Plugin/ExpenseApp/View.pm Fri Oct 10 12:48:13 2008
@@ -3,6 +3,7 @@
package Jifty::Plugin::ExpenseApp::View;
use Jifty::View::Declare -base;
+use utf8;
template '/=/x/expenses' => page {
title => _("Expenses")
@@ -42,6 +43,7 @@
table {
row {
+ th { " " };
th { _("Date") };
th { _("Amount") };
th { _("Currency") };
@@ -52,6 +54,22 @@
my $expenses = get('expenses');
while(my $expense = $expenses->next) {
row {
+ cell {
+ form {
+ form_submit(
+ class => "expense record delete action",
+ as_link => 1,
+ label => "ⓧ",
+ tooltip => _("Delete this record"),
+ onclick => {
+ confirm => _("Are you sure ?"),
+ submit =>
+ $expense->as_delete_action,
+ refresh_self => 1
+ }
+ );
+ };
+ };
cell { $expense->happened_at };
cell { $expense->amount };
cell { $expense->currency };
Modified: JiftyX-ExpenseApp/trunk/share/web/static/css/jiftyx_expenseapp.css
==============================================================================
--- JiftyX-ExpenseApp/trunk/share/web/static/css/jiftyx_expenseapp.css (original)
+++ JiftyX-ExpenseApp/trunk/share/web/static/css/jiftyx_expenseapp.css Fri Oct 10 12:48:13 2008
@@ -14,5 +14,13 @@
.expensesapp .list table tr:nth-child(2n) {
background: #ccf;
-}
+}
+.expensesapp .expense.record.delete.action {
+ text-decoration: none;
+ color:#555;
+}
+
+.expensesapp .expense.record.delete.action:hover {
+ color: #f00;
+}
More information about the Jifty-commit
mailing list