-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changes to Short URL admin page (#4813)
* Display short URLs in a LabKey grid. * Code review changes: - Display ShortURL table only if container is root and user has AdminOperationsPermission - Enable standard update and delete
- Loading branch information
Showing
5 changed files
with
293 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<%@ page import="org.labkey.api.view.HttpView" %> | ||
<%@ page import="org.labkey.core.admin.AdminController" %> | ||
<%@ page import="org.labkey.api.view.ActionURL" %> | ||
<%@ page extends="org.labkey.api.jsp.JspBase" %> | ||
<%@ taglib prefix="labkey" uri="http://www.labkey.org/taglib" %> | ||
|
||
<labkey:errors/> | ||
|
||
<% | ||
AdminController.ShortURLForm bean = (AdminController.ShortURLForm) HttpView.currentModel(); | ||
%> | ||
|
||
<labkey:form action="<%=urlFor(AdminController.UpdateShortURLAction.class)%>" method="POST" id="updateShortUrlForm"> | ||
<table class="lk-fields-table"> | ||
<tr> | ||
<td class="labkey-form-label">Short URL: </td> | ||
<td> | ||
<input type="hidden" name="shortURL" value="<%= h(bean.getShortURL()) %>"/> | ||
<%= h(bean.getShortURL()) %> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td class="labkey-form-label">Target URL: </td> | ||
<td><textarea rows="3" cols="80" name="fullURL"><%= h(bean.getFullURL()) %></textarea></td> | ||
</tr> | ||
</table> | ||
<div style="margin-top: 10px;"> | ||
<%= button("Update").submit(true) %> | ||
<%= button("Cancel").href(new ActionURL(AdminController.ShortURLAdminAction.class, getContainer())) %> | ||
</div> | ||
</labkey:form> | ||
|
||
<div style="margin-top: 20px;"> | ||
<%= button("Delete") | ||
.usePost("Are you sure you want to delete the short URL " + bean.getShortURL() + "?") | ||
.href(urlFor(AdminController.UpdateShortURLAction.class).addParameter("shortURL", bean.getShortURL()).addParameter("delete", true)) %> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.