Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/announcementcenter.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@owncloud.com>2015-02-28 13:23:51 +0300
committerJoas Schilling <nickvergessen@owncloud.com>2015-02-28 13:25:04 +0300
commit5b07bcb6fc60274cc542b18841e3f94a30c27427 (patch)
treeb88fb354238eccc64ed2683d6df0c6ffa905f118 /templates
parent26be8fa75ced0b8c7fcc448f01fa464d111b99be (diff)
Add Page to announce new announcements
Diffstat (limited to 'templates')
-rw-r--r--templates/main.php2
-rw-r--r--templates/part.add.php11
-rw-r--r--templates/part.content.php16
-rw-r--r--templates/part.navigation.php16
4 files changed, 30 insertions, 15 deletions
diff --git a/templates/main.php b/templates/main.php
index 980acdd..6bcf934 100644
--- a/templates/main.php
+++ b/templates/main.php
@@ -11,7 +11,7 @@ style('announcementcenter', 'style');
<div id="app-content">
<div id="app-content-wrapper">
- <?php print_unescaped($this->inc('part.content')); ?>
+ <?php print_unescaped($this->inc($_['template'])); ?>
</div>
</div>
</div>
diff --git a/templates/part.add.php b/templates/part.add.php
new file mode 100644
index 0000000..d6f542e
--- /dev/null
+++ b/templates/part.add.php
@@ -0,0 +1,11 @@
+<div class="section">
+ <h2><?php p($l->t('Add announcement')); ?></h2>
+
+ <form>
+ <input type="text" name="announcement-title" id="announcement-title" placeholder="<?php p($l->t('Title…')); ?>" />
+ <br />
+ <textarea name="announcement-text" id="announcement-text" placeholder="<?php p($l->t('Your announcement…')); ?>"></textarea>
+ <br />
+ <button><?php p($l->t('Announce')); ?></button>
+ </form>
+</div>
diff --git a/templates/part.content.php b/templates/part.content.php
index 8046942..b16aa97 100644
--- a/templates/part.content.php
+++ b/templates/part.content.php
@@ -1,10 +1,12 @@
-<p>Hello World <?php p($_['user']) ?></p>
+<div class="section">
+ <p>Hello World <?php p($_['user']) ?></p>
-<p><button id="hello">click me</button></p>
+ <p><button id="hello">click me</button></p>
-<p><textarea id="echo-content">
- Send this as ajax
-</textarea></p>
-<p><button id="echo">Send ajax request</button></p>
+ <p><textarea id="echo-content">
+ Send this as ajax
+ </textarea></p>
+ <p><button id="echo">Send ajax request</button></p>
-Ajax response: <div id="echo-result"></div> \ No newline at end of file
+ Ajax response: <div id="echo-result"></div>
+</div>
diff --git a/templates/part.navigation.php b/templates/part.navigation.php
index b28b6a8..c6ae316 100644
--- a/templates/part.navigation.php
+++ b/templates/part.navigation.php
@@ -1,10 +1,12 @@
<ul>
- <li><a href="#">First level entry</a></li>
<li>
- <a href="#">First level container</a>
- <ul>
- <li><a href="#">Second level entry</a></li>
- <li><a href="#">Second level entry</a></li>
- </ul>
+ <a href="<?php p($_['u_index']); ?>"><?php p($l->t('Announcements')); ?></a>
</li>
-</ul> \ No newline at end of file
+ <?php if ($_['is_admin']): ?>
+ <li class="new-announcement">
+ <a href="<?php p($_['u_add']); ?>">
+ <span><?php p($l->t('Add announcement')); ?></span>
+ </a>
+ </li>
+ <?php endif; ?>
+</ul>