Skip to content

Commit

Permalink
Bringing Recess Tools up to speed with RecessView
Browse files Browse the repository at this point in the history
  • Loading branch information
KrisJordan committed Apr 13, 2009
1 parent 76c352c commit 44cfa28
Show file tree
Hide file tree
Showing 38 changed files with 327 additions and 167 deletions.
13 changes: 5 additions & 8 deletions recess/recess/apps/tools/views/apps/app.php
@@ -1,7 +1,6 @@
<?php
$title = 'Applications - ' . $app->name;
$selectedNav = 'apps';
include_once($viewsDir . 'common/header.php');
Layout::extend('layouts/apps');
Layout::blockAssign('title', $app->name);

Library::import('recess.apps.tools.controllers.RecessToolsCodeController');
$codeController = new RecessToolsCodeController($response->request->meta->app);
Expand Down Expand Up @@ -52,11 +51,9 @@ function printClassesInNamespace($namespace, $codeController) {
<?php
$routes = new RtNode();
$app->addRoutesToRouter($routes);
include_once($viewsDir . 'common/printRoutes.php');
printRoutes($routes, $codeController);
// include_once($viewsDir . 'common/printRoutes.php');
Part::render('routes/table', $routes, $codeController, '');
?>

<hr />
<p>Trying to <a href="<?php echo $controller->urlTo('uninstall',get_class($app)); ?>">uninstall <?php echo $app->name; ?></a>?</p>

<?php include_once($viewsDir . 'common/footer.php'); ?>
<p>Trying to <a href="<?php echo $controller->urlTo('uninstall',get_class($app)); ?>">uninstall <?php echo $app->name; ?></a>?</p>
16 changes: 8 additions & 8 deletions recess/recess/apps/tools/views/apps/createModel.php
@@ -1,9 +1,12 @@
<?php
$title = 'New Model Helper';
$selectedNav = 'apps';
$scripts = array('apps/newModelJQuery.php');
include_once($viewsDir . 'common/header.php');
Layout::extend('layouts/apps');
Layout::blockAssign('title', $app);

Layout::block('scripts');
include_once($viewsDir . 'apps/newModelJQuery.php');
Layout::blockEnd();
?>

<h1>New <strong>Model</strong> Helper</h1>
<p>The purpose of this helper is to help speed the process of creating Recess Models. Please note <span class="highlight">this form is <strong>not</strong> child proof</span>!</p>
<form class="modelForm" method="POST" action="<?php echo $controller->urlTo('generateModel',$app); ?>">
Expand Down Expand Up @@ -192,7 +195,4 @@
<table style="visibility:hidden;">
<tbody id="relationTemplate">
</tbody>
</table>
<?php
include_once($viewsDir . 'common/footer.php');
?>
</table>
11 changes: 3 additions & 8 deletions recess/recess/apps/tools/views/apps/createModelComplete.php
@@ -1,7 +1,6 @@
<?php
$title = 'New Application Instructions';
$selectedNav = 'apps';
include_once($viewsDir . 'common/header.php');
Layout::extend('layouts/apps');
Layout::blockAssign('title', 'Model Created');
?>
<h1>Creating <strong><?php echo $modelName; ?></strong> Model...</h1>

Expand Down Expand Up @@ -36,8 +35,4 @@
<?php endif; ?>
<h2><span class="highlight">Next Steps</span></h2>

<h3><a href="<?php echo $controller->urlTo('generateScaffolding', $appName, $modelName); ?>">Generate Scaffolding</a> | <a href="<?php echo $controller->urlTo('app', $appName); ?>">Back to Code</a></h3>

<?php
include_once($viewsDir . 'common/footer.php');
?>
<h3><a href="<?php echo $controller->urlTo('generateScaffolding', $appName, $modelName); ?>">Generate Scaffolding</a> | <a href="<?php echo $controller->urlTo('app', $appName); ?>">Back to Code</a></h3>
9 changes: 3 additions & 6 deletions recess/recess/apps/tools/views/apps/genController.php
@@ -1,7 +1,6 @@
<?php
$title = 'Scaffolding Generation';
$selectedNav = 'apps';
include_once($viewsDir . 'common/header.php');
Layout::extend('layouts/apps');
Layout::blockAssign('title', 'Scaffolding Generation');
?>

<h1>Select the Model to Generate Scaffolding for:</h1>
Expand All @@ -22,6 +21,4 @@ function printClassesInNamespace($namespace, $controller, $app) {
</ul>

<hr />
<h2><a href="<?php echo $controller->urlTo('app', get_class($app)); ?>">Back to Application</a></h2>

<?php include_once($viewsDir . 'common/footer.php'); ?>
<h2><a href="<?php echo $controller->urlTo('app', get_class($app)); ?>">Back to Application</a></h2>
9 changes: 3 additions & 6 deletions recess/recess/apps/tools/views/apps/generateScaffolding.php
@@ -1,7 +1,6 @@
<?php
$title = 'Scaffolding Generation';
$selectedNav = 'apps';
include_once($viewsDir . 'common/header.php');
Layout::extend('layouts/apps');
Layout::blockAssign('title', 'Scaffolding Generation');
?>

<h1>Generating Scaffolding for <?php echo $modelName; ?>...</h1>
Expand All @@ -14,6 +13,4 @@
?>
</pre>

<h2><a href="<?php echo $controller->urlTo('app', $appName); ?>">Back to Application</a></h2>

<?php include_once($viewsDir . 'common/footer.php'); ?>
<h2><a href="<?php echo $controller->urlTo('app', $appName); ?>">Back to Application</a></h2>
11 changes: 4 additions & 7 deletions recess/recess/apps/tools/views/apps/home.php
@@ -1,10 +1,9 @@
<?php
$title = 'Applications';
$selectedNav = 'apps';
include_once($viewsDir . 'common/header.php');
Layout::extend('layouts/apps');
Layout::blockAssign('Title', 'Home');
?>
<h1>Applications</h1>

<h1>Applications</h1>
<?php
if(isset($flash)) {
echo '<p class="highlight">' . $flash . '</p>';
Expand All @@ -26,6 +25,4 @@
}
?>
<hr />
<h3><a href="<?php echo $controller->urlTo('newApp'); ?>">Start a New Application</a></h3>

<?php include_once($viewsDir . 'common/footer.php'); ?>
<h3><a href="<?php echo $controller->urlTo('newApp'); ?>">Start a New Application</a></h3>
9 changes: 2 additions & 7 deletions recess/recess/apps/tools/views/apps/newAppInstructions.php
@@ -1,13 +1,8 @@
<?php
$title = 'New Application Instructions';
$selectedNav = 'apps';
include_once($viewsDir . 'common/header.php');
Layout::extend('layouts/apps');
Layout::blockAssign('title', 'New App Instructions');
?>

<h1>Your apps dir isn't writeable...</h1>

<h2>Please make: <span class="highlight"><?php echo $_ENV['dir.apps']; ?></span> writeable and try again.</h2>

<?php
include_once($viewsDir . 'common/footer.php');
?>
13 changes: 4 additions & 9 deletions recess/recess/apps/tools/views/apps/newAppWizard.php
@@ -1,10 +1,9 @@
<?php
$title = 'New Application Instructions';
$selectedNav = 'apps';
include_once($viewsDir . 'common/header.php');

Layout::extend('layouts/apps');
Layout::blockAssign('title', 'New Application Instructions');
?>


<h1>New Application Walkthrough</h1>

<p>Ready to start a new application? Great! This walkthrough is designed to step you through the process.</p>
Expand All @@ -21,8 +20,4 @@

<input type="submit" value="Next Step" /><br /><br />

<?php $form->end(); ?>

<?php
include_once($viewsDir . 'common/footer.php');
?>
<?php $form->end(); ?>
13 changes: 4 additions & 9 deletions recess/recess/apps/tools/views/apps/newAppWizardComplete.php
@@ -1,9 +1,8 @@
<?php
$title = 'New Application Instructions';
$selectedNav = 'apps';
include_once($viewsDir . 'common/header.php');

Layout::extend('layouts/apps');
Layout::blockAssign('title', 'New Application Instructions');
?>

<h1>Creating New Application...</h1>

<pre>
Expand All @@ -25,8 +24,4 @@
);
</pre>

<h2><span class="highlight">Did you add that line?</span> Great! Have fun building <a href="<?php echo $controller->urlTo('app', $applicationClass); ?>"><?php echo $appName; ?></a>!</h2>

<?php
include_once($viewsDir . 'common/footer.php');
?>
<h2><span class="highlight">Did you add that line?</span> Great! Have fun building <a href="<?php echo $controller->urlTo('app', $applicationClass); ?>"><?php echo $appName; ?></a>!</h2>
13 changes: 4 additions & 9 deletions recess/recess/apps/tools/views/apps/newAppWizardStep2.php
@@ -1,10 +1,9 @@
<?php
$title = 'New Application Instructions';
$selectedNav = 'apps';
include_once($viewsDir . 'common/header.php');

Layout::extend('layouts/apps');
Layout::blockAssign('title', 'New Application');
?>


<h1>New Application Walkthrough - Step 2</h1>

<?php $form->begin(); ?>
Expand All @@ -19,8 +18,4 @@

<input type="submit" value="Next Step" /><br /><br />

<?php $form->end(); ?>

<?php
include_once($viewsDir . 'common/footer.php');
?>
<?php $form->end(); ?>
13 changes: 4 additions & 9 deletions recess/recess/apps/tools/views/apps/newModelComplete.php
@@ -1,8 +1,8 @@
<?php
$title = 'New Application Instructions';
$selectedNav = 'apps';
include_once($viewsDir . 'common/header.php');
Layout::extend('layouts/apps');
Layout::blockAssign('title', 'New Application');
?>

<h1>Creating <strong><?php echo $modelName; ?></strong> Model...</h1>

<h3 class="bottom">Code Gen <?php if($modelWasSaved){ echo '<span class="added">Done</a>'; } else { echo '<span class="highlight">Almost Done</span>'; } ?></h3>
Expand All @@ -29,9 +29,4 @@
}
?></h3>


