don't show '/index' in urls
[owncloud:owncloud.git] / core / templates / layout.user.php
1 <!DOCTYPE html>
2 <html>
3         <head>
4                 <title><?php echo isset($_['application']) && !empty($_['application'])?$_['application'].' | ':'' ?>ownCloud</title>
5                 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6                 <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'); ?>" />
7                 <?php foreach($_['cssfiles'] as $cssfile): ?>
8                         <link rel="stylesheet" href="<?php echo $cssfile; ?>" type="text/css" media="screen" />
9                 <?php endforeach; ?>
10                 <script type="text/javascript">
11                         var OC={}
12                         OC.webroot = '<?php echo OC::$WEBROOT; ?>';
13                         OC.current_user = '<?php echo OC_User::getUser() ?>';
14                         OC.scripts=<?php echo json_encode($_['scripts']);?>;
15                         OC.styles=<?php echo json_encode($_['styles']);?>;
16                 </script>
17                 <?php foreach($_['jsfiles'] as $jsfile): ?>
18                         <script type="text/javascript" src="<?php echo $jsfile; ?>"></script>
19                 <?php endforeach; ?>
20                 <?php foreach($_['headers'] as $header): ?>
21                         <?php
22                                 echo '<'.$header['tag'].' ';
23                                 foreach($header['attributes'] as $name=>$value){
24                                         echo "$name='$value' ";
25                                 };
26                                 echo '/>';
27                         ?>
28                 <?php endforeach; ?>
29         </head>
30
31         <body id="body-user">
32                 <header><div id="header">
33                         <a href="<?php echo link_to('', 'index.php'); ?>" title="" id="owncloud"><img class="svg" src="<?php echo image_path('', 'logo-wide.svg'); ?>" alt="ownCloud" /></a>
34                         <form class="searchbox" action="#" method="post">
35                                 <input id="searchbox" class="svg" type="search" name="query" value="<?php if(isset($_POST['query'])){echo $_POST['query'];};?>" autocomplete="off" />
36                         </form>
37                         <a id="logout" href="<?php echo link_to('', 'index.php'); ?>?logout=true"><img class="svg" alt="<?php echo $l->t('Log out');?>" title="<?php echo $l->t('Log out');?>" src="<?php echo image_path('', 'actions/logout.svg'); ?>" /></a>
38                 </div></header>
39
40                 <nav><div id="navigation">
41                         <ul id="apps" class="svg">
42                                 <?php foreach($_['navigation'] as $entry): ?>
43                                         <li data-app="<?php echo $entry['app']?>"  data-page="<?php echo $entry['page']?>">
44                                                 <a style="background-image:url(<?php echo $entry['icon']; ?>)" href="#<?php echo $entry['app'];
45                                                          if($entry['page']!='index'){echo '/'.$entry['page'];} ?>" title="" ><?php echo $entry['name']; ?></a>
46                                         </li>
47                                 <?php endforeach; ?>
48                         </ul>
49
50                         <ul id="settings" class="svg">
51                                 <img id="expand" class="svg" alt="<?php echo $l->t('Settings');?>" src="<?php echo image_path('', 'actions/settings.svg'); ?>" />
52                                 <span style="display:none;"><?php echo $l->t('Settings');?></span>
53                                 <div id="expanddiv" <?php if($_['bodyid'] == 'body-user') echo 'style="display:none;"'; ?>>
54                                 <?php foreach($_['settingsnavigation'] as $entry):?>
55                                         <li data-app="<?php echo $entry['app']?>"  data-page="<?php echo $entry['page']?>">
56                                                 <a style="background-image:url(<?php echo $entry['icon']; ?>)" href="#<?php echo $entry['app'].'/'.$entry['page']; ?>" title="" ><?php echo $entry['name']; ?></a>
57                                         </li>
58                                 <?php endforeach; ?>
59                                 </div>
60                         </ul>
61                 </div></nav>
62
63                 <div id="content">
64                         <?php
65                                 if(isset($_['content'])){
66                                         echo $_['content'];
67                                 }else{
68                                         echo '<div id="loader"/>';
69                                 }
70                         ?>
71                 </div>
72         </body>
73 </html>