| 1 | |
|
| 2 | |
|
| 3 | |
|
| 4 | |
|
| 5 | |
|
| 6 | |
|
| 7 | |
|
| 8 | |
|
| 9 | |
|
| 10 | |
|
| 11 | |
|
| 12 | |
|
| 13 | |
|
| 14 | |
|
| 15 | |
|
| 16 | |
package org.kuali.rice.kim.lookup; |
| 17 | |
|
| 18 | |
import java.util.Properties; |
| 19 | |
|
| 20 | |
import org.apache.commons.lang.StringUtils; |
| 21 | |
import org.kuali.rice.kim.bo.impl.ReviewResponsibility; |
| 22 | |
import org.kuali.rice.kim.util.KimConstants; |
| 23 | |
import org.kuali.rice.kns.lookup.KualiLookupableImpl; |
| 24 | |
import org.kuali.rice.kns.util.KNSConstants; |
| 25 | |
import org.kuali.rice.kns.util.UrlFactory; |
| 26 | |
|
| 27 | |
|
| 28 | |
|
| 29 | |
|
| 30 | |
|
| 31 | |
|
| 32 | |
|
| 33 | 0 | public class ResponsibilityLookupableImpl extends KualiLookupableImpl { |
| 34 | |
|
| 35 | |
|
| 36 | |
|
| 37 | |
|
| 38 | |
|
| 39 | |
|
| 40 | |
|
| 41 | |
@Override |
| 42 | |
public String getCreateNewUrl() { |
| 43 | 0 | String url = ""; |
| 44 | |
|
| 45 | 0 | if (getLookupableHelperService().allowsNewOrCopyAction(KimConstants.KimUIConstants.KIM_REVIEW_RESPONSIBILITY_DOCUMENT_TYPE_NAME)) { |
| 46 | 0 | Properties parameters = new Properties(); |
| 47 | 0 | parameters.put(KNSConstants.DISPATCH_REQUEST_PARAMETER, KNSConstants.MAINTENANCE_NEW_METHOD_TO_CALL); |
| 48 | 0 | parameters.put(KNSConstants.BUSINESS_OBJECT_CLASS_ATTRIBUTE, ReviewResponsibility.class.getName()); |
| 49 | 0 | if (StringUtils.isNotBlank(getReturnLocation())) { |
| 50 | 0 | parameters.put(KNSConstants.RETURN_LOCATION_PARAMETER, getReturnLocation()); |
| 51 | |
} |
| 52 | 0 | url = UrlFactory.parameterizeUrl(KNSConstants.MAINTENANCE_ACTION, parameters); |
| 53 | 0 | url = "<a href=\"" + url + "\"><img src=\"images/tinybutton-createnew.gif\" alt=\"create new\" width=\"70\" height=\"15\"/></a>"; |
| 54 | |
} |
| 55 | |
|
| 56 | 0 | return url; |
| 57 | |
} |
| 58 | |
} |