<h2><span class="highlight">Next Steps</span></h2>

<?php
include_once($viewsDir . 'common/footer.php');
?>
<h2><span class="highlight">Next Steps</span></h2>
2 changes: 1 addition & 1 deletion recess/recess/apps/tools/views/apps/newModelJQuery.php
Expand Up @@ -219,4 +219,4 @@ function(data) {

}
</script>
<script type="text/javascript" src="<?php echo $_ENV['url.content']; ?>js/jquery/jquery-1.2.6.js"></script>
<?php echo Html::js('jquery/jquery-1.2.6') ?>
9 changes: 4 additions & 5 deletions recess/recess/apps/tools/views/apps/uninstall.php
@@ -1,8 +1,8 @@
<?php
$title = 'Uninstall';
$selectedNav = 'apps';
include_once($viewsDir . 'common/header.php');
Layout::extend('layouts/apps');
Layout::blockAssign('title', 'Uninstall');
?>

<h1>To <span class="removed">Uninstall</span> <?php echo $app->name; ?>...</h1>
<ol>
<li><span class="highlight">Open <?php echo $_ENV['dir.bootstrap']; ?>recess-conf.php</span></li>
Expand All @@ -13,5 +13,4 @@
<li><span class="highlight">Remove the string '<?php echo $appClass; ?>'</span></li>
<li>[Optional] Delete the directory <?php echo $_ENV['dir.apps'] . substr($appClass,0,strpos($appClass,'.')); ?></li>
</ol>
<h2>Th-Th-Th-Th-That's all folks. <a href="<?php echo $controller->urlTo('home'); ?>">Head back to apps.</a></h2>
<?php include_once($viewsDir . 'common/footer.php'); ?>
<h2>That's all folks. <a href="<?php echo $controller->urlTo('home'); ?>">Head back to apps.</a></h2>
9 changes: 4 additions & 5 deletions recess/recess/apps/tools/views/code/byClass.php
@@ -1,8 +1,8 @@
<?php
$title = 'Browsing Code by Package';
$selectedNav = 'code';
include_once($viewsDir . 'common/header.php');
Layout::extend('layouts/code');
Layout::blockAssign('title', 'By Class');
?>

