SF patch [2612341] Patch for SF Feature Request [2609564] group delete confirm

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3488 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
Claudia Juergen
2009-02-20 10:49:25 +00:00
parent eca471a28e
commit 2a66fb44e6
4 changed files with 105 additions and 4 deletions

View File

@@ -272,6 +272,9 @@ jsp.dspace-admin.general.remove = Remove
jsp.dspace-admin.general.save = Save
jsp.dspace-admin.general.update = Update
jsp.dspace-admin.general.upload = Upload
jsp.dspace-admin.group-confirm-delete.confirm = Are you sure this group should be deleted? Note: Deleting this group will remove all resource policies associated with this group.
jsp.dspace-admin.group-confirm-delete.heading = Delete Group: {0}
jsp.dspace-admin.group-confirm-delete.title = Delete Group
jsp.dspace-admin.group-eperson-select.add = Add EPerson
jsp.dspace-admin.group-eperson-select.heading = Select EPerson to Add to Group {0}
jsp.dspace-admin.group-eperson-select.title = Select EPerson

View File

@@ -95,10 +95,11 @@ public class GroupEditServlet extends DSpaceServlet
AuthorizeManager.authorizeAction(c, group, Constants.ADD);
boolean submit_edit = (request.getParameter("submit_edit") != null);
boolean submit_group_update = (request
.getParameter("submit_group_update") != null);
boolean submit_group_delete = (request
.getParameter("submit_group_delete") != null);
boolean submit_group_update = (request.getParameter("submit_group_update") != null);
boolean submit_group_delete = (request.getParameter("submit_group_delete") != null);
boolean submit_confirm_delete = (request.getParameter("submit_confirm_delete") != null);
boolean submit_cancel_delete = (request.getParameter("submit_cancel_delete") != null);
// just chosen a group to edit - get group and pass it to
// group-edit.jsp
@@ -253,6 +254,12 @@ public class GroupEditServlet extends DSpaceServlet
c.complete();
}
else if (submit_group_delete)
{
// direct to a confirmation step
request.setAttribute("group", group);
JSPManager.showJSP(request, response, "/dspace-admin/group-confirm-delete.jsp");
}
else if (submit_confirm_delete)
{
// phony authorize, only admins can do this
AuthorizeManager.authorizeAction(c, group, Constants.WRITE);
@@ -262,6 +269,11 @@ public class GroupEditServlet extends DSpaceServlet
showMainPage(c, request, response);
}
else if (submit_cancel_delete)
{
// show group list
showMainPage(c, request, response);
}
else
{
// unknown action, show edit page

View File

@@ -0,0 +1,85 @@
<%--
- group-confirm-delete.jsp
-
- Version: $Revision: $
-
- Date: $Date: $
-
- Copyright (C) 2009, The DSpace Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are
- met:
-
- - Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- - Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- - Neither the name of the DSpace Foundation nor the names of their
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
- DAMAGE.
--%>
<%--
- Confirm deletion of a group
-
- Attributes:
- group - group we may delete
--%>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ page import="org.dspace.eperson.Group" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
<%
Group group = (Group) request.getAttribute("group");
%>
<dspace:layout titlekey="jsp.dspace-admin.group-confirm-delete.title"
navbar="admin"
locbar="link"
parenttitlekey="jsp.administer"
parentlink="/dspace-admin">
<h1><fmt:message key="jsp.dspace-admin.group-confirm-delete.heading">
<fmt:param><%= group.getName() %></fmt:param>
</fmt:message></h1>
<p><fmt:message key="jsp.dspace-admin.group-confirm-delete.confirm"/></p>
<center>
<table width="70%">
<tr>
<td align="left">
<form method="post" action="">
<input type="hidden" name="group_id" value="<%= group.getID() %>"/>
<input type="submit" name="submit_confirm_delete" value="<fmt:message key="jsp.dspace-admin.general.delete"/>" />
</form>
</td>
<td align="right">
<form method="post" action="">
<input type="submit" name="submit_cancel_delete" value="<fmt:message key="jsp.dspace-admin.general.cancel"/>" />
</form>
</td>
</tr>
</table>
</center>
</dspace:layout>

View File

@@ -49,6 +49,7 @@
- SF Patch #2540683 jspui Thai translation for 1.5.1 (gone into google code)
- SF patch [2560974] for SF feature request [2560839] Make sitemap directory configurable
- SF patch [2615647] Greek translation for xmlui version 1.5.1 submitted to Google code
- SF patch [2612341] Patch for SF Feature Request [2609564] group delete confirm
(Elliot Metsger)
- Patch for SF bug #2016130 checksum checker can not retrieve very large bitstream