Skip to content

Commit

Permalink
LPS-85545 users-admin-web - cleans up organization screen navigation …
Browse files Browse the repository at this point in the history
…code and makes the existing category and entry names match the given design
  • Loading branch information
drewbrokke committed Sep 19, 2018
1 parent 20826a0 commit f85653a
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 43 deletions.
Expand Up @@ -20,7 +20,6 @@
import com.liferay.portal.kernel.model.Organization;
import com.liferay.portal.kernel.model.User;
import com.liferay.portal.kernel.service.OrganizationService;
import com.liferay.portal.kernel.servlet.taglib.ui.FormNavigatorConstants;
import com.liferay.portal.kernel.util.HashMapDictionary;
import com.liferay.users.admin.constants.UserFormConstants;

Expand Down Expand Up @@ -66,35 +65,32 @@ public void deactivate() {

protected void registerScreenNavigationCategories() {
_registerScreenNavigationCategory(
new OrganizationScreenNavigationCategory(
_CATEGORY_ORGANIZATION_INFORMATION),
10);
new OrganizationScreenNavigationCategory(_CATEGORY_GENERAL), 10);

_registerScreenNavigationCategory(
new OrganizationScreenNavigationCategory(_CATEGORY_CONTACT), 20);

_registerScreenNavigationCategory(
new OrganizationScreenNavigationCategory(_CATEGORY_MISCELLANEOUS),
30);
}

protected void registerScreenNavigationEntries() {
_registerScreenNavigationEntry(
_createScreenNavigationEntry(
"general", _CATEGORY_ORGANIZATION_INFORMATION,
"/organization/general.jsp", "/users_admin/edit_organization"),
"information", _CATEGORY_GENERAL,
"/organization/information.jsp",
"/users_admin/edit_organization"),
10);

_registerScreenNavigationEntry(
_createUpdateOnlyScreenNavigationEntry(
"contact-information", _CATEGORY_CONTACT,
"/organization/contact_information.jsp",
"/users_admin/organization/update_contact_information"),
20);
"reminder-queries", _CATEGORY_GENERAL,
"/organization/reminder_queries.jsp",
"/users_admin/update_organization_reminder_queries"),
30);

_registerScreenNavigationEntry(
_createUpdateOnlyScreenNavigationEntry(
"reminder-queries", _CATEGORY_MISCELLANEOUS,
"/organization/reminder_queries.jsp",
"/users_admin/organization/update_reminder_queries"),
"contact-information", _CATEGORY_CONTACT,
"/organization/contact_information.jsp",
"/users_admin/update_organization_contact_information"),
20);
}

Expand Down Expand Up @@ -133,10 +129,6 @@ private ScreenNavigationEntry<Organization> _createScreenNavigationEntry(
});
}

private Dictionary<String, Object> _getProperties() {
return _getProperties(null);
}

private Dictionary<String, Object> _getProperties(Integer serviceRanking) {
return new HashMapDictionary<String, Object>() {
{
Expand All @@ -148,13 +140,6 @@ private Dictionary<String, Object> _getProperties(Integer serviceRanking) {
};
}

private void _registerScreenNavigationCategory(
ScreenNavigationCategory screenNavigationCategory) {

_registerScreenNavigationCategory(
screenNavigationCategory, _getProperties());
}

private void _registerScreenNavigationCategory(
ScreenNavigationCategory screenNavigationCategory,
Dictionary<String, Object> properties) {
Expand All @@ -173,12 +158,6 @@ private void _registerScreenNavigationCategory(
screenNavigationCategory, _getProperties(serviceRanking));
}

private void _registerScreenNavigationEntry(
ScreenNavigationEntry screenNavigationEntry) {

_registerScreenNavigationEntry(screenNavigationEntry, _getProperties());
}

private void _registerScreenNavigationEntry(
ScreenNavigationEntry screenNavigationEntry,
Dictionary<String, Object> properties) {
Expand All @@ -199,12 +178,8 @@ private void _registerScreenNavigationEntry(
private static final String _CATEGORY_CONTACT =
UserFormConstants.CATEGORY_KEY_CONTACT;

private static final String _CATEGORY_MISCELLANEOUS =
FormNavigatorConstants.CATEGORY_KEY_ORGANIZATION_MISCELLANEOUS;

private static final String _CATEGORY_ORGANIZATION_INFORMATION =
FormNavigatorConstants.
CATEGORY_KEY_ORGANIZATION_ORGANIZATION_INFORMATION;
private static final String _CATEGORY_GENERAL =
UserFormConstants.CATEGORY_KEY_GENERAL;

private BundleContext _bundleContext;

Expand Down
Expand Up @@ -56,7 +56,7 @@
property = {
"javax.portlet.name=" + UsersAdminPortletKeys.MY_ORGANIZATIONS,
"javax.portlet.name=" + UsersAdminPortletKeys.USERS_ADMIN,
"mvc.command.name=/users_admin/organization/update_contact_information"
"mvc.command.name=/users_admin/update_organization_contact_information"
},
service = MVCActionCommand.class
)
Expand Down
Expand Up @@ -45,11 +45,12 @@
property = {
"javax.portlet.name=" + UsersAdminPortletKeys.MY_ORGANIZATIONS,
"javax.portlet.name=" + UsersAdminPortletKeys.USERS_ADMIN,
"mvc.command.name=/users_admin/organization/update_reminder_queries"
"mvc.command.name=/users_admin/update_organization_reminder_queries"
},
service = MVCActionCommand.class
)
public class EditReminderQueriesMVCActionCommand extends BaseMVCActionCommand {
public class UpdateOrganizationReminderQueriesMVCActionCommand
extends BaseMVCActionCommand {

@Override
protected void doProcessAction(
Expand Down

0 comments on commit f85653a

Please sign in to comment.