Skip to Content.
Sympa Menu

comanage-dev - [comanage-dev] r626 - in registry/trunk/app: Controller Lib Model View/CoPeople View/OrgIdentities

Subject: COmanage Developers List

List archive

[comanage-dev] r626 - in registry/trunk/app: Controller Lib Model View/CoPeople View/OrgIdentities


Chronological Thread 
  • From:
  • To:
  • Subject: [comanage-dev] r626 - in registry/trunk/app: Controller Lib Model View/CoPeople View/OrgIdentities
  • Date: Sun, 27 Oct 2013 08:27:03 -0400

Author: benno
Date: 2013-10-27 08:27:03 -0400 (Sun, 27 Oct 2013)
New Revision: 626

Modified:
registry/trunk/app/Controller/CoGroupsController.php
registry/trunk/app/Lib/lang.php
registry/trunk/app/Model/CoEnrollmentAttribute.php
registry/trunk/app/View/CoPeople/fields.inc
registry/trunk/app/View/OrgIdentities/fields.inc
Log:
Additional fixes for CO-333

Modified: registry/trunk/app/Controller/CoGroupsController.php
===================================================================
--- registry/trunk/app/Controller/CoGroupsController.php 2013-10-25
22:56:55 UTC (rev 625)
+++ registry/trunk/app/Controller/CoGroupsController.php 2013-10-27
12:27:03 UTC (rev 626)
@@ -200,7 +200,7 @@
)
);
$coPerson['CoPerson']['CoGroupMember'] =
array($member['CoGroupMember']);
- $coPerson['CoPerson']['Name'] = $name['Name'];
+ $coPerson['CoPerson']['PrimaryName'] = $name['Name'];
$coPerson['CoPerson']['Status'] =
$member['CoPerson']['status'];
$member = array_merge($member, $coPerson);
}

Modified: registry/trunk/app/Lib/lang.php
===================================================================
--- registry/trunk/app/Lib/lang.php 2013-10-25 22:56:55 UTC (rev 625)
+++ registry/trunk/app/Lib/lang.php 2013-10-27 12:27:03 UTC (rev 626)
@@ -613,7 +613,7 @@
'fd.name.family' => 'Family Name',
'fd.name.suffix' => 'Suffix',
'fd.name.language' => 'Language',
- 'fd.name.primary' => 'Primary',
+ 'fd.name.primary_name' => 'Primary',
'fd.no' => 'No',
'fd.null' => 'Null',
'fd.o' => 'Organization',

Modified: registry/trunk/app/Model/CoEnrollmentAttribute.php
===================================================================
--- registry/trunk/app/Model/CoEnrollmentAttribute.php 2013-10-25 22:56:55
UTC (rev 625)
+++ registry/trunk/app/Model/CoEnrollmentAttribute.php 2013-10-27 12:27:03
UTC (rev 626)
@@ -464,8 +464,9 @@
&&
!$attrModel->validate[$k]['allowEmpty']);

- // We hide language, type, status, and verified
+ // We hide language, primary_name, type, status, and verified
$attr['hidden'] = ($k == 'language'
+ || $k == 'primary_name'
|| $k == 'type'
|| $k == 'status'
|| $k == 'verified' ? 1 : 0);
@@ -481,6 +482,14 @@
$attr['default'] = "";
}
break;
+ case 'primary_name':
+ // Official names are considered primary names, at least
for now
+ if($attr['attribute'] == 'i:name:O' || $attr['attribute']
== 'p:name:O') {
+ $attr['default'] = 1;
+ } else {
+ $attr['default'] = 0;
+ }
+ break;
case 'type':
// Just use $attrType
$attr['default'] = $attrType;

Modified: registry/trunk/app/View/CoPeople/fields.inc
===================================================================
--- registry/trunk/app/View/CoPeople/fields.inc 2013-10-25 22:56:55 UTC (rev
625)
+++ registry/trunk/app/View/CoPeople/fields.inc 2013-10-27 12:27:03 UTC (rev
626)
@@ -377,7 +377,7 @@
<?php
print generateCn($n)
. " ("
- . ($n['primary_name'] ? (_txt('fd.name.primary') . ",
") : "")
+ . ($n['primary_name'] ? (_txt('fd.name.primary_name')
. ", ") : "")
. _txt('en.name', null, $n['type'])
. (!empty($n['language']) ? (", " .
_txt('en.language', null, $n['language'])) : "")
. ")";
@@ -394,7 +394,7 @@
<?php
print generateCn($n)
. " ("
- . ($n['primary_name'] ? (_txt('fd.name.primary') . ",
") : "")
+ . ($n['primary_name'] ? (_txt('fd.name.primary_name')
. ", ") : "")
. _txt('en.name', null, $n['type'])
. (!empty($n['language']) ? (", " .
_txt('en.language', null, $n['language'])) : "")
. ")";
@@ -418,7 +418,7 @@
}

print " ("
- . ($n['primary_name'] ? (_txt('fd.name.primary') . ",
") : "")
+ . ($n['primary_name'] ? (_txt('fd.name.primary_name')
. ", ") : "")
. _txt('en.name', null, $n['type'])
. (!empty($n['language']) ? (", " .
_txt('en.language', null, $n['language'])) : "")
. ")";

Modified: registry/trunk/app/View/OrgIdentities/fields.inc
===================================================================
--- registry/trunk/app/View/OrgIdentities/fields.inc 2013-10-25 22:56:55
UTC (rev 625)
+++ registry/trunk/app/View/OrgIdentities/fields.inc 2013-10-27 12:27:03
UTC (rev 626)
@@ -232,7 +232,7 @@
</td>
</tr>
<?php else: // add ?>
- <?php foreach($org_identities[0]['PrimaryName'] as $n): ?>
+ <?php foreach($org_identities[0]['Name'] as $n): ?>
<div>
<div>
<?php
@@ -247,7 +247,7 @@
}

print " ("
- . ($n['primary_name'] ? (_txt('fd.name.primary') . ",
") : "")
+ . ($n['primary_name'] ? (_txt('fd.name.primary_name')
. ", ") : "")
. _txt('en.name', null, $n['type'])
. (!empty($n['language']) ? (", " .
_txt('en.language', null, $n['language'])) : "")
. ")";



  • [comanage-dev] r626 - in registry/trunk/app: Controller Lib Model View/CoPeople View/OrgIdentities, svnlog, 10/27/2013

Archive powered by MHonArc 2.6.16.

Top of Page