Skip to content

Commit

Permalink
Title for PMASA pages
Browse files Browse the repository at this point in the history
Signed-off-by: Michal Čihař <michal@cihar.com>
  • Loading branch information
nijel committed Jun 23, 2015
1 parent 0d4d4dd commit dc03bbb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pmaweb/templates/base.html
Expand Up @@ -7,7 +7,7 @@
<meta name="author" content="phpMyAdmin contributors" />
<meta name="copyright" content="Copyright &copy; 2003 - {{current_year}} phpMyAdmin contributors" />
<link rel="copyright" href="{% url 'license' %}" />
<title>phpMyAdmin{% if page_title %} -- {{ page_title }}{% endif %}</title>
<title>phpMyAdmin{% if page_title %} - {{ page_title }}{% endif %}</title>
{% if page_rss %}
<link rel="alternate" type="application/rss+xml" href="{{ page_rss }}" title="{{ page_rss_title }}"/>
{% endif %}
Expand Down
1 change: 0 additions & 1 deletion pmaweb/templates/security/pmasa_detail.html
@@ -1,7 +1,6 @@
{% extends 'base.html' %}
{% load staticfiles %}

<py:def function="page_title">Security - ${announcement_id()}</py:def>
<py:def function="page_rss">${base_url}security/index.xml</py:def>
<py:def function="page_rss_title">phpMyAdmin security issues</py:def>

Expand Down
5 changes: 5 additions & 0 deletions security/views.py
Expand Up @@ -26,6 +26,11 @@
class PMASAView(DetailView):
model = PMASA

def get_context_data(self, **kwargs):
context = super(PMASAView, self).get_context_data(**kwargs)
context['page_title'] = 'Security - {0}'.format(self.object)
return context

def get_object(self, queryset=None):
if queryset is None:
queryset = self.get_queryset()
Expand Down

0 comments on commit dc03bbb

Please sign in to comment.