reorganize database columns, fix series search, show image licences

This commit is contained in:
Milan
2018-06-18 00:43:02 +02:00
parent aa648f58ef
commit d7e1f02198
13 changed files with 387 additions and 234 deletions

View File

@@ -113,4 +113,133 @@ ALTER TABLE `calcms_event_history`
ADD COLUMN series_image varchar(200) NULL AFTER draft, ADD COLUMN series_image varchar(200) NULL AFTER draft,
ADD COLUMN recurrence_count int(10) unsigned NOT NULL DEFAULT '0' AFTER project_id, ADD COLUMN recurrence_count int(10) unsigned NOT NULL DEFAULT '0' AFTER project_id,
ADD COLUMN image_label varchar(200) NULL; ADD COLUMN image_label varchar(200) NULL;
-- 2018-06-18 refactor columns
ALTER TABLE `calcms`.`calcms_audio_recordings`
CHANGE COLUMN `created_by` `created_by` VARCHAR(100) NOT NULL AFTER `processed`,
CHANGE COLUMN `created_at` `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP AFTER `created_by`;
ALTER TABLE `calcms`.`calcms_events`
CHANGE COLUMN `program` `program` VARCHAR(40) NULL DEFAULT NULL AFTER `end`,
CHANGE COLUMN `series_name` `series_name` VARCHAR(40) NULL DEFAULT NULL AFTER `program`,
CHANGE COLUMN `episode` `episode` INT(10) UNSIGNED NULL DEFAULT NULL AFTER `title`,
CHANGE COLUMN `html_content` `html_content` LONGTEXT NULL DEFAULT NULL AFTER `content`,
CHANGE COLUMN `end_date` `end_date` DATE NOT NULL AFTER `start_date`,
CHANGE COLUMN `archive_url` `archive_url` VARCHAR(300) NULL DEFAULT NULL AFTER `podcast_url`,
CHANGE COLUMN `html_topic` `html_topic` LONGTEXT NULL DEFAULT NULL AFTER `user_excerpt`,
CHANGE COLUMN `draft` `draft` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0' AFTER `archived`,
CHANGE COLUMN `recurrence` `recurrence` INT(11) NULL DEFAULT '0' AFTER `recurrence_count`,
CHANGE COLUMN `image` `image` VARCHAR(200) NULL DEFAULT NULL AFTER `recurrence`,
CHANGE COLUMN `image_label` `image_label` VARCHAR(200) NULL DEFAULT NULL AFTER `image`,
CHANGE COLUMN `created_at` `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP AFTER `series_image_label`,
CHANGE COLUMN `modified_by` `modified_by` VARCHAR(20) NULL DEFAULT NULL AFTER `created_at`,
CHANGE COLUMN `modified_at` `modified_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP AFTER `modified_by`,
CHANGE COLUMN `reference` `reference` VARCHAR(300) NULL DEFAULT NULL AFTER `modified_at`,
CHANGE COLUMN `disable_event_sync` `disable_event_sync` TINYINT(1) UNSIGNED NULL DEFAULT NULL AFTER `reference`;
ALTER TABLE `calcms`.`calcms_images`
CHANGE COLUMN `project_id` `project_id` INT(10) UNSIGNED NOT NULL AFTER `id`,
CHANGE COLUMN `studio_id` `studio_id` INT(10) UNSIGNED NULL DEFAULT NULL AFTER `project_id`,
CHANGE COLUMN `filename` `filename` VARCHAR(64) NOT NULL AFTER `studio_id`,
CHANGE COLUMN `name` `name` VARCHAR(300) NULL DEFAULT NULL AFTER `filename`,
CHANGE COLUMN `licence` `licence` VARCHAR(300) NULL DEFAULT NULL AFTER `description`,
CHANGE COLUMN `public` `public` TINYINT(1) UNSIGNED NULL DEFAULT '0' AFTER `licence`,
CHANGE COLUMN `created_at` `created_at` DATETIME NULL DEFAULT CURRENT_TIMESTAMP AFTER `modified_by`;
ALTER TABLE `calcms`.`calcms_roles`
CHANGE COLUMN `project_id` `project_id` TINYINT(1) UNSIGNED NOT NULL AFTER `id`,
CHANGE COLUMN `studio_id` `studio_id` INT(10) UNSIGNED NOT NULL AFTER `project_id`,
CHANGE COLUMN `level` `level` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0' AFTER `role`,
CHANGE COLUMN `read_role` `read_role` TINYINT(1) UNSIGNED NULL DEFAULT NULL AFTER `level`,
CHANGE COLUMN `update_role` `update_role` TINYINT(1) UNSIGNED NULL DEFAULT NULL AFTER `read_role`,
CHANGE COLUMN `read_user_role` `read_user_role` TINYINT(1) UNSIGNED NULL DEFAULT NULL AFTER `update_role`,
CHANGE COLUMN `delete_user` `delete_user` TINYINT(1) UNSIGNED NULL DEFAULT NULL AFTER `update_user`,
CHANGE COLUMN `update_user_role` `update_user_role` TINYINT(1) UNSIGNED NULL DEFAULT NULL AFTER `delete_user`,
CHANGE COLUMN `create_project` `create_project` TINYINT(1) UNSIGNED NOT NULL AFTER `disable_user`,
CHANGE COLUMN `read_project` `read_project` TINYINT(1) UNSIGNED NOT NULL AFTER `create_project`,
CHANGE COLUMN `update_project` `update_project` TINYINT(1) UNSIGNED NOT NULL AFTER `read_project`,
CHANGE COLUMN `delete_project` `delete_project` TINYINT(1) UNSIGNED NOT NULL AFTER `update_project`,
CHANGE COLUMN `assign_project_studio` `assign_project_studio` TINYINT(1) UNSIGNED NOT NULL AFTER `delete_project`,
CHANGE COLUMN `create_studio` `create_studio` TINYINT(1) UNSIGNED NOT NULL AFTER `assign_project_studio`,
CHANGE COLUMN `read_studio` `read_studio` TINYINT(1) UNSIGNED NOT NULL AFTER `create_studio`,
CHANGE COLUMN `delete_studio` `delete_studio` TINYINT(1) UNSIGNED NOT NULL AFTER `update_studio`,
CHANGE COLUMN `read_studio_timeslot_schedule` `read_studio_timeslot_schedule` TINYINT(1) UNSIGNED NOT NULL AFTER `delete_studio`,
CHANGE COLUMN `update_studio_timeslot_schedule` `update_studio_timeslot_schedule` TINYINT(1) UNSIGNED NOT NULL AFTER `read_studio_timeslot_schedule`,
CHANGE COLUMN `update_series_template` `update_series_template` TINYINT(1) UNSIGNED NOT NULL AFTER `delete_series`,
CHANGE COLUMN `assign_series_member` `assign_series_member` TINYINT(1) UNSIGNED NOT NULL AFTER `update_series_template`,
CHANGE COLUMN `remove_series_member` `remove_series_member` TINYINT(1) UNSIGNED NOT NULL AFTER `assign_series_member`,
CHANGE COLUMN `scan_series_events` `scan_series_events` TINYINT(1) UNSIGNED NOT NULL AFTER `remove_series_member`,
CHANGE COLUMN `assign_series_events` `assign_series_events` TINYINT(1) UNSIGNED NOT NULL AFTER `scan_series_events`,
CHANGE COLUMN `read_schedule` `read_schedule` TINYINT(1) UNSIGNED NOT NULL AFTER `assign_series_events`,
CHANGE COLUMN `update_schedule` `update_schedule` TINYINT(1) UNSIGNED NOT NULL AFTER `read_schedule`,
CHANGE COLUMN `delete_schedule` `delete_schedule` TINYINT(1) UNSIGNED NOT NULL AFTER `update_schedule`,
CHANGE COLUMN `create_event_from_schedule` `create_event_from_schedule` TINYINT(1) UNSIGNED NOT NULL AFTER `create_event`,
CHANGE COLUMN `create_event_of_series` `create_event_of_series` TINYINT(1) UNSIGNED NOT NULL AFTER `create_event_from_schedule`,
CHANGE COLUMN `update_event_after_week` `update_event_after_week` TINYINT(1) UNSIGNED NOT NULL AFTER `update_event_time`,
CHANGE COLUMN `update_event_field_title` `update_event_field_title` TINYINT(1) UNSIGNED NOT NULL AFTER `update_event_after_week`,
CHANGE COLUMN `update_event_field_title_extension` `update_event_field_title_extension` TINYINT(1) UNSIGNED NOT NULL AFTER `update_event_field_title`,
CHANGE COLUMN `update_event_field_excerpt` `update_event_field_excerpt` TINYINT(1) UNSIGNED NOT NULL AFTER `update_event_field_title_extension`,
CHANGE COLUMN `update_event_field_description` `update_event_field_description` TINYINT(1) UNSIGNED NOT NULL AFTER `update_event_field_content`,
CHANGE COLUMN `update_event_field_topic` `update_event_field_topic` TINYINT(1) UNSIGNED NOT NULL AFTER `update_event_field_description`,
CHANGE COLUMN `update_event_field_episode` `update_event_field_episode` TINYINT(1) UNSIGNED NOT NULL AFTER `update_event_field_topic`,
CHANGE COLUMN `update_event_field_excerpt_extension` `update_event_field_excerpt_extension` TINYINT(1) UNSIGNED NOT NULL AFTER `update_event_field_episode`,
CHANGE COLUMN `update_event_field_image` `update_event_field_image` TINYINT(1) UNSIGNED NOT NULL AFTER `update_event_field_excerpt_extension`,
CHANGE COLUMN `update_event_field_podcast_url` `update_event_field_podcast_url` TINYINT(1) UNSIGNED NOT NULL AFTER `update_event_field_image`,
CHANGE COLUMN `update_event_field_archive_url` `update_event_field_archive_url` TINYINT(1) UNSIGNED NOT NULL AFTER `update_event_field_podcast_url`,
CHANGE COLUMN `update_event_status_draft` `update_event_status_draft` TINYINT(1) UNSIGNED NOT NULL AFTER `update_event_status_rerun`,
CHANGE COLUMN `update_event_status_live` `update_event_status_live` TINYINT(1) UNSIGNED NOT NULL AFTER `update_event_status_draft`,
CHANGE COLUMN `update_event_status_playout` `update_event_status_playout` TINYINT(1) UNSIGNED NOT NULL AFTER `update_event_status_live`,
CHANGE COLUMN `update_event_status_archived` `update_event_status_archived` TINYINT(1) UNSIGNED NOT NULL AFTER `update_event_status_playout`,
CHANGE COLUMN `create_image` `create_image` TINYINT(1) UNSIGNED NOT NULL AFTER `update_event_status_archived`,
CHANGE COLUMN `update_image_own` `update_image_own` TINYINT(1) UNSIGNED NOT NULL AFTER `create_image`,
CHANGE COLUMN `created_at` `created_at` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP AFTER `read_playout`,
CHANGE COLUMN `create_download` `create_download` TINYINT(1) UNSIGNED NOT NULL AFTER `created_at`,
CHANGE COLUMN `modified_at` `modified_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP AFTER `create_download`;
ALTER TABLE `calcms`.`calcms_series_dates`
CHANGE COLUMN `project_id` `project_id` INT(10) UNSIGNED NOT NULL AFTER `id`,
CHANGE COLUMN `studio_id` `studio_id` INT(10) UNSIGNED NOT NULL AFTER `project_id`;
ALTER TABLE `calcms`.`calcms_series_events`
CHANGE COLUMN `project_id` `project_id` INT(10) UNSIGNED NOT NULL FIRST,
CHANGE COLUMN `studio_id` `studio_id` INT(12) UNSIGNED NOT NULL AFTER `project_id`;
ALTER TABLE `calcms`.`calcms_series_schedule`
CHANGE COLUMN `project_id` `project_id` INT(10) UNSIGNED NOT NULL DEFAULT '1' AFTER `id`,
CHANGE COLUMN `studio_id` `studio_id` INT(10) UNSIGNED NULL DEFAULT NULL AFTER `project_id`;
ALTER TABLE `calcms`.`calcms_studios`
CHANGE COLUMN `image` `image` VARCHAR(200) NOT NULL AFTER `stream`;
ALTER TABLE `calcms`.`calcms_studio_timeslot_dates`
CHANGE COLUMN `project_id` `project_id` INT(10) UNSIGNED NOT NULL FIRST,
CHANGE COLUMN `schedule_id` `schedule_id` INT(10) UNSIGNED NOT NULL AFTER `studio_id`,
DROP PRIMARY KEY,
ADD PRIMARY KEY USING BTREE (`project_id`, `studio_id`, `start`, `end`);
ALTER TABLE `calcms`.`calcms_studio_timeslot_schedule`
CHANGE COLUMN `project_id` `project_id` INT(10) UNSIGNED NOT NULL AFTER `id`;
ALTER TABLE `calcms`.`calcms_user_events`
CHANGE COLUMN `modified_by` `modified_by` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `location`,
CHANGE COLUMN `modified_at` `modified_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP AFTER `modified_by`;
ALTER TABLE `calcms`.`calcms_user_roles`
CHANGE COLUMN `project_id` `project_id` INT(10) UNSIGNED NOT NULL AFTER `id`,
CHANGE COLUMN `studio_id` `studio_id` INT(10) UNSIGNED NOT NULL DEFAULT '0' AFTER `project_id`;
ALTER TABLE `calcms`.`calcms_users`
CHANGE COLUMN `email` `email` VARCHAR(300) NOT NULL AFTER `full_name`,
CHANGE COLUMN `pass` `pass` VARCHAR(100) NOT NULL AFTER `email`,
CHANGE COLUMN `created_at` `created_at` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP AFTER `created_by`,
CHANGE COLUMN `modified_at` `modified_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP AFTER `created_at`;
ALTER TABLE `calcms`.`calcms_user_series`
CHANGE COLUMN `project_id` `project_id` INT(10) UNSIGNED NOT NULL AFTER `id`,
CHANGE COLUMN `studio_id` `studio_id` INT(10) UNSIGNED NOT NULL AFTER `project_id`;
ALTER TABLE `calcms`.`calcms_user_stats`
ADD COLUMN `upload_file` INT(10) UNSIGNED NULL DEFAULT 0 AFTER `delete_series`,
ADD COLUMN `download_file` INT(10) UNSIGNED NULL DEFAULT 0 AFTER `upload_file`;

