# NEVER EDIT this file.  It was generated and will be overwritten without
# notice upon regeneration of this application.  You have been warned.
package GENJobAd;

use strict;
use warnings;

use Gantry qw{ -TemplateEngine=TT };

use JSON;
use Gantry::Utils::TablePerms;

our @ISA = qw( Gantry );


use JobAd::Model;
sub schema_base_class { return 'JobAd::Model'; }
use Gantry::Plugins::DBIxClassConn qw( get_schema );

#-----------------------------------------------------------------
# $self->namespace() or JobAd->namespace()
#-----------------------------------------------------------------
sub namespace {
    return 'JobAd';
}

#-----------------------------------------------------------------
# $self->init( $r )
#-----------------------------------------------------------------
sub init {
    my ( $self, $r ) = @_;

    # process SUPER's init code
    $self->SUPER::init( $r );

    $self->set_doc_rootp( $self->fish_config( 'doc_rootp' ) || '' );
    $self->set_show_dev_navigation( $self->fish_config( 'show_dev_navigation' ) || '' );
} # END init


#-----------------------------------------------------------------
# $self->set_doc_rootp( $new_value )
#-----------------------------------------------------------------
sub set_doc_rootp {
    my ( $self, $value ) = @_;

    $self->{ __doc_rootp__ } = $value;
}

#-----------------------------------------------------------------
# $self->doc_rootp(  )
#-----------------------------------------------------------------
sub doc_rootp {
    my $self = shift;

    return $self->{ __doc_rootp__ };
}

#-----------------------------------------------------------------
# $self->set_show_dev_navigation( $new_value )
#-----------------------------------------------------------------
sub set_show_dev_navigation {
    my ( $self, $value ) = @_;

    $self->{ __show_dev_navigation__ } = $value;
}

#-----------------------------------------------------------------
# $self->show_dev_navigation(  )
#-----------------------------------------------------------------
sub show_dev_navigation {
    my $self = shift;

    return $self->{ __show_dev_navigation__ };
}


#-----------------------------------------------------------------
# $self->do_main(  )
#-----------------------------------------------------------------
sub do_main {
    my ( $self ) = @_;

    $self->stash->view->template( 'main.tt' );
    $self->stash->view->title( 'Main Listing' );

    $self->stash->view->data( { pages => $self->site_links() } );
} # END do_main

#-----------------------------------------------------------------
# $self->site_links(  )
#-----------------------------------------------------------------
sub site_links {
    my ( $self ) = @_;

    return [
        { link => $self->app_rootp() . '/job', label => 'Job' },
        { link => $self->app_rootp() . '/skill', label => 'Skill' },
        { link => $self->app_rootp() . '/position', label => 'Position' },
        { link => $self->app_rootp() . '/user', label => 'User' },
        { link => $self->app_rootp() . '/grouping', label => 'Grouping' },
    ];
} # END site_links

1;

=head1 NAME

GENJobAd - generated support module for JobAd

=head1 SYNOPSIS

In JobAd:

    use base 'GENJobAd';

=head1 DESCRIPTION

This module was generated by Bigtop (and IS subject to regeneration) to
provide methods in support of the whole JobAd
application.

JobAd should inherit from this module.

=head1 METHODS

=over 4

=item namespace

=item init

=item do_main

=item site_links

=item schema_base_class

=item doc_rootp

=item set_doc_rootp

=item show_dev_navigation

=item set_show_dev_navigation


=back

=head1 AUTHOR

Philip Crow, E<lt>phil@apple.comE<gt>

=head1 COPYRIGHT AND LICENSE

Copyright (C) 2007 Philip Crow

This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself, either Perl version 5.8.6 or,
at your option, any later version of Perl 5 you may have available.

=cut

