Author: khiramatsu
Date: 2010-05-10 22:59:04 +0200 (Mon, 10 May 2010)
New Revision: 29404

Added:
   plugins/sfSimpleCommentPlugin/modules/sfSimpleCommentAdmin/
   plugins/sfSimpleCommentPlugin/modules/sfSimpleCommentAdmin/actions/
   
plugins/sfSimpleCommentPlugin/modules/sfSimpleCommentAdmin/actions/actions.class.php
   plugins/sfSimpleCommentPlugin/modules/sfSimpleCommentAdmin/config/
   
plugins/sfSimpleCommentPlugin/modules/sfSimpleCommentAdmin/config/generator.yml
   plugins/sfSimpleCommentPlugin/modules/sfSimpleCommentAdmin/lib/
   
plugins/sfSimpleCommentPlugin/modules/sfSimpleCommentAdmin/lib/sfSimpleCommentAdminGeneratorConfiguration.class.php
   
plugins/sfSimpleCommentPlugin/modules/sfSimpleCommentAdmin/lib/sfSimpleCommentAdminGeneratorHelper.class.php
   plugins/sfSimpleCommentPlugin/modules/sfSimpleCommentAdmin/templates/
   
plugins/sfSimpleCommentPlugin/modules/sfSimpleCommentAdmin/templates/_body.php
   plugins/sfSimpleCommentPlugin/modules/sfSimpleCommentAdmin/templates/_id.php
   
plugins/sfSimpleCommentPlugin/modules/sfSimpleCommentAdmin/templates/_user.php
Modified:
   plugins/sfSimpleCommentPlugin/lib/sfSimpleCommentRouting.class.php
Log:
basic backend for comments management

Modified: plugins/sfSimpleCommentPlugin/lib/sfSimpleCommentRouting.class.php
===================================================================
--- plugins/sfSimpleCommentPlugin/lib/sfSimpleCommentRouting.class.php  
2010-05-10 13:58:20 UTC (rev 29403)
+++ plugins/sfSimpleCommentPlugin/lib/sfSimpleCommentRouting.class.php  
2010-05-10 20:59:04 UTC (rev 29404)
@@ -19,5 +19,17 @@
       'with_wildcard_routes'  => false,
       'actions'               => array('create', 'delete'),
     )));
+
+    $event->getSubject()->prependRoute('sf_simple_comment_admin', new 
sfDoctrineRouteCollection(array(
+      'name'                  => 'sf_simple_comment_admin',
+      'model'                 => 'sfSimpleComment',
+      'module'                => 'sfSimpleCommentAdmin',
+      'column'                => 'id',
+      'prefix_path'           => 'sf_simple_comment_admin',
+      'with_wildcard_routes'  => true,
+      'collection_actions'    => array('filter' => 'post', 'batch' => 'post'),
+      'actions'               => array('list', 'delete', 'edit'),
+    )));
+
   }
 }

Added: 
plugins/sfSimpleCommentPlugin/modules/sfSimpleCommentAdmin/actions/actions.class.php
===================================================================
--- 
plugins/sfSimpleCommentPlugin/modules/sfSimpleCommentAdmin/actions/actions.class.php
                                (rev 0)
+++ 
plugins/sfSimpleCommentPlugin/modules/sfSimpleCommentAdmin/actions/actions.class.php
        2010-05-10 20:59:04 UTC (rev 29404)
@@ -0,0 +1,18 @@
+<?php
+
+//require_once 
dirname(__FILE__).'/../lib/BasesfSimpleCommentAdminActions.class.php';
+
+require_once 
dirname(__FILE__).'/../lib/sfSimpleCommentAdminGeneratorConfiguration.class.php';
+require_once 
dirname(__FILE__).'/../lib/sfSimpleCommentAdminGeneratorHelper.class.php';
+
+/**
+ * sfSimpleCommentAdmin actions.
+ * 
+ * @package    sfSimpleCommentPlugin
+ * @subpackage sfSimpleCommentAdmin
+ * @author     Your name here
+ * @version    SVN: $Id: actions.class.php 12534 2008-11-01 13:38:27Z 
Kris.Wallsmith $
+ */
+class sfSimpleCommentAdminActions extends autoSfSimpleCommentAdminActions
+{
+}

Added: 
plugins/sfSimpleCommentPlugin/modules/sfSimpleCommentAdmin/config/generator.yml
===================================================================
--- 
plugins/sfSimpleCommentPlugin/modules/sfSimpleCommentAdmin/config/generator.yml 
                            (rev 0)
+++ 
plugins/sfSimpleCommentPlugin/modules/sfSimpleCommentAdmin/config/generator.yml 
    2010-05-10 20:59:04 UTC (rev 29404)