View File

@@ -911,19 +911,19 @@ sub get_query {
my $search_cond = ''; my $search_cond = '';
if ( ( defined $params->{search} ) && ( $params->{search} ne '' ) ) { if ( ( defined $params->{search} ) && ( $params->{search} ne '' ) ) {
my $search = lc $params->{search}; my $search = lc $params->{search};
$search =~ s/[^a-z0-9\_\.\-\:\!öäüßÖÄÜ \&]/%/; $search =~ s/(?=[\\%_])/\\/g;
$search =~ s/\%+/\%/;
$search =~ s/^[\%\s]+//; $search =~ s/^[\%\s]+//;
$search =~ s/[\%\s]+$//; $search =~ s/[\%\s]+$//;
if ( $search ne '' ) { if ( $search ne '' ) {
$search = '%' . $search . '%'; $search = '%' . $search . '%';
my @attr = ( 'title', 'series_name', 'excerpt', 'category', 'content', 'topic' ); my @attr = ( 'title', 'series_name', 'excerpt', 'category', 'content', 'topic' );
$search_cond = "(" . join( " or ", map { 'lower(' . $_ . ') like ?' } @attr ) . ")"; $search_cond = "(" . join( " or ", map { 'lower(' . $_ . ') like ?' } @attr ) . ")";
for my $attr (@attr) { for my $attr (@attr) {
push @$bind_values, $search; push @$bind_values, $search;
} }
} }
} }
#print STDERR $search_cond."\n";
my $project_cond = ''; my $project_cond = '';

View File

@@ -269,7 +269,7 @@ sub delete_files{
return undef; return undef;
print log::error($config, 'missing permissions on writing into local media dir ' .$local_media_dir)unless(-w $local_media_dir); print log::error($config, 'missing permissions on writing into local media dir')unless(-w $local_media_dir);
if ($filename=~/[^a-zA-Z0-9\.\_\-]/){ if ($filename=~/[^a-zA-Z0-9\.\_\-]/){
log::error($config, "invalid filename: '$filename'"); log::error($config, "invalid filename: '$filename'");

View File

@@ -50,6 +50,11 @@ sub get{
push @bind_values, $condition->{name}; push @bind_values, $condition->{name};
} }
if ((defined $condition->{location}) && ($condition->{location} ne '')){
push @conditions, 's.location=?';
push @bind_values, $condition->{location};
}
my $limit=''; my $limit='';
if ((defined $condition->{limit}) && ($condition->{limit} ne '')){ if ((defined $condition->{limit}) && ($condition->{limit} ne '')){
$limit= 'limit '.$condition->{limit}; $limit= 'limit '.$condition->{limit};

View File

@@ -79,6 +79,13 @@ RewriteRule ^future$ events.cgi?template=event_list_image.html&limit=20
RewriteRule ^dt64-festival.html$ events.cgi?location=dt64&template=event_dt64&archive=all RewriteRule ^dt64-festival.html$ events.cgi?location=dt64&template=event_dt64&archive=all
RewriteRule ^frrapo-programm.html$ events.cgi?location=potsdam&template=event_frrapo RewriteRule ^frrapo-programm.html$ events.cgi?location=potsdam&template=event_frrapo
RewriteRule ^upload_playout_piradio$ upload_playout.cgi?project_id=1&studio_id=1 RewriteRule ^upload_playout_piradio$ upload_playout.cgi?project_id=1&studio_id=1
RewriteRule ^redaktionen-piradio$ series.cgi?project_id=1&location=piradio
RewriteRule ^redaktionen-studio-ansage$ series.cgi?project_id=1&location=ansage
RewriteRule ^redaktionen-frrapo$ series.cgi?project_id=1&location=potsdam
RewriteRule ^redaktionen-colabo-radio$ series.cgi?project_id=1&location=colabo
RewriteRule ^redaktionen-frb$ series.cgi?project_id=1&location=frb
</IfModule> </IfModule>
# MOD_PERL # MOD_PERL

View File

@@ -4,44 +4,44 @@
/* main structure */ /* main structure */
/* /*
body { body {
font-size:12px font-size:12px
} }
*/ */
#nav { #nav {
text-align:center; text-align:center;
margin:0; margin:0;
height:3em; height:3em;
z-index:3; z-index:3;
text-align:left; text-align:left;
background:white; background:white;
width:100%; width:100%;
font-size:10px; font-size:10px;
} }
#calcms_body { #calcms_body {
/* /*
font-size:10px; font-size:10px;
*/ */
overflow:auto; overflow:auto;
background:white; background:white;
padding-top:3px;padding-right:5px; padding-top:3px;padding-right:5px;
margin:bottom:1px; margin:bottom:1px;
text-align:left; text-align:left;
padding:3px; padding:3px;
} }
pre { pre {
text-align:left; text-align:left;
/* /*
font-size:0.7em; font-size:0.7em;
*/ */
font-family:Courier; font-family:Courier;
padding:1em;margin:1em; padding:1em;margin:1em;
border:1px solid black; border:1px solid black;
background-color:#eee; background-color:#eee;
} }
/* end of main structure */ /* end of main structure */
@@ -49,27 +49,27 @@
/* search field */ /* search field */
#nav form {float:left;} #nav form {float:left;}
#nav form input { #nav form input {
/* /*
font-size:12px; font-size:12px;
*/ */
padding:0;margin:1;border:1px solid gray padding:0;margin:1;border:1px solid gray
} }
#nav form select { #nav form select {
/* /*
font-size:12px; font-size:12px;
*/ */
padding:0;margin:1;border:1px solid gray;width:130px; padding:0;margin:1;border:1px solid gray;width:130px;
} }
#nav form option { #nav form option {
/* /*
font-size:12px; font-size:12px;
*/ */
padding:0;margin:0 padding:0;margin:0
} }
/* end of search field */ /* end of search field */
@@ -77,34 +77,34 @@
/* event fields */ /* event fields */
.calcms_date { .calcms_date {
background: #ccccff; background: #ccccff;
padding:6px;margin:0px; padding:6px;margin:0px;
font-weight:bold; font-weight:bold;
margin-top:1em; margin-top:1em;
-moz-border-radius-topleft:6px; -moz-border-radius-topleft:6px;
-moz-border-radius-topright:6px; -moz-border-radius-topright:6px;
-webkit-border-top-right-radius: 6px; -webkit-border-top-right-radius: 6px;
-webkit-border-top-left-radius: 6px; -webkit-border-top-left-radius: 6px;
text-align:left text-align:left
} }
.calcms_title {padding:3px;margin:0px;font-weight:bold;text-align:left;} .calcms_title {padding:3px;margin:0px;font-weight:bold;text-align:left;}
.calcms_excerpt {padding:3px;margin:0px;background-color:#eee;} .calcms_excerpt {padding:3px;margin:0px;background-color:#eee;}
.calcms_content {padding:3px;margin:0px;clear:left;margin:0} .calcms_content {padding:3px;margin:0px;clear:left;margin:0}
.calcms_content p {margin-top:10px} .calcms_content p {margin-top:10px}
.calcms_content h1 {text-align:left;font-size:1.5em;clear:left;margin-top:16px} .calcms_content h1 {text-align:left;font-size:1.5em;clear:left;margin-top:16px}
.calcms_content h2 {text-align:left;font-size:1.5em;clear:left;margin-top:16px} .calcms_content h2 {text-align:left;font-size:1.5em;clear:left;margin-top:16px}
.calcms_content h3 {text-align:left;font-size:1.5em;clear:left;margin-top:16px} .calcms_content h3 {text-align:left;font-size:1.5em;clear:left;margin-top:16px}
.calcms_content h4 {text-align:left;font-size:1.5em;clear:left;margin-top:16px} .calcms_content h4 {text-align:left;font-size:1.5em;clear:left;margin-top:16px}
.calcms_content li {clear:left;} .calcms_content li {clear:left;}
.calcms_content img {text-align:left;font-size:1.5em;float:left;margin-right:10px;}/*width:50;height:50px;*/ .calcms_content img {text-align:left;font-size:1.5em;float:left;margin-right:10px;}/*width:50;height:50px;*/
.calcms_event {text-align:left} .calcms_event {text-align:left}
.calcms_day {padding:1px;margin:0px;clear:left;text-align:left} .calcms_day {padding:1px;margin:0px;clear:left;text-align:left}
/* hide microformats */ /* hide microformats */
.dtstart {display:none;visibility:hidden;} .dtstart {display:none;visibility:hidden;}
.dtend {display:none;visibility:hidden;} .dtend {display:none;visibility:hidden;}
/* end of event fields */ /* end of event fields */
@@ -112,140 +112,140 @@
/* navigation bar */ /* navigation bar */
table#nav{ table#nav{
padding:0;margin:0;width:100%; padding:0;margin:0;width:100%;
border-left:1px solid #88f; border-left:1px solid #88f;
border-top: 1px solid #88f; border-top: 1px solid #88f;
text-align:left; text-align:left;
} }
table#nav table{ table#nav table{
padding:0;margin:0; padding:0;margin:0;
border-left:0;border-top:0; border-left:0;border-top:0;
text-align:left;width:100% text-align:left;width:100%
} }
table#nav table td{ table#nav table td{
margin:0;text-align:center; margin:0;text-align:center;
border-bottom:1px solid #88f; border-bottom:1px solid #88f;
border-right: 1px solid #88f; border-right: 1px solid #88f;
} }
table#nav table td, table#nav table td,
table#nav table a{ table#nav table a{
padding:1px; padding:1px;
/* /*
font-size:10px; font-size:10px;
*/ */
} }
/* hover effects */ /* hover effects */
table#nav table td:hover{ table#nav table td:hover{
border-bottom:1px solid #88f; border-bottom:1px solid #88f;
border-right :1px solid #88f; border-right :1px solid #88f;
background-color:#f0f0f0; background-color:#f0f0f0;
} }
table#nav table td.selected:hover{ table#nav table td.selected:hover{
background-color:#eee; background-color:#eee;
border-bottom:1px solid #88f; border-bottom:1px solid #88f;
border-right: 1px solid #88f; border-right: 1px solid #88f;
} }
table#nav table a:hover{ table#nav table a:hover{
} }
/* not selectable columns */ /* not selectable columns */
table#nav table td.row_type:hover{ table#nav table td.row_type:hover{
border-bottom:1px solid #88f; border-bottom:1px solid #88f;
border-right: 1px solid #88f; border-right: 1px solid #88f;
background-color:#ffffff; background-color:#ffffff;
} }
.row_type{ .row_type{
width:100px width:100px
} }
/* selected fields */ /* selected fields */
#nav .selected, .night, .morning, .noon, .afternoon, .evening{ #nav .selected, .night, .morning, .noon, .afternoon, .evening{
background:#ddd; background:#ddd;
border-bottom:1px solid #88f; border-bottom:1px solid #88f;
border-right: 1px solid #88f; border-right: 1px solid #88f;
-moz-border-radius-topleft:5px; -moz-border-radius-topleft:5px;
-moz-border-radius-topright:5px; -moz-border-radius-topright:5px;
-webkit-border-top-right-radius: 5px; -webkit-border-top-right-radius: 5px;
-webkit-border-top-left-radius: 5px; -webkit-border-top-left-radius: 5px;
} }
/* end of navigation bar */ /* end of navigation bar */
/* calendar weeks */ /* calendar weeks */
#nav td.week_1, #nav td.week_1,
#nav td.week_2, #nav td.week_2,
#nav td.week_3, #nav td.week_3,
#nav td.week_4, #nav td.week_4,
#nav td.week_5 { #nav td.week_5 {
border-right:1px solid #88f ; border-right:1px solid #88f ;
} }
/* end of calendar weeks */ /* end of calendar weeks */
/* calendar days */ /* calendar days */
/* replaces the original wp css*/ /* replaces the original wp css*/
#wp-calendar {} #wp-calendar {}
#wp-calendar a {padding:2px} #wp-calendar a {padding:2px}
#wp-calendar table {padding:2px} #wp-calendar table {padding:2px}
#wp-calendar td { #wp-calendar td {
/* /*
font-size:8px; font-size:8px;
*/ */
text-align:center; text-align:center;
background-color:#fefeff; background-color:#fefeff;
} }
#wp-calendar td a { #wp-calendar td a {
padding:2px; padding:2px;
/* /*
font-size:8px; font-size:8px;
*/ */
font-weight:normal; font-weight:normal;
} }
#wp-calendar a:hover { #wp-calendar a:hover {
background:#eeeeff; background:#eeeeff;
} }
/* additional css to mark today and all dates matching to the request */ /* additional css to mark today and all dates matching to the request */
#wp-calendar .calcms_today { #wp-calendar .calcms_today {
padding:2px;margin:0px;background:#eeeeee; padding:2px;margin:0px;background:#eeeeee;
} }
#wp-calendar td.calcms_match { #wp-calendar td.calcms_match {
background:#ccffcc; background:#ccffcc;
} }
#wp-calendar td .selected .calcms_match { #wp-calendar td .selected .calcms_match {
background:#ddeedd; background:#ddeedd;
} }
/* end of calendar days */ /* end of calendar days */
div.update { div.update {
position:absolute; position:absolute;
bottom:0px; bottom:0px;
} }
div.update , div.update a{ div.update , div.update a{
text-align:left; text-align:left;
font-size:6px; font-size:6px;
color:#bbb; color:#bbb;
} }

