diff options
author | Jakob Sack <kde@jakobsack.de> | 2011-03-02 11:56:48 +0100 |
---|---|---|
committer | Jakob Sack <kde@jakobsack.de> | 2011-03-02 11:56:48 +0100 |
commit | 66ac355f7845c56589dcd6c10a92a25af48c97fc (patch) | |
tree | 6f8563c33ece2b61cfe5482bf755a87d579ed378 /templates | |
parent | 015ab0eb6424bbde90f36a087326e769233ac577 (diff) | |
download | nextcloud-server-66ac355f7845c56589dcd6c10a92a25af48c97fc.tar.gz nextcloud-server-66ac355f7845c56589dcd6c10a92a25af48c97fc.zip |
Getting rid of Smarty, using our own template system
Diffstat (limited to 'templates')
-rw-r--r-- | templates/_c/.gitkeep | 0 | ||||
-rw-r--r-- | templates/layout.admin.php | 48 | ||||
-rw-r--r-- | templates/layout.admin.tmpl | 43 | ||||
-rw-r--r-- | templates/layout.guest.php | 27 | ||||
-rw-r--r-- | templates/layout.guest.tmpl | 20 | ||||
-rw-r--r-- | templates/layout.user.php | 48 | ||||
-rw-r--r-- | templates/layout.user.tmpl | 43 | ||||
-rw-r--r-- | templates/login.php | 20 | ||||
-rw-r--r-- | templates/login.tmpl | 15 | ||||
-rw-r--r-- | templates/logout.php | 6 | ||||
-rw-r--r-- | templates/logout.tmpl | 1 |
11 files changed, 149 insertions, 122 deletions
diff --git a/templates/_c/.gitkeep b/templates/_c/.gitkeep deleted file mode 100644 index e69de29bb2d..00000000000 --- a/templates/_c/.gitkeep +++ /dev/null diff --git a/templates/layout.admin.php b/templates/layout.admin.php new file mode 100644 index 00000000000..b4fcc915882 --- /dev/null +++ b/templates/layout.admin.php @@ -0,0 +1,48 @@ +<?php +/* + * Template for admin pages + */ +?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> + <head> + <title>ownCloud</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <link rel="shortcut icon" href="favicon.ico" /> + <? foreach( $_["cssfiles"] as $cssfile ){ ?> + <link rel="stylesheet" href="<? echo $cssfile ?>" type="text/css" media="screen" /> + <? } ?> + <? foreach( $_["jsfiles"] as $jsfile ){ ?> + <script type="text/javascript" src="<? echo $jsfile ?>"></script> + <? } ?> + </head> + + <body> + <div id="header"> + <a href="<? echo link_to( "", "index.php" )?>" title="" id="owncloud"><img src="<? echo image_path( "", "owncloud-logo-small-white.png" ) ?>" alt="ownCloud" /></a> + + <div id="user"> + <a id="user_menu_link" href="" title="">Username</a> + <ul id="user_menu"> + <? foreach( $_["personalmenu"] as $entry ){ ?> + <li><a href="<? echo link_to( $entry["app"], $entry["file"] )?>" title=""><? echo $entry["name"] ?></a></li> + <? } ?> + </ul> + </div> + </div> + + <div id="main"> + <div id="plugins"> + <ul> + <? foreach( $_["navigation"] as $entry ){ ?> + <li><a href="<? echo link_to( $entry["app"], $entry["file"] )?>" title=""><? echo $entry["name"] ?></a></li> + <? } ?> + </ul> + </div> + + <div id="content"> + <? echo $_["content"] ?> + </div> + </div> + </body> +</html> diff --git a/templates/layout.admin.tmpl b/templates/layout.admin.tmpl deleted file mode 100644 index 5a31c6af0a3..00000000000 --- a/templates/layout.admin.tmpl +++ /dev/null @@ -1,43 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> - <head> - <title>ownCloud</title> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <link rel="shortcut icon" href="favicon.ico" /> - [%foreach $cssfiles as $cssfile%] - <link rel="stylesheet" href="[%$cssfile%]" type="text/css" media="screen" /> - [%/foreach%] - [%foreach $jsfiles as $jsfile%] - <script type="text/javascript" src="[%$jsfile%]"></script> - [%/foreach%] - </head> - - <body> - <div id="header"> - <a href="/" title="" id="owncloud"><img src="[%imagepath file='owncloud-logo-small-white.png'%]" alt="ownCloud" /></a> - - <div id="user"> - <a id="user_menu_link" href="" title="">Username</a> - <ul id="user_menu"> - [%foreach $personalmenu as $entry%] - <li><a href="[%linkto app=$entry.app file=$entry.file%]" title="">[%$entry.name%]</a></li> - [%/foreach%] - </ul> - </div> - </div> - - <div id="main"> - <div id="plugins"> - <ul> - [%foreach $navigation as $entry%] - <li><a href="[%linkto app=$entry.app file=$entry.file%]" title="">[%$entry.name%]</a></li> - [%/foreach%] - </ul> - </div> - - <div id="content"> - [%$content%] - </div> - </div> - </body> -</html> diff --git a/templates/layout.guest.php b/templates/layout.guest.php new file mode 100644 index 00000000000..a5ebf7a76a8 --- /dev/null +++ b/templates/layout.guest.php @@ -0,0 +1,27 @@ +<?php +/* + * Template for guest pages + */ +?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> + <head> + <title>ownCloud</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <link rel="shortcut icon" href="favicon.ico" /> + <? foreach( $_["cssfiles"] as $cssfile ){ ?> + <link rel="stylesheet" href="<? echo $cssfile ?>" type="text/css" media="screen" /> + <? } ?> + <? foreach( $_["jsfiles"] as $jsfile ){ ?> + <script type="text/javascript" src="<? echo $jsfile ?>"></script> + <? } ?> + </head> + + <body class="login"> + <? echo $_["content"] ?> + <p class="info"> + ownCloud is an open personal cloud which runs on your personal server.<br /> + To learn more, please visit <a href="http://www.owncloud.org/">owncloud.org</a>. + </p> + </body> +</html> diff --git a/templates/layout.guest.tmpl b/templates/layout.guest.tmpl deleted file mode 100644 index 518ba9e771e..00000000000 --- a/templates/layout.guest.tmpl +++ /dev/null @@ -1,20 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> - <head> - <title>ownCloud</title> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <link rel="shortcut icon" href="favicon.ico" /> - [%foreach $cssfiles as $cssfile%] - <link rel="stylesheet" href="[%$cssfile%]" type="text/css" media="screen" /> - [%/foreach%] - [%foreach $jsfiles as $jsfile%] - <script type="text/javascript" src="[%$jsfile%]"></script> - [%/foreach%] - </head> - - <body class="login"> - [%$content%] - <p class="info">ownCloud is an open personal cloud which runs on your personal server.<br /> - To learn more, please visit <a href="http://www.owncloud.org/">owncloud.org</a>.</p> - </body> -</html> diff --git a/templates/layout.user.php b/templates/layout.user.php new file mode 100644 index 00000000000..0643c99e933 --- /dev/null +++ b/templates/layout.user.php @@ -0,0 +1,48 @@ +<?php +/* + * Template for user pages + */ +?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> + <head> + <title>ownCloud</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <link rel="shortcut icon" href="favicon.ico" /> + <? foreach( $_["cssfiles"] as $cssfile ){ ?> + <link rel="stylesheet" href="<? echo $cssfile ?>" type="text/css" media="screen" /> + <? } ?> + <? foreach( $_["jsfiles"] as $jsfile ){ ?> + <script type="text/javascript" src="<? echo $jsfile ?>"></script> + <? } ?> + </head> + + <body> + <div id="header"> + <a href="<? echo link_to( "", "index.php" )?>" title="" id="owncloud"><img src="<? echo image_path( "", "owncloud-logo-small-white.png" ) ?>" alt="ownCloud" /></a> + + <div id="user"> + <a id="user_menu_link" href="" title="">Username</a> + <ul id="user_menu"> + <? foreach( $_["personalmenu"] as $entry ){ ?> + <li><a href="<? echo link_to( $entry["app"], $entry["file"] )?>" title=""><? echo $entry["name"] ?></a></li> + <? } ?> + </ul> + </div> + </div> + + <div id="main"> + <div id="plugins"> + <ul> + <? foreach( $_["navigation"] as $entry ){ ?> + <li><a href="<? echo link_to( $entry["app"], $entry["file"] )?>" title=""><? echo $entry["name"] ?></a></li> + <? } ?> + </ul> + </div> + + <div id="content"> + <? echo $_["content"] ?> + </div> + </div> + </body> +</html> diff --git a/templates/layout.user.tmpl b/templates/layout.user.tmpl deleted file mode 100644 index 5a31c6af0a3..00000000000 --- a/templates/layout.user.tmpl +++ /dev/null @@ -1,43 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> - <head> - <title>ownCloud</title> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <link rel="shortcut icon" href="favicon.ico" /> - [%foreach $cssfiles as $cssfile%] - <link rel="stylesheet" href="[%$cssfile%]" type="text/css" media="screen" /> - [%/foreach%] - [%foreach $jsfiles as $jsfile%] - <script type="text/javascript" src="[%$jsfile%]"></script> - [%/foreach%] - </head> - - <body> - <div id="header"> - <a href="/" title="" id="owncloud"><img src="[%imagepath file='owncloud-logo-small-white.png'%]" alt="ownCloud" /></a> - - <div id="user"> - <a id="user_menu_link" href="" title="">Username</a> - <ul id="user_menu"> - [%foreach $personalmenu as $entry%] - <li><a href="[%linkto app=$entry.app file=$entry.file%]" title="">[%$entry.name%]</a></li> - [%/foreach%] - </ul> - </div> - </div> - - <div id="main"> - <div id="plugins"> - <ul> - [%foreach $navigation as $entry%] - <li><a href="[%linkto app=$entry.app file=$entry.file%]" title="">[%$entry.name%]</a></li> - [%/foreach%] - </ul> - </div> - - <div id="content"> - [%$content%] - </div> - </div> - </body> -</html> diff --git a/templates/login.php b/templates/login.php new file mode 100644 index 00000000000..60b8dc0253f --- /dev/null +++ b/templates/login.php @@ -0,0 +1,20 @@ +<?php +/* + * Template for login page + */ +?> +<div id="login"> + <img src="<? echo image_path( "", "owncloud-logo-medium-white.png" ) ?>" alt="ownCloud" /> + <form action="index.php" method="post"> + <!-- <h1>Sign in :</h1> --> + <fieldset> + <? if( $_["error"] ){ ?> + Login failed! + <? } ?> + <p><input type="text" name="user" value="" /></p> + <p><input type="password" name="password" /></p> + <p><input type="submit" value="Sign in" /></p> + </fieldset> + </form> +</div> + diff --git a/templates/login.tmpl b/templates/login.tmpl deleted file mode 100644 index bfa975f630e..00000000000 --- a/templates/login.tmpl +++ /dev/null @@ -1,15 +0,0 @@ -<div id="login"> - <img src="[%imagepath file='owncloud-logo-medium-white.png'%]" alt="ownCloud" /> - <form action="index.php" method="post"> - <!-- <h1>Sign in :</h1> --> - <fieldset> - [%if $error%] - Login failed! - [%/if%] - <p><input type="text" name="user" value="" /></p> - <p><input type="password" name="password" /></p> - <p><input type="submit" value="Sign in" /></p> - </fieldset> - </form> -</div> - diff --git a/templates/logout.php b/templates/logout.php new file mode 100644 index 00000000000..a378c9d5587 --- /dev/null +++ b/templates/logout.php @@ -0,0 +1,6 @@ +<?php +/* + * Template for logout page + */ +?> +You are logged out. diff --git a/templates/logout.tmpl b/templates/logout.tmpl deleted file mode 100644 index 4a15998a5c0..00000000000 --- a/templates/logout.tmpl +++ /dev/null @@ -1 +0,0 @@ -You are logged out. |