From c1e5dc3810eb0a3a9e472f173685aafd2f63390f Mon Sep 17 00:00:00 2001 From: Ernesto Rico Schmidt <ernesto@helsinki.at> Date: Sat, 21 Nov 2020 12:27:24 -0400 Subject: [PATCH] Remove unused templates and templatetags --- program/templates/boxes/category.html | 16 - program/templates/boxes/current.html | 65 ---- program/templates/boxes/musicfocus.html | 15 - program/templates/boxes/recommendation.html | 39 --- program/templates/boxes/showinformation.html | 16 - program/templates/boxes/showtopic.html | 16 - program/templates/boxes/topic.html | 16 - program/templates/boxes/type.html | 11 - program/templates/calendar.html | 283 ---------------- program/templates/collisions.html | 301 ------------------ program/templates/day_schedule.html | 131 -------- program/templates/host_detail.html | 27 -- program/templates/host_list.html | 19 -- program/templates/recommendation_list.html | 47 --- program/templates/show_detail.html | 88 ----- program/templates/show_list.html | 56 ---- program/templates/styles.css | 179 ----------- program/templates/timeslot_detail.html | 57 ---- program/templates/week_schedule.html | 127 -------- program/templates/week_schedule_timeslot.html | 54 ---- program/templatetags/__init__.py | 0 program/templatetags/content_boxes.py | 27 -- program/templatetags/timeslots.py | 27 -- 23 files changed, 1617 deletions(-) delete mode 100644 program/templates/boxes/category.html delete mode 100644 program/templates/boxes/current.html delete mode 100644 program/templates/boxes/musicfocus.html delete mode 100644 program/templates/boxes/recommendation.html delete mode 100644 program/templates/boxes/showinformation.html delete mode 100644 program/templates/boxes/showtopic.html delete mode 100644 program/templates/boxes/topic.html delete mode 100644 program/templates/boxes/type.html delete mode 100644 program/templates/calendar.html delete mode 100644 program/templates/collisions.html delete mode 100644 program/templates/day_schedule.html delete mode 100644 program/templates/host_detail.html delete mode 100644 program/templates/host_list.html delete mode 100644 program/templates/recommendation_list.html delete mode 100644 program/templates/show_detail.html delete mode 100644 program/templates/show_list.html delete mode 100644 program/templates/styles.css delete mode 100644 program/templates/timeslot_detail.html delete mode 100644 program/templates/week_schedule.html delete mode 100644 program/templates/week_schedule_timeslot.html delete mode 100644 program/templatetags/__init__.py delete mode 100644 program/templatetags/content_boxes.py delete mode 100644 program/templatetags/timeslots.py diff --git a/program/templates/boxes/category.html b/program/templates/boxes/category.html deleted file mode 100644 index 85520b1c..00000000 --- a/program/templates/boxes/category.html +++ /dev/null @@ -1,16 +0,0 @@ -{% if category_list %} - <dl id="filterbox_category" class="portlet filterbox"> - <dt class="portletHeader"><span>Sendungsinfo<span></dt> - <dd class="portletItem"> - <ul> - {% for ca in category_list %} - <li> - <a title="Sendungen mit der Kategorie {{ ca.category }} anzeigen." - class="abbrev ca-{{ ca.abbrev }}" - href="?category={{ ca.slug }}">{{ ca.category }}</a> - </li> - {% endfor %} - </ul> - </dd> - </dl> -{% endif %} \ No newline at end of file diff --git a/program/templates/boxes/current.html b/program/templates/boxes/current.html deleted file mode 100644 index add51f5e..00000000 --- a/program/templates/boxes/current.html +++ /dev/null @@ -1,65 +0,0 @@ -<!doctype html> -<html> -<head> - <meta charset="utf-8"/> - <title>Current program box</title> -</head> -<body> -{% if previous_timeslot or current_timeslot or next_timeslot or after_next_timeslot %} - <dl id="program-current-box" class="portlet program-box"> - <dt class="portletHeader">Programm derzeit</dt> - <dd class="portletItem"> - <table> - <tr class="previous"> - <td class="start">{{ previous_timeslot.start|date:"H:i" }}</td> - <td class="type ty-{{ previous_timeslot.show.type.slug }}" - title="{{ previous_timeslot.show.type.type }}"> </td> - <td class="show"> - <h3> - <a href="{% url "timeslot-detail" previous_timeslot.id %}">{{ previous_timeslot.show.name }}</a> - </h3> - </td> - <td class="show"></td> - </tr> - <tr class="current"> - <td class="start">{{ current_timeslot.start|date:"H:i" }}</td> - <td class="type ty-{{ current_timeslot.show.type.slug }}" - title="{{ current_timeslot.show.type.type }}">▶</td> - <td class="show"> - <h3> - <a href="{% url "timeslot-detail" current_timeslot.id %}">{{ current_timeslot.show.name }}</a> - </h3> - {% if current_timeslot.note %} - <p>{{ current_timeslot.note.title }}</p> - {% else %} - <p>{{ current_timeslot.show.short_description }}</p> - {% endif %} - </td> - </tr> - <tr class="next"> - <td class="start">{{ next_timeslot.start|date:"H:i" }}</td> - <td class="type ty-{{ next_timeslot.show.type.slug }}" - title="{{ next_timeslot.show.type.type }}"> </td> - <td class="show"> - <h3><a href="{% url "timeslot-detail" next_timeslot.id %}">{{ next_timeslot.show.name }}</a> - </h3> - </td> - <td class="show"></td> - </tr> - <tr class="after_next"> - <td class="start">{{ after_next_timeslot.start|date:"H:i" }}</td> - <td class="type ty-{{ after_next_timeslot.show.type.slug }}" - title="{{ after_next_timeslot.show.type.type }}"> </td> - <td class="show"> - <h3> - <a href="{% url "timeslot-detail" after_next_timeslot.id %}">{{ after_next_timeslot.show.name }}</a> - </h3> - </td> - <td class="show"></td> - </tr> - </table> - </dd> - </dl> -{% endif %} -</body> -</html> \ No newline at end of file diff --git a/program/templates/boxes/musicfocus.html b/program/templates/boxes/musicfocus.html deleted file mode 100644 index 021185b0..00000000 --- a/program/templates/boxes/musicfocus.html +++ /dev/null @@ -1,15 +0,0 @@ -{% if musicfocus_list %} - <dl id="filterbox_musicfocus" class="portlet filterbox"> - <dt class="portletHeader"><span>Musiktendenz<span></dt> - <dd class="portletItem"> - <ul> - {% for mf in musicfocus_list %} - <li> - <a title="Sendungen mit der Musiktendenz {{ mf.focus }} anzeigen." - class="abbrev mf-{{ mf.abbrev }}" href="?musicfocus={{ mf.slug }}">{{ mf.focus }}</a> - </li> - {% endfor %} - </ul> - </dd> - </dl> -{% endif %} diff --git a/program/templates/boxes/recommendation.html b/program/templates/boxes/recommendation.html deleted file mode 100644 index 9ac8625b..00000000 --- a/program/templates/boxes/recommendation.html +++ /dev/null @@ -1,39 +0,0 @@ -<!doctype html> -<html> -<head> - <meta charset="utf-8"/> - <title>Recomendations box</title> -</head> -<body> -{% if recommendation_list %} - <dl id="recommendations" class="portlet program-box"> - <dt class="portletHeader">Programmhinweise</dt> - <dd class="portletItem"> - <table> - {% for recommendation in recommendation_list %} - <tr> - <td class="start"> </td> - <td class="type ty-{{ recommendation.show.type.slug }}" - title="{{ recommendation.show.type.type }}"> </td> - <td class="show"> - {{ recommendation.start|date:"d.m. H:i" }} - {{ recommendation.end|date:"H:i" }}<br/> - <h3> - <a href="{% url "timeslot-detail" recommendation.id %}">{{ recommendation.show.name }}</a> - </h3> - <p class="note-title"> - {% if recommendation.note %} - {{ recommendation.note.title }}<br/> - {% else %} - {{ recommendation.show.type.type }}<br/> - {% endif %} - <a href="{% url "timeslot-detail" recommendation.id %}">[weiter]</a> - </p> - </td> - </tr> - {% endfor %} - </table> - </dd> - </dl> -{% endif %} -</body> -</html> \ No newline at end of file diff --git a/program/templates/boxes/showinformation.html b/program/templates/boxes/showinformation.html deleted file mode 100644 index dbbe60df..00000000 --- a/program/templates/boxes/showinformation.html +++ /dev/null @@ -1,16 +0,0 @@ -{% if showinformation_list %} - <dl id="filterbox_showinformation" class="portlet filterbox"> - <dt class="portletHeader"><span>Sendungsinfo<span></dt> - <dd class="portletItem"> - <ul> - {% for si in showinformation_list %} - <li> - <a title="Sendungen mit der Information {{ si.information }} anzeigen." - class="abbrev si-{{ si.abbrev }}" - href="?showinformation={{ si.slug }}">{{ si.information }}</a> - </li> - {% endfor %} - </ul> - </dd> - </dl> -{% endif %} diff --git a/program/templates/boxes/showtopic.html b/program/templates/boxes/showtopic.html deleted file mode 100644 index 93e873a9..00000000 --- a/program/templates/boxes/showtopic.html +++ /dev/null @@ -1,16 +0,0 @@ -{% if showtopic_list %} - <dl id="filterbox_showtopic" class="portlet filterbox"> - <dt class="portletHeader"><span>Thema / Schwerpunkt<span></dt> - <dd class="portletItem"> - <ul> - {% for showtopic in showtopic_list %} - <li> - <a title="Sendungen mit dem Schwerpunkt {{ showtopic.topic }} anzeigen." - class="abbrev st-{{ showtopic.abbrev }}" - href="?showtopic={{ showtopic.slug }}">{{ showtopic.topic }}</a> - </li> - {% endfor %} - </ul> - </dd> - </dl> -{% endif %} diff --git a/program/templates/boxes/topic.html b/program/templates/boxes/topic.html deleted file mode 100644 index 7cbab0b6..00000000 --- a/program/templates/boxes/topic.html +++ /dev/null @@ -1,16 +0,0 @@ -{% if topic_list %} - <dl id="filterbox_topic" class="portlet filterbox"> - <dt class="portletHeader"><span>Thema / Schwerpunkt<span></dt> - <dd class="portletItem"> - <ul> - {% for topic in topic_list %} - <li> - <a title="Sendungen mit dem Schwerpunkt {{ topic.topic }} anzeigen." - class="abbrev to-{{ topic.abbrev }}" - href="?topic={{ topic.slug }}">{{ topic.topic }}</a> - </li> - {% endfor %} - </ul> - </dd> - </dl> -{% endif %} \ No newline at end of file diff --git a/program/templates/boxes/type.html b/program/templates/boxes/type.html deleted file mode 100644 index 6fb2deff..00000000 --- a/program/templates/boxes/type.html +++ /dev/null @@ -1,11 +0,0 @@ -{% if type_list %} - <dl id="type" class="portlet"> - <dt class="portletHeader"><span>Legende</span></dt> - {% for ty in type_list %} - <dd class="portletItem type ty-{{ ty.slug }}"> - <a title="Sendungen mit dem Sendungsformat {{ ty.type }} anzeigen." - href="?type={{ ty.slug }}">{{ type.type }}</a> - </dd> - {% endfor %} - </dl> -{% endif %} \ No newline at end of file diff --git a/program/templates/calendar.html b/program/templates/calendar.html deleted file mode 100644 index 41d59336..00000000 --- a/program/templates/calendar.html +++ /dev/null @@ -1,283 +0,0 @@ -<!doctype html> -<html> -<head> - <title>Kalender</title> - <link rel="stylesheet" href="/program/styles.css" type="text/css" /> - <link rel="stylesheet" href="/static/admin/css/base.css" type="text/css" /> - <!--<link rel="stylesheet" href="/static/admin/css/forms.css" type="text/css" />--> - <link rel="stylesheet" href="/site_media/js/calendar/lib/cupertino/jquery-ui.min.css" type="text/css" media="all" /> - <link rel="stylesheet" href="/site_media/js/calendar/fullcalendar.min.css" type="text/css" media="all" /> - - <script type="text/javascript" src="/site_media/js/jquery/jquery.js"></script> - <script type="text/javascript" src="/site_media/js/calendar/lib/moment.min.js"></script> - <script type="text/javascript" src="/site_media/js/calendar/fullcalendar.min.js"></script> - <script type="text/javascript" src="/site_media/js/calendar/locale-all.js"></script> - - <style type="text/css"> - /* Calendar Screen */ - - /* Sidebar */ - #sidebar { - width:calc( 20% - 40px ); - position:fixed; - top:0px; - bottom:0; - right:0; - padding:10px 30px; - background-color:#eee; - } - - #calendar { - width:calc( 80% - 40px ); - float:left; - } - - /* Notification popup */ - #notification { - display:none; - z-index:9999999; - position:fixed; - width:300px; - left:50%; - margin-left:-150px; - top:33%; - padding: 40px 0px 40px 0px; - -moz-box-shadow:0px 0px 5px 1px #ccc; - -webkit-box-shadow:0px 0px 5px 1px #ccc; - box-shadow:0px 0px 5px 1px #ccc; - background-color:#FFFBCC; - text-align:center; - vertical-align:middle; - font-size:1.5em; - font-weight:bold; - } - - /* Close button for each event */ - .closeon { - display:none; /* Visibility is triggered by mouseover/mouseout */ - position:absolute; - right:0; - top:0; - padding: 1px 4px; - border: 1px solid #000; - background: #fff; - opacity: .5; - color: black; - border-radius: 10px; - font-size:.8em; - } - - .default { - background-color:#3a87ad; - } - .danger { - background-color:#D60935; - border-color:#222; - } - - </style> - -</head> -<body> -<div id="notification"></div> - -<div id="container"> - {% csrf_token %} - <div id="header">Kalender</div> - <div class="breadcrumb"></div> - - <div id="content"> - - <h1></h1> - - <div class="calendar-container"> - <div id="calendar"></div> - <div id="sidebar"> - <!--<div id="timeslot-id"></div>--> - <div> - <span id="show-name"></span> - <span id="show-id"></span> - </div> - <div id="timeslot-start"></div> - <div id="timeslot-end"></div> - <p></p> - <div id="playlist-id"></div> - <div id="is-repetition"></div> - <div id="fallback-id"></div> - <p></p> - <div id="show-hosts"></div> - <div id="show-categories"></div> - <div id="show-type"></div> - <div id="show-musicfocus"></div> - <div id="show-fundingcategory"></div> - <p></p> - <div id="memo"></div> - <div id="response-message"></div> - </div> - </div> - - </div> - -</div> - - <script> - - /* Displays a message to the user after receiving an AJAX response */ - function notify(msg) { - var notify = jQuery("#notification"); - notify.html(msg); - notify.show(); - notify.fadeOut(2000); - } - - /** - * Makes sure the csrftoken get submitted properly - * See https://stackoverflow.com/questions/35112451/forbidden-csrf-token-missing-or-incorrect-django-error - */ - function getCookie(name) { - var cookieValue = null; - if (document.cookie && document.cookie != '') { - var cookies = document.cookie.split(';'); - for (var i = 0; i < cookies.length; i++) { - var cookie = jQuery.trim(cookies[i]); - // Does this cookie string begin with the name we want? - if (cookie.substring(0, name.length + 1) == (name + '=')) { - cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); - break; - } - } - } - return cookieValue; - } - var csrftoken = getCookie('csrftoken'); - function csrfSafeMethod(method) { - // These HTTP methods do not require CSRF protection - return (/^(GET|HEAD|OPTIONS|TRACE)$/.test(method)); - } - - jQuery(document).ready( function() { - - jQuery("#calendar").fullCalendar({ - theme: true, // Enable theme - timezone: 'Europe/Berlin', - locale: 'de', // TODO: make an option for that - defaultView: 'agendaWeek', - // Event dragging & resizing - editable: false, - // Header - header: { - left: 'prev,next today', - center: 'title', - right: 'agendaWeek,agendaDay' - }, - weekNumberCalculation: 'ISO', // Week begins with Monday - firstDay: 1, // Week begins with Monday - events: '/api/v1/program/week', - eventRender: function(event, element) { - element.find('.fc-content').append( '<span class="closeon">X</span>' ); - element.find('.closeon').click(function() { - // Confirm - if( ! confirm( "Wollen Sie diese Episode wirklich löschen?" ) ) - return false; - - jQuery.ajaxSetup({ - beforeSend: function(xhr, settings) { - if( ! csrfSafeMethod(settings.type) && ! this.crossDomain) { - xhr.setRequestHeader("X-CSRFToken", getCookie('csrftoken') ); - } - } - }); - - jQuery.ajax({ - url: '/api/v1/shows/' + event.show_id + '/timeslots/' + event._id + '/', - type: 'DELETE', - success: function(result) { - jQuery('#calendar').fullCalendar('removeEvents', event._id ); - notify( 'Timeslot deleted.' ); - }, - error: function(request, msg, error) { - notify( 'Delete failed: ' + request.responseJSON.detail ); - console.log(error) - console.log(request) - } - }); - - }); - }, - // Triggered when the user mouses over an event. - eventMouseover: function( event, jsEvent, view ) { - jQuery(this).find('.closeon').show(); - }, - // Triggered when the user mouses out an event. - eventMouseout: function( event, jsEvent, view ) { - jQuery(this).find('.closeon').hide(); - }, - // Triggered when an event was clicked - // Load the timeslot into the sidebar form - eventClick: function(calEvent, jsEvent, view) { - console.log(calEvent); - - jQuery("#timeslot-id").html(calEvent.id); - jQuery("#timeslot-start").html('Start: ' + moment(calEvent.start).format("DD.MM. YYYY HH:SS")); - jQuery("#timeslot-end").html('End: ' + moment(calEvent.end).format("DD.MM. YYYY HH:SS")); - jQuery("#show-name").html(calEvent.show_name); - jQuery("#show-id").html('(ID ' + calEvent.show_id + ')'); - jQuery("#show-hosts").html('Hosts: ' + calEvent.show_hosts); - jQuery("#show-type").html('Type: ' + calEvent.show_type); - jQuery("#show-categories").html('Categories: ' + calEvent.show_categories); - jQuery("#show-topics").html('Topics: ' + calEvent.show_topics); - jQuery("#show-musicfocus").html('Music focus: ' + calEvent.show_musicfocus); - jQuery("#show-fundingcategory").html('Funding category: ' + calEvent.show_fundingcategory); - jQuery("#is-repetition").html('Is repetition: ' + calEvent.is_repetition); - jQuery("#playlist-id").html('Playlist ID: ' + calEvent.playlist_id); - jQuery("#fallback-id").html('Fallback ID: ' + calEvent.fallback_id); - jQuery("#memo").html(calEvent.memo); - - }, - // How is this callback triggered? - select: function( start, end, jsEvent, view ) { - console.log("Selected: " + start + " - " + end ); - }, - // Triggered when event dragging stops - BUT BEFORE data was updated - /* eventDragStop: function( event, jsEvent, ui, view ) { - updateTimeslot( event ); - }, */ - // Triggered when resizing stops and the event has changed in duration. - eventResize: function( event, jsEvent, ui, view ) { - updateTimeslot( event ); - }, - // Triggered when dragging stops and the event has moved to a different day/time. - eventDrop: function( event, delta, revertFunc, jsEvent, ui, view ) { - updateTimeslot( event ); - } - - }); - }); - -/* - function updateTimeslot( event ) { - - var id = event.id; - // Use moment.utc() to avoid the offset being added to times - var date = moment.utc( event.start._d ).format('YYYY-MM-DD'); - var start = moment.utc( event.start._d ).format('HH:mm') + ':00'; - var stop = moment.utc( event.end._d ).format('HH:mm') + ':00'; - - console.log( event ); - console.log( "program_id: " + event.id + " date: " + date + " start: " + start + " stop: " + stop ); - - jQuery.post( ajaxurl, { 'action': 'update_timeslot', 'id': id, 'date': date, 'start': start, 'stop' : stop } ) - .done(function( data ) { - notify( 'Changes saved.' ); - console.log(data.result); - }) - .fail(function( data ) { - notify( data.result ); - }); - - } -*/ - </script> - -</body> -</html> \ No newline at end of file diff --git a/program/templates/collisions.html b/program/templates/collisions.html deleted file mode 100644 index c2ad336e..00000000 --- a/program/templates/collisions.html +++ /dev/null @@ -1,301 +0,0 @@ -<!doctype html> -<html> -<head> - <title>Teste nach Terminkollisionen</title> - <link rel="stylesheet" href="/program/styles.css" type="text/css" /> - <link rel="stylesheet" href="/static/admin/css/base.css" type="text/css" /> - <script type="text/javascript" src="/site_media/js/jquery/jquery.js"></script> - <script type="text/javascript" src="/site_media/js/jquery/ui/core.min.js"></script> - <script type="text/javascript" src="/site_media/js/jquery/ui/widget.min.js"></script> - <script type="text/javascript" src="/site_media/js/jquery/ui/mouse.min.js"></script> - <script type="text/javascript" src="/site_media/js/jquery/ui/draggable.min.js"></script> - <script type="text/javascript" src="/site_media/js/jquery/ui/droppable.min.js"></script> -</head> -<body> - -<div id="container"> - - <div id="header">Timeslots (Schritt {{ step|add:"-1" }} / {{ max_steps }})</div> - <div class="breadcrumb"></div> - - <div id="content"> - - <h1>Termine & Kollisionen</h1> - - <div id="content-main"> - - <strong>{{ schedule.show }}</strong> - <p>{{ schedule }}</p> - <p> - {{ timeslots|length }} Timeslots generiert. - {% if self.num_collisions > 0 %} - Davon kollidieren {{ self.num_collisions }}. - {% endif %} - </p> - - <form id="collisions_form" action="/admin/program/show/{{ schedule.show_id }}/change/" enctype="multipart/form-data" method="post"> - {% csrf_token %} - - <table class="table"> - <thead> - <tr> - <th class="table-head">Gewünschter Termin <span class="check-all projected">✓</span> </th> - <th class="table-head"><span class="check-all collision">✓</span> kollidiert mit</th> - </tr> - </thead> - <tbody> - {% for timeslot, collision in timeslots_to_collisions %} - {% if timeslot.start|date:"U" < now|date:"U" %} - <tr class="table-row past" id="row-{{ forloop.counter0 }}"> - <td class="table-cell"> - <label> - <span class="timeslot-date">{{ timeslot.start|date:"D, d.m. Y "}}</span> - <span class="timeslot-time">{{ timeslot.start|date:"H:i"}} - {{ timeslot.end|date:"H:i" }} Uhr</span> - </label> - </td> - <td class="table-cell"> - <label> - <input type="radio" name="resolved_timeslots[{{ forloop.counter0 }}]" value="{{ collision.id }}" id="collision-{{ forloop.counter0 }}" checked="checked" style="display:none;" /> - <span>Timeslot liegt in der Vergangenheit</span> - </label> - </td> - </tr> - {% else %} - - {% if collision != None %} - <tr class="table-row" id="row-{{ forloop.counter0 }}"> - <td class="table-cell projected keep" timeslot_index="{{ forloop.counter0 }}"> - <div class="droppable"> - <label for="timeslot-{{ forloop.counter0 }}" class="noselect"> - <input type="radio" name="resolved_timeslots[{{ forloop.counter0 }}]" value="{{ timeslot.start|date:"Y-m-d H:i:s"}} - {{ timeslot.end|date:"Y-m-d H:i:s" }}" checked="checked" id="timeslot-{{ forloop.counter0 }}" /> - <span> - <span class="timeslot-date">{{ timeslot.start|date:"D, d.m. Y "}}</span> - <span class="timeslot-time">{{ timeslot.start|date:"H:i"}} - {{ timeslot.end|date:"H:i" }} Uhr</span> - </span> - </label> - </div> - </td> - <td class="table-cell collision remove" timeslot_id="{{ collision.id }}"> - <div class="droppable"> - <label for="collision-{{ forloop.counter0 }}" class="noselect"> - <input type="radio" name="resolved_timeslots[{{ forloop.counter0 }}]" value="{{ collision.id }}" id="collision-{{ forloop.counter0 }}" /> - <span> - <span class="timeslot-date">{{ collision.start|date:"D, d.m. Y"}}</span> - <span class="timeslot-time">{{ collision.start|date:"H:i"}} - {{ collision.end|date:"H:i" }} Uhr</span> - <span class="timeslot-show">{{ collision.show }}</span> - </span> - </label> - </div> - {% for note in self.notes %} - {% if collision.id == note.timeslot_id %} - <div id="collision-note-{{ forloop.counter0 }}" class="collision-note draggable" note_id="{{ note.id }}"> - <strong>Note: {{ note.title }}</strong> - </div> - {% endif %} - {% endfor %} - - </td> - </tr> - {% else %} - <tr class="table-row projected keep"> - <td class="table-cell projected" timeslot_index="{{ forloop.counter0 }}"> - <div class="droppable"> - <label for="timeslot-{{ forloop.counter0 }}" class="noselect"> - <span class="timeslot-date">{{ timeslot.start|date:"D, d.m. Y "}}</span> - <span class="timeslot-time">{{ timeslot.start|date:"H:i"}} - {{ timeslot.end|date:"H:i" }} Uhr</span> - <span>✓</span> - </label> - <input type="radio" name="resolved_timeslots[{{ forloop.counter0 }}]" value="{{ timeslot.start|date:"Y-m-d H:i:s"}} - {{ timeslot.end|date:"Y-m-d H:i:s" }}" checked="checked" /> - </div> - </td> - <td class="table-cell projected"> - <label>nichts</label> - </td> - </tr> - {% endif %} - - {% endif %} - {% endfor %} - </tbody> - </table> - - {% for timeslot in timeslots %} - <input type="hidden" name="create_timeslots[{{ forloop.counter0 }}]" value="{{ timeslot.start|date:"Y-m-d H:i:s"}} - {{ timeslot.end|date:"Y-m-d H:i:s" }}" /> - {% endfor %} - - {% for collision in collisions %} - <input type="hidden" name="collisions[{{ forloop.counter0 }}]" value="{{ collision.id}}" /> - {% endfor %} - - <input type="hidden" name="ps_save_id" value="{{ schedule.id }}" /> - <input type="hidden" name="ps_save_rrule_id" value="{{ schedule.rrule_id }}" /> - <input type="hidden" name="ps_save_byweekday" value="{{ schedule.byweekday }}" /> - <input type="hidden" name="ps_save_dstart" value="{{ schedule.dstart|date:"Y-m-d" }}" /> - <input type="hidden" name="ps_save_tstart" value="{{ schedule.tstart }}" /> - <input type="hidden" name="ps_save_tend" value="{{ schedule.tend }}" /> - <input type="hidden" name="ps_save_until" value="{{ schedule.until|date:"Y-m-d" }}" /> - <input type="hidden" name="ps_save_is_repetition" value="{{ schedule.is_repetition }}" /> - <input type="hidden" name="ps_save_automation_id" value="{{ schedule.automation_id }}" /> - <input type="hidden" name="ps_save_fallback_id" value="{{ schedule.fallback_id }}" /> - <input type="hidden" name="ps_save_show_id" value="{{ schedule.show_id }}" /> - <input type="hidden" name="ps_save_add_days_no" value="{{ schedule.add_days_no }}" /> - <input type="hidden" name="ps_save_add_business_days_only" value="{{ schedule.add_business_days_only }}" /> - <input type="hidden" name="num_inputs" value="{{ num_inputs }}" /> - <input type="hidden" name="step" value="{{ step }}" /> - - <input type="hidden" name="num_ntind" value="0" id="ntind-num" /> - <input type="hidden" name="num_ntids" value="0" id="ntids-num" /> - - <!-- Linking notes to timeslots that will be created --> - <div id="ntind"></div> - - <!-- Linking notes to already existing timeslots --> - <div id="ntids"></div> - - <div class="submit-row"> - <input class="default" type="submit" name="_continue" value="Speichern" /> - <p class="deletelink-box"><a href="/admin/program/show/{{ obj.id }}/change" class="deletelink">Abbrechen und Änderungen verwerfen</a></p> - </div> - - <!-- TODO: Problemo: If form validation failed, submit will be prevented -> only include the fields necessary --> - <div style="display:none;"> - {{ schedulesform.as_ul }} - {{ showform.as_ul }} - </div> - - </form> - - </div> <!-- /#content-main --> - - </div> <!-- /#content --> - -</div> <!-- /#container --> - -<script type="text/javascript"> - -jQuery(document).ready( function() { - - /* Change classes if a timeslot or collision checked */ - jQuery(document).on( 'click', 'input[name^="resolved_timeslots"]', function() { - var row_id = jQuery(this).closest('.table-row').attr('id'); - - if( jQuery(this).closest('.table-cell').hasClass('projected') ) { - jQuery('#' + row_id + ' .projected').removeClass('remove').addClass('keep'); - jQuery('#' + row_id + ' .collision').removeClass('keep').addClass('remove'); - } else { - jQuery('#' + row_id + ' .projected').removeClass('keep').addClass('remove'); - jQuery('#' + row_id + ' .collision').removeClass('remove').addClass('keep'); - } - }); - - /* Select a column (all projected timeslots or all collisions */ - /* TODO: Not working */ - jQuery(document).on( 'click', '.check-all', function() { - - if( jQuery(this).hasClass('projected') ) { - jQuery('.projected input[name^="resolved_timeslots"]').attr('checked', 'checked'); - jQuery('.collision input[name^="resolved_timeslots"]').removeAttr('checked'); - - console.log("check all projected"); - } - - if( jQuery(this).hasClass('collision') ) { - jQuery('.collision input[name^="resolved_timeslots"]').attr('checked', 'checked'); - jQuery('.projected input[name^="resolved_timeslots"]').removeAttr('checked'); - console.log("check all collisions"); - } - - }); - -}); - - var ntind = [] - var ntids = [] - - /* Redraws hidden inputs when a note was dropped to a timeslot */ - function drawInputs(nts, name) { - jQuery('#' + name).html(''); - - for(index = 0; index < nts.length; ++index) { - jQuery('#' + name).append('<input type="hidden" name="' + name + '[' + index + '][id]" value="' + nts[index].id + '" />'); - jQuery('#' + name).append('<input type="hidden" name="' + name + '[' + index + '][note_id]" value="' + nts[index].note_id + '" />'); - } - } - - - /* The draggable note */ - jQuery( function() { - jQuery( ".draggable" ).draggable({ - revert: 'invalid', - snap: '.droppable', - snapMode: 'inner', - cursor: 'move', - drag: function() { - }, - stop: function() { - } - }); - - - /** - * When a note was dropped onto a timelost - * regenerate note/timeslot arrays for indices and ids and call drawInputs() - */ - jQuery( ".droppable" ).droppable({ - classes: { - "ui-droppable-active": "ui-state-active", - "ui-droppable-hover": "ui-state-hover" - }, - drop: function( event, ui ) { - jQuery(this).parent("td").append( jQuery(ui.draggable).css({"top": 0, "left": 0 }) ); - - var note_id = jQuery(ui.draggable).attr("note_id"); - - if( jQuery(this).parent("td").hasClass("projected") ) { - // Dropped onto the left column - - var ts_index = jQuery(this).parent("td").attr("timeslot_index"); - - // Remove note id from arrays if already existing - ntind = jQuery.grep(ntind, function(e){ - return e.note_id != note_id; - }); - - ntids = jQuery.grep(ntind, function(e){ - return e.note_id != note_id; - }); - - ntind.push({"id": ts_index, "note_id": note_id}); - - } else { - // Dropped onto the right column - - var ts_id = jQuery(this).parent("td").attr("timeslot_id"); - - // Remove not id from arrays if already existing - ntids = jQuery.grep(ntind, function(e){ - return e.note_id != note_id; - }); - - ntind = jQuery.grep(ntind, function(e){ - return e.note_id != note_id; - }); - - ntids.push({"id": ts_id, "note_id": note_id}); - - } - - jQuery("#ntind-num").val(ntind.length); - jQuery("#ntids-num").val(ntids.length); - - drawInputs(ntind, "ntind"); - drawInputs(ntids, "ntids"); - - } - }); - } ); - -</script> - -</body> -</html> \ No newline at end of file diff --git a/program/templates/day_schedule.html b/program/templates/day_schedule.html deleted file mode 100644 index e6272928..00000000 --- a/program/templates/day_schedule.html +++ /dev/null @@ -1,131 +0,0 @@ -<html> -<head> - <title>Tagesansicht {{ day|date:"l, d.m.Y" }} — Radio Helsinki - Freies Radio Graz</title> - <script type="text/javascript" src="/program/static/js/jquery/jquery.min.js"></script> - <script type="text/javascript" src="/program/static/js/jquery-ui/jquery-ui.min.js"></script> - <script type="text/javascript" src="/program/static/js/jquery-ui/ui/jquery.ui.datepicker.min.js"></script> - <script type="text/javascript"> - jQuery(document).ready(function () { - jQuery("#calendar").datepicker({ - dateFormat: "yy.mm.dd", - monthNames: ["Jänner", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"], - monthNamesShort: ["Jän", "Feb", "Mär", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"], - dayNames: ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"], - dayNamesMin: ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"], - dayNamesShort: ["Son", "Mon", "Die", "Mit", "Don", "Fre", "Sam"], - firstDay: 1, - nextText: "Weiter", - prevText: "Zurück", - defaultDate: location.href.split('/').slice(4, 7).join('.'), - onSelect: function (dateText, inst) { - location = '/program/' + dateText.split('.').join('/'); - } - }); - }); - </script> -</head> -<body> - -<dl id="box_calendar" class="portlet calendar"> - <dt class="portletHeader"><span>Kalender<span></dt> - <dd class="portletItem"> - <div id="calendar"></div> - </dd> -</dl> - -{% load content_boxes %} -<div id="filter-type"> - {% type %} -</div> - -{% comment %} -<div id="filter-topic"> - <dl id="filter-header" class="portlet"> - <dt class="portletHeader"><span>Filter</span></dt> - </dl> -{% musicfocus %} -{% category %} -{% topic %} -</div> -{% endcomment %} - -<div id="content-main" class="day-schedule"> - <h2>Tagesansicht</h2> - <h1 id="date">{{ day|date:"l, d.m.Y" }}</h1> - - <div id="timeslots"> - {% for timeslot in timeslots %} - {% if forloop.first and timeslot.start != timeslot.get_previous_by_start.end %} - <div class="timeslot ty-{{ default_show.type.slug }}"> - <div class="show-start">{{ timeslot.get_previous_by_start.end|date:"H:i" }}</div> - <div class="show-abbrevs"> - {% for ca in default_show.category.all %} - <span title="{{ ca.category }}" - class="abbrev ca-{{ ca.abbrev }}"><span>{{ ca.abbrev }}</span></span> - {% endfor %} - {% for to in default_show.topic.all %} - <span title="{{ to.topic }}" class="abbrev to-{{ to.abbrev }}"><span>{{ to.abbrev }}</span></span> - {% endfor %} - {% for mf in default_show.musicfocus.all %} - <span title="{{ mf.focus }}" class="abbrev mf-{{ mf.abbrev }}"><span>{{ mf.abbrev }}</span></span> - {% endfor %} - </div> - <div class="show-detail"> - <h3 class="show-title">{{ default_show.name }}</h3> - <p class="show-description">{{ default_show.short_description }}</p> - </div> - </div> - {% endif %} - <div class="timeslot bf-{{ timeslot.show.type.slug }}"> - <div class="show-start">{{ timeslot.start|date:"H:i" }}</div> - <div class="show-abbrevs"> - {% for ca in timeslot.show.category.all %} - <span title="{{ ca.category }}" - class="abbrev ca-{{ ca.abbrev }}"><span>{{ ca.abbrev }}</span></span> - {% endfor %} - {% for to in timeslot.show.topic.all %} - <span title="{{ to.topic }}" - class="abbrev to-{{ to.abbrev }}"><span>{{ to.abbrev }}</span></span> - {% endfor %} - {% for mf in timeslot.show.musicfocus.all %} - <span title="{{ mf.focus }}" - class="abbrev mf-{{ mf.abbrev }}"><span>{{ mf.abbrev }}</span></span> - {% endfor %} - </div> - <div class="show-detail"> - <h3 class="show-title"><a - href="{% url "timeslot-detail" timeslot.id %}">{{ timeslot.show.name }}</a></h3> - {% if timeslot.note %} - <p class="note-title"><strong>Heute:</strong> {{ timeslot.note.title }}</p> - {% else %} - <p class="show-description">{{ timeslot.show.short_description }}</p> - {% endif %} - </div> - </div> - {% if timeslot.end != timeslot.get_next_by_start.start %} - <div class="timeslot ty-{{ default_show.type.slug }}"> - <div class="show-start">{{ timeslot.end|date:"H:i" }}</div> - <div class="show-abbrevs"> - {% for ca in default_show.category.all %} - <span title="{{ ca.category }}" - class="abbrev ca-{{ ca.abbrev }}"><span>{{ ca.abbrev }}</span></span> - {% endfor %} - {% for to in default_show.topic.all %} - <span title="{{ to.topic }}" class="abbrev to-{{ to.abbrev }}"><span>{{ to.abbrev }}</span></span> - {% endfor %} - {% for mf in default_show.musicfocus.all %} - <span title="{{ mf.focus }}" class="abbrev mf-{{ mf.abbrev }}"><span>{{ mf.abbrev }}</span></span> - {% endfor %} - </div> - <div class="show-detail"> - <h3 class="show-title">{{ default_show.name }}</h3> - <p class="show-description">{{ default_show.short_description }}</p> - </div> - </div> - {% endif %} - {% endfor %} - </div> -</div> - -</body> -</html> \ No newline at end of file diff --git a/program/templates/host_detail.html b/program/templates/host_detail.html deleted file mode 100644 index d8177481..00000000 --- a/program/templates/host_detail.html +++ /dev/null @@ -1,27 +0,0 @@ -<html> -<head> - <title>Host: {{ host.name }} — Radio Helsinki - Freies Radio Graz</title> -</head> -<body> - -<div id="content-main" class="host-detail"> - <div id="name">{{ host.name }}</div> - - <div id="shows"> - <div id="shows-title">Sendungen</div> - {% for show in host.active_shows %} - <div class="show {{ show.type.slug }}"><a href="{% url "show-detail" show.slug %}"> {{ show.name }}</a></div> - {% endfor %} - </div> - - {% if host.email %} - <div id="email">E-Mail Adresse: <a href="{{ host.email }}">{{ host.email }}</a></div> - {% endif %} - - {% if host.website %} - <div id="website">Website: <a href="{{ host.website }}">{{ host.website }}</a></div> - {% endif %} -</div> - -</body> -</html> \ No newline at end of file diff --git a/program/templates/host_list.html b/program/templates/host_list.html deleted file mode 100644 index ada9bf18..00000000 --- a/program/templates/host_list.html +++ /dev/null @@ -1,19 +0,0 @@ -<html> -<head> - <title>Sendungsmacherinnen — Radio Helsinki - Freies Radio Graz</title> -</head> -<body> - -<div id="content-main"> - <h1>Sendungsmachende A-Z</h1> - <div class="host-list"> - {% for host in host_list %} - <div class="host"> - <a href="{% url "host-detail" host.id %}">{{ host.name }}</a> - </div> - {% endfor %} - </div> -</div> - -</body> -</html> diff --git a/program/templates/recommendation_list.html b/program/templates/recommendation_list.html deleted file mode 100644 index e0de7636..00000000 --- a/program/templates/recommendation_list.html +++ /dev/null @@ -1,47 +0,0 @@ -<html> -<head> - <title>Tipps — Radio Helsinki - Freies Radio Graz</title> -</head> -<body> - -<div id="content-main" class="recommendations"> - <h1>Programmhinweise</h1> - <div id="shows"> - {% for recommendation in recommendation_list %} - <div class="show recommendation ty-{{ recommendation.show.type.slug }}"> - <div class="show-abbrevs"> - {% for ca in recommendation.show.category.all %} - <span title="{{ ca.category }}" - class="abbrev ca-{{ ca.abbrev }}"><span>{{ ca.abbrev }}</span></span> - {% endfor %} - {% for to in recommendation.show.topic.all %} - <span title="{{ to.topic }}" - class="abbrev to-{{ to.abbrev }}"><span>{{ to.abbrev }}</span></span> - {% endfor %} - {% for mf in recommendation.show.musicfocus.all %} - <span title="{{ mf.focus }}" - class="abbrev mf-{{ mf.abbrev }}"><span>{{ mf.abbrev }}</span></span> - {% endfor %} - </div> - <div class="show-detail"> - <h4> - <a href="{% url "show-detail" recommendation.show.slug %}">{{ recommendation.show.name }}</a><br/> - vom {{ recommendation.start|date:"d.m. H:i" }}-{{ recommendation.end|date:"H:i" }}</h4> - {% if recommendation.note %} - <h3 class="show-title"> - <a href="{% url "timeslot-detail" recommendation.id %}">{{ recommendation.note.title }}</a> - </h3> - <div class="note-content">{{ recommendation.note.content|safe }}</div> - {% else %} - <h3 class="show-title"><a - href="{% url "timeslot-detail" recommendation.id %}">{{ recommendation.show.type.type }}</a> - </h3> - {% endif %} - </div> - </div> - {% endfor %} - </div> -</div> - -</body> -</html> \ No newline at end of file diff --git a/program/templates/show_detail.html b/program/templates/show_detail.html deleted file mode 100644 index 43fd9a0b..00000000 --- a/program/templates/show_detail.html +++ /dev/null @@ -1,88 +0,0 @@ -<html> -<head> - <title>Sendung: {{ show.name }} — Radio Helsinki - Freies Radio Graz</title> -</head> -<body> - -<div id="calendar"></div> - -<div id="content-main" class="show-detail"> - - <div class="show-detail-header ty-{{ show.type.slug }}"> - <div class="show-details"> - <h1 id="name">{{ show.name }}</h1> - {% if show.id != 1 %} - <p id="schedules"> - {% for schedule in show.active_schedules %} - <span class="schedule">{{ schedule }}</span><br/> - {% endfor %} - </p> - {% endif %} - </div> - - <div class="show-categorization"> - <p id="type">{{ show.type.type }}</p> - {% for ca in show.category.all %} - <span title="{{ ca.category }}" class="abbrev ca-{{ ca.abbrev }}"><span>{{ ca.abbrev }}</span></span> - {% endfor %} - {% for to in show.topic.all %} - <span title="{{ to.topic }}" class="abbrev to-{{ to.abbrev }}"><span>{{ to.abbrev }}</span></span> - {% endfor %} - {% for mf in show.musicfocus.all %} - <span title="{{ mf.focus }}" class="abbrev mf-{{ mf.abbrev }}"><span>{{ mf.abbrev }}</span></span> - {% endfor %} - </div> - - </div> - - <div id="short-description" class="documentDescription">{{ show.short_description }}</div> - - {% if show.description %} - <div id="description">{{ show.description|safe }}</div> - {% endif %} - - {% if show.image %} - <div id="image" style="float: right;"><img src="/program/static/{{ show.image }}" width="200" alt="image"></div> - {% endif %} - - <p> - {% for host in show.hosts.all %} - <a href="{% url "host-detail" host.id %}">{{ host }}</a><br/> - {% endfor %} - {% if show.email %} - <strong>Email:</strong> <a href="mailto:{{ show.email }}">{{ show.email }}</a><br/> - {% endif %} - {% if show.website %} - <strong>Website:</strong> <a href="{{ show.website }}">{{ show.website }}</a><br/> - {% endif %} - </p> - - {% if show.notes.all %} - <br/> - <h2>Sendungstipps</h2> - <ul class="recommendations-list"> - {% for note in show.notes.all reversed %} - <li> - <a href="{% url "timeslot-detail" note.timeslot.id %}" - title="{{ note.title }}">{{ note.start|date:"d. M Y" }}:</a> - <div class="title">{{ note.title }}</div> - </li> - {% endfor %} - {% if show.predecessor and show.predecessor.notes.all %} - {% if show.name != show.predecessor.name %} - <h3>Davor als <a href="{% url "show-detail" show.predecessor.slug %}">{{ show.predecessor.name }}</a></h3> - {% endif %} - {% for note in show.predecessor.notes.all reversed %} - <li> - <a href="{% url "timeslot-detail" note.timeslot.id %}" - title="{{ note.title }}">{{ note.start|date:"d. M Y" }}:</a> - <div class="title">{{ note.title }}</div> - </li> - {% endfor %} - {% endif %} - </ul> - {% endif %} -</div> - -</body> -</html> \ No newline at end of file diff --git a/program/templates/show_list.html b/program/templates/show_list.html deleted file mode 100644 index d16c90ea..00000000 --- a/program/templates/show_list.html +++ /dev/null @@ -1,56 +0,0 @@ -<html> -<head> - <title>Sendungen — Radio Helsinki - Freies Radio Graz</title> -</head> -<body> - -{% load content_boxes %} -<div id="filter-type"> - {% type %} -</div> -<div id="filter-topic"> - <dl id="filter-header" class="portlet"> - <dt class="portletHeader"><span>Filter</span></dt> - </dl> - {% musicfocus %} - {% category %} - {% topic %} -</div> - -<div id="content-main" class="show-list"> - <h1>Sendungen A-Z</h1> - - <div id="shows"> - {% for show in show_list %} - <div class="show ty-{{ show.type.slug }}"> - <div class="show-abbrevs"> - {% for ca in show.category.all %} - <span title="{{ ca.category }}" - class="abbrev ca-{{ ca.abbrev }}"><span>{{ ca.abbrev }}</span></span> - {% endfor %} - {% for to in show.topic.all %} - <span title="{{ to.topic }}" - class="abbrev to-{{ to.abbrev }}"><span>{{ to.abbrev }}</span></span> - {% endfor %} - {% for mf in show.musicfocus.all %} - <span title="{{ mf.focus }}" - class="abbrev mf-{{ mf.abbrev }}"><span>{{ mf.abbrev }}</span></span> - {% endfor %} - </div> - <div class="show-detail"> - <h3 class="show-title"><a href="{% url "show-detail" show.slug %}">{{ show.name }}</a></h3> - <ul class="show-schedules"> - {% for schedule in show.active_schedules %} - <li class="show-schedule">{{ schedule }}</li> - {% endfor %} - </ul> - <p class="show-description">{{ show.short_description }}</p> - </div> - </div> - {% endfor %} - </div> - -</div> - -</body> -</html> \ No newline at end of file diff --git a/program/templates/styles.css b/program/templates/styles.css deleted file mode 100644 index e9b98eec..00000000 --- a/program/templates/styles.css +++ /dev/null @@ -1,179 +0,0 @@ -{% for ty in types %} -.ty-{{ ty.slug }} { background-color: {{ ty.color }}; color: {{ ty.text_color }}; } -{% endfor %} - -{% for mf in musicfocus %} -.mf-{{ mf.abbrev }} { background-image:url({{ mf.button_url }}); } -.filterbox .mf-{{ mf.abbrev }}:hover { background-image:url({{ mf.button_hover_url }}); } -{% endfor %} - -{% for ca in category %} -.ca-{{ ca.abbrev }} { background-image:url({{ ca.button_url }}); } -.filterbox .ca-{{ ca.abbrev }}:hover { background-image:url({{ ca.button_hover_url }}); } -{% endfor %} - -{% for to in topic %} -.to-{{ to.abbrev }} { background-image:url({{ to.button_url }}); } -.filterbox .to-{{ to.abbrev }}:hover { background-image:url({{ to.button_hover_url }}); } -{% endfor %} - -{% for mf in musicfocus %} -.show-detail-header .mf-{{ mf.abbrev }} { background-image:url({{ mf.big_button_url }}); } -{% endfor %} - -{% for ca in category %} -.show-detail-header .ca-{{ ca.abbrev }} { background-image:url({{ ca.big_button_url }}); } -{% endfor %} - -{% for to in topic %} -.show-detail-header .to-{{ to.abbrev }} { background-image:url({{ to.big_button_url }}); } -{% endfor %} - - -.draggable { - border:1px dashed #bbb; - cursor:move; -} - -.ui-draggable-dragging { - background:#fff; - border-color:#222; -} - -.projected.droppable { - display:none; -} - -.table { display:table; width:100%; border-collapse:collapse; } -.table-row { display:table-row; } -.table-heading { display:table-header-group; background-color:#ddd; font-weight:bold; } -.table-body { display:table-row-group; } -.table-foot { display:table-footer-group; font-weight:bold; background-color:#ddd; } -.table-cell { display:table-cell; vertical-align:top; border:1px solid #777; padding:0; line-height:40px; width:50%; } -.table-head { display:table-cell; vertical-align:top; border:1px solid #777; padding:0 20px; line-height:40px; background-color:#333; color:#fff; font-weight:bold; } - -.table td.table-cell { - padding:0; - line-height:40px; - vertical-align:top; -} - -.timeslot-date { - display:inline-block; - width:130px; -} - -.timeslot-time { - display:inline-block; - width:150px; -} - -.past { background-color:#ddd; color:#000; } -.keep { background-color:#B3E6BA; } -.remove { background-color:#eee; } - -.collision-note { - padding-left:20px; -} - -.table-cell label { - display:block; - cursor:pointer; - line-height:2em; - padding:10px 20px; -} - -/* Radio buttons */ -.table-cell input[type="radio"] { - border:0; - clip:rect(0 0 0 0); - height:1px; - margin:-1px; - overflow:hidden; - padding:0; - position:absolute; - width:1px; -} - -.table-cell.projected input[type="radio"] + span { - display: block; -} - -/* Unchecked style */ -.table-cell.projected input[type="radio"] + span::before { - content:''; - float:right; - width:1.5em; - height:1.5em; - border-radius:1.5em; - border:1px solid #fff; - box-shadow:0 0 0 0.15em #000; - margin:.3em; - /*transition:0.5s ease all;*/ - -} - -/* Checked style */ -.table-cell.projected input[type="radio"]:checked + span::before { - background:green; - box-shadow:0 0 0 0.25em #000; -} - -.table-cell.projected input[type="radio"]:focus + span::after { -} - - -.table-cell.collision input[type="radio"] + span { - display: block; -} - -/* Unchecked style */ -.table-cell.collision input[type="radio"] + span::before { - content:''; - float:left; - width:1.5em; - height:1.5em; - border-radius:1.5em; - border:1px solid #fff; - box-shadow:0 0 0 0.15em #000; - margin:.3em; - margin-right:25px; - /*transition:0.5s ease all;*/ -} - -/* Checked style */ -.table-cell.collision input[type="radio"]:checked + span::before { - background:green; - box-shadow:0 0 0 0.25em #000; -} - -.table-cell.collision input[type="radio"]:focus + span::after { -} - -.check-all { - font-size:15px; - text-align:center; - width:30px; -} - -.check-all.projected { - float:right; -} - -.check-all.collision { - float:left; -} - -.validation-error { - border:2px solid #ba2121 !important; -} - -.noselect { - -webkit-touch-callout: none; /* iOS Safari */ - -webkit-user-select: none; /* Safari */ - -khtml-user-select: none; /* Konqueror HTML */ - -moz-user-select: none; /* Firefox */ - -ms-user-select: none; /* Internet Explorer/Edge */ - user-select: none; /* Non-prefixed version, currently - supported by Chrome and Opera */ -} \ No newline at end of file diff --git a/program/templates/timeslot_detail.html b/program/templates/timeslot_detail.html deleted file mode 100644 index 5914548d..00000000 --- a/program/templates/timeslot_detail.html +++ /dev/null @@ -1,57 +0,0 @@ -<html> -<head> - <title>Sendung: {{ timeslot.show.name }} — Radio Helsinki - Freies Radio Graz</title> -</head> -<body> - -<div id="content-main" class="timeslot-detail"> - - <div class="show-detail-header ty-{{ timeslot.show.type.slug }}"> - <h1 id="name"> - <a href="{% url "show-detail" timeslot.show.slug %}">{{ timeslot.show.name }}</a> - </h1> - {% if timeslot.note %} - <h2>{{ timeslot.note.title }}</h2> - {% endif %} - <strong>Sendung am {{ timeslot.start|date:"d.m.Y H:i" }} bis {{ timeslot.end|date:"H:i" }}</strong> - - <div class="show-abbrevs"> - {% for ca in timeslot.show.category.all %} - <span title="{{ ca.category }}" class="abbrev ca-{{ ca.abbrev }}"><span>{{ ca.abbrev }}</span></span> - {% endfor %} - {% for to in timeslot.show.topic.all %} - <span title="{{ to.topic }}" class="abbrev to-{{ to.abbrev }}"><span>{{ to.abbrev }}</span></span> - {% endfor %} - {% for mf in timeslot.show.musicfocus.all %} - <span title="{{ mf.focus }}" class="abbrev mf-{{ mf.abbrev }}"><span>{{ mf.abbrev }}</span></span> - {% endfor %} - </div> - - <p id="type">{{ timeslot.show.type.type }}</p> - </div> - - {% if timeslot.note %} - <p class="timeslot-note">{{ timeslot.note.content|safe }}</p> - {% endif %} - - <div id="short-description" class="documentDescription">{{ timeslot.show.short_description }}</div> - - {% if timeslot.show.description %} - <div id="description">{{ timeslot.show.description|safe }}</div> - {% endif %} - - <p> - {% for host in timeslot.show.hosts.all %} - <a href="{% url "host-detail" host.id %}">{{ host }}</a><br/> - {% endfor %} - {% if timeslot.show.email %} - <strong>Email:</strong> <a href="mailto:{{ timeslot.show.email }}">{{ timeslot.show.email }}</a><br/> - {% endif %} - {% if timeslot.show.website %} - <strong>Website:</strong> <a href="{{ timeslot.show.website }}">{{ timeslot.show.website }}</a><br/> - {% endif %} - </p> -</div> - -</body> -</html> \ No newline at end of file diff --git a/program/templates/week_schedule.html b/program/templates/week_schedule.html deleted file mode 100644 index ad6b0125..00000000 --- a/program/templates/week_schedule.html +++ /dev/null @@ -1,127 +0,0 @@ -<html> -<head> - <title>Wochenansicht — Radio Helsinki - Freies Radio Graz</title> -</head> - -<body> - -<div id="content-main" class="week-schedule"> - <table class="week-navigation"> - <tr> - <td><a href="/program/{{ last_w }}"><--</a></td> - <td class="current">{{ cur_w }}</td> - <td><a href="/program/{{ next_w1 }}">{{ next_w1 }}</a></td> - <td><a href="/program/{{ next_w2 }}">{{ next_w2 }}</a></td> - <td><a href="/program/{{ next_w3 }}">{{ next_w3 }}</a></td> - <td><a href="/program/{{ next_w4 }}">{{ next_w4 }}</a></td> - <td><a href="/program/{{ next_w1 }}">--></a></td> - </tr> - </table> - <div class="weekday-starts weekday-starts-left"> - <div style="height: 43px;"> </div> - <div style="height: 60px;">06:00</div> - <div style="height: 60px;">07:00</div> - <div style="height: 60px;">08:00</div> - <div style="height: 60px;">09:00</div> - <div style="height: 60px;">10:00</div> - <div style="height: 60px;">11:00</div> - <div style="height: 60px;">12:00</div> - <div style="height: 60px;">13:00</div> - <div style="height: 60px;">14:00</div> - <div style="height: 60px;">15:00</div> - <div style="height: 60px;">16:00</div> - <div style="height: 60px;">17:00</div> - <div style="height: 60px;">18:00</div> - <div style="height: 60px;">19:00</div> - <div style="height: 60px;">20:00</div> - <div style="height: 60px;">21:00</div> - <div style="height: 60px;">22:00</div> - <div style="height: 60px;">23:00</div> - <div style="height: 60px;">00:00</div> - <div style="height: 60px;">01:00</div> - <div style="height: 60px;">02:00</div> - <div style="height: 60px;">03:00</div> - <div style="height: 60px;">04:00</div> - <div style="height: 60px;">05:00</div> - </div> - <div id="monday" class="weekday weekday-first"> - <h2>{{ monday|date:"l d.m.Y" }}</h2> - {% for timeslot in monday_timeslots %} - {% include "week_schedule_timeslot.html" %} - {% endfor %} - </div> - - <div id="tuesday" class="weekday"> - <h2>{{ tuesday|date:"l d.m.Y" }}</h2> - {% for timeslot in tuesday_timeslots %} - {% include "week_schedule_timeslot.html" %} - {% endfor %} - </div> - - <div id="wednesday" class="weekday"> - <h2>{{ wednesday|date:"l d.m.Y" }}</h2> - {% for timeslot in wednesday_timeslots %} - {% include "week_schedule_timeslot.html" %} - {% endfor %} - </div> - - <div id="thursday" class="weekday"> - <h2>{{ thursday|date:"l d.m.Y" }}</h2> - {% for timeslot in thursday_timeslots %} - {% include "week_schedule_timeslot.html" %} - {% endfor %} - </div> - - <div id="friday" class="weekday"> - <h2>{{ friday|date:"l d.m.Y" }}</h2> - {% for timeslot in friday_timeslots %} - {% include "week_schedule_timeslot.html" %} - {% endfor %} - </div> - - <div id="saturday" class="weekday"> - <h2>{{ saturday|date:"l d.m.Y" }}</h2> - {% for timeslot in saturday_timeslots %} - {% include "week_schedule_timeslot.html" %} - {% endfor %} - </div> - - <div id="sunday" class="weekday weekday-last"> - <h2>{{ sunday|date:"l d.m.Y" }}</h2> - {% for timeslot in sunday_timeslots %} - {% include "week_schedule_timeslot.html" %} - {% endfor %} - </div> - - <div class="weekday-starts weekday-starts-right"> - <div style="height: 43px;"> </div> - <div style="height: 60px;">06:00</div> - <div style="height: 60px;">07:00</div> - <div style="height: 60px;">08:00</div> - <div style="height: 60px;">09:00</div> - <div style="height: 60px;">10:00</div> - <div style="height: 60px;">11:00</div> - <div style="height: 60px;">12:00</div> - <div style="height: 60px;">13:00</div> - <div style="height: 60px;">14:00</div> - <div style="height: 60px;">15:00</div> - <div style="height: 60px;">16:00</div> - <div style="height: 60px;">17:00</div> - <div style="height: 60px;">18:00</div> - <div style="height: 60px;">19:00</div> - <div style="height: 60px;">20:00</div> - <div style="height: 60px;">21:00</div> - <div style="height: 60px;">22:00</div> - <div style="height: 60px;">23:00</div> - <div style="height: 60px;">00:00</div> - <div style="height: 60px;">01:00</div> - <div style="height: 60px;">02:00</div> - <div style="height: 60px;">03:00</div> - <div style="height: 60px;">04:00</div> - <div style="height: 60px;">05:00</div> - </div> - -</div> - -</body> -</html> diff --git a/program/templates/week_schedule_timeslot.html b/program/templates/week_schedule_timeslot.html deleted file mode 100644 index 12abade9..00000000 --- a/program/templates/week_schedule_timeslot.html +++ /dev/null @@ -1,54 +0,0 @@ -{% load timeslots %} - -{% if forloop.first and timeslot.start != timeslot.get_previous_by_start.end %} - <div class="timeslot ty-{{ default_show.type.slug }}" {% duration_until timeslot.start %}> - <div>{{ default_show.name }}</div> - </div> -{% endif %} - -{% if forloop.first and timeslot.start == timeslot.get_next_by_start.end and timeslot.start != "06:00" %} - <div class="timeslot ty-{{ timeslot.show.type.slug }}" {% duration timeslot.start timeslot.end %}> - <div><a href="{% url "timeslot-detail" timeslot.id %}">{{ timeslot.show.name }}</a></div> - </div> -{% endif %} - -{% if forloop.first and timeslot.start != "06:00" and timeslot.show == default_show %} - <div class="timeslot ty-{{ timeslot.show.type.slug }}" {% duration_until timeslot.end %}> - <div><a href="{% url "timeslot-detail" timeslot.id %}">{{ timeslot.show.name }}</a></div> - </div> -{% endif %} - -{% if forloop.first and timeslot.start != "06:00" and timeslot.show != default_show %} - <div class="timeslot ty-{{ timeslot.show.type.slug }}" {% duration timeslot.start timeslot.end %}> - <div><a href="{% url "timeslot-detail" timeslot.id %}">{{ timeslot.show.name }}</a></div> - </div> -{% endif %} - -{% if not forloop.first and not forloop.last %} - <div class="timeslot ty-{{ timeslot.show.type.slug }}" {% duration timeslot.start timeslot.end %}> - <div><a href="{% url "timeslot-detail" timeslot.id %}">{{ timeslot.show.name }}</a></div> - </div> - {% if timeslot.end != timeslot.get_next_by_start.start %} - <div class="timeslot ty-{{ default_show.type.slug }}" {% duration timeslot.end timeslot.get_next_by_start.start %}> - <div>{{ default_show.name }}</div> - </div> - {% endif %} -{% endif %} - -{% if forloop.last and timeslot.end != "06:00" and timeslot.show == default_show %} - <div class="timeslot ty-{{ timeslot.show.type.slug }}" {% duration_since timeslot.start %}> - <div><a href="{% url "timeslot-detail" timeslot.id %}">{{ timeslot.show.name }}</a></div> - </div> -{% endif %} - -{% if forloop.last and timeslot.end != "06:00" and timeslot.show != default_show %} - <div class="timeslot ty-{{ timeslot.show.type.slug }}" {% duration timeslot.start timeslot.end %}> - <div><a href="{% url "timeslot-detail" timeslot.id %}">{{ timeslot.show.name }}</a></div> - </div> -{% endif %} - -{% if forloop.last and timeslot.end != timeslot.get_next_by_start.start %} - <div class="timeslot ty-{{ default_show.type.slug }}" {% duration_since timeslot.end %}> - <div>{{ default_show.name }}</div> - </div> -{% endif %} \ No newline at end of file diff --git a/program/templatetags/__init__.py b/program/templatetags/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/program/templatetags/content_boxes.py b/program/templatetags/content_boxes.py deleted file mode 100644 index 6f4caa32..00000000 --- a/program/templatetags/content_boxes.py +++ /dev/null @@ -1,27 +0,0 @@ -# -*- coding: utf-8 -*- - -from django import template - -from program.models import Type, MusicFocus, Category, Topic - -register = template.Library() - - -@register.inclusion_tag('boxes/type.html') -def type(): - return {'type_list': Type.objects.filter(is_active=True)} - - -@register.inclusion_tag('boxes/musicfocus.html') -def musicfocus(): - return {'musicfocus_list': MusicFocus.objects.filter(is_active=True)} - - -@register.inclusion_tag('boxes/category.html') -def category(): - return {'category_list': Category.objects.filter(is_active=True)} - - -@register.inclusion_tag('boxes/topic.html') -def topic(): - return {'topic_list': Topic.objects.filter(is_active=True)} \ No newline at end of file diff --git a/program/templatetags/timeslots.py b/program/templatetags/timeslots.py deleted file mode 100644 index efab3ccd..00000000 --- a/program/templatetags/timeslots.py +++ /dev/null @@ -1,27 +0,0 @@ -# -*- coding: utf-8 -*- - -from django import template - -from datetime import datetime, time, timedelta - -register = template.Library() - - -@register.simple_tag -def duration(start, end): - return 'style="height: %dpx"' % ((end-start).seconds/60) - - -@register.simple_tag -def duration_until(end): - start = datetime.combine(end.date(), time(6, 0)) - return 'style="height: %dpx"' % ((end-start).seconds/60) - - -@register.simple_tag -def duration_since(start): - if start.time() < time(23, 59): - end = datetime.combine(start.date()+timedelta(days=1), time(6, 0)) - else: - end = datetime.combine(start.date(), time(6, 0)) - return 'style="height: %dpx"' % ((end-start).seconds/60) \ No newline at end of file -- GitLab