| 1 | package Smolder::Control::Admin; | ||
| 2 | use base 'Smolder::Control'; | ||
| 3 | use strict; | ||
| 4 | use warnings; | ||
| 5 | |||
| 6 | =head1 NAME | ||
| 7 | |||
| 8 | Smolder::Control::Admin | ||
| 9 | |||
| 10 | =head1 DESCRIPTION | ||
| 11 | |||
| 12 | Controller module for admin pages. | ||
| 13 | |||
| 14 | =cut | ||
| 15 | |||
| 16 | sub setup { | ||
| 17 | my $self = shift; | ||
| 18 | $self->start_mode('welcome'); | ||
| 19 | $self->run_modes( | ||
| 20 | [ | ||
| 21 | qw( | ||
| 22 | welcome | ||
| 23 | ) | ||
| 24 | ] | ||
| 25 | ); | ||
| 26 | } | ||
| 27 | sub require_group { 'admin' } | ||
| 28 | |||
| 29 | =head1 RUN MODES | ||
| 30 | |||
| 31 | =head2 welcome | ||
| 32 | |||
| 33 | Shows a welcome page using the F<Admin/welcome.tmpl> template. | ||
| 34 | |||
| 35 | =cut | ||
| 36 | |||
| 37 | sub welcome { | ||
| 38 | my $self = shift; | ||
| 39 | return $self->tt_process({}); | ||
| 40 | } | ||
| 41 | |||
| 42 | 1; |