summaryrefslogtreecommitdiffstats
path: root/modules-available/news
diff options
context:
space:
mode:
Diffstat (limited to 'modules-available/news')
-rw-r--r--modules-available/news/page.inc.php5
-rw-r--r--modules-available/news/templates/page-news.html12
2 files changed, 17 insertions, 0 deletions
diff --git a/modules-available/news/page.inc.php b/modules-available/news/page.inc.php
index ceffd028..3b58e9a2 100644
--- a/modules-available/news/page.inc.php
+++ b/modules-available/news/page.inc.php
@@ -180,6 +180,11 @@ class Page_News extends Page
$data['locationid'] = $this->locationId;
if ($this->locationId > 0) {
$data['location_name'] = Location::getName($this->locationId);
+ } else {
+ // Superadmin can see all overridden locations
+ $data['overridden'] = Database::queryAll("SELECT l.locationid, l.locationname FROM vmchooser_pages
+ INNER JOIN location l USING (locationid)
+ WHERE expires > UNIX_TIMESTAMP() ORDER BY locationname ASC");
}
Render::addTemplate('page-news', $data);
}
diff --git a/modules-available/news/templates/page-news.html b/modules-available/news/templates/page-news.html
index aa5785da..5ace6e35 100644
--- a/modules-available/news/templates/page-news.html
+++ b/modules-available/news/templates/page-news.html
@@ -2,12 +2,24 @@
<p>{{lang_introText}}</p>
+{{#overridden.0}}
+ <div class="pull-right">
+ <h3>{{lang_overridenLocations}}</h3>
+ <ul>
+ {{#overridden}}
+ <li><a href="?do=news&amp;type={{type}}&amp;locationid={{locationid}}">{{locationname}}</a></li>
+ {{/overridden}}
+ </ul>
+ </div>
+{{/overridden.0}}
+
<h2>{{newsTypeName}}</h2>
{{#locationid}}
<h3>{{location_name}}</h3>
<div class="alert alert-info">{{lang_editingForLocation}}</div>
{{/locationid}}
+<div class="clearfix"></div>
<form action="?do=news" method="post">
<input type="hidden" name="token" value="{{token}}">