Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of git@github.com:recess/recess
- Loading branch information
Showing
49 changed files
with
648 additions
and
223 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
15 changes: 0 additions & 15 deletions
15
recess/recess/apps/tools/templates/navigation.template.php
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 0 additions & 16 deletions
16
recess/recess/apps/tools/templates/scaffolding/views/details.template.php
This file was deleted.
Oops, something went wrong.
14 changes: 0 additions & 14 deletions
14
recess/recess/apps/tools/templates/scaffolding/views/editForm.template.php
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
recess/recess/apps/tools/templates/scaffolding/views/editFormInput.template.php
This file was deleted.
Oops, something went wrong.
19 changes: 19 additions & 0 deletions
19
recess/recess/apps/tools/templates/scaffolding/views/home/index.template.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
Layout::extend('master'); | ||
Layout::blockAssign('title', 'Home'); | ||
?> | ||
<h1>Hello Kick-ass Developer!</h1> | ||
<h2 class="highlight"><?php echo $flash; ?></h2> | ||
<ul> | ||
<?php | ||
// This is a really slow way to generate navigation. | ||
// You probably should not use this in a real app. Thx -Kris | ||
Library::import('recess.lang.Inflector'); | ||
$app = $controller->application(); | ||
$controllers = $app->listControllers(); | ||
foreach($controllers as $controllerClass): | ||
$title = Inflector::toEnglish(str_replace('Controller','',$controllerClass)); | ||
?> | ||
<li><?php echo Html::anchor(Url::action($controllerClass . '::index'), $title)?></li> | ||
<?php endforeach; ?> | ||
</ul> |
26 changes: 0 additions & 26 deletions
26
recess/recess/apps/tools/templates/scaffolding/views/index.template.php
This file was deleted.
Oops, something went wrong.
35 changes: 35 additions & 0 deletions
35
recess/recess/apps/tools/templates/scaffolding/views/master.template.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<html> | ||
<head> | ||
<?php | ||
Layout::slot('style'); | ||
Part::render('parts/style'); | ||
Layout::slotEnd(); | ||
?> | ||
<title>{{appName}} - <?php Layout::slot('title'); Layout::slotEnd() ?></title> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<div class="span-24"> | ||
<h1>{{appName}}</h1> | ||
</div> | ||
<div class="span-24 last"> | ||
<div class="navigation"> | ||
<?php | ||
Layout::slot('navigation'); | ||
Layout::slotEnd(); | ||
?> | ||
</div> | ||
<?php | ||
Layout::slot('body'); | ||
Layout::slotEnd(); | ||
?> | ||
</div> | ||
<div class="span-24 footer"> | ||
<p class="quiet bottom"> | ||
<?php echo Html::anchor('/{{camelProgrammaticName}}/', '{{appName}}') ?> is © <?php echo date('Y'); ?> | ||
{Insert Kick-ass App Developer Name Here}. All rights reserved. | ||
</p> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |
6 changes: 6 additions & 0 deletions
6
recess/recess/apps/tools/templates/scaffolding/views/parts/navigation.part.template.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<ul> | ||
<li><?php echo Html::anchor(Url::action('{{programmaticName}}HomeController::index'), 'Home') ?></li> | ||
<!-- | ||
Add your application's navigation links here. | ||
--> | ||
</ul> |
35 changes: 35 additions & 0 deletions
35
recess/recess/apps/tools/templates/scaffolding/views/parts/style.part.template.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<!-- Blue Print --> | ||
<?php | ||
// Scaffolding uses Recess Tools' stylesheets. You should place your apps stylesheets | ||
// in apps/yourApp/public/css/ and get rid of $recessToolsCss | ||
$recessToolsCss = '../../../../recess/recess/apps/tools/public/css/'; | ||
?> | ||
<?php echo Html::css($recessToolsCss . 'blueprint/screen','screen') ?> | ||
<?php echo Html::css($recessToolsCss . 'blueprint/print',array('print')) ?> | ||
<!--[if IE]> | ||
<?php echo Html::css('blueprint/ie',array('screen', 'projection')) ?> | ||
<![endif]--> | ||
<style type="text/css"> | ||
.error,.notice,.success{ margin: 0 0 1em 0; padding: 0.8em; border: 2px solid #000; } | ||
.error{ background: #FBE3E4; border-color: #FBC2C4; } | ||
.error, .error a{ color: #8A1F11; } | ||
.notice{ background: #FFF6BF; border-color: #FFD324; } | ||
.notice, .notice a{ color: #514721; } | ||
.success{ background: #E6EFC2; border-color: #C6D880; } | ||
.success, .success a{ color: #264409; } | ||
body { font-size: .8em; } | ||
p { font-size: 1.2em; } | ||
form{ margin: 0; padding: 0; } | ||
fieldset{ margin: 0 0 1em 0; padding: 1em; border: 2px solid #a9b5c7; background: #f0f6fe; } | ||
legend{ margin: 0; padding: 0 0.5em; font-size: 1.5em; font-weight: bold; color: #222; } | ||
label{ font-weight: bold; color: #222; } | ||
|
||
input.text,textarea{ width: 300px; padding: 3px; font-size: 14px; font-family: arial, verdana, sans-serif; color: #333; } | ||
input.short{ width: 100px; } | ||
input.long{ width: 500px; } | ||
textarea{ width: 500px; height: 150px; } | ||
.navigation { font-size: 1.6em; } | ||
.navigation ul { margin: 0 0 1em 0; } | ||
.navigation ul li { display: inline; background: #E6EFC2; border: 2px solid #C6D880; } | ||
.navigation ul li a { color: #000; text-decoration: none; margin: .5em; } | ||
</style> |
14 changes: 14 additions & 0 deletions
14
recess/recess/apps/tools/templates/scaffolding/views/resource/details.part.template.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
assert(${{modelNameLower}} instanceof {{modelName}}); | ||
?> | ||
<form method="POST" action="<?php echo Url::action('{{modelName}}Controller::delete', ${{modelNameLower}}->{{primaryKey}}) ?>"> | ||
<fieldset> | ||
<h3><?php echo Html::anchor(Url::action('{{modelName}}Controller::details', ${{modelNameLower}}->{{primaryKey}}), '{{modelName}} #' . ${{modelNameLower}}->{{primaryKey}}) ?></h3> | ||
<p> | ||
{{fields}} | ||
</p> | ||
<?php echo Html::anchor(Url::action('{{modelName}}Controller::editForm', ${{modelNameLower}}->{{primaryKey}}), 'Edit') ?> - | ||
<input type="hidden" name="_METHOD" value="DELETE" /> | ||
<input type="submit" name="delete" value="Delete" /> | ||
</fieldset> | ||
</form> |
9 changes: 9 additions & 0 deletions
9
recess/recess/apps/tools/templates/scaffolding/views/resource/details.template.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
Layout::extend('{{modelNameLower}}/layout'); | ||
Layout::blockAssign('title', 'Details of {{modelName}} #' . ${{modelNameLower}}->{{primaryKey}} ); | ||
?> | ||
|
||
<?php Part::render('{{modelNameLower}}/details', ${{modelNameLower}}) ?> | ||
|
||
<?php echo Html::anchor(Url::action('{{modelName}}Controller::index'), 'Back to list of {{modelNameLower}}s') ?> | ||
<hr /> |
13 changes: 13 additions & 0 deletions
13
recess/recess/apps/tools/templates/scaffolding/views/resource/editForm.template.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
Layout::extend('{{modelNameLower}}/layout'); | ||
if(isset(${{modelNameLower}}->{{primaryKey}})) { | ||
$title = 'Edit {{modelName}} #' . ${{modelNameLower}}->{{primaryKey}}; | ||
} else { | ||
$title = 'Create New {{modelName}}'; | ||
} | ||
Layout::blockAssign('title', $title); | ||
?> | ||
|
||
<?php Part::render('{{modelNameLower}}/form', $_form, $title) ?> | ||
|
||
<?php echo Html::anchor(Url::action('{{modelName}}Controller::index'), '{{modelName}} List') ?> |
4 changes: 4 additions & 0 deletions
4
recess/recess/apps/tools/templates/scaffolding/views/resource/editFormInput.template.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<p> | ||
<label for="<?php echo $form->{{fieldName}}->getName(); ?>">{{fieldNameEnglish}}</label><br /> | ||
<?php $form->input('{{fieldName}}'); ?> | ||
</p> |
Oops, something went wrong.