Improved property checker.
This commit is contained in:
parent
18d1cec4dd
commit
c486b99cf9
2 changed files with 13 additions and 13 deletions
|
@ -90,8 +90,8 @@ public class PropertyChecker
|
||||||
this.organizationRules.add("organization.contact.email", EMAIL, PropertyMode.WISHED);
|
this.organizationRules.add("organization.contact.email", EMAIL, PropertyMode.WISHED);
|
||||||
this.organizationRules.add("organization.legal", URL, PropertyMode.WISHED);
|
this.organizationRules.add("organization.legal", URL, PropertyMode.WISHED);
|
||||||
this.organizationRules.add("organization.legal.url", URL, PropertyMode.WISHED);
|
this.organizationRules.add("organization.legal.url", URL, PropertyMode.WISHED);
|
||||||
this.organizationRules.add("organization.technical", URL, PropertyMode.WISHED);
|
this.organizationRules.add("organization.guide.user", URL, PropertyMode.WISHED);
|
||||||
this.organizationRules.add("organization.technical.url", URL, PropertyMode.WISHED);
|
this.organizationRules.add("organization.guide.technical", URL, PropertyMode.WISHED);
|
||||||
this.organizationRules.add("organization.startdate", DATE, PropertyMode.WISHED);
|
this.organizationRules.add("organization.startdate", DATE, PropertyMode.WISHED);
|
||||||
this.organizationRules.add("organization.enddate", DATE, PropertyMode.OPTIONAL);
|
this.organizationRules.add("organization.enddate", DATE, PropertyMode.OPTIONAL);
|
||||||
|
|
||||||
|
|
|
@ -68,25 +68,25 @@ public class CategoriesView
|
||||||
for (Category category : categories)
|
for (Category category : categories)
|
||||||
{
|
{
|
||||||
data.setAttribute("category", index, "categoryLink", "href", "category-" + category.getTechnicalName() + ".xhtml");
|
data.setAttribute("category", index, "categoryLink", "href", "category-" + category.getTechnicalName() + ".xhtml");
|
||||||
|
|
||||||
|
if (mode == Mode.ALL)
|
||||||
|
{
|
||||||
data.setAttribute("category", index, "categoryLink", "title", category.getDescription());
|
data.setAttribute("category", index, "categoryLink", "title", category.getDescription());
|
||||||
|
|
||||||
if ((mode == Mode.ALL) || (mode == Mode.ICONS_ONLY))
|
|
||||||
{
|
|
||||||
data.setAttribute("category", index, "categoryLogo", "src", category.getLogoPath());
|
data.setAttribute("category", index, "categoryLogo", "src", category.getLogoPath());
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
data.setAttribute("category", index, "categoryLogo", "class", "xid:nodisplay");
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((mode == Mode.ALL) || (mode == Mode.LABELS_ONLY))
|
|
||||||
{
|
|
||||||
data.setEscapedContent("category", index, "categoryName", category.getName());
|
data.setEscapedContent("category", index, "categoryName", category.getName());
|
||||||
}
|
}
|
||||||
else
|
else if (mode == Mode.ICONS_ONLY)
|
||||||
{
|
{
|
||||||
|
data.setAttribute("category", index, "categoryLink", "title", category.getName());
|
||||||
|
data.setAttribute("category", index, "categoryLogo", "src", category.getLogoPath());
|
||||||
data.setAttribute("category", index, "categoryName", "class", "xid:nodisplay");
|
data.setAttribute("category", index, "categoryName", "class", "xid:nodisplay");
|
||||||
}
|
}
|
||||||
|
else if (mode == Mode.LABELS_ONLY)
|
||||||
|
{
|
||||||
|
data.setAttribute("category", index, "categoryLink", "title", category.getDescription());
|
||||||
|
data.setAttribute("category", index, "categoryLogo", "class", "xid:nodisplay");
|
||||||
|
data.setEscapedContent("category", index, "categoryName", category.getName());
|
||||||
|
}
|
||||||
|
|
||||||
index += 1;
|
index += 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue