0c406705eb16e5297457390fc62b0c02b93bbee5
[catagits/Reaction.git] / lib / Reaction / UI / Widget / Action / Link.pm
1 package Reaction::UI::Widget::Action::Link;
2
3 use Reaction::UI::WidgetClass;
4
5 #I want to change this at some point.
6 use namespace::clean -except => [ qw(meta) ];
7
8
9 before fragment widget {
10   arg uri => $_{viewport}->uri;
11   arg label => localized $_{viewport}->label;
12 };
13
14 __PACKAGE__->meta->make_immutable;
15
16
17 1;
18
19 __END__;
20
21 =head1 NAME
22
23 Reaction::UI::Widget::Action::Link - A hyperlink representing an object mutation
24
25 =head1 DESCRIPTION
26
27 =head1 FRAGMENTS
28
29 =head2 widget
30
31 The following additional arguments are provided:
32
33 =over 4
34
35 =item uri
36
37 The viewport's C<uri>.
38
39 =item label
40
41 The localised value of the viewport's C<label>.
42
43 =back
44
45 =head1 LAYOUT SETS
46
47 =head2 base
48
49   share/skin/base/layout/action/link.tt
50
51 The following layouts are provided:
52
53 =over 4
54
55 =item widget
56
57 Renders a hyperlink with a C<href> attribute set to the C<uri> argument and
58 the content set to the C<label> argument.
59
60 =back
61
62 =head2 default
63
64   share/skin/default/layout/action/link.tt
65
66 This layout set extends the C<NEXT> layout set with the same name in the parent
67 skin.
68
69 The following layouts are provided:
70
71 =over 4
72
73 =item widget
74
75 Renders a C<br> element after the original C<widget> fragment.
76
77 =back
78
79 =head1 SEE ALSO
80
81 =over 4
82
83 =item * L<Reaction::UI::Widget::Action>
84
85 =back
86
87 =head1 AUTHORS
88
89 See L<Reaction::Class> for authors.
90
91 =head1 LICENSE
92
93 See L<Reaction::Class> for the license.
94
95 =cut