Added application/package name
authorMarcel Werk <burntime@woltlab.com>
Thu, 13 Jun 2013 17:16:49 +0000 (19:16 +0200)
committerMarcel Werk <burntime@woltlab.com>
Thu, 13 Jun 2013 17:16:49 +0000 (19:16 +0200)
wcfsetup/install/files/acp/templates/dashboardOption.tpl
wcfsetup/install/files/lib/data/dashboard/box/DashboardBox.class.php

index 74bc6d8c8ab82cb8178524408322875809d25061..d14b57fdd71a13648fd8e5d54ed4f58ffb3d2516 100644 (file)
@@ -49,7 +49,7 @@
                                                {foreach from=$enabledBoxes item=boxID}
                                                        {if $boxes[$boxID]->boxType == 'content'}
                                                                <li class="sortableNode" data-object-id="{@$boxID}">
-                                                                       <span class="sortableNodeLabel">{lang}wcf.dashboard.box.{$boxes[$boxID]->boxName}{/lang}</span>
+                                                                       <span class="sortableNodeLabel">{lang}wcf.dashboard.box.{$boxes[$boxID]->boxName}{/lang}{if $boxes[$boxID]->packageID != 1} ({lang}{$boxes[$boxID]->getPackage()->packageName}{/lang}){/if}</span>
                                                                </li>
                                                        {/if}
                                                {/foreach}
@@ -65,7 +65,7 @@
                                                {foreach from=$boxes item=box}
                                                        {if $box->boxType == 'content' && !$box->boxID|in_array:$enabledBoxes}
                                                                <li class="sortableNode" data-object-id="{@$box->boxID}">
-                                                                       <span class="sortableNodeLabel">{lang}wcf.dashboard.box.{$box->boxName}{/lang}</span>
+                                                                       <span class="sortableNodeLabel">{lang}wcf.dashboard.box.{$box->boxName}{/lang}{if $box->packageID != 1} ({lang}{$box->getPackage()->packageName}{/lang}){/if}</span>
                                                                </li>
                                                        {/if}
                                                {/foreach}
@@ -97,7 +97,7 @@
                                                {foreach from=$enabledBoxes item=boxID}
                                                        {if $boxes[$boxID]->boxType == 'sidebar'}
                                                                <li class="sortableNode" data-object-id="{@$boxID}">
-                                                                       <span class="sortableNodeLabel">{lang}wcf.dashboard.box.{$boxes[$boxID]->boxName}{/lang}</span>
+                                                                       <span class="sortableNodeLabel">{lang}wcf.dashboard.box.{$boxes[$boxID]->boxName}{/lang}{if $boxes[$boxID]->packageID != 1} ({lang}{$boxes[$boxID]->getPackage()->packageName}{/lang}){/if}</span>
                                                                </li>
                                                        {/if}
                                                {/foreach}
                                                {foreach from=$boxes item=box}
                                                        {if $box->boxType == 'sidebar' && !$box->boxID|in_array:$enabledBoxes}
                                                                <li class="sortableNode" data-object-id="{@$box->boxID}">
-                                                                       <span class="sortableNodeLabel">{lang}wcf.dashboard.box.{$box->boxName}{/lang}</span>
+                                                                       <span class="sortableNodeLabel">{lang}wcf.dashboard.box.{$box->boxName}{/lang}{if $box->packageID != 1} ({lang}{$box->getPackage()->packageName}{/lang}){/if}</span>
                                                                </li>
                                                        {/if}
                                                {/foreach}
index 40b3b2e95c6165084c6223eda8be4d6eb3aba3cb..7e67ca813c4937f0bd390dbca005a903badbb16b 100644 (file)
@@ -1,5 +1,6 @@
 <?php
 namespace wcf\data\dashboard\box;
+use wcf\data\package\PackageCache;
 use wcf\data\DatabaseObject;
 
 /**
@@ -22,4 +23,13 @@ class DashboardBox extends DatabaseObject {
         * @see wcf\data\DatabaseObject::$databaseTableIndexName
         */
        protected static $databaseTableIndexName = 'boxID';
+       
+       /**
+        * Returns the owner of this dashboard box.
+        * 
+        * @return wcf\data\package\Package
+        */
+       public function getPackage() {
+               return PackageCache::getInstance()->getPackage($this->packageID);
+       }
 }