View File

@@ -1,41 +1,30 @@
/*
include in your web page:
<link rel="stylesheet" type="text/css" media="screen" href="/agenda_files/css/calcms.css" />
* {font-size:1em !important;}
*/
/* latin-ext */ /* roboto-regular - latin_latin-ext */
@font-face { @font-face {
font-family: 'Roboto'; font-family: 'Roboto';
font-style: normal; font-style: normal;
font-weight: 400; font-weight: 400;
src: local('Roboto'), local('Roboto-Regular'), url(https://fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu7GxKOzY.woff2) format('woff2'); src: url('../fonts/roboto-v18-latin_latin-ext-regular.eot'); /* IE9 Compat Modes */
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; src: local('Roboto'), local('Roboto-Regular'),
} url('../fonts/roboto-v18-latin_latin-ext-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
/* latin */ url('../fonts/roboto-v18-latin_latin-ext-regular.woff2') format('woff2'), /* Super Modern Browsers */
@font-face { url('../fonts/roboto-v18-latin_latin-ext-regular.woff') format('woff'), /* Modern Browsers */
font-family: 'Roboto'; url('../fonts/roboto-v18-latin_latin-ext-regular.ttf') format('truetype'), /* Safari, Android, iOS */
font-style: normal; url('../fonts/roboto-v18-latin_latin-ext-regular.svg#Roboto') format('svg'); /* Legacy iOS */
font-weight: 400;
src: local('Roboto'), local('Roboto-Regular'), url(https://fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu4mxK.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
} }
/* latin-ext */ /* open-sans-regular - latin_latin-ext */
@font-face { @font-face {
font-family: 'Open Sans'; font-family: 'Open Sans';
font-style: normal; font-style: normal;
font-weight: 400; font-weight: 400;
src: local('Open Sans Regular'), local('OpenSans-Regular'), url(https://fonts.gstatic.com/s/opensans/v15/mem8YaGs126MiZpBA-UFW50bbck.woff2) format('woff2'); src: url('../fonts/open-sans-v15-latin_latin-ext-regular.eot'); /* IE9 Compat Modes */
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; src: local('Open Sans Regular'), local('OpenSans-Regular'),
} url('../fonts/open-sans-v15-latin_latin-ext-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
/* latin */ url('../fonts/open-sans-v15-latin_latin-ext-regular.woff2') format('woff2'), /* Super Modern Browsers */
@font-face { url('../fonts/open-sans-v15-latin_latin-ext-regular.woff') format('woff'), /* Modern Browsers */
font-family: 'Open Sans'; url('../fonts/open-sans-v15-latin_latin-ext-regular.ttf') format('truetype'), /* Safari, Android, iOS */
font-style: normal; url('../fonts/open-sans-v15-latin_latin-ext-regular.svg#OpenSans') format('svg'); /* Legacy iOS */
font-weight: 400;
src: local('Open Sans Regular'), local('OpenSans-Regular'), url(https://fonts.gstatic.com/s/opensans/v15/mem8YaGs126MiZpBA-UFVZ0b.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
} }
#page * { #page * {
@@ -51,6 +40,10 @@ input{
max-width:20em; max-width:20em;
} }
body.custom-background{
image-rendering: pixelated;
}
a{ a{
text-decoration:none; text-decoration:none;
box-shadow:none !important; box-shadow:none !important;
@@ -507,12 +500,12 @@ a{
} }
#calcms_comments input{ #calcms_comments input{
max-width:20em; max-width:40rem;
height:32px; height:32px;
} }
#calcms_comments input[type=submit]{ #calcms_comments input[type=submit]{
max-width:10em; max-width:10rem;
background:#ddd; background:#ddd;
} }

View File

@@ -157,6 +157,31 @@ var calcms_settings = new Array();
return false; return false;
} }
calcms.insertEditors = function insertEditors() {
var url=document.location.href;
var mapping={
"studio\-ansage" : "/agenda/redaktionen-studio-ansage",
"studio\-pi\-radio" : "/agenda/redaktionen-piradio",
"studio\-frb" : "/agenda/redaktionen-frb",
"studio\-colabo" : "/agenda/redaktionen-colabo-radio",
"studio\-frrapo" : "/agenda/redaktionen-frrapo"
};
for (var key in mapping){
var editorsUrl = mapping[key];
var pattern = new RegExp(key);
var matchs = pattern.exec(url);
if ((matchs != null) && (matchs.length > 0) ) {
console.log("matchs "+url)
$('div.entry-content').append('<div id="result"> </div>')
$("#result").load(editorsUrl)
}
}
}
/* /*
function insertDeskDetails() { function insertDeskDetails() {
var pattern = new RegExp(/redaktion\/(.*)$/); var pattern = new RegExp(/redaktion\/(.*)$/);

View File

@@ -500,7 +500,7 @@ sub showCalendar {
next unless defined $event->{uploaded_at}; next unless defined $event->{uploaded_at};
print STDERR "uploadAt=$event->{uploaded_at}, playoutModified:$event->{playout_modified_at}, playoutUpdatedAt:$event->{playout_updated_at}\n"; print STDERR "uploadAt=$event->{uploaded_at}, playoutModified:$event->{playout_modified_at}, playoutUpdatedAt:$event->{playout_updated_at}\n";
next if (defined $event->{playout_updated_at}) && ( $event->{uploaded_at} lt $event->{playout_updated_at} ); next if (defined $event->{playout_updated_at}) && ( $event->{uploaded_at} lt $event->{playout_updated_at} );
print STDERR Dumper($event); #print STDERR Dumper($event);
$event->{upload} ='pending' ; $event->{upload} ='pending' ;
#$event->{title}.='<br>pending'; #$event->{title}.='<br>pending';
} }

View File

@@ -1,11 +0,0 @@
.ui-timepicker-div .ui-widget-header { margin-bottom: 8px; }
.ui-timepicker-div dl { text-align: left; }
.ui-timepicker-div dl dt { float: left; clear:left; padding: 0 0 0 5px; }
.ui-timepicker-div dl dd { margin: 0 10px 10px 40%; }
.ui-timepicker-div td { font-size: 90%; }
.ui-tpicker-grid-label { background: none; border: none; margin: 0; padding: 0; }
.ui-timepicker-rtl{ direction: rtl; }
.ui-timepicker-rtl dl { text-align: right; padding: 0 5px 0 0; }
.ui-timepicker-rtl dl dt{ float: right; clear: right; }
.ui-timepicker-rtl dl dd { margin: 0 40% 10px 10px; }

View File

@@ -10,15 +10,16 @@ div#oldSeries{
clear:both; clear:both;
} }
div#newSeries, div#oldSeries{ div#newSeries,
div#oldSeries{
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
div#newSeries div, div#newSeries a,
div#oldSeries div{ div#oldSeries a{
color:#fff; color:#fff;
background:#1abc9c; background:#1abc9c;
padding:6px; padding:6px;
@@ -35,12 +36,11 @@ div#oldSeries div{
height:3rem; height:3rem;
line-height:2em; line-height:2em;
} }
/*
*/ div#newSeries a:hover,
div#newSeries div:hover, div#oldSeries a:hover{
div#oldSeries div:hover{
background:#1dd2af; background:#1dd2af;
text-decoration:none;
} }
div#search{ div#search{