@@ -0,0 +1,26 @@
+generator:
+  class: sfDoctrineGenerator
+  param:
+    model_class:           sfSimpleComment
+    theme:                 admin
+    non_verbose_templates: true
+    with_show:             false
+    singular:              ~
+    plural:                ~
+    route_prefix:          sf_simple_comment_admin
+    with_doctrine_route:   true
+    actions_base_class:    sfActions
+
+    config:
+      actions: []
+      fields:  ~
+      list:
+        display: [_id, _user, _body, created_at, updated_at]
+        sort:   [updated_at, desc]
+        actions: []
+        object_actions:
+          _delete: ~
+      filter:  ~
+      form:    ~
+      edit:    ~
+      new:     ~

Added: 
plugins/sfSimpleCommentPlugin/modules/sfSimpleCommentAdmin/lib/sfSimpleCommentAdminGeneratorConfiguration.class.php
===================================================================
--- 
plugins/sfSimpleCommentPlugin/modules/sfSimpleCommentAdmin/lib/sfSimpleCommentAdminGeneratorConfiguration.class.php
                         (rev 0)
+++ 
plugins/sfSimpleCommentPlugin/modules/sfSimpleCommentAdmin/lib/sfSimpleCommentAdminGeneratorConfiguration.class.php
 2010-05-10 20:59:04 UTC (rev 29404)
@@ -0,0 +1,13 @@
+<?php
+
+/**
+ * comment module configuration.
+ *
+ * @package    rankingzdrowia.pl
+ * @subpackage comment
+ * @author     Crimson Oak
+ * @version    SVN: $Id: configuration.php 23810 2009-11-12 11:07:44Z 
Kris.Wallsmith $
+ */
+class sfSimpleCommentAdminGeneratorConfiguration extends 
BaseSfSimpleCommentAdminGeneratorConfiguration
+{
+}

Added: 
plugins/sfSimpleCommentPlugin/modules/sfSimpleCommentAdmin/lib/sfSimpleCommentAdminGeneratorHelper.class.php
===================================================================
--- 
plugins/sfSimpleCommentPlugin/modules/sfSimpleCommentAdmin/lib/sfSimpleCommentAdminGeneratorHelper.class.php
                                (rev 0)
+++ 
plugins/sfSimpleCommentPlugin/modules/sfSimpleCommentAdmin/lib/sfSimpleCommentAdminGeneratorHelper.class.php
        2010-05-10 20:59:04 UTC (rev 29404)
@@ -0,0 +1,13 @@
+<?php
+
+/**
+ * comment module helper.
+ *
+ * @package    rankingzdrowia.pl
+ * @subpackage comment
+ * @author     Crimson Oak
+ * @version    SVN: $Id: helper.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
+ */
+class sfSimpleCommentAdminGeneratorHelper extends 
BaseSfSimpleCommentAdminGeneratorHelper
+{
+}

Added: 
plugins/sfSimpleCommentPlugin/modules/sfSimpleCommentAdmin/templates/_body.php
===================================================================
--- 
plugins/sfSimpleCommentPlugin/modules/sfSimpleCommentAdmin/templates/_body.php  
                            (rev 0)
+++ 
plugins/sfSimpleCommentPlugin/modules/sfSimpleCommentAdmin/templates/_body.php  
    2010-05-10 20:59:04 UTC (rev 29404)
@@ -0,0 +1,3 @@
+<?php 
+
+echo substr($sf_simple_comment->getBody(), 0, 
128).(strlen($sf_simple_comment->getBody() > 128) ? '...' : null); ?>

Added: 
plugins/sfSimpleCommentPlugin/modules/sfSimpleCommentAdmin/templates/_id.php
===================================================================
--- 
plugins/sfSimpleCommentPlugin/modules/sfSimpleCommentAdmin/templates/_id.php    
                            (rev 0)
+++ 
plugins/sfSimpleCommentPlugin/modules/sfSimpleCommentAdmin/templates/_id.php    
    2010-05-10 20:59:04 UTC (rev 29404)
@@ -0,0 +1,3 @@
+<?php 
+
+echo $sf_simple_comment->getId();

Added: 
plugins/sfSimpleCommentPlugin/modules/sfSimpleCommentAdmin/templates/_user.php
===================================================================
--- 
plugins/sfSimpleCommentPlugin/modules/sfSimpleCommentAdmin/templates/_user.php  
                            (rev 0)
+++ 
plugins/sfSimpleCommentPlugin/modules/sfSimpleCommentAdmin/templates/_user.php  
    2010-05-10 20:59:04 UTC (rev 29404)
@@ -0,0 +1,3 @@
+<?php
+
+echo link_to($sf_simple_comment->getUser()->getUsername(), 
'sf_guard_user_edit', $sf_simple_comment->getUser());

-- 
You received this message because you are subscribed to the Google Groups 
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/symfony-svn?hl=en.

Reply via email to