Author: liem_nguyen
Date: 2010-02-09 22:41:38 -0500 (Tue, 09 Feb 2010)
New Revision: 1603
Modified:
portal/trunk/portlet/exoadmin/src/main/webapp/groovy/navigation/webui/component/UINavigationGrid.gtmpl
portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/OrganizationUtils.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UIPageNavigationForm.java
Log:
GTNPORTAL-616 Remove navigtion description concept and use group description instead
Modified:
portal/trunk/portlet/exoadmin/src/main/webapp/groovy/navigation/webui/component/UINavigationGrid.gtmpl
===================================================================
---
portal/trunk/portlet/exoadmin/src/main/webapp/groovy/navigation/webui/component/UINavigationGrid.gtmpl 2010-02-10
02:25:10 UTC (rev 1602)
+++
portal/trunk/portlet/exoadmin/src/main/webapp/groovy/navigation/webui/component/UINavigationGrid.gtmpl 2010-02-10
03:41:38 UTC (rev 1603)
@@ -10,8 +10,7 @@
<div id="$uicomponent.id" class="FeedBox">
<%
boolean isEvenRow = true;
- for(navigation in navigations) {
- description = (navigation.getDescription()==null)? "" :
navigation.getDescription();
+ for(navigation in navigations) {
deleteLink =
parent.event("DeleteNavigation",String.valueOf(navigation.getId()));
editProperties =
parent.event("EditProperties",String.valueOf(navigation.getId()));
editLink =
parent.event("EditNavigation",String.valueOf(navigation.getId()));%>
@@ -20,7 +19,7 @@
<td class="Image"><img
src="/exoadmin/skin/navigation/webui/component/background/GroupImage.png"
alt="" /></td>
<td class="Content">
<div class="Label" title="$navigation.ownerId"><%=
OrganizationUtils.getGroupLabel(navigation.ownerId) %></div>
-
<div><%=_ctx.appRes("UIGroupNavigationManagement.Label.Description")%>:
<%= description%></div>
+
<div><%=_ctx.appRes("UIGroupNavigationManagement.Label.Description")%>:
<%= OrganizationUtils.getGroupDescription(navigation.ownerId) %></div>
</td>
<td class="ActionBlock">
<a href="<%=editLink%>"
class="EditNavIcon"><%=_ctx.appRes("UIGroupNavigationManagement.Label.EditNavigation")%></a>
Modified:
portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/OrganizationUtils.java
===================================================================
---
portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/OrganizationUtils.java 2010-02-10
02:25:10 UTC (rev 1602)
+++
portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/OrganizationUtils.java 2010-02-10
03:41:38 UTC (rev 1603)
@@ -49,5 +49,18 @@
cachedGroupLabel = (label != null && label.trim().length() > 0 )? label
: group.getGroupName();
return cachedGroupLabel;
}
+
+ static public String getGroupDescription(String groupId) throws Exception {
+ WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
+ ExoContainer container =
context.getApplication().getApplicationServiceContainer();
+ OrganizationService orgService =
+
(OrganizationService)container.getComponentInstanceOfType(OrganizationService.class);
+ String description = "";
+ Group group = orgService.getGroupHandler().findGroupById(groupId);
+ if (group != null) {
+ description = group.getDescription();
+ }
+ return description;
+ }
}
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UIPageNavigationForm.java
===================================================================
---
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UIPageNavigationForm.java 2010-02-10
02:25:10 UTC (rev 1602)
+++
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UIPageNavigationForm.java 2010-02-10
03:41:38 UTC (rev 1603)
@@ -40,8 +40,6 @@
import org.exoplatform.webui.form.UIForm;
import org.exoplatform.webui.form.UIFormSelectBox;
import org.exoplatform.webui.form.UIFormStringInput;
-import org.exoplatform.webui.form.UIFormTextAreaInput;
-import org.exoplatform.webui.form.validator.StringLengthValidator;
import java.util.ArrayList;
import java.util.List;
@@ -62,8 +60,6 @@
private String ownerId;
- private String description;
-
private String ownerType;
private String priority;
@@ -82,8 +78,6 @@
}
addUIFormInput(new UIFormStringInput("ownerType", "ownerType",
getOwnerType()).setEditable(false))
.addUIFormInput(new UIFormStringInput("ownerId", "ownerId",
ownerId).setEditable(false)).addUIFormInput(
- new UIFormTextAreaInput("description", "description",
getDescription()).addValidator(
- StringLengthValidator.class, 0, 255)).addUIFormInput(
new UIFormSelectBox("priority", null,
priorties).setValue(getPriority()));
}
@@ -91,8 +85,7 @@
{
setPageNav(pageNavigation);
invokeGetBindingBean(pageNavigation);
- removeChildById("ownerId");
- // getUIStringInput("creator").setValue(pageNavigation.getCreator());
+ removeChildById("ownerId");
UIFormStringInput ownerId = new UIFormStringInput("ownerId",
"ownerId", pageNavigation.getOwnerId());
ownerId.setEditable(false);
ownerId.setParent(this);
@@ -111,16 +104,6 @@
return ownerId;
}
- public void setDescription(String description)
- {
- this.description = description;
- }
-
- public String getDescription()
- {
- return description;
- }
-
public void setOwnerType(String ownerType)
{
this.ownerType = ownerType;
Show replies by date