def get_context_data(self, **kwargs):
context = super(EmissionDetailView, self).get_context_data(**kwargs)
- context['sectionName'] = "emissions"
+ context['sectionName'] = "Emissions"
context['schedules'] = Schedule.objects.filter(emission=self.object).order_by('datetime')
# get all episodes, with an additional attribute to get the date of
def get_context_data(self, **kwargs):
context = super(EpisodeDetailView, self).get_context_data(**kwargs)
- context['sectionName'] = "emissions"
+ context['sectionName'] = "Emissions"
context['diffusions'] = Diffusion.objects.filter(episode=self.object.id)
context['soundfiles'] = SoundFile.objects.filter(episode=self.object.id)
context['emission'] = Emission.objects.get(slug=self.kwargs.get('emission_slug'))
def get_context_data(self, year=None, week=None, **kwargs):
context = super(ProgramView, self).get_context_data(**kwargs)
- context['sectionName'] = "emissions"
+ context['sectionName'] = "Emissions"
schedules = Schedule.objects.select_related().order_by('datetime')
days = []
for day in range(7):
def get_context_data(self, **kwargs):
context = super(Grid, self).get_context_data(**kwargs)
- context['sectionName'] = "emissions"
+ context['sectionName'] = "Emissions"
nb_lines = 2 * 24 # the cells are half hours
grid = []
def get_context_data(self, **kwargs):
context = super(Home, self).get_context_data(**kwargs)
- context['sectionName'] = "home"
+ context['sectionName'] = "Home"
context['news'] = list(NewsItem.objects.all().exclude(image__isnull=True).exclude(image__exact='').order_by('-datetime')[:10])
context['emissions'] = list(Emission.objects.filter(archived=False).order_by('title'))
schedules = Schedule.objects.select_related().order_by('datetime')
class NewsItemDetailView(DetailView):
model = NewsItem
def get_context_data(self, **kwargs):
- context['sectionName'] = "news"
+ context['sectionName'] = "News"
context = super(NewsItemDetailView, self).get_context_data(**kwargs)
context['news'] = list(NewsItem.objects.all().order_by('-datetime')[:60])
context['categories'] = list(NewsCategory.objects.all())
def get_context_data(self, **kwargs):
context = super(News, self).get_context_data(**kwargs)
- context['sectionName'] = "news"
+ context['sectionName'] = "News"
context['newsImaged'] = list(NewsItem.objects.all().exclude(image__isnull=True).exclude(image__exact='').order_by('-datetime')[:3])
context['news'] = list(NewsItem.objects.all().order_by('-datetime')[:60])
context['categories'] = list(NewsCategory.objects.all())
def get_context_data(self, **kwargs):
context = super(Emissions, self).get_context_data(**kwargs)
- context['sectionName'] = "emissions"
+ context['sectionName'] = "Emissions"
context['emissions'] = Emission.objects.all().filter(archived=False).order_by('title')
context['categories'] = Category.objects.all()
return context
template_name = 'archives.html'
def get_context_data(self, **kwargs):
context = super(Archives, self).get_context_data(**kwargs)
- context['sectionName'] = "emissions"
+ context['sectionName'] = "Emissions"
context['emissions'] = Emission.objects.all().filter(archived=True).order_by('title')
return context
def get_context_data(self, **kwargs):
context = super(Listen, self).get_context_data(**kwargs)
- context['sectionName'] = "listen"
+ context['sectionName'] = "Listen"
context['sounds'] = SoundFile.objects.all()[:15]
listenable = []
x=0
{% if cell.episode %}
<strong>{{ cell.datetime|date:"H:i" }}</strong> -
<a href="{% url 'episode-view' emission_slug=cell.episode.emission.slug slug=cell.episode.slug %}">
- <span>{{ cell.episode.emission.title }} - {{ cell.episode.title }}</span>
+ <span><em>{{ cell.episode.emission.title }}</em> - {{ cell.episode.title }}</span>
{% if cell.episode.description %}
- |<span class="smooth"> - {{ cell.episode.description|safe|striptags|truncatewords:50 }}</span>
+ <span class="smooth"> | {{ cell.episode.description|safe|striptags|truncatewords:50 }}</span>
{% elif cell.episode.emission.description %}
- |<span class="smooth"> - {{ cell.episode.emission.description|safe|striptags|truncatewords:50 }}</span>
+ <span class="smooth"> | {{ cell.episode.emission.description|safe|striptags|truncatewords:50 }}</span>
{% endif %}
</a>
{% elif cell.emission %}
<strong>{{ cell.datetime|date:"H:i" }}</strong> -
<a href="{% url 'emission-view' slug=cell.emission.slug %}">
- <span>{{ cell.emission.title }}</span>
+ <span><em>{{ cell.emission.title }}</em></span>
{% if cell.emission.description %}
- <span class="smooth"> - {{ cell.emission.description|safe|striptags|truncatewords:50 }}</span>
+ <span class="smooth"> | {{ cell.emission.description|safe|striptags|truncatewords:50 }}</span>
+ {% elif cell.emission.text %}
+ <span class="smooth"> | {{ cell.emission.text|safe|striptags|truncatewords:50 }}</span>
{% endif %}
</a>
{% else %}