-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make report types editable though the UI.
- Loading branch information
Showing
2 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
=head1 NAME | ||
Tuba::ReportType : Controller class for report types. | ||
=cut | ||
|
||
package Tuba::ReportType; | ||
use Mojo::Base qw/Tuba::Controller/; | ||
use Tuba::DB::Objects qw/-nicknames/; | ||
|
||
sub _default_list_order { | ||
return "identifier"; | ||
} | ||
|
||
=head1 show | ||
Show metadata about a report types. | ||
=cut | ||
|
||
sub show { | ||
my $c = shift; | ||
my $identifier = $c->stash('report_type_identifier'); | ||
my $meta = ReportType->meta; | ||
my $object = ReportType->new( identifier => $identifier ) | ||
->load( speculative => 1 ) or return $c->reply->not_found; | ||
$c->stash(object => $object); | ||
$c->stash(meta => $meta); | ||
$c->SUPER::show(@_); | ||
} | ||
|
||
|
||
|
||
1; | ||
|