work on archiver / episode item: is now
This commit is contained in:
		@ -155,6 +155,7 @@ class Log(models.Model):
 | 
			
		||||
    @classmethod
 | 
			
		||||
    def merge_diffusions(cls, logs, diffs, count=None):
 | 
			
		||||
        # TODO: limit count
 | 
			
		||||
        # FIXME: log may be iterable (in stats view)
 | 
			
		||||
        logs = list(logs.order_by('-date'))
 | 
			
		||||
        diffs = deque(diffs.on_air().before().order_by('-start'))
 | 
			
		||||
        object_list = []
 | 
			
		||||
 | 
			
		||||
@ -12,7 +12,10 @@ Context variables:
 | 
			
		||||
 | 
			
		||||
{% block title %}
 | 
			
		||||
{% if not object.is_published and object.program.is_published %}
 | 
			
		||||
<a href="{{ object.program.get_absolute_url }}">{{ object.title }}</a>
 | 
			
		||||
<a href="{{ object.program.get_absolute_url }}">
 | 
			
		||||
    {{ object.title }}
 | 
			
		||||
    {% if object.is_now %}<span class="has-text-danger fa fa-play-circle"></span>{% endif %}
 | 
			
		||||
</a>
 | 
			
		||||
{% else %}
 | 
			
		||||
{{ block.super }}
 | 
			
		||||
{% endif %}
 | 
			
		||||
 | 
			
		||||
@ -33,6 +33,6 @@ class StatisticsView(BaseAdminView, LogListView, ListView):
 | 
			
		||||
    date = None
 | 
			
		||||
 | 
			
		||||
    def get_object_list(self, logs, *_):
 | 
			
		||||
        return super().get_object_list(logs, True)
 | 
			
		||||
        super().get_object_list(logs, True)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -43,7 +43,7 @@ class LogListMixin(GetDateMixin):
 | 
			
		||||
 | 
			
		||||
    def get_object_list(self, logs, full=False):
 | 
			
		||||
        """
 | 
			
		||||
        Return diffusions merged to the provided logs queryset. If
 | 
			
		||||
        Return diffusions merged to the provided logs iterable. If
 | 
			
		||||
        `full`, sort items by date without merging.
 | 
			
		||||
        """
 | 
			
		||||
        diffs = self.get_diffusions_queryset()
 | 
			
		||||
 | 
			
		||||
@ -10,7 +10,7 @@
 | 
			
		||||
            </span>
 | 
			
		||||
            [[ source.id ]]
 | 
			
		||||
 | 
			
		||||
            <small v-if="source.isPaused || source.isPlaying">(-[[ source.remainingString ]])</small>
 | 
			
		||||
            <small v-if="source.isPaused || source.isPlaying">([[ source.remainingString ]])</small>
 | 
			
		||||
 | 
			
		||||
            <a v-if="source.data.program !== undefined"
 | 
			
		||||
               :href="'{% url 'admin:aircox_program_change' "$$" %}'.replace('$$', source.data.program)"
 | 
			
		||||
 | 
			
		||||
@ -21,7 +21,7 @@
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="navbar-end">
 | 
			
		||||
            <div class="select navbar-item">
 | 
			
		||||
                <select ref="selectStreamer" @change.native="selectStreamer" class="control"
 | 
			
		||||
                <select ref="selectStreamer" onchange="selectStreamer" class="control"
 | 
			
		||||
                        title="{% trans "Select a station" %}"
 | 
			
		||||
                        aria-label="{% trans "Select a station" %}">
 | 
			
		||||
                    <option v-for="streamer of streamers" :value="streamer.id">[[ streamer.data.name ]]</option>
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user