Changeset 3622

Show
Ignore:
Timestamp:
01/24/08 22:06:03 (2 years ago)
Author:
pookey
Message:

Changes for the new download page.

Location:
website
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • website/apps/frontend/modules/main/actions/actions.class.php

    r3364 r3622  
    3131  public function executeDownload() 
    3232  { 
    33      
     33    $this->releases = Doctrine::getTable('ApiRelease')->findAll(); 
    3434  } 
    3535   
  • website/apps/frontend/modules/main/templates/downloadSuccess.php

    r3351 r3622  
    11<div id="download_page"> 
    22  <h1 class="title">Download</h1> 
    3    
    4   <div id="download_links> 
    5     <?php echo get_partial('download'); ?> 
    6     <ul> 
    7       <li>svn co <?php echo link_to('http://svn.phpdoctrine.org/trunk', 'http://svn.phpdoctrine.org/trunk'); ?> .</li> 
    8     </ul> 
     3 
     4  <div id="download_links">  
     5      <?php foreach ($releases as $release): ?> 
     6        <h2> 
     7          Doctrine <?php echo $release->getName(); ?> 
     8          <?php if ($release->getLatest()): ?> 
     9            (latest) 
     10          <?php endif; ?> 
     11        </h2> 
     12 
     13        <ul style="margin-left: 30px; list-style: square;"> 
     14          <li>svn co <?php echo link_to($release->getSvnUrl(), $release->getSvnUrl()); ?> .</li> 
     15          <li><?php echo link_to($release->getPackageFileName(), $release->getPackageRoute()); ?></li> 
     16        </ul> 
     17      <?php endforeach; ?> 
    918  </div> 
    10    
     19 
     20  <h2>Doctrine through svn:externals</h2> 
     21 
     22  <pre><code> 
     23    $ svn propedit svn:externals /path/to/project 
     24 
     25    doctrine http://svn.phpdoctrine.org/trunk 
     26  </code></pre> 
     27 
    1128  <h2>After Downloading</h2> 
    1229   
     
    2239    </ul> 
    2340  </div> 
     41 
     42  <h2>Get started with Sandbox</h2> 
     43 
     44  <p>The sandbox is a sample implementation of the Doctrine ORM framework in a ready to use web application setup. 
     45     It uses a sqlite database that is ready to use out-of-the-box.</p> 
     46 
     47  <pre><code> 
     48    // Checkout from svn 
     49    $ svn co http://svn.phpdoctrine.org/trunk doctrine 
     50 
     51    // Move in to the sandbox directory 
     52    $ cd doctrine/tools/sandbox 
     53 
     54    // Write your schema files 
     55    $ vi schema/user.yml 
     56 
     57    // Sample user schema file 
     58    --- 
     59    User: 
     60      columns: 
     61        username: string(255) 
     62        password: string(255) 
     63 
     64    $ vi data/fixtures/data.yml 
     65 
     66    // Sample user data fixtures 
     67    --- 
     68    User: 
     69      jwage: 
     70        username: jwage 
     71        password: changeme 
     72      zYne-: 
     73       username: zYne- 
     74       password: changeme 
     75 
     76    // Build everything. Will drop databases(if they exist), generate models,  
     77    // create databases, create all tables, and load all fixtures data 
     78 
     79    $ ./doctrine build-all-reload 
     80 
     81    // Will generate models in doctrine/tools/sandbox/models 
     82    // Take a peak at doctrine/tools/sandbox/models/generated/BaseUser.class.php to see the generated class. 
     83    // You can modify doctrine/tools/sandbox/models/User.class.php to add your own custom php code to the model 
     84    // Start using your models 
     85 
     86    $ vi index.php 
     87 
     88    require_once('config.php'); 
     89 
     90    $user = Doctrine::getTable('User')->findOneByUsername('jwage'); 
     91    echo $user->username; // prints jwage 
     92 
     93    // Query your models with DQL from the command line 
     94 
     95    $ ./doctrine dql "FROM User u WHERE u.username = ?" jwage 
     96  </code></pre> 
    2497</div> 
  • website/lib/model/doctrine/ApiRelease.class.php

    r3054 r3622  
    77class ApiRelease extends BaseApiRelease 
    88{ 
    9    
     9  public function getPackageFileName() 
     10  { 
     11    return 'Doctrine' . $this->getName() . '.tgz'; 
     12  } 
     13 
     14  public function getPackageRoute() 
     15  { 
     16    return 'htp://www.phpdoctrine.org/download/' . $this->getPackageFileName(); 
     17  } 
     18 
     19  public function getSvnUrl() 
     20  { 
     21    return 'http://svn.phpdoctrine.org' . $this->getSvnPath(); 
     22  } 
    1023} 
  • website/web/css/layout.css

    r3616 r3622  
    9393#key-features ul { margin-left: 30px; } 
    9494#key-features ul li { list-style: square; } 
     95 
     96pre { border: 1px solid #CCCCCC; background-color: #F5F5F5; overflow: auto; margin: 0 15px 15px 30px; }