Changeset 46
- Timestamp:
- 05/24/08 11:30:09
- Files:
-
- trunk/apps/main/config/routing.yml (modified) (1 diff)
- trunk/apps/main/modules/localEvents (added)
- trunk/apps/main/modules/localEvents/actions (added)
- trunk/apps/main/modules/localEvents/actions/actions.class.php (added)
- trunk/apps/main/modules/localEvents/config (added)
- trunk/apps/main/modules/localEvents/lib (added)
- trunk/apps/main/modules/localEvents/templates (added)
- trunk/apps/main/modules/localEvents/templates/homeSuccess.php (added)
- trunk/apps/main/modules/localEvents/validate (added)
- trunk/config/schema.yml (modified) (2 diffs)
- trunk/data (modified) (1 prop)
- trunk/data/fixtures/data.yml (modified) (1 diff)
- trunk/lib (modified) (1 prop)
- trunk/lib/helper/ObjectUrlHelper.php (modified) (1 diff)
- trunk/lib/model/LocalEvent.php (added)
- trunk/lib/model/LocalEventPeer.php (added)
- trunk/plugins (modified) (1 prop)
- trunk/plugins/sfGuardPlugin (deleted)
- trunk/test/functional/main/localEventsActionsTest.php (added)
- trunk/web (modified) (1 prop)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/apps/main/config/routing.yml
r37 r46 62 62 url: /:from/connection/delete/:to/:id 63 63 param: { module: utils, action: deleteConnection } 64 65 # Local events 66 local_event_delete: 67 url: /local/:id/delete 68 param: { module: localEvents, action: delete } 69 70 local_event_details: 71 url: /local/event/:year/:month/:day/:slug 72 param: { module: localEvents, action: details } 73 74 local_events_home: 75 url: /local/* 76 param: { module: localEvents, action: home } 64 77 65 78 # Events trunk/config/schema.yml
r2 r46 105 105 _attributes: { phpName: Event } 106 106 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 } 116 116 _indexes: 117 filter_index: [source_model, source_slug, occured_at, is_admin]117 filter_index: [source_model, source_slug, occured_at, is_admin] 118 118 119 119 jobs: … … 146 146 _indexes: 147 147 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 553 553 project 554 554 created_at: "2007-11-01 00:00:00" 555 556 LocalEvent: 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 249 249 return link_to($image, $route, $options); 250 250 } 251 252 /** 253 * Generates url for a blog post 254 * 255 * @return string 256 */ 257 function 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 */ 270 function 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 */ 282 function _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
