PageRenderTime 11ms CodeModel.GetById 2ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 0ms

/halogy/application/modules/pages/views/admin/navigation.php

https://bitbucket.org/haloweb/halogy-1.0/
PHP | 75 lines | 63 code | 12 blank | 0 comment | 2 complexity | b00e3fb5286af55c3a1f603245188aa0 MD5 | raw file
 1<script type="text/javascript">
 2function setOrder(){
 3	$.post('/admin/pages/order/nav',$(this).sortable('serialize'),function(data){ });
 4};
 5
 6function initOrder(el){
 7	$(el).sortable({ 
 8		axis: 'y',
 9	    revert: false, 
10	    delay: '80',
11	    opacity: '0.5',
12	    update: setOrder
13	});
14};
15
16$(function(){
17	initOrder('ol.order, ol.order ol');
18});
19</script>
20
21<h1 class="headingleft">Custom Navigation</h1>
22
23<div class="headingright">
24	<a href="/admin/pages/viewall" class="button blue">View Pages</a>
25	<a href="/admin/pages/add_nav" class="showform button blue">Add Navigation</a>	
26</div>
27
28<div class="clear"></div>
29
30<div class="tip">
31	<p>Custom Navigation allows you to override the default page navigation. To use the custom navigation make sure you use the <strong>{navigation(custom)}</strong> tag.</p>
32</div>
33
34<div class="hidden"></div>
35
36<?php if ($parents): ?>
37
38	<hr />
39
40	<ol class="order">
41	<?php foreach ($parents as $nav): ?>
42		<li id="navigation-<?php echo $nav['navID']; ?>" class="<?php echo (@$children[$nav['navID']]) ? 'haschildren' : ''; ?>">
43			<div class="col1">
44				<span><strong><?php echo $nav['navName']; ?></strong> <small>(<?php echo $nav['uri']; ?>)</small></span>
45			</div>
46			<div class="col2">&nbsp;</div>
47			<div class="buttons">
48				<a href="/admin/pages/edit_nav/<?php echo $nav['navID']; ?>" class="showform"><img src="<?php echo $this->config->item('staticPath'); ?>/images/btn_edit.png" alt="Edit" /></a>
49				<a href="/admin/pages/delete_nav/<?php echo $nav['navID']; ?>" onclick="return confirm('Are you sure you want to delete this?')"><img src="<?php echo $this->config->item('staticPath'); ?>/images/btn_delete.png" alt="Delete" /></a>
50			</div>
51			<div class="clear"></div>
52			<?php if (@$children[$nav['navID']]): ?>
53				<ol class="subnav">
54				<?php foreach ($children[$nav['navID']] as $child): ?>
55					<li id="navigation-<?php echo $child['navID']; ?>">
56						<div class="col1">
57							<span class="padded">--</span>
58							<span><strong><?php echo $child['navName']; ?></strong> <small>(<?php echo $child['uri']; ?>)</small></span>
59						</div>
60						<div class="col2">&nbsp;</div>
61						<div class="buttons">
62							<a href="/admin/pages/edit_nav/<?php echo $child['navID']; ?>" class="showform"><img src="<?php echo $this->config->item('staticPath'); ?>/images/btn_edit.png" alt="Edit" /></a>
63							<a href="/admin/pages/delete_nav/<?php echo $child['navID']; ?>" onclick="return confirm('Are you sure you want to delete this?')"><img src="<?php echo $this->config->item('staticPath'); ?>/images/btn_delete.png" alt="Delete" /></a>
64						</div>
65						<div class="clear"></div>
66					</li>
67				<?php endforeach; ?>
68				</ol>
69			<?php endif; ?>
70		</li>
71	<?php endforeach; ?>
72	</ol>
73
74<?php endif; ?>
75