Navigation Menu

Skip to content

Commit

Permalink
Merge remote branch 'origin/master' into zoom
Browse files Browse the repository at this point in the history
  • Loading branch information
racke committed Oct 14, 2010
2 parents a9d2283 + 1e9801b commit 3977cbc
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 39 deletions.
33 changes: 0 additions & 33 deletions code/cart_add.tag

This file was deleted.

13 changes: 11 additions & 2 deletions global/datetime.tag
Expand Up @@ -166,10 +166,19 @@ sub {
if ($scope eq 'days') {
$from_dt->add(days => $amount);
} elsif ($scope eq 'business_days') {
my $incr;

if ($function eq 'sub') {
$incr = -1;
}
else {
$incr = 1;
}

while($amount){
$from_dt->add(days => 1);
$from_dt->add(days => $incr);
if($from_dt->day_of_week() < 6){
$amount--;
$amount -= $incr;
}
}
} elsif ($scope eq 'weeks') {
Expand Down
3 changes: 3 additions & 0 deletions lib/WellWell/Core.pm
Expand Up @@ -19,6 +19,9 @@

package WellWell::Core;

use strict;
use warnings;

use Vend::Config;

use WellWell::Cart;
Expand Down
5 changes: 4 additions & 1 deletion lib/WellWell/Menu.pm
Expand Up @@ -57,7 +57,10 @@ sub display {
}

if ($opt->{hooks}) {
my @hook_entries = Vend::Tags->call_hooks('menu', 'collect', $name, $opt);
my @hook_entries;

$opt->{menu_name} = $name;
@hook_entries = Vend::Tags->call_hooks('menu', 'collect', $opt);

for (@hook_entries) {
next unless ref($_) eq 'HASH';
Expand Down
12 changes: 10 additions & 2 deletions plugins/backend/code/backend.sub
Expand Up @@ -10,7 +10,12 @@ sub {
return 1;
}

if ($args[0] eq 'categories') {
if ($args[0] eq 'products') {
$args[1] ||= 'list';
$CGI->{mv_nextpage} = "$name/products/$args[1]";
return 1;
}
elsif ($args[0] eq 'categories') {
$Tag->perl({tables => 'categories'});
@fields = qw/name/;

Expand Down Expand Up @@ -64,7 +69,7 @@ sub {
$CGI->{mv_nextpage} = 'backend/menus/list';
}
return 1;
} else {
} elsif (@args) {
# delegate to a plugin?
my (@ret, @path);

Expand All @@ -85,6 +90,9 @@ sub {

return 1;
}
else {
$CGI->{mv_nextpage} = 'backend/products/list';
}

return 1;
}
Expand Down
2 changes: 1 addition & 1 deletion plugins/backend/components/backend_list
Expand Up @@ -2,7 +2,7 @@
<tr><th>Name</th></tr>
[query sql="select * from __SUBJECT__ order by name" list=1]
[list]
<tr><td>[sql-param name]</td><td><a href="[area href="backend/__SUBJECT__/[sql-code]"]">[L]Edit[/L]</a></td></td></tr>
<tr><td>[sql-param name]</td><td><a href="[area href="backend/__SUBJECT__/edit" form="code=[sql-code]"]">[L]Edit[/L]</a></td></td></tr>
[/list]
[/query]
</table>
3 changes: 3 additions & 0 deletions plugins/backend/pages/backend/products/list.itl
@@ -1,4 +1,7 @@
[compose
acl.check="edit_products"
acl.bounce="backend"

components.left="menu"
attributes.menu.name="backend"
components.right="login"
Expand Down

0 comments on commit 3977cbc

Please sign in to comment.