summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apis/news.inc.php1
-rw-r--r--modules/news.inc.php2
-rw-r--r--templates/page-news.html32
3 files changed, 22 insertions, 13 deletions
diff --git a/apis/news.inc.php b/apis/news.inc.php
index 4f06abf7..ace41b21 100644
--- a/apis/news.inc.php
+++ b/apis/news.inc.php
@@ -20,6 +20,7 @@ if ($row !== false ) {
echo "</news>";
} else {
+ // no news in DB, output a 'null' news xml
echo '<?xml version="1.0" encoding="UTF-8"?>' . "\n";
echo "<news>null</news>";
}
diff --git a/modules/news.inc.php b/modules/news.inc.php
index 7481fad2..e08006dd 100644
--- a/modules/news.inc.php
+++ b/modules/news.inc.php
@@ -51,7 +51,7 @@ class Page_News extends Page
}
// show it to the user
- Render::addDialog('News Verwaltung', false, 'page-news', array(
+ Render::addDialog('bwLehrpool News Verwaltung', false, 'page-news', array(
'token' => Session::get('token'),
'latestDate' => date('Y-m-d H:i:s (T)', $latestDate),
'latestContent' => $latestContent,
diff --git a/templates/page-news.html b/templates/page-news.html
index 37a23b66..bbf9fd6c 100644
--- a/templates/page-news.html
+++ b/templates/page-news.html
@@ -1,20 +1,28 @@
<p>Hier haben Sie die Möglichkeit, die von bwLehrpool-Clients angezeigten News zu editieren.
</p>
<form action="?do=News" method="post">
- <div class="panel panel-default">
- <div class="panel-heading">bwLehrpool News
- </div>
- <div class="panel-body">
+
<div class="form-group">
- <span class="input-group-addon slx-ga"><strong>Titel</strong></span>
- <input type="text" name="news-title" class="form-control" placeholder="Willkommen!" value="{{latestTitle}}">
- <br></br>
- <span class="input-group-addon slx-ga"><b>Inhalt</b></span>
- <textarea name="news-content" class="form-control" rows="5" cols="30" placeholder="Willkommen beim bwLehrpool-System!">{{latestContent}}</textarea>
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ <label for="news-title-id">Titel</label>
+ </div>
+ <div class="panel-body">
+ <input type="text" name="news-title" id ="news-title-id" class="form-control" placeholder="Willkommen!" value="{{latestTitle}}">
+ </div>
+ </div>
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ <label for="news-content-id">Inhalt</label>
+ </div>
+ <div class="panel-body">
+ <textarea name="news-content" id ="news-content-id" class="form-control" rows="5" cols="30" placeholder="Willkommen beim bwLehrpool-System!">{{latestContent}}</textarea>
+ </div>
+ </div>
</div>
- </div>
- <div class="panel-footer">Letzte Aktualisierung: {{latestDate}}</div>
- </div>
+
+ <div>Letzte Aktualisierung: {{latestDate}}</div>
+ <br>
<input type="hidden" name="token" value="{{token}}">
<button class="btn btn-sm btn-primary" type="submit">Speichern</button>
</form>