From 3ab26e69269b1612dc687cf1e917e60bb2626b47 Mon Sep 17 00:00:00 2001 From: Keiji Suzuki Date: Thu, 1 Aug 2013 16:22:52 +0900 Subject: [PATCH] extracts the common codes to a file and includes it. --- .../webapp/dspace-admin/curate-collection.jsp | 73 +------------------ .../webapp/dspace-admin/curate-community.jsp | 73 +------------------ .../main/webapp/dspace-admin/curate-item.jsp | 73 +------------------ .../main/webapp/dspace-admin/curate-main.jsp | 73 +------------------ .../webapp/dspace-admin/curate-message.jsp | 72 ++++++++++++++++++ 5 files changed, 76 insertions(+), 288 deletions(-) create mode 100644 dspace-jspui/src/main/webapp/dspace-admin/curate-message.jsp diff --git a/dspace-jspui/src/main/webapp/dspace-admin/curate-collection.jsp b/dspace-jspui/src/main/webapp/dspace-admin/curate-collection.jsp index bb58ed3559..4d977c8abb 100644 --- a/dspace-jspui/src/main/webapp/dspace-admin/curate-collection.jsp +++ b/dspace-jspui/src/main/webapp/dspace-admin/curate-collection.jsp @@ -49,78 +49,7 @@ parenttitlekey="jsp.administer" parentlink="/dspace-admin"> -<% - if (result != null) - { - String type = result.getType(); - boolean isSuccess = result.isSuccess(); - String resultClass = (isSuccess ? "success" : "failure"); -%> -
-

- - - -

-<% - if ("perform".equals(type)) - { - if (isSuccess) - { -%> -

-
- - - - -
-<% - } - else - { -%> -

-
- - - -
-<% - } - } - else - { - if (isSuccess) - { -%> -

-
- - - - -
-<% - } - else - { -%> -

-
- - - - -
-<% - } - } -%> -
-<% - } -%> +<%@ include file="/dspace-admin/curate-message.jsp" %>

diff --git a/dspace-jspui/src/main/webapp/dspace-admin/curate-community.jsp b/dspace-jspui/src/main/webapp/dspace-admin/curate-community.jsp index d5c6693313..cd2d01c1d3 100644 --- a/dspace-jspui/src/main/webapp/dspace-admin/curate-community.jsp +++ b/dspace-jspui/src/main/webapp/dspace-admin/curate-community.jsp @@ -48,78 +48,7 @@ parenttitlekey="jsp.administer" parentlink="/dspace-admin"> -<% - if (result != null) - { - String type = result.getType(); - boolean isSuccess = result.isSuccess(); - String resultClass = (isSuccess ? "success" : "failure"); -%> -
-

- - - -

-<% - if ("perform".equals(type)) - { - if (isSuccess) - { -%> -

-
- - - - -
-<% - } - else - { -%> -

-
- - - -
-<% - } - } - else - { - if (isSuccess) - { -%> -

-
- - - - -
-<% - } - else - { -%> -

-
- - - - -
-<% - } - } -%> -
-<% - } -%> +<%@ include file="/dspace-admin/curate-message.jsp" %>

diff --git a/dspace-jspui/src/main/webapp/dspace-admin/curate-item.jsp b/dspace-jspui/src/main/webapp/dspace-admin/curate-item.jsp index eafdbc88e7..e1d9bc924c 100644 --- a/dspace-jspui/src/main/webapp/dspace-admin/curate-item.jsp +++ b/dspace-jspui/src/main/webapp/dspace-admin/curate-item.jsp @@ -57,78 +57,7 @@ parenttitlekey="jsp.administer" parentlink="/dspace-admin"> -<% - if (result != null) - { - String type = result.getType(); - boolean isSuccess = result.isSuccess(); - String resultClass = (isSuccess ? "success" : "failure"); -%> -
-

- - - -

-<% - if ("perform".equals(type)) - { - if (isSuccess) - { -%> -

-
- - - - -
-<% - } - else - { -%> -

-
- - - -
-<% - } - } - else - { - if (isSuccess) - { -%> -

-
- - - - -
-<% - } - else - { -%> -

-
- - - - -
-<% - } - } -%> -
-<% - } -%> +<%@ include file="/dspace-admin/curate-message.jsp" %>

diff --git a/dspace-jspui/src/main/webapp/dspace-admin/curate-main.jsp b/dspace-jspui/src/main/webapp/dspace-admin/curate-main.jsp index 8d1ffc3a25..c5db01e729 100644 --- a/dspace-jspui/src/main/webapp/dspace-admin/curate-main.jsp +++ b/dspace-jspui/src/main/webapp/dspace-admin/curate-main.jsp @@ -49,78 +49,7 @@ parenttitlekey="jsp.administer" parentlink="/dspace-admin"> -<% - if (result != null) - { - String type = result.getType(); - boolean isSuccess = result.isSuccess(); - String resultClass = (isSuccess ? "success" : "failure"); -%> -
-

- - - -

-<% - if ("perform".equals(type)) - { - if (isSuccess) - { -%> -

-
- - - - -
-<% - } - else - { -%> -

-
- - - -
-<% - } - } - else - { - if (isSuccess) - { -%> -

-
- - - - -
-<% - } - else - { -%> -

-
- - - - -
-<% - } - } -%> -
-<% - } -%> +<%@ include file="/dspace-admin/curate-message.jsp" %>
diff --git a/dspace-jspui/src/main/webapp/dspace-admin/curate-message.jsp b/dspace-jspui/src/main/webapp/dspace-admin/curate-message.jsp new file mode 100644 index 0000000000..b5c821da43 --- /dev/null +++ b/dspace-jspui/src/main/webapp/dspace-admin/curate-message.jsp @@ -0,0 +1,72 @@ +<% + if (result != null) + { + String type = result.getType(); + boolean isSuccess = result.isSuccess(); + String resultClass = (isSuccess ? "success" : "failure"); +%> +
+

+ + + +

+<% + if ("perform".equals(type)) + { + if (isSuccess) + { +%> +

+
+ + + + +
+<% + } + else + { +%> +

+
+ + + +
+<% + } + } + else + { + if (isSuccess) + { +%> +

+
+ + + + +
+<% + } + else + { +%> +

+
+ + + + +
+<% + } + } +%> +
+<% + } +%>