Permalink
Browse files

Cleaning up HTML in views to use PHP short tags, updating user module…

… to use new standards.
  • Loading branch information...
geekforbrains committed Mar 21, 2012
1 parent d0699f4 commit add3bc269b62ad3dcd5d0d8f1a13ed2e233f4bc0
@@ -1,10 +1,10 @@
-<?php View::insert('includes/header'); ?>
+<? View::insert('includes/header'); ?>
<!-- start content -->
<div class="content container_12">
<div class="grid_4 prefix_4 spacer">
<h1>Install</h1>
- <?php echo Html::form()->open(null, 'post', false, array('id' => 'install', 'name' => 'install')); ?>
+ <?= Html::form()->open(null, 'post', false, array('id' => 'install', 'name' => 'install')); ?>
<ul style="margin-top: 18px;">
<li class="text full">
<label>Email</label>
@@ -22,9 +22,9 @@
<a class="btn blue" href="javascript:document.install.submit();">Install</a>
</li>
</ul>
- <?php echo Html::form()->close(); ?>
+ <?= Html::form()->close(); ?>
</div>
</div>
<!-- end content -->
-<?php View::insert('includes/footer'); ?>
+<? View::insert('includes/footer'); ?>
@@ -1,4 +1,4 @@
-<?php View::insert('includes/header'); ?>
+<? View::insert('includes/header'); ?>
<!-- start content -->
<div class="content container_12">
@@ -9,4 +9,4 @@
</div>
<!-- end content -->
-<?php View::insert('includes/footer'); ?>
+<? View::insert('includes/footer'); ?>
@@ -1,4 +1,4 @@
-<?php View::insert('includes/header'); ?>
+<? View::insert('includes/header'); ?>
<!-- start content -->
<div class="content container_12">
@@ -9,4 +9,4 @@
</div>
<!-- end content -->
-<?php View::insert('includes/footer'); ?>
+<? View::insert('includes/footer'); ?>
@@ -1,7 +1,7 @@
<!-- start footer -->
<div class="footer container_12">
<div class="grid_12">
- Powered by <a href="http://github.com/geekforbrains/caffeine" target="_blank">Caffeine <?php echo VERSION; ?></a>
+ Powered by <a href="http://github.com/geekforbrains/caffeine" target="_blank">Caffeine <?= VERSION; ?></a>
</div>
<div class="clear">&nbsp;</div>
</div>
@@ -1,10 +1,10 @@
<!DOCTYPE html>
<html>
<head>
- <base href="<?php echo View::getBaseHref(); ?>" />
+ <base href="<?= View::getBaseHref(); ?>" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
- <title><?php echo View::getTitle('Control Panel', null, ' - Control Panel'); ?></title>
+ <title><?= View::getTitle('Control Panel', null, ' - Control Panel'); ?></title>
<link rel="stylesheet" type="text/css" href="css/reset.css" />
<link rel="stylesheet" type="text/css" href="css/grid.css" />
@@ -18,40 +18,33 @@
<script type="text/javascript" src="plugins/chosen/chosen.jquery.js"></script>
<script type="text/javascript">
- var baseHref = '<?php echo View::getBaseHref(); ?>'; // Used by plugins to get relative paths to scripts
+ var baseHref = '<?= View::getBaseHref(); ?>'; // Used by plugins to get relative paths to scripts
</script>
<script type="text/javascript" src="js/admin.js"></script>
</head>
<body>
-
-<!-- jquey modal -->
-<div id="modal" title="Hello World">
- <p>This is a modal</p>
-</div>
-
-
<!-- start header -->
<div class="header">
<div class="container_12">
<h1 class="grid_12">Control Panel</h1>
- <?php if(!User::current()->isAnonymous()): ?>
+ <? if(!User::current()->isAnonymous()): ?>
<div class="user_box">
Logged in as
- <?php Html::a(User::current()->email, 'admin/user/edit/' . User::current()->id); ?>
+ <?= Html::a(User::current()->email, 'admin/user/edit/' . User::current()->id); ?>
&nbsp;&nbsp;|&nbsp;&nbsp;
- <?php Html::a('Logout', 'admin/logout'); ?>
+ <?= Html::a('Logout', 'admin/logout'); ?>
</div>
- <?php endif; ?>
+ <? endif; ?>
</div>
<div class="clear">&nbsp;</div>
<div class="tab_bar">
<div class="container_12">
<div class="grid_12">
- <?php echo Menu::build(0, 'admin', array('attributes' => array('class' => 'tabs'))); ?>
+ <?= Menu::build(0, 'admin', array('attributes' => array('class' => 'tabs'))); ?>
</div>
<div class="clear">&nbsp;</div>
</div>
@@ -74,15 +67,15 @@
<!-- start messages -->
-<?php if($messages = Message::get()): ?>
+<? if($messages = Message::get()): ?>
<div class="container_12">
<div class="grid_12 messages">
- <?php foreach($messages as $type => $typeMessages): ?>
- <?php foreach($typeMessages as $message): ?>
- <p class="<?php echo $type; ?>"><?php echo $message; ?></p>
- <?php endforeach; ?>
- <?php endforeach; ?>
+ <? foreach($messages as $type => $typeMessages): ?>
+ <? foreach($typeMessages as $message): ?>
+ <p class="<?= $type; ?>"><?= $message; ?></p>
+ <? endforeach; ?>
+ <? endforeach; ?>
</div>
</div>
-<?php endif; ?>
+<? endif; ?>
<!-- end messages -->
View
@@ -1,229 +1,59 @@
-<?php View::insert('includes/header'); ?>
+<? View::insert('includes/header'); ?>
<!-- start content -->
<div class="content container_12">
- <?php if($subNav = Menu::build(-1, 'admin/%s', array('attributes' => array('class' => 'menu')))): ?>
+ <? if($subNav = Menu::build(-1, 'admin/%s', array('attributes' => array('class' => 'menu')))): ?>
<div class="grid_3 spacer">
<h2>Navigation</h2>
- <?php echo $subNav; ?>
+ <?= $subNav; ?>
</div>
- <?php endif; ?>
+ <? endif; ?>
- <div class="grid_<?php echo ($subNav) ? '9' : '12'; ?>">
- <?php if(is_array($adminContent) && $adminContent): ?>
- <?php if(isset($adminContent[0])): ?>
+ <div class="grid_<?= ($subNav) ? '9' : '12'; ?>">
+ <? if(is_array($adminContent) && $adminContent): ?>
+ <? if(isset($adminContent[0])): ?>
- <?php foreach($adminContent as $content): ?>
+ <? foreach($adminContent as $content): ?>
<div class="grid_12 spacer">
- <h1><?php echo $content['title']; ?></h1>
+ <h1><?= $content['title']; ?></h1>
- <?php if(isset($content['topright'])): ?>
+ <? if(isset($content['topright'])): ?>
<div class="topright">
- <?php echo $content['topright']; ?>
+ <?= $content['topright']; ?>
</div>
- <?php endif; ?>
+ <? endif; ?>
- <?php echo $content['content']; ?>
+ <?= $content['content']; ?>
</div>
- <?php endforeach; ?>
+ <? endforeach; ?>
- <?php else: ?>
+ <? else: ?>
<div class="grid_12 spacer">
- <h2><?php echo $adminContent['title']; ?></h2>
+ <h2><?= $adminContent['title']; ?></h2>
- <?php if(isset($adminContent['topright'])): ?>
+ <? if(isset($adminContent['topright'])): ?>
<div class="topright">
- <?php echo $adminContent['topright']; ?>
+ <?= $adminContent['topright']; ?>
</div>
- <?php endif; ?>
+ <? endif; ?>
- <?php echo $adminContent['content']; ?>
+ <?= $adminContent['content']; ?>
</div>
- <?php endif; ?>
- <?php else: ?>
+ <? endif; ?>
+ <? else: ?>
<div class="grid_12 spacer">
<p><em>Nothing to display</em></p>
</div>
- <?php endif; ?>
+ <? endif; ?>
</div>
<div class="clear">&nbsp;</div>
-
- <?php /*
- <div class="grid_12 spacer">
- <h1>Table</h1>
-
- <div class="topright">
- <form>
- Search:
- <input type="text" />
- <a class="btn mini blue" href="#">Go</a>
- </form>
- </div>
-
- <table class="sortable">
- <thead>
- <tr>
- <th width="10"><input class="checkall" type="checkbox" /></th>
- <th>Header One</th>
- <th>Header Two</th>
- <th class="right">Header Right</th>
- </tr>
- </thead>
- <tbody class="sort_items">
- <tr class="sort_item">
- <td><input type="checkbox" /></td>
- <td><a href="#">Item A1</a></td>
- <td>Item A2</td>
- <td class="right">Item Right</td>
- </tr>
- <tr class="sort_item">
- <td><input type="checkbox" /></td>
- <td><a href="#">Item B1</a></td>
- <td>Item B2</td>
- <td class="right">Item Right</td>
- </tr>
- <tr class="sort_item">
- <td><input type="checkbox" /></td>
- <td><a href="#">Item C1</a></td>
- <td>Item C2</td>
- <td class="right">Item Right</td>
- </tr>
- <tr class="sort_item">
- <td><input type="checkbox" /></td>
- <td><a href="#">Item D1</a></td>
- <td>Item D2</td>
- <td class="right">Item Right</td>
- </tr>
- <tr class="sort_item">
- <td><input type="checkbox" /></td>
- <td><a href="#">Item E1</a></td>
- <td>Item E2</td>
- <td class="right">Item Right</td>
- </tr>
- </tbody>
- </table>
-
- <div class="buttons">
- <a class="btn blue modal" href="#">Show Modal</a>
- </div>
-
- <div class="buttons right">
- <a class="btn blue" href="#">Submit</a>&nbsp;
- <a class="btn gray" href="#">Cancel</a>
- </div>
- </div>
- <div class="clear">&nbsp;</div>
-
- <div class="grid_3 spacer">
- <h2>Menu</h2>
- <ul class="menu">
- <li><a href="#">Item One</a></li>
- <li><a href="#">Item Two</a></li>
- <li><a href="#">Item Three</a></li>
- <li class="noborder"><a href="#">Item Four</a></li>
- </ul>
- </div>
- <div class="grid_9 spacer">
- <h1>Form</h1>
- <form>
- <ul>
- <!-- mini form items -->
- <li class="text mini">
- <label>Text Mini</label>
- <input type="text" />
- <input type="text" />
- <input type="text" />
- </li>
- <li class="select mini">
- <label>Select Mini</label>
- <select class="chzn-select"><option>-</option></select>
- <select class="chzn-select"><option>-</option></select>
- <select class="chzn-select"><option>-</option></select>
- </li>
-
- <!-- small form items -->
- <li class="text">
- <label>Text Small <em>(Default)</em></label>
- <input type="text" />
- </li>
- <li class="select">
- <label>Select Small <em>(Default)</em></label>
- <select class="chzn-select"><option>-</option></select>
- </li>
- <li class="textarea small">
- <label>Textarea Small</label>
- <textarea></textarea>
- </li>
-
- <!-- medium form items -->
- <li class="text medium">
- <label>Text Medium</label>
- <input type="text" />
- </li>
- <li class="select medium">
- <label>Select Medium</label>
- <select class="chzn-select"><option>-</option></select>
- </li>
- <li class="textarea medium">
- <label>Textarea Medium <em>(Default)</em></label>
- <textarea class="tinymce"></textarea>
- </li>
-
- <!-- large form items -->
- <li class="text large">
- <label>Text Large</label>
- <input type="text" />
- </li>
- <li class="select large">
- <label>Select Large</label>
- <select class="chzn-select"><option>-</option></select>
- </li>
- <li class="textarea large">
- <label>Textarea Large</label>
- <textarea></textarea>
- </li>
-
- <!-- full form items -->
- <li class="text full">
- <label>Text Full</label>
- <input type="text" />
- </li>
- <li class="select full">
- <label>Select Full</label>
- <select class="chzn-select"><option>-</option></select>
- </li>
- <li class="textarea full">
- <label>Textarea Full</label>
- <textarea></textarea>
- </li>
- <li class="checkbox">
- <label>Checkboxes</label>
- <div class="row"><input type="checkbox" /> Checkbox One</div>
- <div class="row"><input type="checkbox" /> Checkbox Two</div>
- <div class="row"><input type="checkbox" /> Checkbox Three</div>
- </li>
- <li class="radio">
- <label>Radios</label>
- <div class="row"><input type="radio" /> Radio One</div>
- <div class="row"><input type="radio" /> Radio Two</div>
- <div class="row"><input type="radio" /> Radio Three</div>
- </li>
- <li class="buttons">
- <a class="btn blue">Submit</a>&nbsp;
- <a class="btn gray">Cancel</a>
- </li>
- </ul>
- </form>
- </div>
- <div class="clear">&nbsp;</div>
- */ ?>
</div>
<!-- end content -->
-<?php View::insert('includes/footer'); ?>
+<? View::insert('includes/footer'); ?>
Oops, something went wrong.

0 comments on commit add3bc2

Please sign in to comment.