View File

@@ -37,10 +37,13 @@ var region='<TMPL_VAR loc.region>';
<div id="newSeries"> <div id="newSeries">
<TMPL_LOOP newSeries> <TMPL_LOOP newSeries>
<div onclick="view_series_details('<TMPL_VAR series_id>','<TMPL_VAR .studio_id>','<TMPL_VAR .project_id>')"> <a
onclick="view_series_details('<TMPL_VAR series_id>','<TMPL_VAR .studio_id>','<TMPL_VAR .project_id>')"
href="series.cgi?project_id=<TMPL_VAR .project_id>&studio_id=<TMPL_VAR .studio_id>&series_id=<TMPL_VAR series_id>&action=show"
>
<b><TMPL_IF has_single_events><TMPL_VAR .loc.single_events><TMPL_ELSE><TMPL_VAR series_name></TMPL_IF></b> <b><TMPL_IF has_single_events><TMPL_VAR .loc.single_events><TMPL_ELSE><TMPL_VAR series_name></TMPL_IF></b>
<TMPL_IF TITLE> <br> <TMPL_VAR title></TMPL_IF> <TMPL_IF TITLE> <br> <TMPL_VAR title></TMPL_IF>
</div> </a>
</TMPL_LOOP> </TMPL_LOOP>
</div> </div>
@@ -50,10 +53,12 @@ var region='<TMPL_VAR loc.region>';
<div id="oldSeries" style="display:none;"> <div id="oldSeries" style="display:none;">
<TMPL_LOOP oldSeries> <TMPL_LOOP oldSeries>
<div onclick="view_series_details('<TMPL_VAR series_id>','<TMPL_VAR .studio_id>','<TMPL_VAR .project_id>')"> <a onclick="view_series_details('<TMPL_VAR series_id>','<TMPL_VAR .studio_id>','<TMPL_VAR .project_id>')"
href="series.cgi?project_id=<TMPL_VAR .project_id>&studio_id=<TMPL_VAR .studio_id>&series_id=<TMPL_VAR series_id>&action=show"
>
<b><TMPL_IF has_single_events><TMPL_VAR .loc.single_events><TMPL_ELSE><TMPL_VAR series_name></TMPL_IF></b> <b><TMPL_IF has_single_events><TMPL_VAR .loc.single_events><TMPL_ELSE><TMPL_VAR series_name></TMPL_IF></b>
<TMPL_IF TITLE> <br> <TMPL_VAR title></TMPL_IF> <TMPL_IF TITLE> <br> <TMPL_VAR title></TMPL_IF>
</div> </a>
</TMPL_LOOP> </TMPL_LOOP>
</div> </div>

