summaryrefslogtreecommitdiffstats
path: root/core/templates
diff options
context:
space:
mode:
authorJakob Sack <kde@jakobsack.de>2011-06-20 20:29:30 +0200
committerJakob Sack <kde@jakobsack.de>2011-06-20 20:29:30 +0200
commit91c37bbb7642b996e4c386b3033cca02831371ef (patch)
tree96984269f6851e9208e26c9533c5ce4e045396c5 /core/templates
parent272fc252fb71422db2101a76fc541f20924808cd (diff)
downloadnextcloud-server-91c37bbb7642b996e4c386b3033cca02831371ef.tar.gz
nextcloud-server-91c37bbb7642b996e4c386b3033cca02831371ef.zip
moved core stuff to /core
Diffstat (limited to 'core/templates')
-rw-r--r--core/templates/404.php19
-rw-r--r--core/templates/error.php17
-rw-r--r--core/templates/installation.php70
-rw-r--r--core/templates/layout.admin.php57
-rw-r--r--core/templates/layout.guest.php22
-rw-r--r--core/templates/layout.user.php42
-rw-r--r--core/templates/login.php14
-rw-r--r--core/templates/logout.php1
-rw-r--r--core/templates/part.pagenavi.php31
-rw-r--r--core/templates/part.searchbox.php4
10 files changed, 277 insertions, 0 deletions
diff --git a/core/templates/404.php b/core/templates/404.php
new file mode 100644
index 00000000000..b287571d166
--- /dev/null
+++ b/core/templates/404.php
@@ -0,0 +1,19 @@
+<?php
+if(!isset($_)){//also provide standalone error page
+ require_once '../lib/base.php';
+ require( 'template.php' );
+
+ $tmpl = new OC_TEMPLATE( '', '404', 'guest' );
+ $tmpl->printPage();
+ exit;
+}
+?>
+<div id="login">
+ <img src="<?php echo image_path("", "weather-clear.png"); ?>" alt="ownCloud" />
+ <ul>
+ <li class='error'>
+ <?php echo $l->t( 'Error 404, Cloud not found' ); ?><br/>
+ <p class='hint'><?php if(isset($_['file'])) echo $_['file']?></p>
+ </li>
+ </ul>
+</div> \ No newline at end of file
diff --git a/core/templates/error.php b/core/templates/error.php
new file mode 100644
index 00000000000..ae3f029708f
--- /dev/null
+++ b/core/templates/error.php
@@ -0,0 +1,17 @@
+<?php
+/*
+ * Template for error page
+ */
+?>
+<div id="login">
+ <img src="<?php echo image_path("", "owncloud-logo-medium-white.png"); ?>" alt="ownCloud" />
+ <ul>
+ <?php foreach($_["errors"] as $error):?>
+ <li class='error'>
+ <?php echo $error['error'] ?><br/>
+ <p class='hint'><?php if(isset($error['hint']))echo $error['hint'] ?></p>
+ </li>
+ <?php endforeach ?>
+ </ul>
+</div>
+
diff --git a/core/templates/installation.php b/core/templates/installation.php
new file mode 100644
index 00000000000..93c00547ab9
--- /dev/null
+++ b/core/templates/installation.php
@@ -0,0 +1,70 @@
+<div id="login">
+ <img src="<?php echo image_path('', 'owncloud-logo-medium-white.png'); ?>" alt="ownCloud" />
+ <form action="index.php" method="post" id="setup_form">
+ <input type="hidden" name="install" value="true" />
+ <p class="intro">
+ <?php echo $l->t( 'Welcome to <strong>ownCloud</strong>, your personnal cloud.' ); ?><br />
+ <?php echo $l->t( 'To finish the installation, please follow the steps below.' ); ?>
+ </p>
+
+ <?php if(count($_['errors']) > 0): ?>
+ <ul class="errors">
+ <?php foreach($_['errors'] as $err): ?>
+ <li>
+ <?php if(is_array($err)):?>
+ <?php print $err['error']; ?>
+ <p class='hint'><?php print $err['hint']; ?></p>
+ <?php else: ?>
+ <?php print $err; ?>
+ <?php endif; ?>
+ </li>
+ <?php endforeach; ?>
+ </ul>
+ <?php endif; ?>
+
+ <fieldset>
+ <legend><?php echo $l->t( 'Create an <strong>admin account.</strong>' ); ?></legend>
+ <p><label for="adminlogin"><?php echo $l->t( 'Login:' ); ?></label><input type="text" name="adminlogin" id="adminlogin" value="<?php print OC_HELPER::init_var('adminlogin'); ?>" /></p>
+ <p><label for="adminpass"><?php echo $l->t( 'Password:' ); ?></label><input type="password" name="adminpass" id="adminpass" value="<?php print OC_HELPER::init_var('adminpass'); ?>" /></p>
+ </fieldset>
+
+ <a id='showAdvanced'><?php echo $l->t( 'Advanced' ); ?> <img src='<?php echo OC_HELPER::imagePath('','drop-arrow.png'); ?>'></img></a>
+
+ <fieldset id='datadirField'>
+ <legend><?php echo $l->t( 'Set where to store the data.' ); ?></legend>
+ <p><label for="directory"><?php echo $l->t( 'Data directory:' ); ?></label><input type="text" name="directory" id="directory" value="<?php print OC_HELPER::init_var('directory', $_['directory']); ?>" /></p>
+ </fieldset>
+
+ <fieldset id='databaseField'>
+ <legend><?php echo $l->t( 'Configure your database.' ); ?></legend>
+ <?php if($_['hasSQLite']): ?>
+ <input type='hidden' id='hasSQLite' value='true'/>
+ <?php if(!$_['hasMySQL']): ?>
+ <p><?php echo $l->t( 'I will use a SQLite database. You have nothing to do!' ); ?></p>
+ <input type="hidden" id="dbtype" name="dbtype" value="sqlite" />
+ <?php else: ?>
+ <p><label class="sqlite" for="sqlite"><?php echo $l->t( 'SQLite' ); ?></label><input type="radio" name="dbtype" value='sqlite' id="sqlite" <?php OC_HELPER::init_radio('dbtype', 'sqlite', 'sqlite'); ?>/></p>
+ <?php endif; ?>
+ <?php endif; ?>
+
+ <?php if($_['hasMySQL']): ?>
+ <input type='hidden' id='hasMySQL' value='true'/>
+ <?php if(!$_['hasSQLite']): ?>
+ <p><?php echo $l->t( 'I will use a MySQL database.' ); ?></p>
+ <input type="hidden" id="dbtype" name="dbtype" value="mysql" />
+ <?php else: ?>
+ <p><label class="mysql" for="mysql">MySQL </label><input type="radio" name="dbtype" value='mysql' id="mysql" <?php OC_HELPER::init_radio('dbtype', 'mysql', 'sqlite'); ?>/></p>
+ <?php endif; ?>
+ <div id="use_mysql">
+ <p><label for="dbhost"><?php echo $l->t( 'Host:' ); ?></label><input type="text" name="dbhost" id="dbhost" value="<?php print OC_HELPER::init_var('dbhost', 'localhost'); ?>" /></p>
+ <p><label for="dbname"><?php echo $l->t( 'Database name:' ); ?></label><input type="text" name="dbname" id="dbname" value="<?php print OC_HELPER::init_var('dbname'); ?>" /></p>
+ <p><label for="dbtableprefix"><?php echo $l->t( 'Table prefix:' ); ?></label><input type="text" name="dbtableprefix" id="dbtableprefix" value="<?php print OC_HELPER::init_var('dbtableprefix', 'oc_'); ?>" /></p>
+ <p><label for="dbuser"><?php echo $l->t( 'MySQL user login:' ); ?></label><input type="text" name="dbuser" id="dbuser" value="<?php print OC_HELPER::init_var('dbuser'); ?>" /></p>
+ <p><label for="dbpass"><?php echo $l->t( 'MySQL user password:' ); ?></label><input type="password" name="dbpass" id="dbpass" value="<?php print OC_HELPER::init_var('dbpass'); ?>" /></p>
+ </div>
+ <?php endif; ?>
+ </fieldset>
+
+ <p class="submit"><input type="submit" value="<?php echo $l->t( 'Finish setup' ); ?>" /></p>
+ </form>
+</div>
diff --git a/core/templates/layout.admin.php b/core/templates/layout.admin.php
new file mode 100644
index 00000000000..1fcd4568f8c
--- /dev/null
+++ b/core/templates/layout.admin.php
@@ -0,0 +1,57 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>ownCloud</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <link rel="shortcut icon" href="<?php echo image_path('', 'favicon.png'); ?>" /><link rel="apple-touch-icon-precomposed" href="<?php echo image_path('', 'favicon-touch.png'); ?>" />
+ <?php foreach($_['cssfiles'] as $cssfile): ?>
+ <link rel="stylesheet" href="<?php echo $cssfile; ?>" type="text/css" media="screen" />
+ <?php endforeach; ?>
+ <script type="text/javascript">
+ var oc_webroot = '<?php global $WEBROOT; echo $WEBROOT; ?>';
+ // </script>
+ <?php foreach($_['jsfiles'] as $jsfile): ?>
+ <script type="text/javascript" src="<?php echo $jsfile; ?>"></script>
+ <?php endforeach; ?>
+ </head>
+
+ <body id="body-settings">
+ <div id="header">
+ <a href="<?php echo link_to('', 'index.php'); ?>" title="" id="owncloud"><img src="<?php echo image_path('', 'owncloud-logo-small-white.png'); ?>" alt="ownCloud" /></a>
+ <?php echo $_['searchbox']?>
+ <ul id="metanav">
+ <li><a href="<?php echo link_to('', 'index.php'); ?>" title="Back to files"><img src="<?php echo image_path('', 'layout/back.png'); ?>"></a></li>
+ <li><a href="<?php echo link_to('', 'index.php?logout=true'); ?>" title="Log out"><img src="<?php echo image_path('', 'layout/logout.png'); ?>"></a></li>
+ </ul>
+ </div>
+
+ <div id="main">
+ <div id="plugins">
+ <ul>
+ <?php foreach($_['settingsnavigation'] as $entry):?>
+ <li><a style="background-image:url(<?php echo $entry['icon']; ?>)" href="<?php echo $entry['href']; ?>" title="" <?php if( $entry["active"] ): ?> class="active"<?php endif; ?>><?php echo $entry['name'] ?></a></li>
+ <?php if( sizeof( $entry["subnavigation"] )): ?>
+ <?php foreach($entry["subnavigation"] as $subentry):?>
+ <li><a style="background-color:#FF8800;" href="<?php echo $subentry['href']; ?>" title="" <?php if( $subentry["active"] ): ?> class="active"<?php endif; ?>><?php echo $subentry['name'] ?></a></li>
+ <?php endforeach; ?>
+ <?php endif; ?>
+ <?php endforeach; ?>
+ <?php if(isset($_['adminnavigation'])):?>
+ <?php foreach($_['adminnavigation'] as $entry):?>
+ <li><a style="background-image:url(<?php echo $entry['icon']; ?>)" href="<?php echo $entry['href']; ?>" title="" <?php if( $entry["active"] ): ?> class="active"<?php endif; ?>><?php echo $entry['name'] ?></a></li>
+ <?php if( sizeof( $entry["subnavigation"] )): ?>
+ <?php foreach($entry["subnavigation"] as $subentry):?>
+ <li><a style="background-color:#FF8800;" href="<?php echo $subentry['href']; ?>" title=""><?php echo $subentry['name'] ?> <?php if( $subentry["active"] ): ?> active<?php endif; ?></a></li>
+ <?php endforeach; ?>
+ <?php endif; ?>
+ <?php endforeach; ?>
+ <?php endif; ?>
+ </ul>
+ </div>
+
+ <div id="content">
+ <?php echo $_['content']; ?>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/core/templates/layout.guest.php b/core/templates/layout.guest.php
new file mode 100644
index 00000000000..ce99b00b9f6
--- /dev/null
+++ b/core/templates/layout.guest.php
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>ownCloud</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <link rel="shortcut icon" href="<?php echo image_path('', 'favicon.png'); ?>" /><link rel="apple-touch-icon-precomposed" href="<?php echo image_path('', 'favicon-touch.png'); ?>" />
+ <?php foreach($_['cssfiles'] as $cssfile): ?>
+ <link rel="stylesheet" href="<?php echo $cssfile; ?>" type="text/css" media="screen" />
+ <?php endforeach; ?>
+ <script type="text/javascript">
+ var oc_webroot = '<?php global $WEBROOT; echo $WEBROOT; ?>';
+ // </script>
+ <?php foreach($_['jsfiles'] as $jsfile): ?>
+ <script type="text/javascript" src="<?php echo $jsfile; ?>"></script>
+ <?php endforeach; ?>
+ </head>
+
+ <body id="body-login">
+ <?php echo $_['content']; ?>
+ <p class="info"><?php echo $l->t( '<a href="http://owncloud.org/">ownCloud</a> is a personal cloud which runs on your own server.</p>' ); ?>
+ </body>
+</html>
diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php
new file mode 100644
index 00000000000..f21db202a83
--- /dev/null
+++ b/core/templates/layout.user.php
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>ownCloud</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <link rel="shortcut icon" href="<?php echo image_path('', 'favicon.png'); ?>" /><link rel="apple-touch-icon-precomposed" href="<?php echo image_path('', 'favicon-touch.png'); ?>" />
+ <?php foreach($_['cssfiles'] as $cssfile): ?>
+ <link rel="stylesheet" href="<?php echo $cssfile; ?>" type="text/css" media="screen" />
+ <?php endforeach; ?>
+ <script type="text/javascript">
+ var oc_webroot = '<?php global $WEBROOT; echo $WEBROOT; ?>';
+ // </script>
+ <?php foreach($_['jsfiles'] as $jsfile): ?>
+ <script type="text/javascript" src="<?php echo $jsfile; ?>"></script>
+ <?php endforeach; ?>
+ </head>
+
+ <body id="body-user">
+ <div id="header">
+ <a href="<?php echo link_to('', 'index.php'); ?>" title="" id="owncloud"><img src="<?php echo image_path('', 'owncloud-logo-small-white.png'); ?>" alt="ownCloud" /></a>
+ <?php echo $_['searchbox']?>
+ <ul id="metanav">
+ <li><a href="<?php echo link_to('settings', 'index.php'); ?>" title="Settings"><img src="<?php echo image_path('', 'layout/settings.png'); ?>"></a></li>
+ <li><a href="<?php echo link_to('', 'index.php'); ?>?logout=true" title="Log out"><img src="<?php echo image_path('', 'layout/logout.png'); ?>"></a></li>
+ </ul>
+ </div>
+
+ <div id="main">
+ <div id="plugins">
+ <ul>
+ <?php foreach($_['navigation'] as $entry): ?>
+ <li><a style="background-image:url(<?php echo $entry['icon']; ?>)" href="<?php echo $entry['href']; ?>" title="" <?php if( $entry['active'] ): ?> class="active"<?php endif; ?>><?php echo $entry['name']; ?></a></li>
+ <?php endforeach; ?>
+ </ul>
+ </div>
+
+ <div id="content">
+ <?php echo $_['content']; ?>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/core/templates/login.php b/core/templates/login.php
new file mode 100644
index 00000000000..e0f6ce23e2e
--- /dev/null
+++ b/core/templates/login.php
@@ -0,0 +1,14 @@
+<div id="login">
+ <img src="<?php echo image_path('', 'owncloud-logo-medium-white.png'); ?>" alt="ownCloud" />
+ <form action="index.php" method="post" id="login_form">
+ <fieldset>
+ <?php if($_['error']): ?>
+ <?php echo $l->t( 'Login failed!' ); ?>
+ <?php endif; ?>
+ <input type="text" name="user" id="user" value="" />
+ <input type="password" name="password" id="password" value="" />
+ <input type="submit" value="Log in" />
+ </fieldset>
+ </form>
+</div>
+
diff --git a/core/templates/logout.php b/core/templates/logout.php
new file mode 100644
index 00000000000..8cbbdd9cc8d
--- /dev/null
+++ b/core/templates/logout.php
@@ -0,0 +1 @@
+<?php echo $l->t( 'You are logged out.' ); ?> \ No newline at end of file
diff --git a/core/templates/part.pagenavi.php b/core/templates/part.pagenavi.php
new file mode 100644
index 00000000000..0602b793882
--- /dev/null
+++ b/core/templates/part.pagenavi.php
@@ -0,0 +1,31 @@
+<center>
+ <table class="pager" cellspacing="0" cellpadding="0" border="0">
+ <tr>
+ <td width="1">
+ <?php if($_['page']>0):?>
+ <span class="pagerbutton1"><a href="<?php echo $_['url'].($_['page']-1);?>"><?php echo $l->t( 'prev' ); ?></a>&nbsp;&nbsp;</span>
+ <?php endif; ?>
+ </td>
+ <td>
+ <?php if ($_['pagestart']>0):?>
+ ...
+ <?php endif;?>
+ <?php for ($i=$_['pagestart']; $i < $_['pagestop'];$i++):?>
+ <?php if ($_['page']!=$i):?>
+ <a href="<?php echo $_['url'].$i;?>"><?php echo $i+1;?>&nbsp;</a>
+ <?php else:?>
+ <?php echo $i+1;?>&nbsp;
+ <?php endif?>
+ <?php endfor;?>
+ <?php if ($_['pagestop']<$_['pagecount']):?>
+ ...
+ <?php endif;?>
+ </td>
+ <td width="1">
+ <?php if(($_['page']+1)<$_['pagecount']):?>
+ <span class="pagerbutton2"><a href="<?php echo $_['url'].($_['page']+1);?>"><?php echo $l->t( 'next' ); ?></a></span>
+ <?php endif; ?>
+ </td>
+ </tr>
+ </table>
+</center> \ No newline at end of file
diff --git a/core/templates/part.searchbox.php b/core/templates/part.searchbox.php
new file mode 100644
index 00000000000..7465a7326ee
--- /dev/null
+++ b/core/templates/part.searchbox.php
@@ -0,0 +1,4 @@
+<form class='searchbox' action='<?php echo $_['searchurl']?>' method='post'>
+ <input name='query' value='<?php if(isset($_POST['query'])){echo $_POST['query'];};?>'/>
+ <input type='submit' value='<?php echo $l->t( 'Search' ); ?>' class='prettybutton'/>
+</form> \ No newline at end of file