aboutsummaryrefslogtreecommitdiffstats
path: root/admin/templates
diff options
context:
space:
mode:
authorJakob Sack <kde@jakobsack.de>2011-03-02 11:56:48 +0100
committerJakob Sack <kde@jakobsack.de>2011-03-02 11:56:48 +0100
commit66ac355f7845c56589dcd6c10a92a25af48c97fc (patch)
tree6f8563c33ece2b61cfe5482bf755a87d579ed378 /admin/templates
parent015ab0eb6424bbde90f36a087326e769233ac577 (diff)
downloadnextcloud-server-66ac355f7845c56589dcd6c10a92a25af48c97fc.tar.gz
nextcloud-server-66ac355f7845c56589dcd6c10a92a25af48c97fc.zip
Getting rid of Smarty, using our own template system
Diffstat (limited to 'admin/templates')
-rw-r--r--admin/templates/index.php12
-rw-r--r--admin/templates/index.tmpl7
-rw-r--r--admin/templates/plugins.php28
-rw-r--r--admin/templates/plugins.tmpl23
-rw-r--r--admin/templates/system.php (renamed from admin/templates/system.tmpl)5
-rw-r--r--admin/templates/users.php (renamed from admin/templates/users.tmpl)19
6 files changed, 57 insertions, 37 deletions
diff --git a/admin/templates/index.php b/admin/templates/index.php
new file mode 100644
index 00000000000..56f85cbbbc5
--- /dev/null
+++ b/admin/templates/index.php
@@ -0,0 +1,12 @@
+<?php
+/*
+ * Template for admin pages
+ */
+?>
+<h1>Administration</h1>
+
+<ul>
+ <? foreach( $_["adminpages"] as $i ){ ?>
+ <li><a href="<? echo link_to( $i["app"], $i["file"] ) ?>"><? echo $i["name"] ?></a></li>
+ <? } ?>
+</ul>
diff --git a/admin/templates/index.tmpl b/admin/templates/index.tmpl
deleted file mode 100644
index d6db07f7194..00000000000
--- a/admin/templates/index.tmpl
+++ /dev/null
@@ -1,7 +0,0 @@
-<h1>Administration</h1>
-
-<ul>
- [%foreach $adminpages as $i%]
- <li><a href="[%linkto app=$i.app file=$i.file%]">[%$i.name%]</a></li>
- [%/foreach%]
-</ul>
diff --git a/admin/templates/plugins.php b/admin/templates/plugins.php
new file mode 100644
index 00000000000..11eb569e3d7
--- /dev/null
+++ b/admin/templates/plugins.php
@@ -0,0 +1,28 @@
+<?php
+/*
+ * Template for admin pages
+ */
+?>
+<h1>Administration</h1>
+<h2>Plugins</h2>
+
+<table>
+ <thead>
+ <tr>
+ <th>Name</th>
+ <th>Description</th>
+ <th>Version</th>
+ <th>Author</th>
+ <th></th>
+ </tr>
+ </thead>
+ <tbody>
+ <? foreach( $_["plugins"] as $plugin ){ ?>
+ <td><? echo $plugin["info"]["id"] ?></td>
+ <td><? echo $plugin["info"]["version"] ?></td>
+ <td><? echo $plugin["info"]["name"] ?></td>
+ <td><? echo $plugin["info"]["author"] ?></td>
+ <td>enable</td>
+ <? } ?>
+ </tbody>
+</table>
diff --git a/admin/templates/plugins.tmpl b/admin/templates/plugins.tmpl
deleted file mode 100644
index ca32a877256..00000000000
--- a/admin/templates/plugins.tmpl
+++ /dev/null
@@ -1,23 +0,0 @@
-<h1>Administration</h1>
-<h2>Plugins</h2>
-
-<table>
- <thead>
- <tr>
- <th>Name</th>
- <th>Description</th>
- <th>Version</th>
- <th>Author</th>
- <th></th>
- </tr>
- </thead>
- <tbody>
- [%foreach $plugins as $plugin%]
- <td>[%$plugin.info.id%]</td>
- <td>[%$plugin.info.version%]</td>
- <td>[%$plugin.info.name%]</td>
- <td>[%$plugin.info.author%]</td>
- <td>enable</td>
- [%/foreach%]
- </tbody>
-</table>
diff --git a/admin/templates/system.tmpl b/admin/templates/system.php
index bab436de8dc..4087b40a483 100644
--- a/admin/templates/system.tmpl
+++ b/admin/templates/system.php
@@ -1,3 +1,8 @@
+<?php
+/*
+ * Template for admin pages
+ */
+?>
<h1>Administration</h1>
<h2>System Settings</h2>
#TBD \ No newline at end of file
diff --git a/admin/templates/users.tmpl b/admin/templates/users.php
index 796b55de4e0..a5dccbe995c 100644
--- a/admin/templates/users.tmpl
+++ b/admin/templates/users.php
@@ -1,3 +1,8 @@
+<?php
+/*
+ * Template for admin pages
+ */
+?>
<h1>Administration</h1>
<h2>Users</h2>
@@ -10,13 +15,13 @@
</tr>
<thead>
<tbody>
- [%foreach $users as $user%]
+ <? foreach( $_["users"] as $user ){ ?>
<tr>
<td><input type="checkbox"></td>
- <td>[%$user.name%]</td>
- <td>[%$user.groups%]</td>
+ <td><? echo $user["name"] ?></td>
+ <td><? echo $user["groups"] ?></td>
</tr>
- [%/foreach%]
+ <? } ?>
</tbody>
</table>
@@ -29,11 +34,11 @@
</tr>
<thead>
<tbody>
- [%foreach $groups as $group%]
+ <? foreach( $_["groups"] as $group ){ ?>
<tr>
- <td>[%$group.name%]</td>
+ <td><? echo $group["name"] ?></td>
<td>remove</td>
</tr>
- [%/foreach%]
+ <? } ?>
</tbody>
</table>