Skip to Content.
Sympa Menu

comanage-dev - [comanage-dev] r606 - registry/trunk/app/View/CoPetitions

Subject: COmanage Developers List

List archive

[comanage-dev] r606 - registry/trunk/app/View/CoPetitions


Chronological Thread 
  • From:
  • To:
  • Subject: [comanage-dev] r606 - registry/trunk/app/View/CoPetitions
  • Date: Wed, 18 Sep 2013 14:31:20 -0400

Author: marie
Date: 2013-09-18 14:31:20 -0400 (Wed, 18 Sep 2013)
New Revision: 606

Modified:
registry/trunk/app/View/CoPetitions/petition-attributes.inc
Log:
CO686 - group petition descriptions when duplicated

Modified: registry/trunk/app/View/CoPetitions/petition-attributes.inc
===================================================================
--- registry/trunk/app/View/CoPetitions/petition-attributes.inc 2013-09-18
03:19:13 UTC (rev 605)
+++ registry/trunk/app/View/CoPetitions/petition-attributes.inc 2013-09-18
18:31:20 UTC (rev 606)
@@ -93,6 +93,22 @@
<div class="ui-widget modelbox">
<div class = "boxtitle">
<b><?php print $m ?></b>
+ <?php
+ // Only print the description once if it's the same for all items
+ $groupDesc = false; // Not grouping by default
+ $descriptions = array();
+
+ foreach($coe_attributes as $ea) {
+ $descriptions[] = $ea['description'];
+ }
+ $descTypeCount = count(array_count_values($descriptions));
+
+ if($descTypeCount == 1 &&
!empty($coe_attributes[0]['description'])) {
+ print "</br>\n<font class=\"desc\">" . $ea['description'] .
"</font>\n";
+ $groupDesc = true; // Set flag for later
+ }
+ ?>
+
</div>
<table id="<?php print $this->action; ?>_co_petition_attrs_<?php print
$m?>" class="ui-widget">
<tbody>
@@ -123,7 +139,8 @@
}

if(isset($ea['description'])
- && $ea['description'] != "") {
+ && !$groupDesc
+ && $ea['description'] != "") {
print "</br>\n<font class=\"desc\">" .
$ea['description'] . "</font>\n";
}
?>



  • [comanage-dev] r606 - registry/trunk/app/View/CoPetitions, svnlog, 09/18/2013

Archive powered by MHonArc 2.6.16.

Top of Page