My favorites | Sign in
Project Home Downloads Wiki Issues Source
Checkout   Browse   Changes    
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<!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>Lyra Backend</title>
<link rel="shortcut icon" href="/favicon.ico" />
<?php use_stylesheet('admin.css');
include_javascripts();
include_stylesheets();
?>
</head>
<body>
<div id="container">
<?php if ($sf_user->isAuthenticated()):
$module = $sf_request->getParameter('module');?>
<div id="side-bar">

<div id="menu">
<ul>
<li>
<?php echo link_to(__('MENU_HOME'), '@homepage') ?>
</li>
<li <?php echo ($module == 'content' ? 'class="active"' : ''); ?>>
<?php echo link_to(__('MENU_CONTENT'), '@lyra_content_type') ?>
</li>
<?php
//TODO: hardcoded for now, this must be moved in a component
$ctypes = LyraContentTypeTable::getInstance()
->findAll();?>
<li>
<ul class="content-types">
<?php foreach($ctypes as $ctype):?>
<li><?php echo $ctype->getName();?></li>
<li>
<ul class="content-items">
<li <?php echo ($module == $ctype->getModule() && $sf_request->getParameter('ctype_id') == $ctype->getId() ? 'class="active"' : ''); ?>>
<?php echo link_to(__('MENU_ITEMS'), sfInflector::underscore($ctype->getModel()),array('ctype_id' => $ctype->getId())) ?>
</li>
<li <?php echo ($module == 'route' && $sf_request->getParameter('ctype_id') == $ctype->getId() ? 'class="active"' : ''); ?>>
<?php echo link_to(__('MENU_LISTS'), 'lyra_route',array('ctype_id' => $ctype->getId())) ?>
</li>
</ul>
</li>
<?php endforeach; ?>
</ul>
</li>
<!-- end TODO -->
<li <?php echo ($module == 'comment' ? 'class="active"' : ''); ?>>
<?php echo link_to(__('MENU_COMMENTS'), '@lyra_comment') ?>
</li>
<li <?php echo ($module == 'catalog' || $module == 'label' ? 'class="active"' : ''); ?>>
<?php echo link_to(__('MENU_CATALOGS'), '@lyra_catalog') ?>
</li>
<li <?php echo ($module == 'menu' ? 'class="active"' : ''); ?>>
<?php echo link_to(__('MENU_MENU'), '@lyra_menu') ?>
</li>
<li <?php echo ($module == 'sfGuardUser' ? 'class="active"' : ''); ?>>
<?php echo link_to(__('MENU_USERS'), '@sf_guard_user') ?>
</li>
<li <?php echo ($module == 'sfGuardGroup' ? 'class="active"' : ''); ?>>
<?php echo link_to(__('MENU_GROUPS'), '@sf_guard_group') ?>
</li>
<li <?php echo ($module == 'settings' ? 'class="active"' : ''); ?>>
<?php echo link_to(__('MENU_SETTINGS'), 'settings/edit?id=1') ?>
</li>
<li <?php echo ($module == 'sfGuardPermission' ? 'class="active"' : ''); ?>>
<?php //echo link_to('Permissions', '@sf_guard_permission') ?>
</li>
<li <?php echo ($module == '' ? 'class="active"' : ''); ?>>
<?php echo link_to(__('MENU_LOGOUT'), '@sf_guard_signout') ?>
</li>
</ul>
</div>
<?php if (has_slot('admin_filters')) { include_slot('admin_filters'); }?>
<div class="user-info">
<h3>User</h3>
<span class="username">
<?php echo $sf_user->getGuardUser()->getProfile()->getFirstName(); ?>
<?php echo $sf_user->getGuardUser()->getProfile()->getLastName(); ?>
(<?php echo $sf_user->getGuardUser()->getUsername(); ?>)
</span>
<span class="logout-link"><?php echo link_to(__('MENU_LOGOUT'), '@sf_guard_signout') ?></span>
</div>
</div>
<?php endif; ?>
<div id="content">
<?php echo $sf_content ?>
<div class="clear">&nbsp;</div>
</div>
</div>
</body>
</html>

Change log

r95 by gimassimo on Nov 30, 2010   Diff
Added user information in backend layout.
Go to: 
Project members, sign in to write a code review

Older revisions

r89 by gimassimo on Nov 28, 2010   Diff
Improved backend content types menu.
r80 by gimassimo on Nov 9, 2010   Diff
First basic implementation of 'per-
route' configuration settings.
r78 by gimassimo on Sep 30, 2010   Diff
Added getInstance() method to all
table classes where it was missing.
Replaced each call to
Doctrine::getTable() with a call to
getInstance() method of the
...
All revisions of this file

File info

Size: 4203 bytes, 92 lines
Powered by Google Project Hosting