Show
Ignore:
Timestamp:
01/01/06 21:37:32 (6 years ago)
Author:
john
Message:

added a bunch of stuff for scaffolding

Location:
trunk/trax/vendor/trax/templates/scaffolds
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • trunk/trax/vendor/trax/templates/scaffolds/add.phtml

    r72 r106  
    1 <h1>New <?= @scaffold_singular_name ?></h1> 
     1 <style> 
     2    body { background-color: #fff; color: #333; } 
    23 
    3 <?= error_messages_for(@scaffold_singular_name) ?> 
    4 <?= form(@scaffold_singular_name, :action => "create#{@scaffold_suffix}") ?> 
     4    body, p, ol, ul, td { 
     5    font-family: verdana, arial, helvetica, sans-serif; 
     6    font-size:   13px; 
     7    line-height: 18px; 
     8    } 
    59 
    6 <?= link_to "Back", :action => "list#{@scaffold_suffix}" ?> 
     10    pre { 
     11    background-color: #eee; 
     12    padding: 10px; 
     13    font-size: 11px; 
     14    } 
     15 
     16    a { color: #000; } 
     17    a:visited { color: #666; } 
     18    a:hover { color: #fff; background-color:#000; } 
     19 
     20    .fieldWithErrors { 
     21    padding: 2px; 
     22    background-color: red; 
     23    display: table; 
     24    } 
     25 
     26    #ErrorExplanation { 
     27    width: 400px; 
     28    border: 2px solid 'red'; 
     29    padding: 7px; 
     30    padding-bottom: 12px; 
     31    margin-bottom: 20px; 
     32    background-color: #f0f0f0; 
     33    } 
     34 
     35    #ErrorExplanation h2 { 
     36    text-align: left; 
     37    font-weight: bold; 
     38    padding: 5px 5px 5px 15px; 
     39    font-size: 12px; 
     40    margin: -7px; 
     41    background-color: #c00; 
     42    color: #fff; 
     43    } 
     44 
     45    #ErrorExplanation p { 
     46    color: #333; 
     47    margin-bottom: 0; 
     48    padding: 5px; 
     49    } 
     50 
     51    #ErrorExplanation ul li { 
     52    font-size: 12px; 
     53    list-style: square; 
     54    } 
     55 
     56    div.uploadStatus { 
     57    margin: 5px; 
     58    } 
     59 
     60    div.progressBar { 
     61    margin: 5px; 
     62    } 
     63 
     64    div.progressBar div.border { 
     65    background-color: #fff; 
     66    border: 1px solid grey; 
     67    width: 100%; 
     68    } 
     69 
     70    div.progressBar div.background { 
     71    background-color: #333; 
     72    height: 18px; 
     73    width: 0%; 
     74    } 
     75  </style> 
     76<h1>New <?= $model_name ?></h1> 
     77 
     78<?= error_messages_for("model") ?> 
     79<?= form("model", array(":action" => "add",'submit_value' => "Create")) ?> 
     80 
     81<?= link_to("Show", array(":action" => "show", ":id" => $model->id)) ?> | 
     82<?= link_to("Back", array(":action" => "index")) ?> 
  • trunk/trax/vendor/trax/templates/scaffolds/edit.phtml

    r72 r106  
    1 <h1>Editing <%= @scaffold_singular_name %></h1> 
     1 <style> 
     2    body { background-color: #fff; color: #333; } 
    23 
    3 <%= error_messages_for(@scaffold_singular_name) %> 
    4 <%= form(@scaffold_singular_name, :action => "update#{@scaffold_suffix}") %> 
     4    body, p, ol, ul, td { 
     5    font-family: verdana, arial, helvetica, sans-serif; 
     6    font-size:   13px; 
     7    line-height: 18px; 
     8    } 
    59 
    6 <%= link_to "Show", :action => "show#{@scaffold_suffix}", :id => instance_variable_get("@#{@scaffold_singular_name}") %> | 
    7 <%= link_to "Back", :action => "list#{@scaffold_suffix}" %> 
     10    pre { 
     11    background-color: #eee; 
     12    padding: 10px; 
     13    font-size: 11px; 
     14    } 
     15 
     16    a { color: #000; } 
     17    a:visited { color: #666; } 
     18    a:hover { color: #fff; background-color:#000; } 
     19 
     20    .fieldWithErrors { 
     21    padding: 2px; 
     22    background-color: red; 
     23    display: table; 
     24    } 
     25 
     26    #ErrorExplanation { 
     27    width: 400px; 
     28    border: 2px solid 'red'; 
     29    padding: 7px; 
     30    padding-bottom: 12px; 
     31    margin-bottom: 20px; 
     32    background-color: #f0f0f0; 
     33    } 
     34 
     35    #ErrorExplanation h2 { 
     36    text-align: left; 
     37    font-weight: bold; 
     38    padding: 5px 5px 5px 15px; 
     39    font-size: 12px; 
     40    margin: -7px; 
     41    background-color: #c00; 
     42    color: #fff; 
     43    } 
     44 
     45    #ErrorExplanation p { 
     46    color: #333; 
     47    margin-bottom: 0; 
     48    padding: 5px; 
     49    } 
     50 
     51    #ErrorExplanation ul li { 
     52    font-size: 12px; 
     53    list-style: square; 
     54    } 
     55 
     56    div.uploadStatus { 
     57    margin: 5px; 
     58    } 
     59 
     60    div.progressBar { 
     61    margin: 5px; 
     62    } 
     63 
     64    div.progressBar div.border { 
     65    background-color: #fff; 
     66    border: 1px solid grey; 
     67    width: 100%; 
     68    } 
     69 
     70    div.progressBar div.background { 
     71    background-color: #333; 
     72    height: 18px; 
     73    width: 0%; 
     74    } 
     75  </style> 
     76<h1>Editing <?= $model_name ?></h1> 
     77 
     78<?= error_messages_for("model") ?> 
     79<?= form("model", array(":action" => "edit",'submit_value' => "Update")) ?> 
     80 
     81<?= link_to("Show", array(":action" => "show", ":id" => $model->id)) ?> | 
     82<?= link_to("Back", array(":action" => "index")) ?> 
  • trunk/trax/vendor/trax/templates/scaffolds/index.phtml

    r72 r106  
     1  <style> 
     2    body { background-color: #fff; color: #333; } 
     3 
     4    body, p, ol, ul, td { 
     5      font-family: verdana, arial, helvetica, sans-serif; 
     6      font-size:   13px; 
     7      line-height: 18px; 
     8    } 
     9 
     10    pre { 
     11      background-color: #eee; 
     12      padding: 10px; 
     13      font-size: 11px; 
     14    } 
     15 
     16    a { color: #000; } 
     17    a:visited { color: #666; } 
     18    a:hover { color: #fff; background-color:#000; } 
     19 
     20    .fieldWithErrors { 
     21      padding: 2px; 
     22      background-color: red; 
     23      display: table; 
     24    } 
     25 
     26    #ErrorExplanation { 
     27      width: 400px; 
     28      border: 2px solid red; 
     29      padding: 7px; 
     30      padding-bottom: 12px; 
     31      margin-bottom: 20px; 
     32      background-color: #f0f0f0; 
     33    } 
     34 
     35    #ErrorExplanation h2 { 
     36      text-align: left; 
     37      font-weight: bold; 
     38      padding: 5px 5px 5px 15px; 
     39      font-size: 12px; 
     40      margin: -7px; 
     41      background-color: #c00; 
     42      color: #fff; 
     43    } 
     44 
     45    #ErrorExplanation p { 
     46      color: #333; 
     47      margin-bottom: 0; 
     48      padding: 5px; 
     49    } 
     50 
     51    #ErrorExplanation ul li { 
     52      font-size: 12px; 
     53      list-style: square; 
     54    } 
     55  </style> 
    156<h1>Listing <?= $model_name_plural ?></h1> 
    257 
     
    459<? if(count($models)): ?>  
    560    <tr>  
    6         <? foreach($table_info as $column): ?> 
     61        <? foreach($content_columns as $column): ?> 
    762            <th><?= $column['human_name'] ?></th> 
    863        <? endforeach; ?> 
    964    </tr> 
    1065   
    11     <? foreach($models as $model): ?>    
     66    <? foreach($models as $model): ?> 
    1267        <tr> 
    13             <? foreach($model->table_info as $column): ?> 
     68            <? foreach($model->content_columns as $column): ?> 
    1469                <td><?= $model->send($column['name']) ?></td> 
    15             <? endforeach; ?>                             
    16             <td><?= link_to('Show', $controller_name, array(":action" => 'show', ":id" => $model)) ?></td> 
    17             <td><?= link_to('Edit', $controller_name, array(":action" => 'edit', ":id" => $model)) ?></td> 
    18             <td><?= link_to('Delete', $controller_name, array(":action" => 'delete', ":id" => $model, ":confirm" => "Are you sure?")) ?></td> 
     70            <? endforeach; ?> 
     71            <td><?= link_to('Show', array(":action" => 'show', ":id" => $model)) ?></td> 
     72            <td><?= link_to('Edit', array(":action" => 'edit', ":id" => $model)) ?></td> 
     73            <td><?= link_to('Delete', array(":action" => 'delete', ":id" => $model, "confirm" => "Are you sure?")) ?></td> 
    1974        </tr> 
    2075    <? endforeach; ?> 
     
    2883<br /> 
    2984 
    30 <?= link_to('New post', $controller_name, array(":action" => 'add')) ?> 
     85<?= link_to('New post', array(":action" => 'add')) ?> 
  • trunk/trax/vendor/trax/templates/scaffolds/layout.phtml

    r95 r106  
    33<html> 
    44<head> 
    5   <title>Scaffolding</title> 
     5  <title>Scaffolding: </title> 
    66  <style> 
    77    body { background-color: #fff; color: #333; } 
    8  
     8     
    99    body, p, ol, ul, td { 
    10       font-family: verdana, arial, helvetica, sans-serif; 
    11       font-size:   13px; 
    12       line-height: 18px; 
     10    font-family: verdana, arial, helvetica, sans-serif; 
     11    font-size:   13px; 
     12    line-height: 18px; 
    1313    } 
    14  
     14     
    1515    pre { 
    16       background-color: #eee; 
    17       padding: 10px; 
    18       font-size: 11px; 
     16    background-color: #eee; 
     17    padding: 10px; 
     18    font-size: 11px; 
    1919    } 
    20  
     20     
    2121    a { color: #000; } 
    2222    a:visited { color: #666; } 
    2323    a:hover { color: #fff; background-color:#000; } 
    24  
     24     
    2525    .fieldWithErrors { 
    26       padding: 2px; 
    27       background-color: red; 
    28       display: table; 
     26    padding: 2px; 
     27    background-color: red; 
     28    display: table; 
    2929    } 
    30  
     30     
    3131    #ErrorExplanation { 
    32       width: 400px; 
    33       border: 2px solid 'red'; 
    34       padding: 7px; 
    35       padding-bottom: 12px; 
    36       margin-bottom: 20px; 
    37       background-color: #f0f0f0; 
     32    width: 400px; 
     33    border: 2px solid 'red'; 
     34    padding: 7px; 
     35    padding-bottom: 12px; 
     36    margin-bottom: 20px; 
     37    background-color: #f0f0f0; 
    3838    } 
    39  
     39     
    4040    #ErrorExplanation h2 { 
    41       text-align: left; 
    42       font-weight: bold; 
    43       padding: 5px 5px 5px 15px; 
    44       font-size: 12px; 
    45       margin: -7px; 
    46       background-color: #c00; 
    47       color: #fff; 
     41    text-align: left; 
     42    font-weight: bold; 
     43    padding: 5px 5px 5px 15px; 
     44    font-size: 12px; 
     45    margin: -7px; 
     46    background-color: #c00; 
     47    color: #fff; 
    4848    } 
    49  
     49     
    5050    #ErrorExplanation p { 
    51       color: #333; 
    52       margin-bottom: 0; 
    53       padding: 5px; 
     51    color: #333; 
     52    margin-bottom: 0; 
     53    padding: 5px; 
    5454    } 
    55  
     55     
    5656    #ErrorExplanation ul li { 
    57       font-size: 12px; 
    58       list-style: square; 
     57    font-size: 12px; 
     58    list-style: square; 
     59    } 
     60     
     61    div.uploadStatus { 
     62    margin: 5px; 
     63    } 
     64     
     65    div.progressBar { 
     66    margin: 5px; 
     67    } 
     68     
     69    div.progressBar div.border { 
     70    background-color: #fff; 
     71    border: 1px solid grey; 
     72    width: 100%; 
     73    } 
     74     
     75    div.progressBar div.background { 
     76    background-color: #333; 
     77    height: 18px; 
     78    width: 0%; 
    5979    } 
    6080  </style> 
  • trunk/trax/vendor/trax/templates/scaffolds/show.phtml

    r72 r106  
    1 <? foreach($model->table_info as $column): ?> 
     1  <style> 
     2    body { background-color: #fff; color: #333; } 
     3 
     4    body, p, ol, ul, td { 
     5      font-family: verdana, arial, helvetica, sans-serif; 
     6      font-size:   13px; 
     7      line-height: 18px; 
     8    } 
     9 
     10    pre { 
     11      background-color: #eee; 
     12      padding: 10px; 
     13      font-size: 11px; 
     14    } 
     15 
     16    a { color: #000; } 
     17    a:visited { color: #666; } 
     18    a:hover { color: #fff; background-color:#000; } 
     19 
     20    .fieldWithErrors { 
     21      padding: 2px; 
     22      background-color: red; 
     23      display: table; 
     24    } 
     25 
     26    #ErrorExplanation { 
     27      width: 400px; 
     28      border: 2px solid red; 
     29      padding: 7px; 
     30      padding-bottom: 12px; 
     31      margin-bottom: 20px; 
     32      background-color: #f0f0f0; 
     33    } 
     34 
     35    #ErrorExplanation h2 { 
     36      text-align: left; 
     37      font-weight: bold; 
     38      padding: 5px 5px 5px 15px; 
     39      font-size: 12px; 
     40      margin: -7px; 
     41      background-color: #c00; 
     42      color: #fff; 
     43    } 
     44 
     45    #ErrorExplanation p { 
     46      color: #333; 
     47      margin-bottom: 0; 
     48      padding: 5px; 
     49    } 
     50 
     51    #ErrorExplanation ul li { 
     52      font-size: 12px; 
     53      list-style: square; 
     54    } 
     55  </style> 
     56<? foreach($model->content_columns as $column): ?> 
    257  <p> 
    358    <b><?= $column['human_name'] ?>:</b> 
     
    661<? endforeach; ?> 
    762 
    8 <?= link_to("Edit", $controller_name, array(":action" => "edit", ":id" => $model)) ?> | 
    9 <?= link_to("Back", $controller_name, array(":action" => "index")) ?> 
     63<?= link_to("Edit", array(":action" => "edit", ":id" => $model)) ?> | 
     64<?= link_to("Back", array(":action" => "index")) ?>