Skip to Content.
Sympa Menu

comanage-dev - Re: [comanage-dev] next odd feature

Subject: COmanage Developers List

List archive

Re: [comanage-dev] next odd feature


Chronological Thread 
  • From: Marie Huynh <>
  • To: Heather Flanagan <>
  • Cc:
  • Subject: Re: [comanage-dev] next odd feature
  • Date: Sun, 22 Apr 2012 23:38:38 -0400

I did some poking around.  This is a weird case.  The title is set in the CoGroupsController.php(line 272):

  function select() {
    // Set page title
    $this->set('title_for_layout', _txt('op.select-a', array(_txt('ct.co_groups.1'))));

This isn't actually used in the view for the select page though.  I changed it to set $name_for_title to hold the name.  Problem: I don't know why  _txt('op.gr.memadd', $name_for_title) only returns the first letter of the name; $name_for_title holds the whole first/last name.  See diff:

solanum:app marie$ svn diff --changelist titlename
Index: Controller/CoGroupsController.php
===================================================================
--- Controller/CoGroupsController.php (revision 287)
+++ Controller/CoGroupsController.php (working copy)
@@ -270,8 +270,8 @@
    */
   
   function select() {
-    // Set page title
-    $this->set('title_for_layout', _txt('op.select-a', array(_txt('ct.co_groups.1'))));
+    // Set name for page title
+    $this->set('name_for_title', Sanitize::html(generateCn($this->Session->read('Auth.User.name'))));
 
     // XXX proper authz here is probably something like "(all open CO groups
     // and all CO groups that I own) that CO Person isn't already a member of)"
Index: Lib/lang.php
===================================================================
--- Lib/lang.php (revision 287)
+++ Lib/lang.php (working copy)
@@ -411,7 +411,7 @@
   'op.edit-f' =>      'Edit %1$s for %2$s',
   'op.enroll' =>      'Enroll',
   'op.find.inv' =>    'Find a Person to Invite to %1$s',
-  'op.gr.memadd' =>   'Add Person %1$s to Group',
+  'op.gr.memadd' =>   'Add %1$s to Group',
   'op.grm.add' =>     'Add Person to %1$s Group %2$s',
   'op.inv' =>         'Invite',
   'op.inv-a' =>       'Invite %1$s',
Index: View/CoGroups/index.ctp
===================================================================
--- View/CoGroups/index.ctp (revision 288)
+++ View/CoGroups/index.ctp (working copy)
@@ -25,7 +25,7 @@
 <?php
   if($this->action == 'select') {
     $params = array('title' => _txt('op.gr.memadd',
-                                    array($this->request->params['named']['copersonid'])
+                                    $name_for_title
                                    )
                    );
   } else {
solanum:app marie$ 

*scratches head*

Marie



On Sun, Apr 22, 2012 at 1:26 PM, Heather Flanagan <> wrote:
I'm not sure if this is just a problem with the code on demo, or if this
is a bug I should really file:

1 - Go to My Population
2 - Select CO
3 - Click on a pencil to edit a user
4 - Click on Group
Header to the add-to-a-group page is "Add Person 4 to Group" where as in
other add/edit spots it something like "Edit "Ernst Karl Abbe"" or "Add
a New CO Person Role (Ernst Karl Abbe)"

Should say the person's name, not "Person #"

-Heather




Archive powered by MHonArc 2.6.16.

Top of Page