Changeset 46

Show
Ignore:
Timestamp:
05/24/08 11:30:09
Author:
nperriault
Message:

As of now, trunk is broken. Use branches to get stable versions.

  • Preparing upgrade symfonians to use symfony 1.1
  • Added local events alpha feature
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/apps/main/config/routing.yml

    r37 r46  
    6262  url:   /:from/connection/delete/:to/:id 
    6363  param: { module: utils, action: deleteConnection } 
     64 
     65# Local events 
     66local_event_delete: 
     67  url:   /local/:id/delete 
     68  param: { module: localEvents, action: delete } 
     69 
     70local_event_details: 
     71  url:   /local/event/:year/:month/:day/:slug 
     72  param: { module: localEvents, action: details } 
     73 
     74local_events_home: 
     75  url:   /local/* 
     76  param: { module: localEvents, action: home } 
    6477 
    6578# Events 
  • trunk/config/schema.yml

    r2 r46  
    105105    _attributes:      { phpName: Event } 
    106106    id: 
    107     type:           { type: varchar, size: 255, required: true, index: true } 
    108     source_model:   { type: varchar, size: 25, required: true } 
    109     source_name:    { type: varchar, size: 255, required: true } 
    110     source_slug:    { type: varchar, size: 255, required: true } 
    111     target_model:   { type: varchar, size: 255 } 
    112     target_name:    { type: varchar, size: 255 } 
    113     target_slug:    { type: varchar, size: 255 } 
    114     occured_at:     { type: timestamp, required: true, index: true } 
    115     is_admin:       { type: boolean, default: 0, index: true } 
     107    type:             { type: varchar, size: 255, required: true, index: true } 
     108    source_model:     { type: varchar, size: 25, required: true } 
     109    source_name:      { type: varchar, size: 255, required: true } 
     110    source_slug:      { type: varchar, size: 255, required: true } 
     111    target_model:     { type: varchar, size: 255 } 
     112    target_name:      { type: varchar, size: 255 } 
     113    target_slug:      { type: varchar, size: 255 } 
     114    occured_at:       { type: timestamp, required: true, index: true } 
     115    is_admin:         { type: boolean, default: 0, index: true } 
    116116    _indexes: 
    117       filter_index: [source_model, source_slug, occured_at, is_admin] 
     117      filter_index:   [source_model, source_slug, occured_at, is_admin] 
    118118   
    119119  jobs: 
     
    146146    _indexes: 
    147147      filter_index:   [recommender_id, recommended_id, created_at] 
     148 
     149  local_event: 
     150    _attributes:      { phpName: LocalEvent } 
     151    id: 
     152    owner_id:         { type: integer, foreignTable: sf_guard_user, foreignReference: id, required: true, onDelete: setnull } 
     153    title:            { type: varchar, size: 255, required: true, index: true } 
     154    slug:             { type: varchar, size: 255, required: true, index: true } 
     155    description:      { type: longvarchar, required: true } 
     156    city:             { type: varchar, size: 255, required: true, index: true } 
     157    country:          { type: varchar, size: 2, required: true, index: true } 
     158    start_at:         { type: timestamp, required: true, index: true } 
     159    end_at:           { type: timestamp, index: true } 
     160    created_at: 
     161    updated_at: 
  • trunk/data

    • Property svn:externals changed from symfony http://svn.symfony-project.com/branches/1.0/data to symfony http://svn.symfony-project.com/branches/1.1/data
  • trunk/data/fixtures/data.yml

    r37 r46  
    553553      project 
    554554    created_at:       "2007-11-01 00:00:00" 
     555 
     556LocalEvent: 
     557  ev1: 
     558    owner_id:         niko 
     559    title:            First event 
     560    description: > 
     561      blah blah blah 
     562    city:             Paris 
     563    country:          FR 
     564    start_at:         "2008-12-12 00:00:00" 
     565  ev2: 
     566    owner_id:         fabpot 
     567    title:            Second event 
     568    description: > 
     569      blah blah blah 
     570    city:             Paris 
     571    country:          FR 
     572    start_at:         "2009-01-01 00:00:00" 
  • trunk/lib

    • Property svn:externals changed from symfony http://svn.symfony-project.com/branches/1.0/lib to symfony http://svn.symfony-project.com/branches/1.1/lib
  • trunk/lib/helper/ObjectUrlHelper.php

    r2 r46  
    249249  return link_to($image, $route, $options); 
    250250} 
     251 
     252/** 
     253 * Generates url for a blog post 
     254 * 
     255 * @return string 
     256 */ 
     257function blog_post_url($local_event, $absolute = false) 
     258{ 
     259  $route = _gen_local_event_route($local_event); 
     260  return url_for($route, $absolute); 
     261} 
     262 
     263/** 
     264 * Generates a link to a blog post 
     265 * 
     266 * @param  LocalEvent $local_event 
     267 * @param  mixed      $options 
     268 * @return string 
     269 */ 
     270function link_to_local_event($local_event, $options = null) 
     271{ 
     272  $local_event_route = _gen_local_event_route($local_event); 
     273  return link_to($local_event->getTitle(), $local_event_route, $options); 
     274} 
     275 
     276/** 
     277 * Generates a link to a local event 
     278 * 
     279 * @param  LocalEvent $local_event 
     280 * @return string 
     281 */ 
     282function _gen_local_event_route($local_event) 
     283{ 
     284  if (is_null($local_event)) 
     285  { 
     286    return null; 
     287  } 
     288  if (!$local_event instanceof LocalEvent) 
     289  { 
     290    $local_event = $local_event->getRawValue(); 
     291  } 
     292  return $local_event->getRoute(); 
     293} 
  • trunk/plugins

    • Property svn:externals changed from sfPropelAlternativeSchemaPlugin http://svn.symfony-project.com/plugins/sfPropelAlternativeSchemaPlugin sfCSRFPlugin http://svn.symfony-project.com/plugins/sfCSRFPlugin sfWebBrowserPlugin http://svn.symfony-project.com/plugins/sfWebBrowserPlugin sfPagerNavigationPlugin http://svn.symfony-project.com/plugins/sfPagerNavigationPlugin sfFeed2Plugin http://svn.symfony-project.com/plugins/sfFeed2Plugin sfPropelMigrationsLightPlugin -r7087 http://svn.symfony-project.com/plugins/sfPropelMigrationsLightPlugin/trunk/ sfSwiftPlugin -r6447 http://svn.symfony-project.com/plugins/sfSwiftPlugin/trunk sfLucenePlugin -r7866 http://svn.symfony-project.com/plugins/sfLucenePlugin/branches/1.0 sfI18nExtractPlugin http://svn.symfony-project.com/plugins/sfI18nExtractPlugin to sfPropelAlternativeSchemaPlugin http://svn.symfony-project.com/plugins/sfPropelAlternativeSchemaPlugin sfWebBrowserPlugin http://svn.symfony-project.com/plugins/sfWebBrowserPlugin sfPagerNavigationPlugin http://svn.symfony-project.com/plugins/sfPagerNavigationPlugin sfFeed2Plugin http://svn.symfony-project.com/plugins/sfFeed2Plugin sfPropelMigrationsLightPlugin -r7087 http://svn.symfony-project.com/plugins/sfPropelMigrationsLightPlugin/trunk/ sfSwiftPlugin -r6447 http://svn.symfony-project.com/plugins/sfSwiftPlugin/trunk sfLucenePlugin -r7866 http://svn.symfony-project.com/plugins/sfLucenePlugin/branches/1.1
  • trunk/web

    • Property svn:externals changed from sf http://svn.symfony-project.com/branches/1.0/data/web/sf sfLucenePlugin http://svn.symfony-project.com/plugins/sfLucenePlugin/branches/1.0/web to sf http://svn.symfony-project.com/branches/1.1/data/web/sf sfLucenePlugin http://svn.symfony-project.com/plugins/sfLucenePlugin/branches/1.1/web