summaryrefslogtreecommitdiff
path: root/lib/VNDB/Handler/Producers.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-10-21 13:37:42 +0200
committerYorhel <git@yorhel.nl>2009-10-21 13:37:42 +0200
commit2301f0d2c726a1352494ad0f3bba8c5138b4fedd (patch)
tree1feecf14aafd791cfb6b34399f7befe969e03a7d /lib/VNDB/Handler/Producers.pm
parentbd2251939c7e4c9903aa3a6eb838f489b0328bcd (diff)
Wrote producer relation editor interface
Again, mostly copied from the VN relation editor...
Diffstat (limited to 'lib/VNDB/Handler/Producers.pm')
-rw-r--r--lib/VNDB/Handler/Producers.pm30
1 files changed, 28 insertions, 2 deletions
diff --git a/lib/VNDB/Handler/Producers.pm b/lib/VNDB/Handler/Producers.pm
index f662ba3e..41465b18 100644
--- a/lib/VNDB/Handler/Producers.pm
+++ b/lib/VNDB/Handler/Producers.pm
@@ -69,7 +69,7 @@ sub page {
p class => 'center';
txt "\n";
for my $r (sort keys %rel) {
- txt mt("_prodrel_$r").' ';
+ txt mt("_prodrel_$r").': ';
for (@{$rel{$r}}) {
a href => "/p$_->{id}", title => $_->{original}||$_->{name}, shorten $_->{name}, 40;
txt ', ' if $_ ne $rel{$r}[$#{$rel{$r}}];
@@ -191,7 +191,33 @@ sub edit {
[ input => name => mt('_pedit_form_website'), short => 'website' ],
[ text => name => mt('_pedit_form_desc').'<br /><b class="standout">'.mt('_inenglish').'</b>', short => 'desc', rows => 6 ],
], 'pedit_rel' => [ mt('_pedit_form_rel'),
- [ textarea => short => 'prodrelations' ],
+ [ hidden => short => 'prodrelations' ],
+ [ static => nolabel => 1, content => sub {
+ h2 mt '_pedit_rel_sel';
+ table;
+ tbody id => 'relation_tbl';
+ # to be filled using javascript
+ end;
+ end;
+
+ h2 mt '_pedit_rel_add';
+ table;
+ Tr id => 'relation_new';
+ td class => 'tc_prod';
+ input type => 'text', class => 'text';
+ end;
+ td class => 'tc_rel';
+ Select;
+ option value => $_, mt "_prodrel_$_"
+ for (sort { $self->{prod_relations}{$a}[0] <=> $self->{prod_relations}{$b}[0] } keys %{$self->{prod_relations}});
+ end;
+ end;
+ td class => 'tc_add';
+ a href => '#', mt '_pedit_rel_addbut';
+ end;
+ end;
+ end;
+ }],
]);
$self->htmlFooter;
}