<h1>Browse Code by Class</h1>

<table>
Expand All @@ -24,5 +24,4 @@
echo '</tr>';
}
?>
</table>
<?php include_once($viewsDir . 'common/footer.php'); ?>
</table>
9 changes: 3 additions & 6 deletions recess/recess/apps/tools/views/code/byPackage.php
@@ -1,7 +1,6 @@
<?php
$title = 'Browsing Code by Package';
$selectedNav = 'code';
include_once($viewsDir . 'common/header.php');
Layout::extend('layouts/code');
Layout::blockAssign('title', 'By Package');
?>

<h1>Browse Code by Package</h1>
Expand All @@ -10,6 +9,4 @@
<?php foreach($packages as $package): ?>
<li><?php echo $package->name; ?></li>
<?php endforeach; ?>
</ul>

<?php include_once($viewsDir . 'common/footer.php'); ?>
</ul>
9 changes: 2 additions & 7 deletions recess/recess/apps/tools/views/code/classInfo.php
@@ -1,7 +1,6 @@
<?php
$title = 'Model ' . $reflection->name;
$selectedNav = 'code';
include_once($viewsDir . 'common/header.php');
Layout::extend('layouts/code');
Layout::blockAssign('title', 'Class ' . $reflection->name);
?>

<?php
Expand Down Expand Up @@ -95,10 +94,6 @@ function printModelInfo($table, $source, $relationships, $columns) {

</div>

<?php
include_once($viewsDir . 'common/footer.php');
?>

<?php
// Print Methods

Expand Down
8 changes: 3 additions & 5 deletions recess/recess/apps/tools/views/code/home.php
@@ -1,7 +1,6 @@
<?php
$title = 'Code Browsing';
$selectedNav = 'code';
include_once($viewsDir . 'common/header.php');
Layout::extend('layouts/code');
Layout::blockAssign('title', 'Code Browser');
?>
<h1>Code Browser</h1>
<?php if(count($packages) == 0):?>
Expand Down Expand Up @@ -35,5 +34,4 @@ function printTable($controller, $objects, $columns = 4) {
}
?>

<a href="<?php echo $controller->urlTo('index'); ?>">Re-index your Code</a>
<?php include_once($viewsDir . 'common/footer.php'); ?>
<a href="<?php echo $controller->urlTo('index'); ?>">Re-index your Code</a>
5 changes: 2 additions & 3 deletions recess/recess/apps/tools/views/code/packageInfo.php
@@ -1,7 +1,6 @@
<?php
$title = 'Package ' . $package->name;
$selectedNav = 'code';
include_once($viewsDir . 'common/header.php');
Layout::extend('layouts/code');
Layout::blockAssign('title', $package->name);
?>
<?php

Expand Down
2 changes: 1 addition & 1 deletion recess/recess/apps/tools/views/common/header.php
Expand Up @@ -38,4 +38,4 @@
<p class="qotm quiet">"Give us the tools, and we'll finish the job." ~Churchill</p>
</div>
<div class="span-19">
<?php include_once($viewsDir . 'common/navbar.php'); ?>
<?php include($viewsDir . 'common/navbar.php'); ?>

0 comments on commit 44cfa28

Please sign in to comment.