templates: move includes into *-header.html files
This commit is contained in:
@@ -62,16 +62,9 @@ $params = $request->{params}->{checked};
|
||||
#process header
|
||||
my $headerParams = uac::set_template_permissions( $request->{permissions}, $params );
|
||||
$headerParams->{loc} = localization::get( $config, { user => $user, file => 'menu' } );
|
||||
template::process( $config, 'print', template::check( $config, 'default.html' ), $headerParams );
|
||||
template::process( $config, 'print', template::check( $config, 'assign-series-header.html' ), $headerParams );
|
||||
return unless uac::check( $config, $params, $user_presets ) == 1;
|
||||
|
||||
print q{
|
||||
<script src="js/datetime.js" type="text/javascript"></script>
|
||||
<script src="js/event.js" type="text/javascript"></script>
|
||||
<script src="js/localization.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" href="css/series.css" type="text/css" />
|
||||
};
|
||||
|
||||
my $permissions = $request->{permissions};
|
||||
unless ( $permissions->{scan_series_events} == 1 ) {
|
||||
uac::permissions_denied('scan_series_events');
|
||||
|
||||
@@ -63,16 +63,9 @@ $params = $request->{params}->{checked};
|
||||
#process header
|
||||
my $headerParams = uac::set_template_permissions( $request->{permissions}, $params );
|
||||
$headerParams->{loc} = localization::get( $config, { user => $user, file => 'menu' } );
|
||||
template::process( $config, 'print', template::check( $config, 'default.html' ), $headerParams );
|
||||
template::process( $config, 'print', template::check( $config, 'assignments-header.html' ), $headerParams );
|
||||
return unless uac::check( $config, $params, $user_presets ) == 1;
|
||||
|
||||
print q{
|
||||
<script src="js/datetime.js" type="text/javascript"></script>
|
||||
<script src="js/event.js" type="text/javascript"></script>
|
||||
<script src="js/localization.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" href="css/series.css" type="text/css" />
|
||||
};
|
||||
|
||||
my $permissions = $request->{permissions};
|
||||
unless ( $permissions->{scan_series_events} == 1 ) {
|
||||
uac::permissions_denied('scan_series_events');
|
||||
|
||||
@@ -87,11 +87,8 @@ $headerParams->{loc} = localization::get( $config, { user => $user, file => 'men
|
||||
template::process( $config, 'print', template::check( $config, 'default.html' ), $headerParams );
|
||||
|
||||
exit unless uac::check( $config, $params, $user_presets ) == 1;
|
||||
|
||||
print q{
|
||||
<script src="js/audio-recordings.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" href="css/audio-recordings.css" type="text/css" />
|
||||
} unless (params::isJson);
|
||||
template::process( $config, 'print', template::check( $config, 'audio-recordings-header.html' ), $headerParams )
|
||||
unless params::isJson;
|
||||
|
||||
my $permissions = $request->{permissions};
|
||||
$params->{action} = '' unless defined $params->{action};
|
||||
|
||||
@@ -100,15 +100,8 @@ if (
|
||||
#process header
|
||||
my $headerParams = uac::set_template_permissions( $request->{permissions}, $params );
|
||||
$headerParams->{loc} = localization::get( $config, { user => $user, file => 'menu' } );
|
||||
template::process( $config, 'print', template::check( $config, 'default.html' ),
|
||||
template::process( $config, 'print', template::check( $config, 'calendar-header.html' ),
|
||||
$headerParams );
|
||||
print q{
|
||||
<link rel="stylesheet" href="css/calendar.css" type="text/css" />
|
||||
<link rel="stylesheet" href="css/flatpickr.min.css" type="text/css" />
|
||||
<script src="js/flatpickr.js" type="text/javascript"></script>
|
||||
<script src="js/calendar.js" type="text/javascript"></script>
|
||||
<script src="js/datetime.js" type="text/javascript"></script>
|
||||
};
|
||||
if ( $params->{list} eq '1' ) {
|
||||
print q{
|
||||
<script src="js/jquery.tablesorter.min.js"></script>
|
||||
|
||||
@@ -68,9 +68,8 @@ if ( ( params::isJson() ) || ( defined $params->{action} ) ) {
|
||||
my $headerParams = uac::set_template_permissions( $request->{permissions}, $params );
|
||||
$headerParams->{loc} = localization::get( $config, { user => $user, file => 'menu' } );
|
||||
template::process( $config, 'print', template::check( $config, 'default.html' ), $headerParams );
|
||||
print q{
|
||||
<script src="js/datetime.js" type="text/javascript"></script>
|
||||
} unless (params::isJson);
|
||||
template::process( $config, 'print', template::check( $config, 'comment-header.html' ), $headerParams )
|
||||
unless (params::isJson);
|
||||
}
|
||||
return unless uac::check( $config, $params, $user_presets ) == 1;
|
||||
|
||||
|
||||
@@ -57,16 +57,9 @@ $params = $request->{params}->{checked};
|
||||
#process header
|
||||
my $headerParams = uac::set_template_permissions( $request->{permissions}, $params );
|
||||
$headerParams->{loc} = localization::get( $config, { user => $user, file => 'menu' } );
|
||||
template::process( $config, 'print', template::check( $config, 'default.html' ), $headerParams );
|
||||
template::process( $config, 'print', template::check( $config, 'create-events-header.html' ), $headerParams );
|
||||
return unless uac::check( $config, $params, $user_presets ) == 1;
|
||||
|
||||
print q{
|
||||
<script src="js/datetime.js" type="text/javascript"></script>
|
||||
<script src="js/event.js" type="text/javascript"></script>
|
||||
<script src="js/localization.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" href="css/series.css" type="text/css" />
|
||||
};
|
||||
|
||||
my $permissions = $request->{permissions};
|
||||
unless ( $permissions->{create_event_from_schedule} == 1 ) {
|
||||
uac::permissions_denied('create_event_from_schedule');
|
||||
|
||||
@@ -43,6 +43,7 @@ my $config = config::get('../config/config.cgi');
|
||||
my $debug = $config->{system}->{debug};
|
||||
my ( $user, $expires ) = auth::get_user( $config, $params, $cgi );
|
||||
return if ( ( !defined $user ) || ( $user eq '' ) );
|
||||
|
||||
my $user_presets = uac::get_user_presets(
|
||||
$config,
|
||||
{
|
||||
@@ -73,17 +74,10 @@ my $show_header = ! (params::isJson() or $params->{action} eq 'download_audio');
|
||||
if ( $show_header ) {
|
||||
my $headerParams = uac::set_template_permissions( $request->{permissions}, $params );
|
||||
$headerParams->{loc} = localization::get( $config, { user => $user, file => 'menu' } );
|
||||
template::process( $config, 'print', template::check( $config, 'default.html' ),
|
||||
$headerParams );
|
||||
template::process( $config, 'print', template::check( $config, 'event-header.html' ), $headerParams );
|
||||
}
|
||||
return unless uac::check( $config, $params, $user_presets ) == 1;
|
||||
|
||||
print q{
|
||||
<script src="js/datetime.js" type="text/javascript"></script>
|
||||
<script src="js/event.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" href="css/event.css" type="text/css" />
|
||||
} if $show_header;
|
||||
|
||||
if ( defined $params->{action} ) {
|
||||
if ( ( $params->{action} eq 'show_new_event' )
|
||||
|| ( $params->{action} eq 'show_new_event_from_schedule' ) )
|
||||
|
||||
@@ -54,15 +54,9 @@ $params = $request->{params}->{checked};
|
||||
#process header
|
||||
my $headerParams = uac::set_template_permissions( $request->{permissions}, $params );
|
||||
$headerParams->{loc} = localization::get( $config, { user => $user, file => 'menu' } );
|
||||
template::process( $config, 'print', template::check( $config, 'default.html' ), $headerParams );
|
||||
template::process( $config, 'print', template::check( $config, 'projects-header.html' ), $headerParams );
|
||||
return unless uac::check( $config, $params, $user_presets ) == 1;
|
||||
|
||||
print q{
|
||||
<link rel="stylesheet" href="css/projects.css" type="text/css" />
|
||||
<script src="js/datetime.js" type="text/javascript"></script>
|
||||
<script src="js/projects.js" type="text/javascript"></script>
|
||||
};
|
||||
|
||||
if ( defined $params->{action} ) {
|
||||
save_project( $config, $request ) if ( $params->{action} eq 'save' );
|
||||
delete_project( $config, $request ) if ( $params->{action} eq 'delete' );
|
||||
|
||||
@@ -65,19 +65,11 @@ $params = $request->{params}->{checked};
|
||||
unless ( params::isJson() ) {
|
||||
my $headerParams = uac::set_template_permissions( $request->{permissions}, $params );
|
||||
$headerParams->{loc} = localization::get( $config, { user => $user, file => 'menu' } );
|
||||
template::process( $config, 'print', template::check( $config, 'default.html' ),
|
||||
template::process( $config, 'print', template::check( $config, 'series-header.html' ),
|
||||
$headerParams );
|
||||
}
|
||||
return unless uac::check( $config, $params, $user_presets ) == 1;
|
||||
|
||||
print q{
|
||||
<script src="js/datetime.js" type="text/javascript"></script>
|
||||
<script src="js/event.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" href="css/series.css" type="text/css" />
|
||||
} unless params::isJson();
|
||||
|
||||
# <script src="js/localization.js" type="text/javascript"></script>
|
||||
|
||||
if ( defined $params->{action} ) {
|
||||
save_schedule( $config, $request ) if ( $params->{action} eq 'save_schedule' );
|
||||
delete_schedule( $config, $request ) if ( $params->{action} eq 'delete_schedule' );
|
||||
@@ -109,14 +101,12 @@ if ( defined $params->{action} ) {
|
||||
$config->{access}->{write} = 0;
|
||||
|
||||
if ( defined $params->{series_id} ) {
|
||||
print q{<script src="js/edit-series.js" type="text/javascript"></script>}
|
||||
unless params::isJson();
|
||||
template::process( $config, 'print', template::check( $config, 'show-series-header.html' ),{})
|
||||
unless params::isJson();
|
||||
show_series( $config, $request );
|
||||
} else {
|
||||
print q{
|
||||
<link rel="stylesheet" href="css/list-series.css" type="text/css" />
|
||||
<script src="js/list-series.js" type="text/javascript"></script>
|
||||
} unless params::isJson();
|
||||
template::process( $config, 'print', template::check( $config, 'list-series-header.html' ),{})
|
||||
unless params::isJson();
|
||||
list_series( $config, $request );
|
||||
}
|
||||
|
||||
|
||||
@@ -60,10 +60,8 @@ unless ( params::isJson() ) {
|
||||
}
|
||||
return unless uac::check( $config, $params, $user_presets ) == 1;
|
||||
|
||||
print q{
|
||||
<script src="js/show-playout.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" href="css/show-playout.css" type="text/css" />
|
||||
} unless (params::isJson);
|
||||
template::process( $config, 'print', template::check( $config, 'show-playout-header.html' ), $headerParams )
|
||||
unless (params::isJson);
|
||||
|
||||
my $permissions = $request->{permissions};
|
||||
$params->{action} = '' unless defined $params->{action};
|
||||
|
||||
@@ -60,7 +60,6 @@ $headerParams->{loc} = localization::get( $config, { user => $user, file => 'all
|
||||
|
||||
my $action = $params->{action} || '';
|
||||
if ( $action eq 'show_dates' ) {
|
||||
|
||||
#print "Content-type:text/html\n\n";
|
||||
} else {
|
||||
template::process( $config, 'print', template::check( $config, 'default.html' ), $headerParams );
|
||||
@@ -70,13 +69,7 @@ return unless uac::check( $config, $params, $user_presets ) == 1;
|
||||
if ( $action eq 'show_dates' ) {
|
||||
print "Content-Type:text/html\n\n";
|
||||
} else {
|
||||
print q{
|
||||
<link href="css/theme.default.css" rel="stylesheet">
|
||||
<script src="js/jquery.tablesorter.min.js"></script>
|
||||
<script src="js/studio-timeslots.js" type="text/javascript"></script>
|
||||
<script src="js/datetime.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" href="css/studio-timeslots.css" type="text/css" />
|
||||
};
|
||||
template::process( $config, 'print', template::check( $config, 'studio-timeslots-header.html' ), $headerParams );
|
||||
}
|
||||
|
||||
if ( defined $params->{action} ) {
|
||||
|
||||
@@ -53,14 +53,9 @@ $params = $request->{params}->{checked};
|
||||
#process header
|
||||
my $headerParams = uac::set_template_permissions( $request->{permissions}, $params );
|
||||
$headerParams->{loc} = localization::get( $config, { user => $user, file => 'menu' } );
|
||||
template::process( $config, 'print', template::check( $config, 'default.html' ), $headerParams );
|
||||
template::process( $config, 'print', template::check( $config, 'studio-headers.html' ), $headerParams );
|
||||
return unless uac::check( $config, $params, $user_presets ) == 1;
|
||||
|
||||
print q{
|
||||
<link rel="stylesheet" href="css/studios.css" type="text/css" />
|
||||
<script src="js/studios.js" type="text/javascript"></script>
|
||||
};
|
||||
|
||||
if ( defined $params->{action} ) {
|
||||
save_studio( $config, $request ) if ( $params->{action} eq 'save' );
|
||||
delete_studio( $config, $request ) if ( $params->{action} eq 'delete' );
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
<TMPL_INCLUDE default.html>
|
||||
<script src="js/datetime.js" type="text/javascript"></script>
|
||||
<script src="js/event.js" type="text/javascript"></script>
|
||||
<script src="js/localization.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" href="css/series.css" type="text/css" />
|
||||
5
website/agenda/planung/templates/assignments-header.html
Normal file
5
website/agenda/planung/templates/assignments-header.html
Normal file
@@ -0,0 +1,5 @@
|
||||
<TMPL_INCLUDE default.html>
|
||||
<script src="js/datetime.js" type="text/javascript"></script>
|
||||
<script src="js/event.js" type="text/javascript"></script>
|
||||
<script src="js/localization.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" href="css/series.css" type="text/css" />
|
||||
@@ -0,0 +1,3 @@
|
||||
<script src="js/audio-recordings.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" href="css/audio-recordings.css" type="text/css" />
|
||||
|
||||
6
website/agenda/planung/templates/calendar-header.html
Normal file
6
website/agenda/planung/templates/calendar-header.html
Normal file
@@ -0,0 +1,6 @@
|
||||
<TMPL_INCLUDE default.html>
|
||||
<link rel="stylesheet" href="css/calendar.css" type="text/css" />
|
||||
<link rel="stylesheet" href="css/flatpickr.min.css" type="text/css" />
|
||||
<script src="js/flatpickr.js" type="text/javascript"></script>
|
||||
<script src="js/calendar.js" type="text/javascript"></script>
|
||||
<script src="js/datetime.js" type="text/javascript"></script>
|
||||
2
website/agenda/planung/templates/comment-header.html
Normal file
2
website/agenda/planung/templates/comment-header.html
Normal file
@@ -0,0 +1,2 @@
|
||||
<script src="js/datetime.js" type="text/javascript"></script>
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
<TMPL_INCLUDE default.html>
|
||||
<script src="js/datetime.js" type="text/javascript"></script>
|
||||
<script src="js/event.js" type="text/javascript"></script>
|
||||
<script src="js/localization.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" href="css/series.css" type="text/css" />
|
||||
4
website/agenda/planung/templates/event-header.html
Normal file
4
website/agenda/planung/templates/event-header.html
Normal file
@@ -0,0 +1,4 @@
|
||||
<TMPL_INCLUDE default.html>
|
||||
<script src="js/datetime.js" type="text/javascript"></script>
|
||||
<script src="js/event.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" href="css/event.css" type="text/css" />
|
||||
2
website/agenda/planung/templates/list-series-header.html
Normal file
2
website/agenda/planung/templates/list-series-header.html
Normal file
@@ -0,0 +1,2 @@
|
||||
<link rel="stylesheet" href="css/list-series.css" type="text/css" />
|
||||
<script src="js/list-series.js" type="text/javascript"></script>
|
||||
5
website/agenda/planung/templates/projects-header.html
Normal file
5
website/agenda/planung/templates/projects-header.html
Normal file
@@ -0,0 +1,5 @@
|
||||
<TMPL_INCLUDE header.html>
|
||||
<link rel="stylesheet" href="css/projects.css" type="text/css" />
|
||||
<script src="js/datetime.js" type="text/javascript"></script>
|
||||
<script src="js/projects.js" type="text/javascript"></script>
|
||||
|
||||
4
website/agenda/planung/templates/series-header.html
Normal file
4
website/agenda/planung/templates/series-header.html
Normal file
@@ -0,0 +1,4 @@
|
||||
<TMPL_INCLUDE default.html>
|
||||
<script src="js/datetime.js" type="text/javascript"></script>
|
||||
<script src="js/event.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" href="css/series.css" type="text/css" />
|
||||
@@ -0,0 +1,3 @@
|
||||
<script src="js/show-playout.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" href="css/show-playout.css" type="text/css" />
|
||||
|
||||
1
website/agenda/planung/templates/show-series-header.html
Normal file
1
website/agenda/planung/templates/show-series-header.html
Normal file
@@ -0,0 +1 @@
|
||||
<script src="js/edit-series.js" type="text/javascript"></script>
|
||||
@@ -0,0 +1,5 @@
|
||||
<link href="css/theme.default.css" rel="stylesheet">
|
||||
<script src="js/jquery.tablesorter.min.js"></script>
|
||||
<script src="js/studio-timeslots.js" type="text/javascript"></script>
|
||||
<script src="js/datetime.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" href="css/studio-timeslots.css" type="text/css" />
|
||||
4
website/agenda/planung/templates/studios-header.html
Normal file
4
website/agenda/planung/templates/studios-header.html
Normal file
@@ -0,0 +1,4 @@
|
||||
<TMPL_INCLUDE default.html>
|
||||
<link rel="stylesheet" href="css/studios.css" type="text/css" />
|
||||
<script src="js/studios.js" type="text/javascript"></script>
|
||||
|
||||
2
website/agenda/planung/templates/worktime-header.html
Normal file
2
website/agenda/planung/templates/worktime-header.html
Normal file
@@ -0,0 +1,2 @@
|
||||
<script src="js/edit_work_time.js" type="text/javascript"></script>
|
||||
|
||||
@@ -64,7 +64,8 @@ if ( defined $params->{action} ) {
|
||||
}
|
||||
|
||||
$config->{access}->{write} = 0;
|
||||
print q{<script src="js/edit_work_time.js" type="text/javascript"></script>};
|
||||
template::process( $config, 'print', template::check( $config, 'worktime-header.html' ), $headerParams );
|
||||
|
||||
show_work_schedule( $config, $request );
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user