View File

@@ -22,18 +22,18 @@
<div class="date<TMPL_IF is_running> running</TMPL_IF>"> <div class="date<TMPL_IF is_running> running</TMPL_IF>">
<TMPL_IF is_running> ... Diese Sendung l&auml;uft gerade ...<p></TMPL_IF> <TMPL_IF is_running> ... Diese Sendung l&auml;uft gerade ...<p></TMPL_IF>
<h1 class="summary title"> <h1 class="summary title">
<TMPL_IF series_name> <TMPL_IF series_name>
<a href="#" onclick="calcms.showPrevSeriesEvent(<TMPL_VAR event_id>)" title="vorherige Sendung">&laquo;</a><TMPL_VAR series_name><a href="#" onclick="calcms.showNextSeriesEvent(<TMPL_VAR event_id>)" title="n&auml;chste Sendung">&raquo;</a> <a href="#" onclick="calcms.showPrevSeriesEvent(<TMPL_VAR event_id>)" title="vorherige Sendung">&laquo;</a><TMPL_VAR series_name><a href="#" onclick="calcms.showNextSeriesEvent(<TMPL_VAR event_id>)" title="n&auml;chste Sendung">&raquo;</a>
</TMPL_IF> </TMPL_IF>
<TMPL_VAR full_title_no_series> <TMPL_VAR full_title_no_series>
<div style="font-size:1rem"> <div style="font-size:1rem">
<TMPL_VAR weekday_name>, <TMPL_VAR start_date_name>, <TMPL_VAR weekday_name>, <TMPL_VAR start_date_name>,
<span style="font-size:1.5rem"><TMPL_VAR start_time_name></span> bis <TMPL_VAR end_time_name> Uhr <span style="font-size:1.5rem"><TMPL_VAR start_time_name></span> bis <TMPL_VAR end_time_name> Uhr
</div> </div>
</h1> </h1>
<TMPL_IF program> (<TMPL_VAR program>)</TMPL_IF> <TMPL_IF program> (<TMPL_VAR program>)</TMPL_IF>
</div> </div>
@@ -44,7 +44,7 @@
<TMPL_IF no_image_in_text> <TMPL_IF no_image_in_text>
<TMPL_IF .hide_event_images> <TMPL_IF .hide_event_images>
<a href="<TMPL_VAR series_image_url>"> <a href="<TMPL_VAR series_image_url>">
<figure> <figure>
<TMPL_IF series_thumb_url> <TMPL_IF series_thumb_url>
<img alt="<TMPL_VAR series_name>" src="<TMPL_VAR series_thumb_url>"> <img alt="<TMPL_VAR series_name>" src="<TMPL_VAR series_thumb_url>">
<TMPL_IF series_image_label><figcaption>Bild:<TMPL_VAR series_image_label></figcaption></TMPL_IF> <TMPL_IF series_image_label><figcaption>Bild:<TMPL_VAR series_image_label></figcaption></TMPL_IF>
@@ -56,9 +56,9 @@
<figure> <figure>
<TMPL_IF thumb_url> <TMPL_IF thumb_url>
<img alt="<TMPL_VAR series_name>" src="<TMPL_VAR thumb_url>"> <img alt="<TMPL_VAR series_name>" src="<TMPL_VAR thumb_url>">
<TMPL_IF image_label><figcaption>Bild:<TMPL_VAR image_label></figcaption></TMPL_IF> <TMPL_IF image_label><figcaption>Bild:<TMPL_VAR image_label></figcaption></TMPL_IF>
</TMPL_IF> </TMPL_IF>
</figure> </figure>
</a> </a>
</TMPL_IF> </TMPL_IF>
</TMPL_IF> </TMPL_IF>
@@ -66,7 +66,7 @@
<TMPL_VAR topic ESCAPE=0><TMPL_VAR content ESCAPE=0> <TMPL_VAR topic ESCAPE=0><TMPL_VAR content ESCAPE=0>
<TMPL_IF recurrence_date><a href="<TMPL_VAR recurrence>.html">Wiederholung vom <TMPL_VAR recurrence_date></a></TMPL_IF> <TMPL_IF recurrence_date><a href="<TMPL_VAR recurrence>.html">Wiederholung vom <TMPL_VAR recurrence_date></a></TMPL_IF>
</div> </div>
</div> </div>
<div id="icon_bar"> <div id="icon_bar">