mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-08 10:34:25 +00:00
SF Patch 1450491 i18n configurable multilingualism support
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1947 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
(Claudia Juergen)
|
||||||
|
- SF Patch 1450491 i18n configurable multilingualism support
|
||||||
1.4.2 beta
|
1.4.2 beta
|
||||||
===========
|
===========
|
||||||
|
|
||||||
|
@@ -366,6 +366,19 @@ webui.licence_bundle.show = false
|
|||||||
# webui.browse.index.title = dc.title
|
# webui.browse.index.title = dc.title
|
||||||
# webui.browse.index.subject = dc.subject.*
|
# webui.browse.index.subject = dc.subject.*
|
||||||
|
|
||||||
|
|
||||||
|
### i18n - Locales ####
|
||||||
|
# Default Locale
|
||||||
|
# A Locale in the form country or country_language or country_language_variant
|
||||||
|
# if no default locale is defined the server default locale will be used.
|
||||||
|
default.locale = en
|
||||||
|
|
||||||
|
# All the Locales, that are supported by this instance of DSpace
|
||||||
|
# A comma seperated list of Locales. All types of Locales country, country_language, country_language_variant
|
||||||
|
# Note that the appropriate file are present, especially that all the Messages_x.properties are there
|
||||||
|
# may be used, e. g: webui.supported.locales = en, de
|
||||||
|
|
||||||
|
|
||||||
### MyDSpace display of group membership
|
### MyDSpace display of group membership
|
||||||
#
|
#
|
||||||
# if omitted, the default behaviour is false
|
# if omitted, the default behaviour is false
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -172,6 +172,11 @@ property2.name = ${dspace.dir}/rest/of/path
|
|||||||
|
|
||||||
<td>Enable the Creative Commons license step in the submission process. Submitters are given an opportunity to select a Creative Commons license to accompany the Item. Creative Commons licenses govern the use of the content. For more details, see <a href="http://creativecommons.org">the Creative Commons website</a>.</td>
|
<td>Enable the Creative Commons license step in the submission process. Submitters are given an opportunity to select a Creative Commons license to accompany the Item. Creative Commons licenses govern the use of the content. For more details, see <a href="http://creativecommons.org">the Creative Commons website</a>.</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>default.locale</code></td>
|
||||||
|
<td><code>en</code></td>
|
||||||
|
<td>The default Locale your Installation is working with.</td>
|
||||||
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
@@ -412,6 +417,58 @@ cp <i>[dspace-source]</i>/build/dspace.war <i>[tomcat]</i>/webapps
|
|||||||
|
|
||||||
<p>When you restart the web server you should see your customized JSPs.</p>
|
<p>When you restart the web server you should see your customized JSPs.</p>
|
||||||
|
|
||||||
|
<h2><a name="multilingualui" id="multilingualui">Multilingual User Interface</a></h2>
|
||||||
|
<h3>Setting the default language for the application</h3>
|
||||||
|
The default language for the application is set via the <code><i>[dspace]</i>/config/dspace.cfg</code> parameter <code>default.locale</code>. <br />
|
||||||
|
This is a locale according to i18n and might consist of country, country_language or country_language_variant, <br />
|
||||||
|
e. g.: <code>default.locale=en</code>. If not default locale is specified the server locale will be used instead.
|
||||||
|
<h3>Supporting more than one language</h3>
|
||||||
|
<h4>Changes in dspace.cfg</h4>
|
||||||
|
With the <code><i>[dspace]</i>/config/dspace.cfg</code> parameter <code>webui.supported.locales</code> you may provide a comma seperated list of supported (including the default locale) locales. <br />
|
||||||
|
The locales might have the form country, country_language or country_language_variant, e. g.:<br />
|
||||||
|
<code>webui.supported.locales = en, de</code> or <code>webui.supported.locales = en, en_ca, de</code>.<br />
|
||||||
|
This will result in:
|
||||||
|
<ul>
|
||||||
|
<li>a language switch in the default header</li>
|
||||||
|
<li>the user will able to choose his preferred language, this will be part of his profile</li>
|
||||||
|
<li>wording of emails
|
||||||
|
<ul>
|
||||||
|
<li>mails to registered users e. g. alerting service will use the preferred language of the user</li>
|
||||||
|
<li>mails to unregistered users e. g. suggest an item will use the language of the session</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li>according to the language selected for the session, using dspace-admin Edit News will edit the news file of the language according to session</li>
|
||||||
|
</ul>
|
||||||
|
<h4>Related files</h4>
|
||||||
|
If you set webui.supported.locales make sure that all the related additional files for each language are available. <code>LOCALE</code> should correspond to the locale set in <code>webui.supported.locales</code>,
|
||||||
|
e. g.: for webui.supported.locales = en, de, fr, there should be:
|
||||||
|
<ul>
|
||||||
|
<li><code><i>[dspace]</i>/config/language-packs/Messages.properties</code></li>
|
||||||
|
<li><code><i>[dspace]</i>/config/language-packs/Messages_en.properties</code></li>
|
||||||
|
<li><code><i>[dspace]</i>/config/language-packs/Messages_de.properties</code></li>
|
||||||
|
<li><code><i>[dspace]</i>/config/language-packs/Messages_fr.properties</code></li>
|
||||||
|
</ul>
|
||||||
|
Files to be localized:
|
||||||
|
<ul>
|
||||||
|
<li><code><i>[dspace]</i>/config/language-packs/Messages_LOCALE.properties</code></li>
|
||||||
|
<li><code><i>[dspace]</i>/config/input-forms_LOCALE.xml</code></li>
|
||||||
|
<li><code><i>[dspace]</i>/config/default_LOCALE.license</code> <i>should be pure ascii</i></li>
|
||||||
|
<li><code><i>[dspace]</i>/config/news-top_LOCALE.html</code></li>
|
||||||
|
<li><code><i>[dspace]</i>/config/news-side_LOCALE.html</code></li>
|
||||||
|
<li><code><i>[dspace]</i>/config/emails/change_password_LOCALE</code></li>
|
||||||
|
<li><code><i>[dspace]</i>/config/emails/feedback_LOCALE</code></li>
|
||||||
|
<li><code><i>[dspace]</i>/config/emails/internal_error_LOCALE</code></li>
|
||||||
|
<li><code><i>[dspace]</i>/config/emails/register_LOCALE</code></li>
|
||||||
|
<li><code><i>[dspace]</i>/config/emails/submit_archive_LOCALE</code></li>
|
||||||
|
<li><code><i>[dspace]</i>/config/emails/submit_reject_LOCALE</code></li>
|
||||||
|
<li><code><i>[dspace]</i>/config/emails/submit_task_LOCALE</code></li>
|
||||||
|
<li><code><i>[dspace]</i>/config/emails/subscription_LOCALE</code></li>
|
||||||
|
<li><code><i>[dspace]</i>/config/emails/suggest_LOCALE</code></li>
|
||||||
|
<li><code><i>[dspace]</i>/jsp/help/collection-admin_LOCALE.html</code> <i>in html keep the jump link as original</i></li>
|
||||||
|
<li><code><i>[dspace]</i>/jsp/help/index_LOCALE.html</code></li>
|
||||||
|
<li><code><i>[dspace]</i>/jsp/help/site-admin_LOCALE.html</code></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
<h2><a name="customsimpleitem" id="customsimpleitem">Customizing the Simple Item Display Metadata</a></h2>
|
<h2><a name="customsimpleitem" id="customsimpleitem">Customizing the Simple Item Display Metadata</a></h2>
|
||||||
|
|
||||||
<h3>Customizing the Default Simple Item Display Metadata</h3>
|
<h3>Customizing the Default Simple Item Display Metadata</h3>
|
||||||
|
@@ -77,6 +77,7 @@
|
|||||||
<LI><A HREF="configure.html#templates">Configuration Files for Other Applications</A></LI>
|
<LI><A HREF="configure.html#templates">Configuration Files for Other Applications</A></LI>
|
||||||
<LI><A HREF="configure.html#customui">Customizing the Web User Interface</A></LI>
|
<LI><A HREF="configure.html#customui">Customizing the Web User Interface</A></LI>
|
||||||
<LI><A HREF="configure.html#customsimpleitem">Customizing the Simple Item Display Metadata</A></LI>
|
<LI><A HREF="configure.html#customsimpleitem">Customizing the Simple Item Display Metadata</A></LI>
|
||||||
|
<LI><A HREF="configure.html#multilingualui">Multilingual User Interface</A></LI>
|
||||||
<li><a href="configure.html#mydspacegroupmembership">MyDSpace Display of Group Memberships</li>
|
<li><a href="configure.html#mydspacegroupmembership">MyDSpace Display of Group Memberships</li>
|
||||||
<LI><A HREF="configure.html#authenticate">Custom Authentication Code</A></LI>
|
<LI><A HREF="configure.html#authenticate">Custom Authentication Code</A></LI>
|
||||||
<LI><A HREF="configure.html#ldap">Configuring LDAP Authentication</A></LI>
|
<LI><A HREF="configure.html#ldap">Configuring LDAP Authentication</A></LI>
|
||||||
|
@@ -276,6 +276,13 @@ See the <code>dspace.cfg</code> file for examples.
|
|||||||
|
|
||||||
<P>For information on customising the output of this see <A HREF="configure.html#statistics">configuring system statistical reports</A>.</P>
|
<P>For information on customising the output of this see <A HREF="configure.html#statistics">configuring system statistical reports</A>.</P>
|
||||||
|
|
||||||
|
<h3>Multilingual Installation</h3>
|
||||||
|
In order to deploy a multilingual version of DSpace you have to configure two parameters in <code><i>[dspace]</i>/config/dspace.cfg:</code><br />
|
||||||
|
<code>default.locale</code>, e. g. default.locale = en<br />
|
||||||
|
<code>webui.supported locales</code>, e. g. webui.supported.locales = en, de<br />
|
||||||
|
The Locales might have the form country, country_language, country_language_variant.<br />
|
||||||
|
Accoding to the languages you wish to support, you have to make sure, that all the i18n related files are available
|
||||||
|
see the <a href="configure.html#multilingualui">Multilingual User Interface</a> section in the configuration documentation.
|
||||||
|
|
||||||
<H3><A NAME="https">DSpace over HTTPS</a></H3>
|
<H3><A NAME="https">DSpace over HTTPS</a></H3>
|
||||||
|
|
||||||
|
@@ -177,7 +177,8 @@ CREATE TABLE EPerson
|
|||||||
last_active TIMESTAMP,
|
last_active TIMESTAMP,
|
||||||
sub_frequency INTEGER,
|
sub_frequency INTEGER,
|
||||||
phone VARCHAR(32),
|
phone VARCHAR(32),
|
||||||
netid VARCHAR(64)
|
netid VARCHAR(64),
|
||||||
|
language VARCHAR(64)
|
||||||
);
|
);
|
||||||
|
|
||||||
-- index by email
|
-- index by email
|
||||||
|
53
dspace/etc/database_schema_14-15.sql
Normal file
53
dspace/etc/database_schema_14-15.sql
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
--
|
||||||
|
-- database_schema_14-15.sql
|
||||||
|
--
|
||||||
|
-- Version: $$
|
||||||
|
--
|
||||||
|
-- Date: $Date:$
|
||||||
|
--
|
||||||
|
-- Copyright (c) 2002-2007, Hewlett-Packard Company and Massachusetts
|
||||||
|
-- Institute of Technology. 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 Hewlett-Packard Company nor the name of the
|
||||||
|
-- Massachusetts Institute of Technology 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.
|
||||||
|
|
||||||
|
--
|
||||||
|
-- SQL commands to upgrade the database schema of a live DSpace 1.3 or 1.3.x
|
||||||
|
-- to the DSpace 1.4 database schema
|
||||||
|
--
|
||||||
|
-- DUMP YOUR DATABASE FIRST. DUMP YOUR DATABASE FIRST. DUMP YOUR DATABASE FIRST. DUMP YOUR DATABASE FIRST.
|
||||||
|
-- DUMP YOUR DATABASE FIRST. DUMP YOUR DATABASE FIRST. DUMP YOUR DATABASE FIRST. DUMP YOUR DATABASE FIRST.
|
||||||
|
-- DUMP YOUR DATABASE FIRST. DUMP YOUR DATABASE FIRST. DUMP YOUR DATABASE FIRST. DUMP YOUR DATABASE FIRST.
|
||||||
|
|
||||||
|
------------------------------------------------------
|
||||||
|
-- New Column language language in EPerson
|
||||||
|
------------------------------------------------------
|
||||||
|
|
||||||
|
alter table eperson add column language VARCHAR(64);
|
||||||
|
update eperson set language = 'en';
|
@@ -64,6 +64,7 @@
|
|||||||
|
|
||||||
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
||||||
|
|
||||||
|
<%@ page import="org.dspace.core.I18nUtil" %>
|
||||||
<%@ page import="org.dspace.browse.BrowseInfo" %>
|
<%@ page import="org.dspace.browse.BrowseInfo" %>
|
||||||
<%@ page import="org.dspace.content.Community" %>
|
<%@ page import="org.dspace.content.Community" %>
|
||||||
<%@ page import="org.dspace.content.Collection" %>
|
<%@ page import="org.dspace.content.Collection" %>
|
||||||
@@ -71,6 +72,7 @@
|
|||||||
<%@ page import="org.dspace.content.DCValue" %>
|
<%@ page import="org.dspace.content.DCValue" %>
|
||||||
<%@ page import="org.dspace.content.Item" %>
|
<%@ page import="org.dspace.content.Item" %>
|
||||||
|
|
||||||
|
|
||||||
<%
|
<%
|
||||||
// Get attributes
|
// Get attributes
|
||||||
Collection collection = (Collection) request.getAttribute("collection");
|
Collection collection = (Collection) request.getAttribute("collection");
|
||||||
@@ -117,7 +119,7 @@
|
|||||||
for (int i = 1; i <= 12; i++)
|
for (int i = 1; i <= 12; i++)
|
||||||
{
|
{
|
||||||
%>
|
%>
|
||||||
<option value="<%= i %>"><%= DCDate.getMonthName(i) %></option>
|
<option value="<%= i %>"><%= DCDate.getMonthName(i, I18nUtil.getSupportedLocale(request.getLocale())) %></option>
|
||||||
<%
|
<%
|
||||||
}
|
}
|
||||||
%>
|
%>
|
||||||
|
@@ -68,6 +68,7 @@
|
|||||||
<%@ page import="org.dspace.eperson.Group" %>
|
<%@ page import="org.dspace.eperson.Group" %>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<%
|
<%
|
||||||
// Retrieve attributes
|
// Retrieve attributes
|
||||||
Collection collection = (Collection) request.getAttribute("collection");
|
Collection collection = (Collection) request.getAttribute("collection");
|
||||||
@@ -274,7 +275,7 @@
|
|||||||
<% } %>
|
<% } %>
|
||||||
<tr>
|
<tr>
|
||||||
<td headers="t1" class="standard" align="center">
|
<td headers="t1" class="standard" align="center">
|
||||||
<dspace:popup page="/help/collection-admin.html"><fmt:message key="jsp.adminhelp"/></dspace:popup>
|
<dspace:popup page="<%= LocaleSupport.getLocalizedMessage(pageContext, \"help.collection-admin\")%>"><fmt:message key="jsp.adminhelp"/></dspace:popup>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
@@ -64,6 +64,7 @@
|
|||||||
<%@ page import="org.dspace.core.Utils" %>
|
<%@ page import="org.dspace.core.Utils" %>
|
||||||
<%@ page import="org.dspace.core.ConfigurationManager" %>
|
<%@ page import="org.dspace.core.ConfigurationManager" %>
|
||||||
|
|
||||||
|
|
||||||
<%
|
<%
|
||||||
// Retrieve attributes
|
// Retrieve attributes
|
||||||
Community community = (Community) request.getAttribute( "community" );
|
Community community = (Community) request.getAttribute( "community" );
|
||||||
@@ -318,7 +319,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td headers="t1" class="standard" align="center">
|
<td headers="t1" class="standard" align="center">
|
||||||
<dspace:popup page="/help/site-admin.html"><fmt:message key="jsp.adminhelp"/></dspace:popup>
|
<dspace:popup page="<%= LocaleSupport.getLocalizedMessage(pageContext, \"help.site-admin\")%>"><fmt:message key="jsp.adminhelp"/></dspace:popup>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@@ -62,6 +62,7 @@
|
|||||||
<%@ page import="org.dspace.content.Collection" %>
|
<%@ page import="org.dspace.content.Collection" %>
|
||||||
<%@ page import="org.dspace.app.webui.servlet.admin.EditCommunitiesServlet" %>
|
<%@ page import="org.dspace.app.webui.servlet.admin.EditCommunitiesServlet" %>
|
||||||
<%@ page import="org.dspace.core.ConfigurationManager" %>
|
<%@ page import="org.dspace.core.ConfigurationManager" %>
|
||||||
|
<%@ page import="javax.servlet.jsp.jstl.fmt.LocaleSupport" %>
|
||||||
|
|
||||||
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
||||||
|
|
||||||
@@ -158,7 +159,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td headers="t1" class="standard" align="center">
|
<td headers="t1" class="standard" align="center">
|
||||||
<dspace:popup page="/help/site-admin.html"><fmt:message key="jsp.adminhelp"/></dspace:popup>
|
<dspace:popup page="<%= LocaleSupport.getLocalizedMessage(pageContext, \"help.site-admin\")%>"><fmt:message key="jsp.adminhelp"/></dspace:popup>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@@ -68,6 +68,7 @@
|
|||||||
<%@ page import="java.util.List" %>
|
<%@ page import="java.util.List" %>
|
||||||
<%@ page import="java.util.Iterator" %>
|
<%@ page import="java.util.Iterator" %>
|
||||||
|
|
||||||
|
<%@ page import="javax.servlet.jsp.jstl.fmt.LocaleSupport" %>
|
||||||
|
|
||||||
<%@ page import="org.dspace.content.Collection" %>
|
<%@ page import="org.dspace.content.Collection" %>
|
||||||
<%@ page import="org.dspace.core.Constants" %>
|
<%@ page import="org.dspace.core.Constants" %>
|
||||||
@@ -90,7 +91,7 @@
|
|||||||
of policies for types of content contained in a collection.
|
of policies for types of content contained in a collection.
|
||||||
Warning, dangerous - removing READ permissions from
|
Warning, dangerous - removing READ permissions from
|
||||||
items will make them not viewable! <dspace:popup page="/help/site-admin.html#advancedpolicies">More help...</dspace:popup></p> --%>
|
items will make them not viewable! <dspace:popup page="/help/site-admin.html#advancedpolicies">More help...</dspace:popup></p> --%>
|
||||||
<div><fmt:message key="jsp.dspace-admin.authorize-advanced.text"/> <dspace:popup page="/help/site-admin.html#advancedpolicies"><fmt:message key="jsp.morehelp"/></dspace:popup></div>
|
<div><fmt:message key="jsp.dspace-admin.authorize-advanced.text"/> <dspace:popup page="<%= LocaleSupport.getLocalizedMessage(pageContext, \"help.site-admin\") +\"#advancedpolicies\"%>"><fmt:message key="jsp.morehelp"/></dspace:popup></div>
|
||||||
|
|
||||||
<form method="post" action="">
|
<form method="post" action="">
|
||||||
|
|
||||||
|
@@ -68,6 +68,7 @@
|
|||||||
<%@ page import="java.util.List" %>
|
<%@ page import="java.util.List" %>
|
||||||
<%@ page import="java.util.Iterator" %>
|
<%@ page import="java.util.Iterator" %>
|
||||||
|
|
||||||
|
<%@ page import="javax.servlet.jsp.jstl.fmt.LocaleSupport" %>
|
||||||
|
|
||||||
<%@ page import="org.dspace.authorize.ResourcePolicy" %>
|
<%@ page import="org.dspace.authorize.ResourcePolicy" %>
|
||||||
<%@ page import="org.dspace.content.Collection" %>
|
<%@ page import="org.dspace.content.Collection" %>
|
||||||
@@ -75,6 +76,7 @@
|
|||||||
<%@ page import="org.dspace.eperson.EPerson" %>
|
<%@ page import="org.dspace.eperson.EPerson" %>
|
||||||
<%@ page import="org.dspace.eperson.Group" %>
|
<%@ page import="org.dspace.eperson.Group" %>
|
||||||
|
|
||||||
|
|
||||||
<%
|
<%
|
||||||
Collection collection = (Collection) request.getAttribute("collection");
|
Collection collection = (Collection) request.getAttribute("collection");
|
||||||
List policies =
|
List policies =
|
||||||
@@ -98,7 +100,7 @@
|
|||||||
</fmt:message></h1>
|
</fmt:message></h1>
|
||||||
</td>
|
</td>
|
||||||
<td align="right" class="standard">
|
<td align="right" class="standard">
|
||||||
<dspace:popup page="/help/site-admin.html#collectionpolicies"><fmt:message key="jsp.help"/></dspace:popup>
|
<dspace:popup page="<%= LocaleSupport.getLocalizedMessage(pageContext, \"help.site-admin\") + \"#collectionpolicies\"%>"><fmt:message key="jsp.help"/></dspace:popup>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@@ -64,6 +64,7 @@
|
|||||||
<%@ page import="java.util.List" %>
|
<%@ page import="java.util.List" %>
|
||||||
<%@ page import="java.util.Iterator" %>
|
<%@ page import="java.util.Iterator" %>
|
||||||
|
|
||||||
|
<%@ page import="javax.servlet.jsp.jstl.fmt.LocaleSupport" %>
|
||||||
|
|
||||||
<%@ page import="org.dspace.authorize.ResourcePolicy" %>
|
<%@ page import="org.dspace.authorize.ResourcePolicy" %>
|
||||||
<%@ page import="org.dspace.content.Community" %>
|
<%@ page import="org.dspace.content.Community" %>
|
||||||
@@ -71,6 +72,7 @@
|
|||||||
<%@ page import="org.dspace.eperson.EPerson" %>
|
<%@ page import="org.dspace.eperson.EPerson" %>
|
||||||
<%@ page import="org.dspace.eperson.Group" %>
|
<%@ page import="org.dspace.eperson.Group" %>
|
||||||
|
|
||||||
|
|
||||||
<%
|
<%
|
||||||
Community community = (Community) request.getAttribute("community");
|
Community community = (Community) request.getAttribute("community");
|
||||||
List policies =
|
List policies =
|
||||||
@@ -93,7 +95,7 @@
|
|||||||
</fmt:message></h1>
|
</fmt:message></h1>
|
||||||
</td>
|
</td>
|
||||||
<td align="right" class="standard">
|
<td align="right" class="standard">
|
||||||
<dspace:popup page="/help/site-admin.html#communitypolicies"><fmt:message key="jsp.help"/></dspace:popup>
|
<dspace:popup page="<%= LocaleSupport.getLocalizedMessage(pageContext, \"help.site-admin\") + \"#communitypolicies\"%>"><fmt:message key="jsp.help"/></dspace:popup>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@@ -79,6 +79,8 @@
|
|||||||
<%@ page import="java.util.List" %>
|
<%@ page import="java.util.List" %>
|
||||||
<%@ page import="java.util.Map" %>
|
<%@ page import="java.util.Map" %>
|
||||||
|
|
||||||
|
<%@ page import="javax.servlet.jsp.jstl.fmt.LocaleSupport" %>
|
||||||
|
|
||||||
<%@ page import="org.dspace.authorize.ResourcePolicy" %>
|
<%@ page import="org.dspace.authorize.ResourcePolicy" %>
|
||||||
<%@ page import="org.dspace.content.Item" %>
|
<%@ page import="org.dspace.content.Item" %>
|
||||||
<%@ page import="org.dspace.content.Bundle" %>
|
<%@ page import="org.dspace.content.Bundle" %>
|
||||||
@@ -87,6 +89,7 @@
|
|||||||
<%@ page import="org.dspace.eperson.EPerson" %>
|
<%@ page import="org.dspace.eperson.EPerson" %>
|
||||||
<%@ page import="org.dspace.eperson.Group" %>
|
<%@ page import="org.dspace.eperson.Group" %>
|
||||||
|
|
||||||
|
|
||||||
<%
|
<%
|
||||||
// get item and list of policies
|
// get item and list of policies
|
||||||
Item item = (Item) request.getAttribute("item");
|
Item item = (Item) request.getAttribute("item");
|
||||||
@@ -115,7 +118,7 @@
|
|||||||
</fmt:message></h1>
|
</fmt:message></h1>
|
||||||
</td>
|
</td>
|
||||||
<td align="right" class="standard">
|
<td align="right" class="standard">
|
||||||
<dspace:popup page="/help/site-admin.html#itempolicies"><fmt:message key="jsp.help"/></dspace:popup>
|
<dspace:popup page="<%= LocaleSupport.getLocalizedMessage(pageContext, \"help.site-admin\") + \"#itempolicies\"%>"><fmt:message key="jsp.help"/></dspace:popup>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@@ -57,9 +57,11 @@
|
|||||||
|
|
||||||
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
||||||
|
|
||||||
|
<%@ page import="javax.servlet.jsp.jstl.fmt.LocaleSupport" %>
|
||||||
|
|
||||||
<%@ page import="org.dspace.content.Collection" %>
|
<%@ page import="org.dspace.content.Collection" %>
|
||||||
|
|
||||||
|
|
||||||
<%
|
<%
|
||||||
// this space intentionally left blank
|
// this space intentionally left blank
|
||||||
%>
|
%>
|
||||||
@@ -79,7 +81,7 @@
|
|||||||
<h3><fmt:message key="jsp.dspace-admin.authorize-main.choose"/></h3>
|
<h3><fmt:message key="jsp.dspace-admin.authorize-main.choose"/></h3>
|
||||||
</td>
|
</td>
|
||||||
<td align="right" class="standard">
|
<td align="right" class="standard">
|
||||||
<dspace:popup page="/help/site-admin.html#authorize"><fmt:message key="jsp.help"/></dspace:popup>
|
<dspace:popup page="<%= LocaleSupport.getLocalizedMessage(pageContext, \"help.site-admin\") + \"#authorize\"%>"><fmt:message key="jsp.help"/></dspace:popup>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@@ -65,12 +65,15 @@
|
|||||||
|
|
||||||
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
||||||
|
|
||||||
|
<%@ page import="javax.servlet.jsp.jstl.fmt.LocaleSupport" %>
|
||||||
|
|
||||||
<%@ page import="org.dspace.authorize.ResourcePolicy" %>
|
<%@ page import="org.dspace.authorize.ResourcePolicy" %>
|
||||||
<%@ page import="org.dspace.content.Collection" %>
|
<%@ page import="org.dspace.content.Collection" %>
|
||||||
<%@ page import="org.dspace.core.Constants" %>
|
<%@ page import="org.dspace.core.Constants" %>
|
||||||
<%@ page import="org.dspace.eperson.EPerson" %>
|
<%@ page import="org.dspace.eperson.EPerson" %>
|
||||||
<%@ page import="org.dspace.eperson.Group" %>
|
<%@ page import="org.dspace.eperson.Group" %>
|
||||||
|
|
||||||
|
|
||||||
<%
|
<%
|
||||||
ResourcePolicy policy = (ResourcePolicy) request.getAttribute("policy" );
|
ResourcePolicy policy = (ResourcePolicy) request.getAttribute("policy" );
|
||||||
Group [] groups = (Group [] ) request.getAttribute("groups" );
|
Group [] groups = (Group [] ) request.getAttribute("groups" );
|
||||||
@@ -101,7 +104,7 @@
|
|||||||
</fmt:message></h1>
|
</fmt:message></h1>
|
||||||
</td>
|
</td>
|
||||||
<td align="right" class="standard">
|
<td align="right" class="standard">
|
||||||
<dspace:popup page="/help/site-admin.html#authorize"><fmt:message key="jsp.help"/></dspace:popup>
|
<dspace:popup page="<%= LocaleSupport.getLocalizedMessage(pageContext, \"help.site-admin\") + \"#authorize\"%>"><fmt:message key="jsp.help"/></dspace:popup>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@@ -52,6 +52,7 @@
|
|||||||
- firstname
|
- firstname
|
||||||
- lastname
|
- lastname
|
||||||
- phone
|
- phone
|
||||||
|
- language
|
||||||
- can_log_in - (boolean)
|
- can_log_in - (boolean)
|
||||||
- require_certificate - (boolean)
|
- require_certificate - (boolean)
|
||||||
--%>
|
--%>
|
||||||
@@ -64,6 +65,11 @@
|
|||||||
|
|
||||||
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
||||||
|
|
||||||
|
<%@ page import="java.util.Locale"%>
|
||||||
|
|
||||||
|
<%@ page import="javax.servlet.jsp.jstl.fmt.LocaleSupport" %>
|
||||||
|
|
||||||
|
<%@ page import="org.dspace.core.I18nUtil" %>
|
||||||
<%@ page import="org.dspace.eperson.EPerson, org.dspace.core.ConfigurationManager" %>
|
<%@ page import="org.dspace.eperson.EPerson, org.dspace.core.ConfigurationManager" %>
|
||||||
<%@ page import="org.dspace.eperson.Group" %>
|
<%@ page import="org.dspace.eperson.Group" %>
|
||||||
|
|
||||||
@@ -81,6 +87,7 @@
|
|||||||
String lastName = eperson.getLastName();
|
String lastName = eperson.getLastName();
|
||||||
String phone = eperson.getMetadata("phone");
|
String phone = eperson.getMetadata("phone");
|
||||||
String netid = eperson.getNetid();
|
String netid = eperson.getNetid();
|
||||||
|
String language = eperson.getMetadata("language");
|
||||||
boolean emailExists = (request.getAttribute("email_exists") != null);
|
boolean emailExists = (request.getAttribute("email_exists") != null);
|
||||||
|
|
||||||
boolean ldap_enabled = ConfigurationManager.getBooleanProperty("ldap.enable");
|
boolean ldap_enabled = ConfigurationManager.getBooleanProperty("ldap.enable");
|
||||||
@@ -103,7 +110,7 @@
|
|||||||
</fmt:message></h1>
|
</fmt:message></h1>
|
||||||
</td>
|
</td>
|
||||||
<td align="right" class="standard">
|
<td align="right" class="standard">
|
||||||
<dspace:popup page="/help/site-admin.html#epeople"><fmt:message key="jsp.help"/></dspace:popup>
|
<dspace:popup page="<%= LocaleSupport.getLocalizedMessage(pageContext, \"help.site-admin\") + \"#epeople\"%>"><fmt:message key="jsp.help"/></dspace:popup>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@@ -158,6 +165,36 @@
|
|||||||
<input name="phone" id="tphone" size="24" value="<%=phone == null ? "" : phone%>"/>
|
<input name="phone" id="tphone" size="24" value="<%=phone == null ? "" : phone%>"/>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><label for="tlanguage"><fmt:message key="jsp.register.profile-form.language.field"/></label></td>
|
||||||
|
<td class="standard">
|
||||||
|
<select name="language" id="tlanguage">
|
||||||
|
<%
|
||||||
|
Locale[] supportedLocales = I18nUtil.getSupportedLocales();
|
||||||
|
|
||||||
|
for (int i = supportedLocales.length-1; i >= 0; i--)
|
||||||
|
{
|
||||||
|
String lang = supportedLocales[i].toString();
|
||||||
|
String selected = "";
|
||||||
|
|
||||||
|
if (language == null || language.equals(""))
|
||||||
|
{ if(lang.equals(I18nUtil.getSupportedLocale(request.getLocale()).getLanguage()))
|
||||||
|
{
|
||||||
|
selected = "selected=\"selected\"";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (lang.equals(language))
|
||||||
|
{ selected = "selected=\"selected\"";}
|
||||||
|
%>
|
||||||
|
<option <%= selected %>
|
||||||
|
value="<%= lang %>"><%= supportedLocales[i].getDisplayName(I18nUtil.getSupportedLocale(request.getLocale())) %></option>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<%-- <td>Can Log In:</td> --%>
|
<%-- <td>Can Log In:</td> --%>
|
||||||
<td><label for="tcan_log_in"><fmt:message key="jsp.dspace-admin.eperson-edit.can"/></label></td>
|
<td><label for="tcan_log_in"><fmt:message key="jsp.dspace-admin.eperson-edit.can"/></label></td>
|
||||||
|
@@ -52,6 +52,7 @@
|
|||||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt"
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt"
|
||||||
prefix="fmt" %>
|
prefix="fmt" %>
|
||||||
|
|
||||||
|
<%@ page import="javax.servlet.jsp.jstl.fmt.LocaleSupport" %>
|
||||||
|
|
||||||
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
||||||
|
|
||||||
@@ -74,7 +75,7 @@
|
|||||||
<h3><fmt:message key="jsp.dspace-admin.eperson-main.choose"/></h3>
|
<h3><fmt:message key="jsp.dspace-admin.eperson-main.choose"/></h3>
|
||||||
</td>
|
</td>
|
||||||
<td align="right" class="standard">
|
<td align="right" class="standard">
|
||||||
<dspace:popup page="/help/site-admin.html#epeople"><fmt:message key="jsp.help"/></dspace:popup>
|
<dspace:popup page="<%= LocaleSupport.getLocalizedMessage(pageContext, \"help.site-admin\") + \"epeople\"%>"><fmt:message key="jsp.help"/></dspace:popup>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@@ -53,8 +53,11 @@
|
|||||||
|
|
||||||
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
||||||
|
|
||||||
|
<%@ page import="javax.servlet.jsp.jstl.fmt.LocaleSupport" %>
|
||||||
|
|
||||||
<%@ page import="org.dspace.core.ConfigurationManager" %>
|
<%@ page import="org.dspace.core.ConfigurationManager" %>
|
||||||
|
|
||||||
|
|
||||||
<dspace:layout titlekey="jsp.dspace-admin.item-select.title"
|
<dspace:layout titlekey="jsp.dspace-admin.item-select.title"
|
||||||
navbar="admin"
|
navbar="admin"
|
||||||
locbar="link"
|
locbar="link"
|
||||||
@@ -78,7 +81,7 @@
|
|||||||
|
|
||||||
<%-- <p>Enter the Handle or internal item ID of the item you wish to select. --%>
|
<%-- <p>Enter the Handle or internal item ID of the item you wish to select. --%>
|
||||||
<div><fmt:message key="jsp.dspace-admin.item-select.enter"/>
|
<div><fmt:message key="jsp.dspace-admin.item-select.enter"/>
|
||||||
<dspace:popup page="/help/site-admin.html#itempolicies"><fmt:message key="jsp.morehelp"/></dspace:popup></div>
|
<dspace:popup page="<%= LocaleSupport.getLocalizedMessage(pageContext, \"help.site-admin\") + \"#itempolicies\"%>"><fmt:message key="jsp.morehelp"/></dspace:popup></div>
|
||||||
|
|
||||||
<form method="post" action="">
|
<form method="post" action="">
|
||||||
<center>
|
<center>
|
||||||
|
@@ -55,11 +55,14 @@
|
|||||||
|
|
||||||
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
||||||
|
|
||||||
|
<%@ page import="javax.servlet.jsp.jstl.fmt.LocaleSupport" %>
|
||||||
|
|
||||||
<%@ page import="org.dspace.content.BitstreamFormat" %>
|
<%@ page import="org.dspace.content.BitstreamFormat" %>
|
||||||
<%@ page import="org.dspace.core.Context"%>
|
<%@ page import="org.dspace.core.Context"%>
|
||||||
<%@ page import="org.dspace.app.webui.util.UIUtil"%>
|
<%@ page import="org.dspace.app.webui.util.UIUtil"%>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<%
|
<%
|
||||||
BitstreamFormat[] formats =
|
BitstreamFormat[] formats =
|
||||||
(BitstreamFormat[]) request.getAttribute("formats");
|
(BitstreamFormat[]) request.getAttribute("formats");
|
||||||
@@ -76,7 +79,7 @@
|
|||||||
<p><fmt:message key="jsp.dspace-admin.list-formats.text1"/></p>
|
<p><fmt:message key="jsp.dspace-admin.list-formats.text1"/></p>
|
||||||
<p><fmt:message key="jsp.dspace-admin.list-formats.text2"/></p>
|
<p><fmt:message key="jsp.dspace-admin.list-formats.text2"/></p>
|
||||||
|
|
||||||
<dspace:popup page="/help/site-admin.html#bitstream"><fmt:message key="jsp.help"/></dspace:popup>
|
<dspace:popup page="<%= LocaleSupport.getLocalizedMessage(pageContext, \"help.site-admin\") + \"#bitstream\"%>"><fmt:message key="jsp.help"/></dspace:popup>
|
||||||
|
|
||||||
<%
|
<%
|
||||||
Context context = UIUtil.obtainContext(request);
|
Context context = UIUtil.obtainContext(request);
|
||||||
|
@@ -56,9 +56,13 @@
|
|||||||
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
||||||
|
|
||||||
<%@ page import="java.lang.String" %>
|
<%@ page import="java.lang.String" %>
|
||||||
|
|
||||||
|
<%@ page import="javax.servlet.jsp.jstl.fmt.LocaleSupport" %>
|
||||||
|
|
||||||
<%@ page import="org.dspace.content.MetadataField" %>
|
<%@ page import="org.dspace.content.MetadataField" %>
|
||||||
<%@ page import="org.dspace.content.MetadataSchema" %>
|
<%@ page import="org.dspace.content.MetadataSchema" %>
|
||||||
|
|
||||||
|
|
||||||
<%
|
<%
|
||||||
MetadataField[] types =
|
MetadataField[] types =
|
||||||
(MetadataField[]) request.getAttribute("types");
|
(MetadataField[]) request.getAttribute("types");
|
||||||
@@ -83,7 +87,7 @@
|
|||||||
<a href="<%=request.getContextPath()%>/dspace-admin/metadata-schema-registry">
|
<a href="<%=request.getContextPath()%>/dspace-admin/metadata-schema-registry">
|
||||||
<fmt:message key="jsp.dspace-admin.list-metadata-fields.schemas"/>
|
<fmt:message key="jsp.dspace-admin.list-metadata-fields.schemas"/>
|
||||||
</a> |
|
</a> |
|
||||||
<dspace:popup page="/help/site-admin.html#dublincore"><fmt:message key="jsp.help"/></dspace:popup>
|
<dspace:popup page="<%= LocaleSupport.getLocalizedMessage(pageContext, \"help.site-admin\") + \"#dublincore\"%>"><fmt:message key="jsp.help"/></dspace:popup>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@@ -55,8 +55,11 @@
|
|||||||
|
|
||||||
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
||||||
|
|
||||||
|
<%@ page import="javax.servlet.jsp.jstl.fmt.LocaleSupport" %>
|
||||||
|
|
||||||
<%@ page import="org.dspace.content.MetadataSchema" %>
|
<%@ page import="org.dspace.content.MetadataSchema" %>
|
||||||
|
|
||||||
|
|
||||||
<%
|
<%
|
||||||
MetadataSchema[] schemas =
|
MetadataSchema[] schemas =
|
||||||
(MetadataSchema[]) request.getAttribute("schemas");
|
(MetadataSchema[]) request.getAttribute("schemas");
|
||||||
@@ -74,7 +77,7 @@
|
|||||||
<h1><fmt:message key="jsp.dspace-admin.list-metadata-schemas.title"/></h1>
|
<h1><fmt:message key="jsp.dspace-admin.list-metadata-schemas.title"/></h1>
|
||||||
</td>
|
</td>
|
||||||
<td align="right" class="standard">
|
<td align="right" class="standard">
|
||||||
<dspace:popup page="/help/site-admin.html#dublincore"><fmt:message key="jsp.help"/></dspace:popup>
|
<dspace:popup page="<%= LocaleSupport.getLocalizedMessage(pageContext, \"help.site-admin\") + \"#dublincore\"%>"><fmt:message key="jsp.help"/></dspace:popup>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@@ -50,7 +50,7 @@
|
|||||||
<%@ page import="org.dspace.core.Constants" %>
|
<%@ page import="org.dspace.core.Constants" %>
|
||||||
|
|
||||||
<%
|
<%
|
||||||
Integer position = (Integer)request.getAttribute("position");
|
String position = (String)request.getAttribute("position");
|
||||||
|
|
||||||
//get the existing news
|
//get the existing news
|
||||||
String news = (String)request.getAttribute("news");
|
String news = (String)request.getAttribute("news");
|
||||||
@@ -76,7 +76,7 @@
|
|||||||
<form action="<%= request.getContextPath() %>/dspace-admin/news-edit" method="post">
|
<form action="<%= request.getContextPath() %>/dspace-admin/news-edit" method="post">
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<% if (position.intValue() == Constants.NEWS_TOP)
|
<% if (position.contains("top"))
|
||||||
{ %>
|
{ %>
|
||||||
<fmt:message key="jsp.dspace-admin.news-edit.text.topbox"/>
|
<fmt:message key="jsp.dspace-admin.news-edit.text.topbox"/>
|
||||||
<% }
|
<% }
|
||||||
@@ -96,7 +96,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" align="center">
|
<td colspan="2" align="center">
|
||||||
<input type="hidden" name="position" value='<%= position.intValue()%>'/>
|
<input type="hidden" name="position" value='<%= position %>'/>
|
||||||
<%-- <input type="submit" name="submit_save" value="Save"> --%>
|
<%-- <input type="submit" name="submit_save" value="Save"> --%>
|
||||||
<input type="submit" name="submit_save" value="<fmt:message key="jsp.dspace-admin.general.save"/>" />
|
<input type="submit" name="submit_save" value="<fmt:message key="jsp.dspace-admin.general.save"/>" />
|
||||||
<%-- <input type="submit" name="cancel" value="Cancel"> --%>
|
<%-- <input type="submit" name="cancel" value="Cancel"> --%>
|
||||||
|
@@ -51,8 +51,11 @@
|
|||||||
|
|
||||||
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
||||||
|
|
||||||
|
<%@ page import="javax.servlet.jsp.jstl.fmt.LocaleSupport" %>
|
||||||
|
|
||||||
<%@ page import="org.dspace.core.Constants" %>
|
<%@ page import="org.dspace.core.Constants" %>
|
||||||
|
|
||||||
|
|
||||||
<%
|
<%
|
||||||
String news = (String)request.getAttribute("news");
|
String news = (String)request.getAttribute("news");
|
||||||
|
|
||||||
@@ -77,7 +80,7 @@
|
|||||||
<h1><fmt:message key="jsp.dspace-admin.news-main.heading"/></h1>
|
<h1><fmt:message key="jsp.dspace-admin.news-main.heading"/></h1>
|
||||||
</td>
|
</td>
|
||||||
<td align="right" class="standard">
|
<td align="right" class="standard">
|
||||||
<dspace:popup page="/help/site-admin.html#editnews"><fmt:message key="jsp.help"/></dspace:popup>
|
<dspace:popup page="<%= LocaleSupport.getLocalizedMessage(pageContext, \"help.site-admin\") + \"#editnews\"%>"><fmt:message key="jsp.help"/></dspace:popup>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@@ -88,7 +91,7 @@
|
|||||||
<%-- <td class="oddRowOddCol">Top News</td> --%>
|
<%-- <td class="oddRowOddCol">Top News</td> --%>
|
||||||
<th id="t1" class="oddRowOddCol"><fmt:message key="jsp.dspace-admin.news-main.news.top"/></th>
|
<th id="t1" class="oddRowOddCol"><fmt:message key="jsp.dspace-admin.news-main.news.top"/></th>
|
||||||
<td headers="t1" class="oddRowEvenCol">
|
<td headers="t1" class="oddRowEvenCol">
|
||||||
<input type="hidden" name="position" value="<%= Constants.NEWS_TOP %>" />
|
<input type="hidden" name="position" value="<fmt:message key="news-top.html"/>" />
|
||||||
<%-- <input type="submit" name="submit_edit" value="Edit..."> --%>
|
<%-- <input type="submit" name="submit_edit" value="Edit..."> --%>
|
||||||
<input type="submit" name="submit_edit" value="<fmt:message key="jsp.dspace-admin.general.edit"/>" />
|
<input type="submit" name="submit_edit" value="<fmt:message key="jsp.dspace-admin.general.edit"/>" />
|
||||||
</td>
|
</td>
|
||||||
@@ -101,7 +104,7 @@
|
|||||||
<%-- <td class="evenRowOddCol">Sidebar News</td> --%>
|
<%-- <td class="evenRowOddCol">Sidebar News</td> --%>
|
||||||
<th id="t2" class="evenRowOddCol"><fmt:message key="jsp.dspace-admin.news-main.news.sidebar"/></th>
|
<th id="t2" class="evenRowOddCol"><fmt:message key="jsp.dspace-admin.news-main.news.sidebar"/></th>
|
||||||
<td headers="t2" class="evenRowEvenCol">
|
<td headers="t2" class="evenRowEvenCol">
|
||||||
<input type="hidden" name="position" value="<%= Constants.NEWS_SIDE %>" />
|
<input type="hidden" name="position" value="<fmt:message key="news-side.html" />" />
|
||||||
<%-- <input type="submit" name="submit_edit" value="Edit..."> --%>
|
<%-- <input type="submit" name="submit_edit" value="Edit..."> --%>
|
||||||
<input type="submit" name="submit_edit" value="<fmt:message key="jsp.dspace-admin.general.edit"/>" />
|
<input type="submit" name="submit_edit" value="<fmt:message key="jsp.dspace-admin.general.edit"/>" />
|
||||||
</td>
|
</td>
|
||||||
|
@@ -45,9 +45,6 @@
|
|||||||
- collection - collection we're creating
|
- collection - collection we're creating
|
||||||
--%>
|
--%>
|
||||||
|
|
||||||
<%@ page import="org.dspace.app.webui.servlet.admin.CollectionWizardServlet" %>
|
|
||||||
<%@ page import="org.dspace.content.Collection" %>
|
|
||||||
|
|
||||||
<%@ page contentType="text/html;charset=UTF-8" %>
|
<%@ page contentType="text/html;charset=UTF-8" %>
|
||||||
|
|
||||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt"
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt"
|
||||||
@@ -56,6 +53,11 @@
|
|||||||
|
|
||||||
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
||||||
|
|
||||||
|
<%@ page import="javax.servlet.jsp.jstl.fmt.LocaleSupport" %>
|
||||||
|
|
||||||
|
<%@ page import="org.dspace.app.webui.servlet.admin.CollectionWizardServlet" %>
|
||||||
|
<%@ page import="org.dspace.content.Collection" %>
|
||||||
|
|
||||||
<% Collection collection = (Collection) request.getAttribute("collection"); %>
|
<% Collection collection = (Collection) request.getAttribute("collection"); %>
|
||||||
|
|
||||||
<dspace:layout locbar="off"
|
<dspace:layout locbar="off"
|
||||||
@@ -70,7 +72,7 @@
|
|||||||
<h1><fmt:message key="jsp.dspace-admin.wizard-basicinfo.title"/></h1>
|
<h1><fmt:message key="jsp.dspace-admin.wizard-basicinfo.title"/></h1>
|
||||||
</td>
|
</td>
|
||||||
<td class="standard" align="right">
|
<td class="standard" align="right">
|
||||||
<dspace:popup page="/help/site-admin.html#wizard_description"><fmt:message key="jsp.help"/></dspace:popup>
|
<dspace:popup page="<%= LocaleSupport.getLocalizedMessage(pageContext, \"help.site-admin\") + \"#wizard_description\"%>"><fmt:message key="jsp.help"/></dspace:popup>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@@ -45,20 +45,21 @@
|
|||||||
- collection - collection we're creating
|
- collection - collection we're creating
|
||||||
--%>
|
--%>
|
||||||
|
|
||||||
<%@ page import="org.dspace.content.MetadataField" %>
|
|
||||||
<%@ page import="org.dspace.content.MetadataSchema" %>
|
<%@ page import="org.dspace.content.MetadataSchema" %>
|
||||||
<%@ page import="org.dspace.app.webui.util.UIUtil" %>
|
<%@ page import="org.dspace.app.webui.util.UIUtil" %>
|
||||||
<%@ page import="org.dspace.app.webui.servlet.admin.CollectionWizardServlet" %>
|
|
||||||
<%@ page import="org.dspace.content.Collection" %>
|
|
||||||
|
|
||||||
<%@ page contentType="text/html;charset=UTF-8" %>
|
<%@ page contentType="text/html;charset=UTF-8" %>
|
||||||
|
|
||||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt"
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt"
|
||||||
prefix="fmt" %>
|
prefix="fmt" %>
|
||||||
|
|
||||||
|
|
||||||
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
||||||
|
|
||||||
|
<%@ page import="javax.servlet.jsp.jstl.fmt.LocaleSupport" %>
|
||||||
|
|
||||||
|
<%@ page import="org.dspace.app.webui.servlet.admin.CollectionWizardServlet" %>
|
||||||
|
<%@ page import="org.dspace.content.Collection" %>
|
||||||
|
<%@ page import="org.dspace.content.MetadataField" %>
|
||||||
|
|
||||||
<% Collection collection = (Collection) request.getAttribute("collection");
|
<% Collection collection = (Collection) request.getAttribute("collection");
|
||||||
MetadataField[] dcTypes = (MetadataField[]) request.getAttribute("dctypes"); %>
|
MetadataField[] dcTypes = (MetadataField[]) request.getAttribute("dctypes"); %>
|
||||||
|
|
||||||
@@ -75,7 +76,7 @@
|
|||||||
<h1><fmt:message key="jsp.dspace-admin.wizard-default-item.enter"/></h1>
|
<h1><fmt:message key="jsp.dspace-admin.wizard-default-item.enter"/></h1>
|
||||||
</td>
|
</td>
|
||||||
<td class="standard" align="right">
|
<td class="standard" align="right">
|
||||||
<dspace:popup page="/help/site-admin.html#wizard_default"><fmt:message key="jsp.help"/></dspace:popup>
|
<dspace:popup page="<%= LocaleSupport.getLocalizedMessage(pageContext, \"help.site-admin\") + \"#wizard_default\"%>"><fmt:message key="jsp.help"/></dspace:popup>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@@ -47,8 +47,7 @@
|
|||||||
- org.dspace.app.webui.servlet.admin.CollectionWizardServlet
|
- org.dspace.app.webui.servlet.admin.CollectionWizardServlet
|
||||||
--%>
|
--%>
|
||||||
|
|
||||||
<%@ page import="org.dspace.app.webui.servlet.admin.CollectionWizardServlet" %>
|
|
||||||
<%@ page import="org.dspace.content.Collection" %>
|
|
||||||
|
|
||||||
<%@ page contentType="text/html;charset=UTF-8" %>
|
<%@ page contentType="text/html;charset=UTF-8" %>
|
||||||
|
|
||||||
@@ -58,6 +57,11 @@
|
|||||||
|
|
||||||
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
||||||
|
|
||||||
|
<%@ page import="javax.servlet.jsp.jstl.fmt.LocaleSupport" %>
|
||||||
|
|
||||||
|
<%@ page import="org.dspace.app.webui.servlet.admin.CollectionWizardServlet" %>
|
||||||
|
<%@ page import="org.dspace.content.Collection" %>
|
||||||
|
|
||||||
<%
|
<%
|
||||||
Collection collection = (Collection) request.getAttribute("collection");
|
Collection collection = (Collection) request.getAttribute("collection");
|
||||||
int perm = ((Integer) request.getAttribute("permission")).intValue();
|
int perm = ((Integer) request.getAttribute("permission")).intValue();
|
||||||
@@ -142,7 +146,7 @@
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
%>
|
%>
|
||||||
<div><dspace:popup page="/help/site-admin.html#wizard_permissions"><fmt:message key="jsp.morehelp"/></dspace:popup></div>
|
<div><dspace:popup page="<%= LocaleSupport.getLocalizedMessage(pageContext, \"help.site-admin\") + \"#wizard_permissions\"%>"><fmt:message key="jsp.morehelp"/></dspace:popup></div>
|
||||||
<%-- <p>You can change this later using the relevant sections of the DSpace admin UI.</p> --%>
|
<%-- <p>You can change this later using the relevant sections of the DSpace admin UI.</p> --%>
|
||||||
<p><fmt:message key="jsp.dspace-admin.wizard-permissions.change"/></p>
|
<p><fmt:message key="jsp.dspace-admin.wizard-permissions.change"/></p>
|
||||||
|
|
||||||
|
@@ -45,17 +45,18 @@
|
|||||||
- collection - collection we're creating
|
- collection - collection we're creating
|
||||||
--%>
|
--%>
|
||||||
|
|
||||||
<%@ page import="org.dspace.app.webui.servlet.admin.CollectionWizardServlet" %>
|
|
||||||
<%@ page import="org.dspace.content.Collection" %>
|
|
||||||
|
|
||||||
<%@ page contentType="text/html;charset=UTF-8" %>
|
<%@ page contentType="text/html;charset=UTF-8" %>
|
||||||
|
|
||||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt"
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt"
|
||||||
prefix="fmt" %>
|
prefix="fmt" %>
|
||||||
|
|
||||||
|
|
||||||
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
||||||
|
|
||||||
|
<%@ page import="javax.servlet.jsp.jstl.fmt.LocaleSupport" %>
|
||||||
|
|
||||||
|
<%@ page import="org.dspace.app.webui.servlet.admin.CollectionWizardServlet" %>
|
||||||
|
<%@ page import="org.dspace.content.Collection" %>
|
||||||
|
|
||||||
<% Collection collection = (Collection) request.getAttribute("collection"); %>
|
<% Collection collection = (Collection) request.getAttribute("collection"); %>
|
||||||
|
|
||||||
<% Boolean admin_b = (Boolean)request.getAttribute("admin_button");
|
<% Boolean admin_b = (Boolean)request.getAttribute("admin_button");
|
||||||
@@ -71,7 +72,7 @@
|
|||||||
<form action="<%= request.getContextPath() %>/tools/collection-wizard" method="post">
|
<form action="<%= request.getContextPath() %>/tools/collection-wizard" method="post">
|
||||||
<%--<p>Please check the boxes next to the statements that apply to the collection. --%>
|
<%--<p>Please check the boxes next to the statements that apply to the collection. --%>
|
||||||
<div><fmt:message key="jsp.dspace-admin.wizard-questions.text"/>
|
<div><fmt:message key="jsp.dspace-admin.wizard-questions.text"/>
|
||||||
<dspace:popup page="/help/site-admin.html#createcollection"><fmt:message key="jsp.morehelp"/></dspace:popup></div>
|
<dspace:popup page="<%= LocaleSupport.getLocalizedMessage(pageContext, \"help.site-admin\") + \"#createcollection\"%>"><fmt:message key="jsp.morehelp"/></dspace:popup></div>
|
||||||
<center>
|
<center>
|
||||||
<table class="miscTable">
|
<table class="miscTable">
|
||||||
<tr class="oddRowOddCol">
|
<tr class="oddRowOddCol">
|
||||||
|
@@ -94,7 +94,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td align="left">
|
<td align="left">
|
||||||
<%-- <input type="submit" name="submit_abort_confirm" value="Abort"/> --%>
|
<%-- <input type="submit" name="submit_abort_confirm" value="Abort"/> --%>
|
||||||
<input type="submit" name="submit_abort_confirm" value="<fmt:message key="jsp.dspace-admin.general.abort"/>" />
|
<input type="submit" name="submit_abort_confirm" value="<fmt:message key="jsp.dspace-admin.workflow-abort-confirm.button"/>" />
|
||||||
</td>
|
</td>
|
||||||
<td align="right">
|
<td align="right">
|
||||||
<%-- <input type="submit" name="submit_cancel" value="Cancel"/> --%>
|
<%-- <input type="submit" name="submit_cancel" value="Cancel"/> --%>
|
||||||
|
@@ -55,11 +55,13 @@
|
|||||||
|
|
||||||
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
||||||
|
|
||||||
|
<%@ page import="javax.servlet.jsp.jstl.fmt.LocaleSupport" %>
|
||||||
|
|
||||||
<%@ page import="org.dspace.administer.DCType" %>
|
<%@ page import="org.dspace.administer.DCType" %>
|
||||||
<%@ page import="org.dspace.workflow.WorkflowManager" %>
|
|
||||||
<%@ page import="org.dspace.workflow.WorkflowItem" %>
|
|
||||||
<%@ page import="org.dspace.content.Collection" %>
|
<%@ page import="org.dspace.content.Collection" %>
|
||||||
<%@ page import="org.dspace.core.Utils" %>
|
<%@ page import="org.dspace.core.Utils" %>
|
||||||
|
<%@ page import="org.dspace.workflow.WorkflowManager" %>
|
||||||
|
<%@ page import="org.dspace.workflow.WorkflowItem" %>
|
||||||
|
|
||||||
<%
|
<%
|
||||||
WorkflowItem[] workflows =
|
WorkflowItem[] workflows =
|
||||||
@@ -79,7 +81,7 @@
|
|||||||
<td align="left"><h1><fmt:message key="jsp.dspace-admin.workflow-list.heading"/></h1>
|
<td align="left"><h1><fmt:message key="jsp.dspace-admin.workflow-list.heading"/></h1>
|
||||||
</td>
|
</td>
|
||||||
<td align="right" class="standard">
|
<td align="right" class="standard">
|
||||||
<dspace:popup page="/help/site-admin.html#workflow"><fmt:message key="jsp.help"/></dspace:popup>
|
<dspace:popup page="<%= LocaleSupport.getLocalizedMessage(pageContext, \"help.site-admin\") + \"#workflow\"%>"><fmt:message key="jsp.help"/></dspace:popup>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@@ -54,6 +54,8 @@
|
|||||||
|
|
||||||
<%@ page import="java.sql.SQLException" %>
|
<%@ page import="java.sql.SQLException" %>
|
||||||
|
|
||||||
|
<%@ page import="javax.servlet.jsp.jstl.fmt.LocaleSupport" %>
|
||||||
|
|
||||||
<%@ page import="org.apache.log4j.Logger" %>
|
<%@ page import="org.apache.log4j.Logger" %>
|
||||||
|
|
||||||
<%@ page import="org.dspace.app.webui.util.JSPManager" %>
|
<%@ page import="org.dspace.app.webui.util.JSPManager" %>
|
||||||
@@ -103,7 +105,7 @@
|
|||||||
|
|
||||||
<%-- <h2 align="center"><a name="top">DSpace Supported Formats</a></h2> --%>
|
<%-- <h2 align="center"><a name="top">DSpace Supported Formats</a></h2> --%>
|
||||||
<h2 align="center"><a name="top"><fmt:message key="jsp.help.formats.title"/></a></h2>
|
<h2 align="center"><a name="top"><fmt:message key="jsp.help.formats.title"/></a></h2>
|
||||||
<p align="right"><a href="index.html"><fmt:message key="jsp.help.formats.return"/></a></p>
|
<p align="right"><a href="<%= LocaleSupport.getLocalizedMessage(pageContext, \"help.index\")%>"><fmt:message key="jsp.help.formats.return"/></a></p>
|
||||||
|
|
||||||
<%-- <h5><a href="#policy">Format Support Policy</a></h5> --%>
|
<%-- <h5><a href="#policy">Format Support Policy</a></h5> --%>
|
||||||
<h5><a href="#policy"><fmt:message key="jsp.help.formats.policy"/></a></h5>
|
<h5><a href="#policy"><fmt:message key="jsp.help.formats.policy"/></a></h5>
|
||||||
|
@@ -52,16 +52,23 @@
|
|||||||
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
||||||
|
|
||||||
<%@ page import="java.io.File" %>
|
<%@ page import="java.io.File" %>
|
||||||
|
<%@ page import="java.util.Enumeration"%>
|
||||||
|
<%@ page import="java.util.Locale"%>
|
||||||
|
<%@ page import="javax.servlet.jsp.jstl.core.*" %>
|
||||||
|
<%@ page import="javax.servlet.jsp.jstl.fmt.LocaleSupport" %>
|
||||||
|
<%@ page import="org.dspace.core.I18nUtil" %>
|
||||||
|
<%@ page import="org.dspace.app.webui.util.UIUtil" %>
|
||||||
<%@ page import="org.dspace.content.Community" %>
|
<%@ page import="org.dspace.content.Community" %>
|
||||||
<%@ page import="org.dspace.core.ConfigurationManager" %>
|
<%@ page import="org.dspace.core.ConfigurationManager" %>
|
||||||
<%@ page import="org.dspace.core.Constants" %>
|
|
||||||
|
|
||||||
<%
|
<%
|
||||||
Community[] communities = (Community[]) request.getAttribute("communities");
|
Community[] communities = (Community[]) request.getAttribute("communities");
|
||||||
|
|
||||||
String topNews = ConfigurationManager.readNewsFile(Constants.NEWS_TOP);
|
Locale[] supportedLocales = I18nUtil.getSupportedLocales();
|
||||||
String sideNews = ConfigurationManager.readNewsFile(Constants.NEWS_SIDE);
|
Locale sessionLocale = UIUtil.getSessionLocale(request);
|
||||||
|
Config.set(request.getSession(), Config.FMT_LOCALE, sessionLocale);
|
||||||
|
String topNews = ConfigurationManager.readNewsFile(LocaleSupport.getLocalizedMessage(pageContext, "news-top.html"));
|
||||||
|
String sideNews = ConfigurationManager.readNewsFile(LocaleSupport.getLocalizedMessage(pageContext, "news-side.html"));
|
||||||
|
|
||||||
boolean feedEnabled = ConfigurationManager.getBooleanProperty("webui.feed.enable");
|
boolean feedEnabled = ConfigurationManager.getBooleanProperty("webui.feed.enable");
|
||||||
String feedData = "NONE";
|
String feedData = "NONE";
|
||||||
@@ -74,7 +81,30 @@
|
|||||||
|
|
||||||
<dspace:layout locbar="nolink" titlekey="jsp.home.title" feedData="<%= feedData %>">
|
<dspace:layout locbar="nolink" titlekey="jsp.home.title" feedData="<%= feedData %>">
|
||||||
|
|
||||||
<table class="miscTable" width="95%" align="center">
|
<table width="95%" align="center">
|
||||||
|
<tr align="right">
|
||||||
|
<td align="right">
|
||||||
|
<% if (supportedLocales != null && supportedLocales.length > 1)
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<form method="get" name="repost" action="">
|
||||||
|
<input type ="hidden" name ="locale"/>
|
||||||
|
</form>
|
||||||
|
<%
|
||||||
|
for (int i = supportedLocales.length-1; i >= 0; i--)
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<a class ="langChangeOn"
|
||||||
|
onclick="javascript:document.repost.locale.value='<%=supportedLocales[i].toString()%>';
|
||||||
|
document.repost.submit();">
|
||||||
|
<%= supportedLocales[i].getDisplayLanguage(supportedLocales[i])%>
|
||||||
|
</a>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="oddRowEvenCol"><%= topNews %></td>
|
<td class="oddRowEvenCol"><%= topNews %></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@@ -55,9 +55,14 @@
|
|||||||
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
||||||
|
|
||||||
<%@ page import="java.sql.SQLException" %>
|
<%@ page import="java.sql.SQLException" %>
|
||||||
|
<%@ page import="java.util.Locale"%>
|
||||||
|
|
||||||
|
<%@ page import="javax.servlet.jsp.jstl.core.*" %>
|
||||||
|
<%@ page import="javax.servlet.jsp.jstl.fmt.*" %>
|
||||||
|
|
||||||
<%@ page import="org.apache.log4j.Logger" %>
|
<%@ page import="org.apache.log4j.Logger" %>
|
||||||
|
|
||||||
|
<%@ page import="org.dspace.core.I18nUtil" %>
|
||||||
<%@ page import="org.dspace.app.webui.util.JSPManager" %>
|
<%@ page import="org.dspace.app.webui.util.JSPManager" %>
|
||||||
<%@ page import="org.dspace.app.webui.util.UIUtil" %>
|
<%@ page import="org.dspace.app.webui.util.UIUtil" %>
|
||||||
<%@ page import="org.dspace.content.Community" %>
|
<%@ page import="org.dspace.content.Community" %>
|
||||||
@@ -67,6 +72,9 @@
|
|||||||
<%
|
<%
|
||||||
Context context = null;
|
Context context = null;
|
||||||
|
|
||||||
|
Locale sessionLocale = UIUtil.getSessionLocale(request);
|
||||||
|
Config.set(request.getSession(), Config.FMT_LOCALE, sessionLocale);
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// Obtain a context so that the location bar can display log in status
|
// Obtain a context so that the location bar can display log in status
|
||||||
|
@@ -47,8 +47,11 @@
|
|||||||
<%@ page import="java.util.LinkedList" %>
|
<%@ page import="java.util.LinkedList" %>
|
||||||
<%@ page import="java.util.List" %>
|
<%@ page import="java.util.List" %>
|
||||||
|
|
||||||
|
<%@ page import="javax.servlet.jsp.jstl.fmt.LocaleSupport" %>
|
||||||
|
|
||||||
<%@ page import="org.dspace.app.webui.util.UIUtil" %>
|
<%@ page import="org.dspace.app.webui.util.UIUtil" %>
|
||||||
|
|
||||||
|
|
||||||
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
||||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
|
||||||
|
|
||||||
@@ -182,7 +185,7 @@
|
|||||||
<img alt="" src="<%= request.getContextPath() %>/image/arrow.gif" width="16" height="16"/>
|
<img alt="" src="<%= request.getContextPath() %>/image/arrow.gif" width="16" height="16"/>
|
||||||
</td>
|
</td>
|
||||||
<td nowrap="nowrap" class="navigationBarItem">
|
<td nowrap="nowrap" class="navigationBarItem">
|
||||||
<dspace:popup page="/help/site-admin.html"><fmt:message key="jsp.layout.navbar-admin.help"/></dspace:popup>
|
<dspace:popup page="<%= LocaleSupport.getLocalizedMessage(pageContext, \"help.site-admin\")%>"><fmt:message key="jsp.layout.navbar-admin.help"/></dspace:popup>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
@@ -50,13 +50,13 @@
|
|||||||
|
|
||||||
<%@ page import="java.util.ArrayList" %>
|
<%@ page import="java.util.ArrayList" %>
|
||||||
<%@ page import="java.util.List" %>
|
<%@ page import="java.util.List" %>
|
||||||
|
<%@ page import="javax.servlet.jsp.jstl.fmt.LocaleSupport" %>
|
||||||
<%@ page import="org.dspace.app.webui.util.UIUtil" %>
|
<%@ page import="org.dspace.app.webui.util.UIUtil" %>
|
||||||
<%@ page import="org.dspace.content.Collection" %>
|
<%@ page import="org.dspace.content.Collection" %>
|
||||||
<%@ page import="org.dspace.content.Community" %>
|
<%@ page import="org.dspace.content.Community" %>
|
||||||
<%@ page import="org.dspace.eperson.EPerson" %>
|
<%@ page import="org.dspace.eperson.EPerson" %>
|
||||||
<%@ page import="org.dspace.core.ConfigurationManager" %>
|
<%@ page import="org.dspace.core.ConfigurationManager" %>
|
||||||
|
|
||||||
|
|
||||||
<%
|
<%
|
||||||
// Is anyone logged in?
|
// Is anyone logged in?
|
||||||
EPerson user = (EPerson) request.getAttribute("dspace.current.user");
|
EPerson user = (EPerson) request.getAttribute("dspace.current.user");
|
||||||
@@ -254,7 +254,7 @@
|
|||||||
<img alt="" src="<%= request.getContextPath() %>/image/<%= ( currentPage.endsWith( "/help" ) ? "arrow-highlight" : "arrow" ) %>.gif" width="16" height="16"/>
|
<img alt="" src="<%= request.getContextPath() %>/image/<%= ( currentPage.endsWith( "/help" ) ? "arrow-highlight" : "arrow" ) %>.gif" width="16" height="16"/>
|
||||||
</td>
|
</td>
|
||||||
<td nowrap="nowrap" class="navigationBarItem">
|
<td nowrap="nowrap" class="navigationBarItem">
|
||||||
<dspace:popup page="/help/index.html"><fmt:message key="jsp.layout.navbar-default.help"/></dspace:popup>
|
<dspace:popup page="<%= LocaleSupport.getLocalizedMessage(pageContext, \"help.index\")%>"><fmt:message key="jsp.layout.navbar-default.help"/></dspace:popup>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
@@ -46,10 +46,12 @@
|
|||||||
<%@ page contentType="text/html;charset=UTF-8" %>
|
<%@ page contentType="text/html;charset=UTF-8" %>
|
||||||
|
|
||||||
<%@ page import="java.util.Iterator" %>
|
<%@ page import="java.util.Iterator" %>
|
||||||
|
|
||||||
|
<%@ page import="javax.servlet.jsp.jstl.fmt.LocaleSupport" %>
|
||||||
|
|
||||||
|
<%@ page import="org.dspace.core.Context" %>
|
||||||
<%@ page import="org.dspace.eperson.AuthenticationManager" %>
|
<%@ page import="org.dspace.eperson.AuthenticationManager" %>
|
||||||
<%@ page import="org.dspace.eperson.AuthenticationMethod" %>
|
<%@ page import="org.dspace.eperson.AuthenticationMethod" %>
|
||||||
<%@ page import="org.dspace.core.Context" %>
|
|
||||||
|
|
||||||
|
|
||||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt"
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt"
|
||||||
prefix="fmt" %>
|
prefix="fmt" %>
|
||||||
@@ -65,7 +67,7 @@
|
|||||||
<h1><fmt:message key="jsp.login.chooser.heading"/></h1>
|
<h1><fmt:message key="jsp.login.chooser.heading"/></h1>
|
||||||
</td>
|
</td>
|
||||||
<td align="right" class="standard">
|
<td align="right" class="standard">
|
||||||
<dspace:popup page="/help/index.html#login"><fmt:message key="jsp.help"/></dspace:popup>
|
<dspace:popup page="<%= LocaleSupport.getLocalizedMessage(pageContext, \"help.index\") + \"#login\" %>"><fmt:message key="jsp.help"/></dspace:popup>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@@ -50,6 +50,9 @@
|
|||||||
|
|
||||||
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
||||||
|
|
||||||
|
<%@ page import="javax.servlet.jsp.jstl.fmt.LocaleSupport" %>
|
||||||
|
|
||||||
|
|
||||||
<dspace:layout navbar="off"
|
<dspace:layout navbar="off"
|
||||||
locbar="nolink"
|
locbar="nolink"
|
||||||
titlekey="jsp.login.incorrect.title">
|
titlekey="jsp.login.incorrect.title">
|
||||||
@@ -61,7 +64,7 @@
|
|||||||
<h1><fmt:message key="jsp.login.incorrect.heading"/></h1>
|
<h1><fmt:message key="jsp.login.incorrect.heading"/></h1>
|
||||||
</td>
|
</td>
|
||||||
<td align="right" class="standard">
|
<td align="right" class="standard">
|
||||||
<dspace:popup page="/help/index.html#login"><fmt:message key="jsp.help"/></dspace:popup>
|
<dspace:popup page="<%= LocaleSupport.getLocalizedMessage(pageContext, \"help.index\") + \"#login\"%>"><fmt:message key="jsp.help"/></dspace:popup>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@@ -46,6 +46,8 @@
|
|||||||
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
||||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
|
||||||
|
|
||||||
|
<%@ page import="javax.servlet.jsp.jstl.fmt.LocaleSupport" %>
|
||||||
|
|
||||||
<dspace:layout navbar="off"
|
<dspace:layout navbar="off"
|
||||||
locbar="nolink"
|
locbar="nolink"
|
||||||
titlekey="jsp.login.ldap-incorrect.title">
|
titlekey="jsp.login.ldap-incorrect.title">
|
||||||
@@ -55,7 +57,7 @@
|
|||||||
<h1><fmt:message key="jsp.login.ldap-incorrect.heading"/></h1>
|
<h1><fmt:message key="jsp.login.ldap-incorrect.heading"/></h1>
|
||||||
</td>
|
</td>
|
||||||
<td align="right" class="standard">
|
<td align="right" class="standard">
|
||||||
<dspace:popup page="/help/index.html#login"><fmt:message key="jsp.help"/></dspace:popup>
|
<dspace:popup page="<%= LocaleSupport.getLocalizedMessage(pageContext, \"help.index\") + \"#login\" %>"><fmt:message key="jsp.help"/></dspace:popup>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@@ -46,6 +46,8 @@
|
|||||||
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
||||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
|
||||||
|
|
||||||
|
<%@ page import="javax.servlet.jsp.jstl.fmt.LocaleSupport" %>
|
||||||
|
|
||||||
<dspace:layout navbar="off"
|
<dspace:layout navbar="off"
|
||||||
locbar="off"
|
locbar="off"
|
||||||
titlekey="jsp.login.ldap.title">
|
titlekey="jsp.login.ldap.title">
|
||||||
@@ -56,7 +58,7 @@
|
|||||||
<h1><fmt:message key="jsp.login.ldap.heading"/></h1>
|
<h1><fmt:message key="jsp.login.ldap.heading"/></h1>
|
||||||
</td>
|
</td>
|
||||||
<td align="right" class="standard">
|
<td align="right" class="standard">
|
||||||
<dspace:popup page="/help/index.html#login"><fmt:message key="jsp.help"/></dspace:popup>
|
<dspace:popup page="<%= LocaleSupport.getLocalizedMessage(pageContext, \"help.index\") + \"#login\"%>"><fmt:message key="jsp.help"/></dspace:popup>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@@ -50,6 +50,8 @@
|
|||||||
|
|
||||||
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
||||||
|
|
||||||
|
<%@ page import="javax.servlet.jsp.jstl.fmt.LocaleSupport" %>
|
||||||
|
|
||||||
<dspace:layout navbar="off" locbar="nolink" titlekey="jsp.login.no-valid-cert.title">
|
<dspace:layout navbar="off" locbar="nolink" titlekey="jsp.login.no-valid-cert.title">
|
||||||
|
|
||||||
<table border="0" width="90%">
|
<table border="0" width="90%">
|
||||||
@@ -59,7 +61,7 @@
|
|||||||
<h1><fmt:message key="jsp.login.no-valid-cert.heading"/></h1>
|
<h1><fmt:message key="jsp.login.no-valid-cert.heading"/></h1>
|
||||||
</td>
|
</td>
|
||||||
<td align="right" class="standard">
|
<td align="right" class="standard">
|
||||||
<dspace:popup page="/help/index.html#login"><fmt:message key="jsp.help"/></dspace:popup>
|
<dspace:popup page="<%= LocaleSupport.getLocalizedMessage(pageContext, \"help.index\") + \"#login\" %>"><fmt:message key="jsp.help"/></dspace:popup>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@@ -48,6 +48,8 @@
|
|||||||
|
|
||||||
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
||||||
|
|
||||||
|
<%@ page import="javax.servlet.jsp.jstl.fmt.LocaleSupport" %>
|
||||||
|
|
||||||
<dspace:layout navbar="off" locbar="off" titlekey="jsp.login.password.title" nocache="true">
|
<dspace:layout navbar="off" locbar="off" titlekey="jsp.login.password.title" nocache="true">
|
||||||
|
|
||||||
<table border="0" width="90%">
|
<table border="0" width="90%">
|
||||||
@@ -57,7 +59,7 @@
|
|||||||
<h1><fmt:message key="jsp.login.password.heading"/></h1>
|
<h1><fmt:message key="jsp.login.password.heading"/></h1>
|
||||||
</td>
|
</td>
|
||||||
<td align="right" class="standard">
|
<td align="right" class="standard">
|
||||||
<dspace:popup page="/help/index.html#login"><fmt:message key="jsp.help"/></dspace:popup>
|
<dspace:popup page="<%= LocaleSupport.getLocalizedMessage(pageContext, \"help.index\") + \"#login\"%>"><fmt:message key="jsp.help"/></dspace:popup>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@@ -110,7 +110,7 @@
|
|||||||
</h1>
|
</h1>
|
||||||
</td>
|
</td>
|
||||||
<td align="right" class="standard">
|
<td align="right" class="standard">
|
||||||
<dspace:popup page="/help/index.html#mydspace"><fmt:message key="jsp.help"/></dspace:popup>
|
<dspace:popup page="<%= LocaleSupport.getLocalizedMessage(pageContext, \"help.index\") + \"#mydspace\"%>"><fmt:message key="jsp.help"/></dspace:popup>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@@ -54,6 +54,8 @@
|
|||||||
|
|
||||||
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
||||||
|
|
||||||
|
<%@ page import="javax.servlet.jsp.jstl.fmt.LocaleSupport" %>
|
||||||
|
|
||||||
<%@ page import="org.dspace.content.Community" %>
|
<%@ page import="org.dspace.content.Community" %>
|
||||||
<%@ page import="org.dspace.content.Collection" %>
|
<%@ page import="org.dspace.content.Collection" %>
|
||||||
|
|
||||||
@@ -76,8 +78,7 @@
|
|||||||
<h1><fmt:message key="jsp.mydspace.subscriptions.title"/></h1>
|
<h1><fmt:message key="jsp.mydspace.subscriptions.title"/></h1>
|
||||||
</td>
|
</td>
|
||||||
<td align="right" class="standard">
|
<td align="right" class="standard">
|
||||||
<%-- <dspace:popup page="/help/index.html#subscribe">Help...</dspace:popup> --%>
|
<dspace:popup page="<%= LocaleSupport.getLocalizedMessage(pageContext, \"help.index\") +\"#subscribe\" %>"><fmt:message key="jsp.help"/></dspace:popup>
|
||||||
<dspace:popup page="/help/index.html#subscribe"><fmt:message key="jsp.help"/></dspace:popup>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@@ -57,6 +57,8 @@
|
|||||||
|
|
||||||
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
||||||
|
|
||||||
|
<%@ page import="javax.servlet.jsp.jstl.fmt.LocaleSupport" %>
|
||||||
|
|
||||||
<%@ page import="org.dspace.eperson.EPerson, org.dspace.core.ConfigurationManager" %>
|
<%@ page import="org.dspace.eperson.EPerson, org.dspace.core.ConfigurationManager" %>
|
||||||
|
|
||||||
<%
|
<%
|
||||||
@@ -97,7 +99,7 @@
|
|||||||
%>
|
%>
|
||||||
|
|
||||||
<div><fmt:message key="jsp.register.edit-profile.info3"/>
|
<div><fmt:message key="jsp.register.edit-profile.info3"/>
|
||||||
<dspace:popup page="/help/index.html#editprofile"><fmt:message key="jsp.morehelp"/></dspace:popup></div>
|
<dspace:popup page="<%= LocaleSupport.getLocalizedMessage(pageContext, \"help.index\") + \"#editprofile\"%>"><fmt:message key="jsp.morehelp"/></dspace:popup></div>
|
||||||
|
|
||||||
<form action="<%= request.getContextPath() %>/profile" method="post">
|
<form action="<%= request.getContextPath() %>/profile" method="post">
|
||||||
|
|
||||||
|
@@ -55,14 +55,19 @@
|
|||||||
|
|
||||||
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
||||||
|
|
||||||
|
<%@ page import="java.util.Locale"%>
|
||||||
|
|
||||||
|
<%@ page import="org.dspace.core.I18nUtil" %>
|
||||||
<%@ page import="org.dspace.eperson.EPerson" %>
|
<%@ page import="org.dspace.eperson.EPerson" %>
|
||||||
|
|
||||||
<%
|
<%
|
||||||
|
Locale[] supportedLocales = I18nUtil.getSupportedLocales();
|
||||||
EPerson epersonForm = (EPerson) request.getAttribute("eperson");
|
EPerson epersonForm = (EPerson) request.getAttribute("eperson");
|
||||||
|
|
||||||
String lastName = "";
|
String lastName = "";
|
||||||
String firstName = "";
|
String firstName = "";
|
||||||
String phone = "";
|
String phone = "";
|
||||||
|
String language = "";
|
||||||
|
|
||||||
if (epersonForm != null)
|
if (epersonForm != null)
|
||||||
{
|
{
|
||||||
@@ -75,6 +80,9 @@
|
|||||||
|
|
||||||
phone = epersonForm.getMetadata("phone");
|
phone = epersonForm.getMetadata("phone");
|
||||||
if (phone == null) phone = "";
|
if (phone == null) phone = "";
|
||||||
|
|
||||||
|
language = epersonForm.getMetadata("language");
|
||||||
|
if (language == null) language = "";
|
||||||
}
|
}
|
||||||
%>
|
%>
|
||||||
|
|
||||||
@@ -94,4 +102,31 @@
|
|||||||
<td align="right" class="standard"><label for="tphone"><strong><fmt:message key="jsp.register.profile-form.phone.field"/></strong></label></td>
|
<td align="right" class="standard"><label for="tphone"><strong><fmt:message key="jsp.register.profile-form.phone.field"/></strong></label></td>
|
||||||
<td class="standard"><input type="text" name="phone" id="tphone" size="40" maxlength="32" value="<%= phone %>"/></td>
|
<td class="standard"><input type="text" name="phone" id="tphone" size="40" maxlength="32" value="<%= phone %>"/></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="right" class="standard"><label for="tlanguage"><strong><fmt:message key="jsp.register.profile-form.language.field"/></strong></label></td>
|
||||||
|
<td class="standard">
|
||||||
|
<select name="language" id="tlanguage">
|
||||||
|
<%
|
||||||
|
for (int i = supportedLocales.length-1; i >= 0; i--)
|
||||||
|
{
|
||||||
|
String lang = supportedLocales[i].toString();
|
||||||
|
String selected = "";
|
||||||
|
|
||||||
|
if (language.equals(""))
|
||||||
|
{ if(lang.equals(I18nUtil.getSupportedLocale(request.getLocale()).getLanguage()))
|
||||||
|
{
|
||||||
|
selected = "selected=\"selected\"";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (lang.equals(language))
|
||||||
|
{ selected = "selected=\"selected\"";}
|
||||||
|
%>
|
||||||
|
<option <%= selected %>
|
||||||
|
value="<%= lang %>"><%= supportedLocales[i].getDisplayName(I18nUtil.getSupportedLocale(request.getLocale())) %></option>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@@ -121,6 +121,16 @@ UL { font-family: "verdana", "Arial", "Helvetica", sans-serif;
|
|||||||
font-family: "verdana", "Arial", "Helvetica", sans-serif;
|
font-family: "verdana", "Arial", "Helvetica", sans-serif;
|
||||||
font-size: 10pt }
|
font-size: 10pt }
|
||||||
|
|
||||||
|
.langChangeOff { text-decoration: none;
|
||||||
|
color : #bbbbbb;
|
||||||
|
cursor : default;
|
||||||
|
font-size: 10pt }
|
||||||
|
|
||||||
|
.langChangeOn { text-decoration: underline;
|
||||||
|
color: #336699;
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 10pt }
|
||||||
|
|
||||||
.pageBanner { width: 100%;
|
.pageBanner { width: 100%;
|
||||||
border: 0;
|
border: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
@@ -50,6 +50,8 @@
|
|||||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt"
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt"
|
||||||
prefix="fmt" %>
|
prefix="fmt" %>
|
||||||
|
|
||||||
|
<%@ page import="javax.servlet.jsp.jstl.fmt.LocaleSupport" %>
|
||||||
|
|
||||||
<%@ page import="org.dspace.app.webui.servlet.SubmitServlet" %>
|
<%@ page import="org.dspace.app.webui.servlet.SubmitServlet" %>
|
||||||
<%@ page import="org.dspace.app.webui.util.SubmissionInfo" %>
|
<%@ page import="org.dspace.app.webui.util.SubmissionInfo" %>
|
||||||
<%@ page import="org.dspace.content.Bitstream" %>
|
<%@ page import="org.dspace.content.Bitstream" %>
|
||||||
@@ -81,7 +83,7 @@
|
|||||||
<%-- <p>Here are the details of the file.
|
<%-- <p>Here are the details of the file.
|
||||||
<dspace:popup page="/help/index.html#filedescription">(More Help...)</dspace:popup></p> --%>
|
<dspace:popup page="/help/index.html#filedescription">(More Help...)</dspace:popup></p> --%>
|
||||||
<div><fmt:message key="jsp.submit.change-file-description.info1"/>
|
<div><fmt:message key="jsp.submit.change-file-description.info1"/>
|
||||||
<dspace:popup page="/help/index.html#filedescription"><fmt:message key="jsp.morehelp"/></dspace:popup></div>
|
<dspace:popup page="<%= LocaleSupport.getLocalizedMessage(pageContext, \"help.index\") + \"#filedescription\"%>"><fmt:message key="jsp.morehelp"/></dspace:popup></div>
|
||||||
|
|
||||||
<table class="miscTable" align="center" summary="Change file descripton details">
|
<table class="miscTable" align="center" summary="Change file descripton details">
|
||||||
<tr>
|
<tr>
|
||||||
|
@@ -50,11 +50,13 @@
|
|||||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt"
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt"
|
||||||
prefix="fmt" %>
|
prefix="fmt" %>
|
||||||
|
|
||||||
|
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
||||||
|
|
||||||
|
<%@ page import="javax.servlet.jsp.jstl.fmt.LocaleSupport" %>
|
||||||
|
|
||||||
<%@ page import="org.dspace.app.webui.servlet.SubmitServlet" %>
|
<%@ page import="org.dspace.app.webui.servlet.SubmitServlet" %>
|
||||||
<%@ page import="org.dspace.app.webui.util.SubmissionInfo" %>
|
<%@ page import="org.dspace.app.webui.util.SubmissionInfo" %>
|
||||||
|
|
||||||
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
|
||||||
|
|
||||||
<%
|
<%
|
||||||
SubmissionInfo si =
|
SubmissionInfo si =
|
||||||
@@ -85,7 +87,7 @@
|
|||||||
local hard drive. <object><dspace:popup page="/help/index.html#upload">(More Help...)</dspace:popup></object></p> --%>
|
local hard drive. <object><dspace:popup page="/help/index.html#upload">(More Help...)</dspace:popup></object></p> --%>
|
||||||
|
|
||||||
<div><fmt:message key="jsp.submit.choose-file.info1"/>
|
<div><fmt:message key="jsp.submit.choose-file.info1"/>
|
||||||
<dspace:popup page="/help/index.html#upload"><fmt:message key="jsp.morehelp"/></dspace:popup></div>
|
<dspace:popup page="<%= LocaleSupport.getLocalizedMessage(pageContext, \"help.index\") + \"#upload\"%>"><fmt:message key="jsp.morehelp"/></dspace:popup></div>
|
||||||
|
|
||||||
<%-- <p class="submitFormHelp"><strong>Netscape users please note:</strong> By
|
<%-- <p class="submitFormHelp"><strong>Netscape users please note:</strong> By
|
||||||
default, the window brought up by clicking "Browse..." will only display
|
default, the window brought up by clicking "Browse..." will only display
|
||||||
|
@@ -49,18 +49,23 @@
|
|||||||
|
|
||||||
<%@ page contentType="text/html;charset=UTF-8" %>
|
<%@ page contentType="text/html;charset=UTF-8" %>
|
||||||
|
|
||||||
|
<%@ page import="java.util.ArrayList" %>
|
||||||
<%@ page import="java.util.HashMap" %>
|
<%@ page import="java.util.HashMap" %>
|
||||||
<%@ page import="java.util.Iterator" %>
|
<%@ page import="java.util.Iterator" %>
|
||||||
<%@ page import="java.util.List" %>
|
<%@ page import="java.util.List" %>
|
||||||
<%@ page import="java.util.ArrayList" %>
|
|
||||||
<%@ page import="java.util.Map" %>
|
<%@ page import="java.util.Map" %>
|
||||||
<%@ page import="java.net.URLEncoder" %>
|
<%@ page import="java.net.URLEncoder" %>
|
||||||
|
|
||||||
|
<%@ page import="javax.servlet.jsp.jstl.fmt.LocaleSupport" %>
|
||||||
|
<%@ page import="javax.servlet.jsp.tagext.TagSupport" %>
|
||||||
|
<%@ page import="javax.servlet.jsp.PageContext" %>
|
||||||
<%@ page import="javax.servlet.ServletException" %>
|
<%@ page import="javax.servlet.ServletException" %>
|
||||||
|
|
||||||
<%@ page import="org.dspace.app.webui.jsptag.PopupTag" %>
|
<%@ page import="org.dspace.app.webui.jsptag.PopupTag" %>
|
||||||
|
<%@ page import="org.dspace.app.webui.servlet.SubmitServlet" %>
|
||||||
<%@ page import="org.dspace.app.webui.util.DCInput" %>
|
<%@ page import="org.dspace.app.webui.util.DCInput" %>
|
||||||
<%@ page import="org.dspace.app.webui.util.DCInputSet" %>
|
<%@ page import="org.dspace.app.webui.util.DCInputSet" %>
|
||||||
<%@ page import="org.dspace.app.webui.servlet.SubmitServlet" %>
|
<%@ page import="org.dspace.core.I18nUtil" %>
|
||||||
<%@ page import="org.dspace.app.webui.util.JSPManager" %>
|
<%@ page import="org.dspace.app.webui.util.JSPManager" %>
|
||||||
<%@ page import="org.dspace.app.webui.util.SubmissionInfo" %>
|
<%@ page import="org.dspace.app.webui.util.SubmissionInfo" %>
|
||||||
<%@ page import="org.dspace.app.webui.util.UIUtil" %>
|
<%@ page import="org.dspace.app.webui.util.UIUtil" %>
|
||||||
@@ -70,11 +75,6 @@
|
|||||||
<%@ page import="org.dspace.content.DCSeriesNumber" %>
|
<%@ page import="org.dspace.content.DCSeriesNumber" %>
|
||||||
<%@ page import="org.dspace.content.DCValue" %>
|
<%@ page import="org.dspace.content.DCValue" %>
|
||||||
<%@ page import="org.dspace.content.Item" %>
|
<%@ page import="org.dspace.content.Item" %>
|
||||||
|
|
||||||
<%@ page import="javax.servlet.jsp.jstl.fmt.LocaleSupport" %>
|
|
||||||
<%@ page import="javax.servlet.jsp.tagext.TagSupport" %>
|
|
||||||
<%@ page import="javax.servlet.jsp.PageContext" %>
|
|
||||||
|
|
||||||
<%@ page import="org.dspace.core.ConfigurationManager" %>
|
<%@ page import="org.dspace.core.ConfigurationManager" %>
|
||||||
|
|
||||||
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
||||||
@@ -227,7 +227,7 @@
|
|||||||
|
|
||||||
void doDate(javax.servlet.jsp.JspWriter out, Item item,
|
void doDate(javax.servlet.jsp.JspWriter out, Item item,
|
||||||
String fieldName, String schema, String element, String qualifier, boolean repeatable,
|
String fieldName, String schema, String element, String qualifier, boolean repeatable,
|
||||||
int fieldCountIncr, String label, PageContext pageContext)
|
int fieldCountIncr, String label, PageContext pageContext, HttpServletRequest request)
|
||||||
throws java.io.IOException
|
throws java.io.IOException
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -274,7 +274,7 @@
|
|||||||
.append(j)
|
.append(j)
|
||||||
.append((dateIssued.getMonth() == j ? "\" selected=\"selected\"" : "\"" ))
|
.append((dateIssued.getMonth() == j ? "\" selected=\"selected\"" : "\"" ))
|
||||||
.append(">")
|
.append(">")
|
||||||
.append(org.dspace.content.DCDate.getMonthName(j))
|
.append(org.dspace.content.DCDate.getMonthName(j,I18nUtil.getSupportedLocale(request.getLocale())))
|
||||||
.append("</option>");
|
.append("</option>");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -871,14 +871,14 @@
|
|||||||
{
|
{
|
||||||
%>
|
%>
|
||||||
<div><fmt:message key="jsp.submit.edit-metadata.info1"/>
|
<div><fmt:message key="jsp.submit.edit-metadata.info1"/>
|
||||||
<dspace:popup page="/help/index.html#describe2"><fmt:message key="jsp.submit.edit-metadata.help"/></dspace:popup></div>
|
<dspace:popup page="<%= LocaleSupport.getLocalizedMessage(pageContext, \"help.index\") + \"#describe2\"%>"><fmt:message key="jsp.submit.edit-metadata.help"/></dspace:popup></div>
|
||||||
<%
|
<%
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
%>
|
%>
|
||||||
<div><fmt:message key="jsp.submit.edit-metadata.info2"/>
|
<div><fmt:message key="jsp.submit.edit-metadata.info2"/>
|
||||||
<dspace:popup page="/help/index.html#describe3"><fmt:message key="jsp.submit.edit-metadata.help"/></dspace:popup></div>
|
<dspace:popup page="<%= LocaleSupport.getLocalizedMessage(pageContext, \"help.index\") + \"#describe3\"%>"><fmt:message key="jsp.submit.edit-metadata.help"/></dspace:popup></div>
|
||||||
|
|
||||||
<%
|
<%
|
||||||
}
|
}
|
||||||
@@ -959,7 +959,7 @@
|
|||||||
else if (inputType.equals("date"))
|
else if (inputType.equals("date"))
|
||||||
{
|
{
|
||||||
doDate(out, item, fieldName, dcSchema, dcElement, dcQualifier,
|
doDate(out, item, fieldName, dcSchema, dcElement, dcQualifier,
|
||||||
repeatable, fieldCountIncr, label, pageContext);
|
repeatable, fieldCountIncr, label, pageContext, request);
|
||||||
}
|
}
|
||||||
else if (inputType.equals("series"))
|
else if (inputType.equals("series"))
|
||||||
{
|
{
|
||||||
|
@@ -54,6 +54,7 @@
|
|||||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt"
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt"
|
||||||
prefix="fmt" %>
|
prefix="fmt" %>
|
||||||
|
|
||||||
|
<%@ page import="javax.servlet.jsp.jstl.fmt.LocaleSupport" %>
|
||||||
|
|
||||||
<%@ page import="org.dspace.app.webui.servlet.SubmitServlet" %>
|
<%@ page import="org.dspace.app.webui.servlet.SubmitServlet" %>
|
||||||
<%@ page import="org.dspace.app.webui.util.SubmissionInfo" %>
|
<%@ page import="org.dspace.app.webui.util.SubmissionInfo" %>
|
||||||
@@ -129,7 +130,7 @@
|
|||||||
<dspace:popup page="/help/index.html#formats">(More Help...)</dspace:popup></p> --%>
|
<dspace:popup page="/help/index.html#formats">(More Help...)</dspace:popup></p> --%>
|
||||||
|
|
||||||
<div><fmt:message key="jsp.submit.get-file-format.info5"/>
|
<div><fmt:message key="jsp.submit.get-file-format.info5"/>
|
||||||
<dspace:popup page="/help/index.html#formats"><fmt:message key="jsp.morehelp"/></dspace:popup></div>
|
<dspace:popup page="<%= LocaleSupport.getLocalizedMessage(pageContext, \"help.index\") + \"#formats\" %>"><fmt:message key="jsp.morehelp"/></dspace:popup></div>
|
||||||
|
|
||||||
<center>
|
<center>
|
||||||
<select name="format" size="8">
|
<select name="format" size="8">
|
||||||
|
@@ -51,6 +51,7 @@
|
|||||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt"
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt"
|
||||||
prefix="fmt" %>
|
prefix="fmt" %>
|
||||||
|
|
||||||
|
<%@ page import="javax.servlet.jsp.jstl.fmt.LocaleSupport" %>
|
||||||
|
|
||||||
<%@ page import="org.dspace.app.webui.servlet.SubmitServlet" %>
|
<%@ page import="org.dspace.app.webui.servlet.SubmitServlet" %>
|
||||||
<%@ page import="org.dspace.app.webui.util.SubmissionInfo" %>
|
<%@ page import="org.dspace.app.webui.util.SubmissionInfo" %>
|
||||||
@@ -87,7 +88,7 @@
|
|||||||
<object><dspace:popup page="/help/index.html#describe1">(More Help...)</dspace:popup></object></p> --%>
|
<object><dspace:popup page="/help/index.html#describe1">(More Help...)</dspace:popup></object></p> --%>
|
||||||
|
|
||||||
<div><fmt:message key="jsp.submit.initial-questions.info" />
|
<div><fmt:message key="jsp.submit.initial-questions.info" />
|
||||||
<dspace:popup page="/help/index.html#describe1"><fmt:message key="jsp.morehelp"/></dspace:popup></div>
|
<dspace:popup page="<%= LocaleSupport.getLocalizedMessage(pageContext, \"help.index\") + \"#describe1\"%>"><fmt:message key="jsp.morehelp"/></dspace:popup></div>
|
||||||
|
|
||||||
<center>
|
<center>
|
||||||
<table class="miscTable">
|
<table class="miscTable">
|
||||||
|
@@ -50,24 +50,23 @@
|
|||||||
|
|
||||||
<%@ page import="java.io.IOException" %>
|
<%@ page import="java.io.IOException" %>
|
||||||
|
|
||||||
|
<%@ page import="javax.servlet.jsp.jstl.fmt.LocaleSupport" %>
|
||||||
|
<%@ page import="javax.servlet.jsp.PageContext" %>
|
||||||
|
|
||||||
<%@ page import="org.dspace.app.webui.servlet.SubmitServlet" %>
|
<%@ page import="org.dspace.app.webui.servlet.SubmitServlet" %>
|
||||||
<%@ page import="org.dspace.app.webui.util.SubmissionInfo" %>
|
|
||||||
<%@ page import="org.dspace.content.InProgressSubmission" %>
|
|
||||||
<%@ page import="org.dspace.app.webui.util.UIUtil" %>
|
|
||||||
<%@ page import="org.dspace.app.webui.util.DCInputSet" %>
|
<%@ page import="org.dspace.app.webui.util.DCInputSet" %>
|
||||||
<%@ page import="org.dspace.app.webui.util.DCInput" %>
|
<%@ page import="org.dspace.app.webui.util.DCInput" %>
|
||||||
|
<%@ page import="org.dspace.app.webui.util.SubmissionInfo" %>
|
||||||
|
<%@ page import="org.dspace.app.webui.util.UIUtil" %>
|
||||||
<%@ page import="org.dspace.content.Bitstream" %>
|
<%@ page import="org.dspace.content.Bitstream" %>
|
||||||
<%@ page import="org.dspace.content.BitstreamFormat" %>
|
<%@ page import="org.dspace.content.BitstreamFormat" %>
|
||||||
<%@ page import="org.dspace.content.DCDate" %>
|
<%@ page import="org.dspace.content.DCDate" %>
|
||||||
<%@ page import="org.dspace.content.DCLanguage" %>
|
<%@ page import="org.dspace.content.DCLanguage" %>
|
||||||
<%@ page import="org.dspace.content.DCValue" %>
|
<%@ page import="org.dspace.content.DCValue" %>
|
||||||
|
<%@ page import="org.dspace.content.InProgressSubmission" %>
|
||||||
<%@ page import="org.dspace.content.Item" %>
|
<%@ page import="org.dspace.content.Item" %>
|
||||||
<%@ page import="org.dspace.core.Utils" %>
|
<%@ page import="org.dspace.core.Utils" %>
|
||||||
|
|
||||||
<%@ page import="javax.servlet.jsp.jstl.fmt.LocaleSupport" %>
|
|
||||||
<%@ page import="javax.servlet.jsp.PageContext" %>
|
|
||||||
|
|
||||||
|
|
||||||
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
||||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
|
||||||
|
|
||||||
@@ -129,7 +128,7 @@
|
|||||||
if (inputType.equals("date"))
|
if (inputType.equals("date"))
|
||||||
{
|
{
|
||||||
DCDate date = new DCDate(values[i].value);
|
DCDate date = new DCDate(values[i].value);
|
||||||
row.append(UIUtil.displayDate(date, false, true));
|
row.append(UIUtil.displayDate(date, false, true, request));
|
||||||
}
|
}
|
||||||
else if (inputType.equals("dropdown"))
|
else if (inputType.equals("dropdown"))
|
||||||
{
|
{
|
||||||
@@ -177,7 +176,7 @@
|
|||||||
<p><fmt:message key="jsp.submit.review.info1"/></p>
|
<p><fmt:message key="jsp.submit.review.info1"/></p>
|
||||||
|
|
||||||
<div><fmt:message key="jsp.submit.review.info2"/>
|
<div><fmt:message key="jsp.submit.review.info2"/>
|
||||||
<dspace:popup page="/help/index.html#verify"><fmt:message key="jsp.morehelp"/></dspace:popup></div>
|
<dspace:popup page="<%= LocaleSupport.getLocalizedMessage(pageContext, \"help.index\") + \"#verify\"%>"><fmt:message key="jsp.morehelp"/></dspace:popup></div>
|
||||||
|
|
||||||
<p><fmt:message key="jsp.submit.review.info3"/></p>
|
<p><fmt:message key="jsp.submit.review.info3"/></p>
|
||||||
|
|
||||||
|
@@ -47,13 +47,14 @@
|
|||||||
|
|
||||||
<%@ page contentType="text/html;charset=UTF-8" %>
|
<%@ page contentType="text/html;charset=UTF-8" %>
|
||||||
|
|
||||||
|
<%@ page import="javax.servlet.jsp.jstl.fmt.LocaleSupport" %>
|
||||||
|
|
||||||
<%@ page import="org.dspace.content.Collection" %>
|
<%@ page import="org.dspace.content.Collection" %>
|
||||||
<%@ page import="org.dspace.app.webui.servlet.SubmitServlet" %>
|
<%@ page import="org.dspace.app.webui.servlet.SubmitServlet" %>
|
||||||
|
|
||||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt"
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt"
|
||||||
prefix="fmt" %>
|
prefix="fmt" %>
|
||||||
|
|
||||||
|
|
||||||
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
||||||
|
|
||||||
<%
|
<%
|
||||||
@@ -79,7 +80,7 @@
|
|||||||
{
|
{
|
||||||
%>
|
%>
|
||||||
<div><fmt:message key="jsp.submit.select-collection.info1"/>
|
<div><fmt:message key="jsp.submit.select-collection.info1"/>
|
||||||
<dspace:popup page="/help/index.html#choosecollection"><fmt:message key="jsp.morehelp"/> </dspace:popup>
|
<dspace:popup page="<%= LocaleSupport.getLocalizedMessage(pageContext, \"help.index\") + \"#choosecollection\"%>"><fmt:message key="jsp.morehelp"/> </dspace:popup>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<form action="<%= request.getContextPath() %>/submit" method="post">
|
<form action="<%= request.getContextPath() %>/submit" method="post">
|
||||||
|
@@ -51,6 +51,7 @@
|
|||||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt"
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt"
|
||||||
prefix="fmt" %>
|
prefix="fmt" %>
|
||||||
|
|
||||||
|
<%@ page import="javax.servlet.jsp.jstl.fmt.LocaleSupport" %>
|
||||||
|
|
||||||
<%@ page import="org.dspace.app.webui.servlet.SubmitServlet" %>
|
<%@ page import="org.dspace.app.webui.servlet.SubmitServlet" %>
|
||||||
<%@ page import="org.dspace.app.webui.util.SubmissionInfo" %>
|
<%@ page import="org.dspace.app.webui.util.SubmissionInfo" %>
|
||||||
@@ -78,7 +79,7 @@
|
|||||||
</jsp:include>
|
</jsp:include>
|
||||||
|
|
||||||
<div><fmt:message key="jsp.submit.show-license.info1"/>
|
<div><fmt:message key="jsp.submit.show-license.info1"/>
|
||||||
<dspace:popup page="/help/index.html#license"><fmt:message key="jsp.morehelp"/></dspace:popup></div>
|
<dspace:popup page="<%= LocaleSupport.getLocalizedMessage(pageContext, \"help.index\") +\"#license\"%>"><fmt:message key="jsp.morehelp"/></dspace:popup></div>
|
||||||
|
|
||||||
<%-- <p><strong>Not granting the license will not delete your submission.</strong>
|
<%-- <p><strong>Not granting the license will not delete your submission.</strong>
|
||||||
Your item will remain in your "My DSpace" page. You can then either remove
|
Your item will remain in your "My DSpace" page. You can then either remove
|
||||||
|
@@ -56,6 +56,8 @@
|
|||||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt"
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt"
|
||||||
prefix="fmt" %>
|
prefix="fmt" %>
|
||||||
|
|
||||||
|
<%@ page import="javax.servlet.jsp.jstl.fmt.LocaleSupport" %>
|
||||||
|
|
||||||
<%@ page import="org.dspace.app.webui.servlet.SubmitServlet" %>
|
<%@ page import="org.dspace.app.webui.servlet.SubmitServlet" %>
|
||||||
<%@ page import="org.dspace.app.webui.util.SubmissionInfo" %>
|
<%@ page import="org.dspace.app.webui.util.SubmissionInfo" %>
|
||||||
<%@ page import="org.dspace.content.Bitstream" %>
|
<%@ page import="org.dspace.content.Bitstream" %>
|
||||||
@@ -114,7 +116,7 @@
|
|||||||
<dspace:popup page="/help/index.html#uploadedfile">(More Help...)</dspace:popup></p> --%>
|
<dspace:popup page="/help/index.html#uploadedfile">(More Help...)</dspace:popup></p> --%>
|
||||||
|
|
||||||
<div><fmt:message key="jsp.submit.show-uploaded-file.info2"/>
|
<div><fmt:message key="jsp.submit.show-uploaded-file.info2"/>
|
||||||
<dspace:popup page="/help/index.html#uploadedfile"><fmt:message key="jsp.morehelp"/></dspace:popup></div>
|
<dspace:popup page="<%= LocaleSupport.getLocalizedMessage(pageContext, \"help.index\")+ \"#uploadedfile\"%>"><fmt:message key="jsp.morehelp"/></dspace:popup></div>
|
||||||
|
|
||||||
<table class="miscTable" align="center">
|
<table class="miscTable" align="center">
|
||||||
<tr>
|
<tr>
|
||||||
@@ -195,14 +197,14 @@
|
|||||||
{
|
{
|
||||||
%>
|
%>
|
||||||
<li class="uploadHelp"><fmt:message key="jsp.submit.show-uploaded-file.info5"/>
|
<li class="uploadHelp"><fmt:message key="jsp.submit.show-uploaded-file.info5"/>
|
||||||
<dspace:popup page="/help/index.html#checksum"><fmt:message key="jsp.submit.show-uploaded-file.info6"/></dspace:popup></li>
|
<dspace:popup page="<%= LocaleSupport.getLocalizedMessage(pageContext, \"help.index\") +\"#checksum\"%>"><fmt:message key="jsp.submit.show-uploaded-file.info6"/></dspace:popup></li>
|
||||||
<%
|
<%
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
%>
|
%>
|
||||||
<li class="uploadHelp"><fmt:message key="jsp.submit.show-uploaded-file.info7"/>
|
<li class="uploadHelp"><fmt:message key="jsp.submit.show-uploaded-file.info7"/>
|
||||||
<dspace:popup page="/help/index.html#checksum"><fmt:message key="jsp.submit.show-uploaded-file.info8"/></dspace:popup><input type="submit" name="submit_show_checksums" value="<fmt:message key="jsp.submit.show-uploaded-file.show.button"/>" /></li>
|
<dspace:popup page="<%= LocaleSupport.getLocalizedMessage(pageContext, \"help.index\") + \"#checksum\"%>"><fmt:message key="jsp.submit.show-uploaded-file.info8"/></dspace:popup><input type="submit" name="submit_show_checksums" value="<fmt:message key="jsp.submit.show-uploaded-file.show.button"/>" /></li>
|
||||||
<%
|
<%
|
||||||
}
|
}
|
||||||
%>
|
%>
|
||||||
|
@@ -53,12 +53,13 @@
|
|||||||
|
|
||||||
<%@ page contentType="text/html;charset=UTF-8" %>
|
<%@ page contentType="text/html;charset=UTF-8" %>
|
||||||
|
|
||||||
|
<%@ page import="javax.servlet.jsp.jstl.fmt.LocaleSupport" %>
|
||||||
|
|
||||||
<%@ page import="org.dspace.app.webui.servlet.SubmitServlet" %>
|
<%@ page import="org.dspace.app.webui.servlet.SubmitServlet" %>
|
||||||
<%@ page import="org.dspace.app.webui.util.SubmissionInfo" %>
|
<%@ page import="org.dspace.app.webui.util.SubmissionInfo" %>
|
||||||
<%@ page import="org.dspace.content.Bitstream" %>
|
<%@ page import="org.dspace.content.Bitstream" %>
|
||||||
<%@ page import="org.dspace.content.BitstreamFormat" %>
|
<%@ page import="org.dspace.content.BitstreamFormat" %>
|
||||||
<%@ page import="org.dspace.content.Bundle" %>
|
<%@ page import="org.dspace.content.Bundle" %>
|
||||||
<%@ page import="javax.servlet.jsp.jstl.fmt.LocaleSupport" %>
|
|
||||||
|
|
||||||
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
||||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
|
||||||
@@ -98,7 +99,7 @@
|
|||||||
<%
|
<%
|
||||||
}
|
}
|
||||||
%>
|
%>
|
||||||
<div><fmt:message key="jsp.submit.upload-file-list.info2"/> <dspace:popup page="/help/index.html#uploadedfile"><fmt:message key="jsp.morehelp"/></dspace:popup></div>
|
<div><fmt:message key="jsp.submit.upload-file-list.info2"/> <dspace:popup page="<%= LocaleSupport.getLocalizedMessage(pageContext, \"help.index\") + \"#uploadedfile\"%>"><fmt:message key="jsp.morehelp"/></dspace:popup></div>
|
||||||
|
|
||||||
<table class="miscTable" align="center" summary="Table dispalying your submitted files">
|
<table class="miscTable" align="center" summary="Table dispalying your submitted files">
|
||||||
<tr>
|
<tr>
|
||||||
@@ -226,14 +227,14 @@
|
|||||||
{
|
{
|
||||||
%>
|
%>
|
||||||
<li class="uploadHelp"><fmt:message key="jsp.submit.upload-file-list.info5"/>
|
<li class="uploadHelp"><fmt:message key="jsp.submit.upload-file-list.info5"/>
|
||||||
<dspace:popup page="/help/index.html#checksum"><fmt:message key="jsp.submit.upload-file-list.help1"/></dspace:popup></li>
|
<dspace:popup page="<%= LocaleSupport.getLocalizedMessage(pageContext, \"help.index\") + \"#checksum\"%>"><fmt:message key="jsp.submit.upload-file-list.help1"/></dspace:popup></li>
|
||||||
<%
|
<%
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
%>
|
%>
|
||||||
<li class="uploadHelp"><fmt:message key="jsp.submit.upload-file-list.info6"/>
|
<li class="uploadHelp"><fmt:message key="jsp.submit.upload-file-list.info6"/>
|
||||||
<dspace:popup page="/help/index.html#checksum"><fmt:message key="jsp.submit.upload-file-list.help2"/></dspace:popup> <input type="submit" name="submit_show_checksums" value="<fmt:message key="jsp.submit.upload-file-list.button3"/>" /></li>
|
<dspace:popup page="<%= LocaleSupport.getLocalizedMessage(pageContext, \"help.index\") + \"#checksum\"%>"><fmt:message key="jsp.submit.upload-file-list.help2"/></dspace:popup> <input type="submit" name="submit_show_checksums" value="<fmt:message key="jsp.submit.upload-file-list.button3"/>" /></li>
|
||||||
<%
|
<%
|
||||||
}
|
}
|
||||||
%>
|
%>
|
||||||
|
@@ -48,6 +48,8 @@
|
|||||||
|
|
||||||
<%@ page contentType="text/html;charset=UTF-8" %>
|
<%@ page contentType="text/html;charset=UTF-8" %>
|
||||||
|
|
||||||
|
<%@ page import="javax.servlet.jsp.jstl.fmt.LocaleSupport" %>
|
||||||
|
|
||||||
<%@ page import="org.dspace.app.webui.servlet.admin.EditCommunitiesServlet" %>
|
<%@ page import="org.dspace.app.webui.servlet.admin.EditCommunitiesServlet" %>
|
||||||
<%@ page import="org.dspace.content.Bitstream" %>
|
<%@ page import="org.dspace.content.Bitstream" %>
|
||||||
<%@ page import="org.dspace.content.Community" %>
|
<%@ page import="org.dspace.content.Community" %>
|
||||||
@@ -145,7 +147,7 @@
|
|||||||
%>
|
%>
|
||||||
</td>
|
</td>
|
||||||
<td align="right" class="standard">
|
<td align="right" class="standard">
|
||||||
<dspace:popup page="/help/site-admin.html#editcommunity"><fmt:message key="jsp.help"/></dspace:popup>
|
<dspace:popup page="<%= LocaleSupport.getLocalizedMessage(pageContext, \"help.site-admin\") + \"#editcommunity\"%>"><fmt:message key="jsp.help"/></dspace:popup>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@@ -53,7 +53,6 @@
|
|||||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt"
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt"
|
||||||
prefix="fmt" %>
|
prefix="fmt" %>
|
||||||
|
|
||||||
|
|
||||||
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
||||||
|
|
||||||
<%@ page import="java.util.Date" %>
|
<%@ page import="java.util.Date" %>
|
||||||
@@ -100,7 +99,7 @@
|
|||||||
<p><strong><fmt:message key="jsp.tools.edit-item-form.note"/></strong></p>
|
<p><strong><fmt:message key="jsp.tools.edit-item-form.note"/></strong></p>
|
||||||
|
|
||||||
<%-- <p><dspace:popup page="/help/collection-admin.html#editmetadata">More help...</dspace:popup></p> --%>
|
<%-- <p><dspace:popup page="/help/collection-admin.html#editmetadata">More help...</dspace:popup></p> --%>
|
||||||
<div><dspace:popup page="/help/collection-admin.html#editmetadata"><fmt:message key="jsp.morehelp"/></dspace:popup></div>
|
<div><dspace:popup page="<%= LocaleSupport.getLocalizedMessage(pageContext, \"help.collection-admin\") + \"#editmetadata\"%>"><fmt:message key="jsp.morehelp"/></dspace:popup></div>
|
||||||
|
|
||||||
<center>
|
<center>
|
||||||
<table width="70%" summary="Edit item table">
|
<table width="70%" summary="Edit item table">
|
||||||
|
@@ -137,6 +137,7 @@
|
|||||||
String sortByParam = "lastname";
|
String sortByParam = "lastname";
|
||||||
if (sortBy == EPerson.EMAIL) sortByParam = "email";
|
if (sortBy == EPerson.EMAIL) sortByParam = "email";
|
||||||
if (sortBy == EPerson.ID) sortByParam = "id";
|
if (sortBy == EPerson.ID) sortByParam = "id";
|
||||||
|
if (sortBy == EPerson.LANGUAGE) sortByParam = "language";
|
||||||
|
|
||||||
String jumpLink;
|
String jumpLink;
|
||||||
if (search != null && !search.equals(""))
|
if (search != null && !search.equals(""))
|
||||||
@@ -282,8 +283,19 @@ function clearEPeople()
|
|||||||
}
|
}
|
||||||
%></th>
|
%></th>
|
||||||
|
|
||||||
<%-- <th class="oddRowOddCol">First Name</th> --%>
|
|
||||||
<th id="t5" class="oddRowOddCol"><fmt:message key="jsp.tools.eperson-list.th.firstname"/></th>
|
<th id="t5" class="oddRowOddCol"><fmt:message key="jsp.tools.eperson-list.th.firstname"/></th>
|
||||||
|
|
||||||
|
<th id="t6" class="oddRowEvenCol"><%
|
||||||
|
if (sortBy == EPerson.LANGUAGE)
|
||||||
|
{
|
||||||
|
%><fmt:message key="jsp.tools.eperson-list.th.language.sortedby" /><%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
%><a href="<%= sortLink %>language"><fmt:message key="jsp.tools.eperson-list.th.language" /></a><%
|
||||||
|
}
|
||||||
|
%></th>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<% }
|
<% }
|
||||||
String row = "even";
|
String row = "even";
|
||||||
@@ -314,6 +326,9 @@ function clearEPeople()
|
|||||||
<td headers="t5" class="<%= row %>RowOddCol">
|
<td headers="t5" class="<%= row %>RowOddCol">
|
||||||
<%= (e.getFirstName() == null ? "" : e.getFirstName()) %>
|
<%= (e.getFirstName() == null ? "" : e.getFirstName()) %>
|
||||||
</td>
|
</td>
|
||||||
|
<td headers="t6" class="<%= row %>RowOddCol">
|
||||||
|
<%= (e.getLanguage() == null ? "" : e.getLanguage()) %>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<%
|
<%
|
||||||
row = (row.equals("odd") ? "even" : "odd");
|
row = (row.equals("odd") ? "even" : "odd");
|
||||||
|
@@ -53,6 +53,8 @@
|
|||||||
|
|
||||||
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
||||||
|
|
||||||
|
<%@ page import="javax.servlet.jsp.jstl.fmt.LocaleSupport" %>
|
||||||
|
|
||||||
<%@ page import="org.dspace.core.ConfigurationManager" %>
|
<%@ page import="org.dspace.core.ConfigurationManager" %>
|
||||||
|
|
||||||
<dspace:layout titlekey="jsp.tools.get-item-id.title"
|
<dspace:layout titlekey="jsp.tools.get-item-id.title"
|
||||||
@@ -77,7 +79,7 @@
|
|||||||
<%-- <p>Enter the Handle or internal item ID of the item you want to edit or
|
<%-- <p>Enter the Handle or internal item ID of the item you want to edit or
|
||||||
delete. <dspace:popup page="/help/site-admin.html#items">More help...</dspace:popup></p> --%>
|
delete. <dspace:popup page="/help/site-admin.html#items">More help...</dspace:popup></p> --%>
|
||||||
|
|
||||||
<div><fmt:message key="jsp.tools.get-item-id.info2"/> <dspace:popup page="/help/site-admin.html#items"><fmt:message key="jsp.morehelp"/></dspace:popup></div>
|
<div><fmt:message key="jsp.tools.get-item-id.info2"/> <dspace:popup page="<%= LocaleSupport.getLocalizedMessage(pageContext, \"help.site-admin\") + \"#items\"%>"><fmt:message key="jsp.morehelp"/></dspace:popup></div>
|
||||||
|
|
||||||
<form method="get" action="">
|
<form method="get" action="">
|
||||||
<center>
|
<center>
|
||||||
|
@@ -55,9 +55,10 @@
|
|||||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt"
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt"
|
||||||
prefix="fmt" %>
|
prefix="fmt" %>
|
||||||
|
|
||||||
|
|
||||||
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
||||||
|
|
||||||
|
<%@ page import="javax.servlet.jsp.jstl.fmt.LocaleSupport" %>
|
||||||
|
|
||||||
<%@ page import="org.dspace.eperson.EPerson" %>
|
<%@ page import="org.dspace.eperson.EPerson" %>
|
||||||
<%@ page import="org.dspace.eperson.Group" %>
|
<%@ page import="org.dspace.eperson.Group" %>
|
||||||
|
|
||||||
@@ -81,7 +82,7 @@
|
|||||||
<h1><fmt:message key="jsp.tools.group-edit.title"/> : <%=group.getName()%> (id: <%=group.getID()%>)</h1>
|
<h1><fmt:message key="jsp.tools.group-edit.title"/> : <%=group.getName()%> (id: <%=group.getID()%>)</h1>
|
||||||
</td>
|
</td>
|
||||||
<td align="right" class="standard">
|
<td align="right" class="standard">
|
||||||
<dspace:popup page="/help/collection-admin.html#groupeditor"><fmt:message key="jsp.help"/></dspace:popup>
|
<dspace:popup page="<%= LocaleSupport.getLocalizedMessage(pageContext, \"help.collection-admin\") +\"#groupeditor\"%>"><fmt:message key="jsp.help"/></dspace:popup>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@@ -52,6 +52,7 @@
|
|||||||
|
|
||||||
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
||||||
|
|
||||||
|
<%@ page import="javax.servlet.jsp.jstl.fmt.LocaleSupport" %>
|
||||||
|
|
||||||
<%@ page import="org.dspace.eperson.EPerson" %>
|
<%@ page import="org.dspace.eperson.EPerson" %>
|
||||||
<%@ page import="org.dspace.eperson.Group" %>
|
<%@ page import="org.dspace.eperson.Group" %>
|
||||||
@@ -76,7 +77,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td align="right" class="standard">
|
<td align="right" class="standard">
|
||||||
<%-- <dspace:popup page="/help/site-admin.html#groups">Help...</dspace:popup> --%>
|
<%-- <dspace:popup page="/help/site-admin.html#groups">Help...</dspace:popup> --%>
|
||||||
<dspace:popup page="/help/site-admin.html#groups"><fmt:message key="jsp.help"/></dspace:popup>
|
<dspace:popup page="<%= LocaleSupport.getLocalizedMessage(pageContext, \"help.site-admin\") + \"#groups\"%>"><fmt:message key="jsp.help"/></dspace:popup>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@@ -55,6 +55,7 @@
|
|||||||
<%@ page import="org.dspace.content.Item" %>
|
<%@ page import="org.dspace.content.Item" %>
|
||||||
<%@ page import="org.dspace.content.WorkspaceItem" %>
|
<%@ page import="org.dspace.content.WorkspaceItem" %>
|
||||||
<%@ page import="org.dspace.eperson.EPerson" %>
|
<%@ page import="org.dspace.eperson.EPerson" %>
|
||||||
|
<%@ page import="javax.servlet.jsp.jstl.fmt.LocaleSupport" %>
|
||||||
|
|
||||||
<%
|
<%
|
||||||
// get the workspace item from the request
|
// get the workspace item from the request
|
||||||
@@ -81,7 +82,7 @@
|
|||||||
</h1>
|
</h1>
|
||||||
</td>
|
</td>
|
||||||
<td align="right" class="standard">
|
<td align="right" class="standard">
|
||||||
<dspace:popup page="/help/index.html#mydspace"><fmt:message key="jsp.help"/></dspace:popup>
|
<dspace:popup page="<%= LocaleSupport.getLocalizedMessage(pageContext, \"help.index\") + \"#mydspace\"%>"><fmt:message key="jsp.help"/></dspace:popup>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@@ -41,12 +41,16 @@ package org.dspace.administer;
|
|||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
import org.apache.commons.cli.CommandLine;
|
import org.apache.commons.cli.CommandLine;
|
||||||
import org.apache.commons.cli.CommandLineParser;
|
import org.apache.commons.cli.CommandLineParser;
|
||||||
import org.apache.commons.cli.Options;
|
import org.apache.commons.cli.Options;
|
||||||
import org.apache.commons.cli.PosixParser;
|
import org.apache.commons.cli.PosixParser;
|
||||||
|
|
||||||
|
import org.dspace.core.ConfigurationManager;
|
||||||
import org.dspace.core.Context;
|
import org.dspace.core.Context;
|
||||||
|
import org.dspace.core.I18nUtil;
|
||||||
import org.dspace.eperson.EPerson;
|
import org.dspace.eperson.EPerson;
|
||||||
import org.dspace.eperson.Group;
|
import org.dspace.eperson.Group;
|
||||||
|
|
||||||
@@ -92,14 +96,17 @@ public class CreateAdministrator
|
|||||||
options.addOption("e", "email", true, "administrator email address");
|
options.addOption("e", "email", true, "administrator email address");
|
||||||
options.addOption("f", "first", true, "administrator first name");
|
options.addOption("f", "first", true, "administrator first name");
|
||||||
options.addOption("l", "last", true, "administrator lastt name");
|
options.addOption("l", "last", true, "administrator lastt name");
|
||||||
|
options.addOption("c", "language", true, "administrator language");
|
||||||
options.addOption("p", "password", true, "administrator password");
|
options.addOption("p", "password", true, "administrator password");
|
||||||
|
|
||||||
CommandLine line = parser.parse(options, argv);
|
CommandLine line = parser.parse(options, argv);
|
||||||
|
|
||||||
if (line.hasOption("e") && line.hasOption("f") && line.hasOption("l") && line.hasOption("p"))
|
if (line.hasOption("e") && line.hasOption("f") && line.hasOption("l") &&
|
||||||
|
line.hasOption("c") && line.hasOption("p"))
|
||||||
{
|
{
|
||||||
ca.createAdministrator(line.getOptionValue("e"), line.getOptionValue("f"),
|
ca.createAdministrator(line.getOptionValue("e"),
|
||||||
line.getOptionValue("l"), line.getOptionValue("p"));
|
line.getOptionValue("f"), line.getOptionValue("l"),
|
||||||
|
line.getOptionValue("c"), line.getOptionValue("p"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -139,6 +146,7 @@ public class CreateAdministrator
|
|||||||
String lastName = null;
|
String lastName = null;
|
||||||
String password1 = null;
|
String password1 = null;
|
||||||
String password2 = null;
|
String password2 = null;
|
||||||
|
String language = I18nUtil.DEFAULTLOCALE.getLanguage();
|
||||||
|
|
||||||
while (!dataOK)
|
while (!dataOK)
|
||||||
{
|
{
|
||||||
@@ -157,6 +165,16 @@ public class CreateAdministrator
|
|||||||
|
|
||||||
lastName = input.readLine().trim();
|
lastName = input.readLine().trim();
|
||||||
|
|
||||||
|
if (ConfigurationManager.getProperty("webui.supported.locales") != null)
|
||||||
|
{
|
||||||
|
System.out.println("Select one of the following languages: " + ConfigurationManager.getProperty("webui.supported.locales"));
|
||||||
|
System.out.print("Language: ");
|
||||||
|
System.out.flush();
|
||||||
|
|
||||||
|
language = input.readLine().trim();
|
||||||
|
language = I18nUtil.getSupportedLocale(new Locale(language)).getLanguage();
|
||||||
|
}
|
||||||
|
|
||||||
System.out.println("WARNING: Password will appear on-screen.");
|
System.out.println("WARNING: Password will appear on-screen.");
|
||||||
System.out.print("Password: ");
|
System.out.print("Password: ");
|
||||||
System.out.flush();
|
System.out.flush();
|
||||||
@@ -188,7 +206,7 @@ public class CreateAdministrator
|
|||||||
}
|
}
|
||||||
|
|
||||||
// if we make it to here, we are ready to create an administrator
|
// if we make it to here, we are ready to create an administrator
|
||||||
createAdministrator(email, firstName, lastName, password1);
|
createAdministrator(email, firstName, lastName, language, password1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -202,7 +220,8 @@ public class CreateAdministrator
|
|||||||
*
|
*
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
private void createAdministrator(String email, String first, String last, String pw)
|
private void createAdministrator(String email, String first, String last,
|
||||||
|
String language, String pw)
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
// Of course we aren't an administrator yet so we need to
|
// Of course we aren't an administrator yet so we need to
|
||||||
@@ -233,6 +252,7 @@ public class CreateAdministrator
|
|||||||
|
|
||||||
eperson.setLastName(last);
|
eperson.setLastName(last);
|
||||||
eperson.setFirstName(first);
|
eperson.setFirstName(first);
|
||||||
|
eperson.setLanguage(language);
|
||||||
eperson.setPassword(pw);
|
eperson.setPassword(pw);
|
||||||
eperson.update();
|
eperson.update();
|
||||||
|
|
||||||
|
@@ -41,6 +41,7 @@ package org.dspace.app.webui.jsptag;
|
|||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.jsp.JspException;
|
import javax.servlet.jsp.JspException;
|
||||||
import javax.servlet.jsp.tagext.TagSupport;
|
import javax.servlet.jsp.tagext.TagSupport;
|
||||||
|
|
||||||
@@ -107,7 +108,7 @@ public class DateTag extends TagSupport
|
|||||||
|
|
||||||
public int doStartTag() throws JspException
|
public int doStartTag() throws JspException
|
||||||
{
|
{
|
||||||
String toDisplay = UIUtil.displayDate(date, displayTime, true);
|
String toDisplay = UIUtil.displayDate(date, displayTime, true, (HttpServletRequest)pageContext.getRequest());
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@@ -248,7 +248,7 @@ public class ItemListTag extends TagSupport
|
|||||||
thumbs = getThumbMarkup(hrq, items[i]);
|
thumbs = getThumbMarkup(hrq, items[i]);
|
||||||
}
|
}
|
||||||
DCDate dd = new DCDate(metadataArray[0].value);
|
DCDate dd = new DCDate(metadataArray[0].value);
|
||||||
metadata = UIUtil.displayDate(dd, false, false) + thumbs;
|
metadata = UIUtil.displayDate(dd, false, false, (HttpServletRequest)pageContext.getRequest()) + thumbs;
|
||||||
}
|
}
|
||||||
// format the title field correctly
|
// format the title field correctly
|
||||||
else if (field.equals(titleField))
|
else if (field.equals(titleField))
|
||||||
|
@@ -364,7 +364,7 @@ public class ItemTag extends TagSupport
|
|||||||
DCDate dd = new DCDate(values[j].value);
|
DCDate dd = new DCDate(values[j].value);
|
||||||
|
|
||||||
// Parse the date
|
// Parse the date
|
||||||
out.print(UIUtil.displayDate(dd, false, false));
|
out.print(UIUtil.displayDate(dd, false, false, (HttpServletRequest)pageContext.getRequest()));
|
||||||
}
|
}
|
||||||
else if (isAuthor)
|
else if (isAuthor)
|
||||||
{
|
{
|
||||||
|
@@ -161,11 +161,13 @@ public class EditProfileServlet extends DSpaceServlet
|
|||||||
String lastName = request.getParameter("last_name");
|
String lastName = request.getParameter("last_name");
|
||||||
String firstName = request.getParameter("first_name");
|
String firstName = request.getParameter("first_name");
|
||||||
String phone = request.getParameter("phone");
|
String phone = request.getParameter("phone");
|
||||||
|
String language = request.getParameter("language");
|
||||||
|
|
||||||
// Update the eperson
|
// Update the eperson
|
||||||
eperson.setFirstName(firstName);
|
eperson.setFirstName(firstName);
|
||||||
eperson.setLastName(lastName);
|
eperson.setLastName(lastName);
|
||||||
eperson.setMetadata("phone", phone);
|
eperson.setMetadata("phone", phone);
|
||||||
|
eperson.setLanguage(language);
|
||||||
|
|
||||||
// Check all required fields are there
|
// Check all required fields are there
|
||||||
if ((lastName == null) || lastName.equals("") || (firstName == null)
|
if ((lastName == null) || lastName.equals("") || (firstName == null)
|
||||||
|
@@ -55,6 +55,7 @@ import org.dspace.authorize.AuthorizeException;
|
|||||||
import org.dspace.core.ConfigurationManager;
|
import org.dspace.core.ConfigurationManager;
|
||||||
import org.dspace.core.Context;
|
import org.dspace.core.Context;
|
||||||
import org.dspace.core.Email;
|
import org.dspace.core.Email;
|
||||||
|
import org.dspace.core.I18nUtil;
|
||||||
import org.dspace.core.LogManager;
|
import org.dspace.core.LogManager;
|
||||||
import org.dspace.eperson.EPerson;
|
import org.dspace.eperson.EPerson;
|
||||||
|
|
||||||
@@ -136,7 +137,7 @@ public class FeedbackServlet extends DSpaceServlet
|
|||||||
// All data is there, send the email
|
// All data is there, send the email
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Email email = ConfigurationManager.getEmail("feedback");
|
Email email = ConfigurationManager.getEmail(I18nUtil.getEmailFilename(context.getCurrentLocale(), "feedback"));
|
||||||
email.addRecipient(ConfigurationManager
|
email.addRecipient(ConfigurationManager
|
||||||
.getProperty("feedback.recipient"));
|
.getProperty("feedback.recipient"));
|
||||||
|
|
||||||
|
@@ -331,6 +331,7 @@ public class MyDSpaceServlet extends DSpaceServlet
|
|||||||
// User has cancelled. Back to main page.
|
// User has cancelled. Back to main page.
|
||||||
showMainPage(context, request, response);
|
showMainPage(context, request, response);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -41,18 +41,20 @@ package org.dspace.app.webui.servlet;
|
|||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
import javax.servlet.ServletException;
|
import javax.servlet.ServletException;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import javax.servlet.jsp.jstl.core.Config;
|
||||||
|
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
import org.dspace.app.webui.util.Authenticate;
|
import org.dspace.app.webui.util.Authenticate;
|
||||||
import org.dspace.app.webui.util.JSPManager;
|
import org.dspace.app.webui.util.JSPManager;
|
||||||
import org.dspace.authorize.AuthorizeException;
|
import org.dspace.authorize.AuthorizeException;
|
||||||
import org.dspace.core.Context;
|
import org.dspace.core.Context;
|
||||||
|
import org.dspace.core.I18nUtil;
|
||||||
import org.dspace.core.LogManager;
|
import org.dspace.core.LogManager;
|
||||||
import org.dspace.eperson.EPerson;
|
|
||||||
import org.dspace.eperson.AuthenticationManager;
|
import org.dspace.eperson.AuthenticationManager;
|
||||||
import org.dspace.eperson.AuthenticationMethod;
|
import org.dspace.eperson.AuthenticationMethod;
|
||||||
|
|
||||||
@@ -93,11 +95,18 @@ public class PasswordServlet extends DSpaceServlet
|
|||||||
int status = AuthenticationManager.authenticate(context, email, password,
|
int status = AuthenticationManager.authenticate(context, email, password,
|
||||||
null, request);
|
null, request);
|
||||||
|
|
||||||
|
|
||||||
if (status == AuthenticationMethod.SUCCESS)
|
if (status == AuthenticationMethod.SUCCESS)
|
||||||
{
|
{
|
||||||
// Logged in OK.
|
// Logged in OK.
|
||||||
Authenticate.loggedIn(context, request, context.getCurrentUser());
|
Authenticate.loggedIn(context, request, context.getCurrentUser());
|
||||||
|
|
||||||
|
// Set the Locale according to user preferences
|
||||||
|
String preferredLanguage = context.getCurrentUser().getLanguage();
|
||||||
|
Locale epersonLocale = I18nUtil.getSupportedLocale(new Locale(preferredLanguage));
|
||||||
|
context.setCurrentLocale(epersonLocale);
|
||||||
|
Config.set(request.getSession(), Config.FMT_LOCALE, epersonLocale);
|
||||||
|
|
||||||
log.info(LogManager.getHeader(context, "login", "type=explicit"));
|
log.info(LogManager.getHeader(context, "login", "type=explicit"));
|
||||||
|
|
||||||
// resume previous request
|
// resume previous request
|
||||||
|
@@ -291,7 +291,7 @@ public class RegisterServlet extends DSpaceServlet
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
AccountManager.sendRegistrationInfo(context, email);
|
AccountManager.sendRegistrationInfo(request, context, email);
|
||||||
}
|
}
|
||||||
catch (javax.mail.SendFailedException e)
|
catch (javax.mail.SendFailedException e)
|
||||||
{
|
{
|
||||||
@@ -403,7 +403,7 @@ public class RegisterServlet extends DSpaceServlet
|
|||||||
log.info(LogManager.getHeader(context,
|
log.info(LogManager.getHeader(context,
|
||||||
"sendtoken_forgotpw", "email=" + email));
|
"sendtoken_forgotpw", "email=" + email));
|
||||||
|
|
||||||
AccountManager.sendForgotPasswordInfo(context, email);
|
AccountManager.sendForgotPasswordInfo(request, context, email);
|
||||||
JSPManager.showJSP(request, response,
|
JSPManager.showJSP(request, response,
|
||||||
"/register/password-token-sent.jsp");
|
"/register/password-token-sent.jsp");
|
||||||
|
|
||||||
|
@@ -48,6 +48,7 @@ import java.sql.SQLException;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
import javax.servlet.ServletException;
|
import javax.servlet.ServletException;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
@@ -77,6 +78,7 @@ import org.dspace.content.WorkspaceItem;
|
|||||||
import org.dspace.core.ConfigurationManager;
|
import org.dspace.core.ConfigurationManager;
|
||||||
import org.dspace.core.Constants;
|
import org.dspace.core.Constants;
|
||||||
import org.dspace.core.Context;
|
import org.dspace.core.Context;
|
||||||
|
import org.dspace.core.I18nUtil;
|
||||||
import org.dspace.core.LogManager;
|
import org.dspace.core.LogManager;
|
||||||
import org.dspace.eperson.EPerson;
|
import org.dspace.eperson.EPerson;
|
||||||
import org.dspace.license.CreativeCommons;
|
import org.dspace.license.CreativeCommons;
|
||||||
@@ -199,14 +201,9 @@ public class SubmitServlet extends DSpaceServlet
|
|||||||
private static Logger log = Logger.getLogger(SubmitServlet.class);
|
private static Logger log = Logger.getLogger(SubmitServlet.class);
|
||||||
|
|
||||||
/** hash of all submission forms details */
|
/** hash of all submission forms details */
|
||||||
private DCInputsReader inputsReader;
|
private DCInputsReader inputsReader = null;
|
||||||
|
|
||||||
public SubmitServlet()
|
private Locale langForm = null;
|
||||||
throws ServletException
|
|
||||||
{
|
|
||||||
// read configurable submissions forms data
|
|
||||||
inputsReader = new DCInputsReader();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void doDSGet(Context context, HttpServletRequest request,
|
protected void doDSGet(Context context, HttpServletRequest request,
|
||||||
HttpServletResponse response) throws ServletException, IOException,
|
HttpServletResponse response) throws ServletException, IOException,
|
||||||
@@ -321,6 +318,17 @@ public class SubmitServlet extends DSpaceServlet
|
|||||||
HttpServletResponse response) throws ServletException, IOException,
|
HttpServletResponse response) throws ServletException, IOException,
|
||||||
SQLException, AuthorizeException
|
SQLException, AuthorizeException
|
||||||
{
|
{
|
||||||
|
Locale locale = context.getCurrentLocale();
|
||||||
|
|
||||||
|
if (inputsReader == null || !langForm.equals(locale))
|
||||||
|
{
|
||||||
|
log.info("Dateiname="+I18nUtil.getInputFormsFileName(locale));
|
||||||
|
|
||||||
|
// read configurable submissions forms data
|
||||||
|
inputsReader = new DCInputsReader(I18nUtil.getInputFormsFileName(locale));
|
||||||
|
langForm = locale;
|
||||||
|
}
|
||||||
|
|
||||||
// First of all, we need to work out if this is a multipart request
|
// First of all, we need to work out if this is a multipart request
|
||||||
// The file upload page uses those
|
// The file upload page uses those
|
||||||
String contentType = request.getContentType();
|
String contentType = request.getContentType();
|
||||||
@@ -1859,7 +1867,7 @@ public class SubmitServlet extends DSpaceServlet
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case GRANT_LICENSE:
|
case GRANT_LICENSE:
|
||||||
request.setAttribute("license", c.getLicense());
|
request.setAttribute("license", getLicense(c, context));
|
||||||
showProgressAwareJSP(request, response, subInfo,
|
showProgressAwareJSP(request, response, subInfo,
|
||||||
"/submit/show-license.jsp");
|
"/submit/show-license.jsp");
|
||||||
break;
|
break;
|
||||||
@@ -2591,6 +2599,26 @@ public class SubmitServlet extends DSpaceServlet
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the license that users must grant before submitting to this
|
||||||
|
* collection. If the collection does not have a specific license, the
|
||||||
|
* site-wide default is returned.
|
||||||
|
*
|
||||||
|
* @return the license for this collection
|
||||||
|
*/
|
||||||
|
public String getLicense(Collection c, Context context)
|
||||||
|
{
|
||||||
|
// FIXME: attributes of collections are not yet i18n
|
||||||
|
String license = c.getLicenseCollection();
|
||||||
|
|
||||||
|
if ((license == null) || license.equals(""))
|
||||||
|
{
|
||||||
|
// Fallback to site-wide default for current Locale
|
||||||
|
license = ConfigurationManager.getLicenseText(I18nUtil.getDefaultLicense(context));
|
||||||
|
}
|
||||||
|
return license;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get repeated values from a form. If "foo" is passed in, values in the
|
* Get repeated values from a form. If "foo" is passed in, values in the
|
||||||
* form of parameters "foo_0", "foo_1", etc. are returned.
|
* form of parameters "foo_0", "foo_1", etc. are returned.
|
||||||
|
@@ -56,6 +56,7 @@ import org.dspace.authorize.AuthorizeException;
|
|||||||
import org.dspace.core.ConfigurationManager;
|
import org.dspace.core.ConfigurationManager;
|
||||||
import org.dspace.core.Context;
|
import org.dspace.core.Context;
|
||||||
import org.dspace.core.Email;
|
import org.dspace.core.Email;
|
||||||
|
import org.dspace.core.I18nUtil;
|
||||||
import org.dspace.core.LogManager;
|
import org.dspace.core.LogManager;
|
||||||
import org.dspace.eperson.EPerson;
|
import org.dspace.eperson.EPerson;
|
||||||
import org.dspace.handle.HandleManager;
|
import org.dspace.handle.HandleManager;
|
||||||
@@ -175,10 +176,8 @@ public class SuggestServlet extends DSpaceServlet
|
|||||||
// All data is there, send the email
|
// All data is there, send the email
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Email email = ConfigurationManager.getEmail("suggest");
|
Email email = ConfigurationManager.getEmail(I18nUtil.getEmailFilename(context.getCurrentLocale(), "suggest"));
|
||||||
|
|
||||||
email.addRecipient(recipAddr); // recipient address
|
email.addRecipient(recipAddr); // recipient address
|
||||||
|
|
||||||
email.addArgument(recipName); // 1st arg - recipient name
|
email.addArgument(recipName); // 1st arg - recipient name
|
||||||
email.addArgument(senderName); // 2nd arg - sender name
|
email.addArgument(senderName); // 2nd arg - sender name
|
||||||
email.addArgument(siteName); // 3rd arg - repository name
|
email.addArgument(siteName); // 3rd arg - repository name
|
||||||
|
@@ -165,6 +165,9 @@ public class EPersonAdminServlet extends DSpaceServlet
|
|||||||
e.setMetadata("phone", request.getParameter("phone")
|
e.setMetadata("phone", request.getParameter("phone")
|
||||||
.equals("") ? null : request.getParameter("phone"));
|
.equals("") ? null : request.getParameter("phone"));
|
||||||
|
|
||||||
|
e.setMetadata("language", request.getParameter("language")
|
||||||
|
.equals("") ? null : request.getParameter("language"));
|
||||||
|
|
||||||
e.setCanLogIn((request.getParameter("can_log_in") != null)
|
e.setCanLogIn((request.getParameter("can_log_in") != null)
|
||||||
&& request.getParameter("can_log_in")
|
&& request.getParameter("can_log_in")
|
||||||
.equals("true"));
|
.equals("true"));
|
||||||
@@ -217,6 +220,9 @@ public class EPersonAdminServlet extends DSpaceServlet
|
|||||||
request.getParameter("phone").equals("") ? null
|
request.getParameter("phone").equals("") ? null
|
||||||
: request.getParameter("phone"));
|
: request.getParameter("phone"));
|
||||||
|
|
||||||
|
e.setMetadata("language", request.getParameter("language")
|
||||||
|
.equals("") ? null : request.getParameter("language"));
|
||||||
|
|
||||||
e.setCanLogIn((request.getParameter("can_log_in") != null)
|
e.setCanLogIn((request.getParameter("can_log_in") != null)
|
||||||
&& request.getParameter("can_log_in").equals("true"));
|
&& request.getParameter("can_log_in").equals("true"));
|
||||||
|
|
||||||
|
@@ -92,6 +92,10 @@ public class EPersonListServlet extends DSpaceServlet
|
|||||||
{
|
{
|
||||||
sortBy = EPerson.ID;
|
sortBy = EPerson.ID;
|
||||||
}
|
}
|
||||||
|
else if ((sbParam != null) && sbParam.equals("language"))
|
||||||
|
{
|
||||||
|
sortBy = EPerson.LANGUAGE;
|
||||||
|
}
|
||||||
|
|
||||||
// What's the index of the first eperson to show? Default is 0
|
// What's the index of the first eperson to show? Default is 0
|
||||||
int first = UIUtil.getIntParameter(request, "first");
|
int first = UIUtil.getIntParameter(request, "first");
|
||||||
|
@@ -57,6 +57,7 @@ import org.dspace.content.MetadataField;
|
|||||||
import org.dspace.content.MetadataSchema;
|
import org.dspace.content.MetadataSchema;
|
||||||
import org.dspace.content.NonUniqueMetadataException;
|
import org.dspace.content.NonUniqueMetadataException;
|
||||||
import org.dspace.core.Context;
|
import org.dspace.core.Context;
|
||||||
|
import org.dspace.core.I18nUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Servlet for editing the Dublin Core registry
|
* Servlet for editing the Dublin Core registry
|
||||||
@@ -98,7 +99,7 @@ public class MetadataFieldRegistryServlet extends DSpaceServlet
|
|||||||
int schemaID = getSchemaID(request);
|
int schemaID = getSchemaID(request);
|
||||||
|
|
||||||
// Get access to the localized resource bundle
|
// Get access to the localized resource bundle
|
||||||
Locale locale = request.getLocale();
|
Locale locale = context.getCurrentLocale();
|
||||||
ResourceBundle labels = ResourceBundle.getBundle("Messages", locale);
|
ResourceBundle labels = ResourceBundle.getBundle("Messages", locale);
|
||||||
|
|
||||||
if (button.equals("submit_update"))
|
if (button.equals("submit_update"))
|
||||||
|
@@ -45,6 +45,7 @@ import java.sql.SQLException;
|
|||||||
import javax.servlet.ServletException;
|
import javax.servlet.ServletException;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import javax.servlet.jsp.jstl.fmt.LocaleSupport;
|
||||||
|
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
import org.dspace.app.webui.servlet.DSpaceServlet;
|
import org.dspace.app.webui.servlet.DSpaceServlet;
|
||||||
@@ -52,6 +53,7 @@ import org.dspace.app.webui.util.JSPManager;
|
|||||||
import org.dspace.app.webui.util.UIUtil;
|
import org.dspace.app.webui.util.UIUtil;
|
||||||
import org.dspace.authorize.AuthorizeException;
|
import org.dspace.authorize.AuthorizeException;
|
||||||
import org.dspace.core.ConfigurationManager;
|
import org.dspace.core.ConfigurationManager;
|
||||||
|
import org.dspace.core.Constants;
|
||||||
import org.dspace.core.Context;
|
import org.dspace.core.Context;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -81,7 +83,7 @@ public class NewsEditServlet extends DSpaceServlet
|
|||||||
String news = "";
|
String news = "";
|
||||||
|
|
||||||
//Are we editing the top news or the sidebar news?
|
//Are we editing the top news or the sidebar news?
|
||||||
int position = UIUtil.getIntParameter(request, "position");
|
String position = request.getParameter("position");
|
||||||
|
|
||||||
if (button.equals("submit_edit"))
|
if (button.equals("submit_edit"))
|
||||||
{
|
{
|
||||||
@@ -89,7 +91,7 @@ public class NewsEditServlet extends DSpaceServlet
|
|||||||
news = ConfigurationManager.readNewsFile(position);
|
news = ConfigurationManager.readNewsFile(position);
|
||||||
|
|
||||||
//pass the position back to the JSP
|
//pass the position back to the JSP
|
||||||
request.setAttribute("position", new Integer(position));
|
request.setAttribute("position", position);
|
||||||
|
|
||||||
//pass the existing news back to the JSP
|
//pass the existing news back to the JSP
|
||||||
request.setAttribute("news", news);
|
request.setAttribute("news", news);
|
||||||
|
@@ -47,10 +47,10 @@ import java.text.NumberFormat;
|
|||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.Enumeration;
|
import java.util.Enumeration;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.net.URLEncoder;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpSession;
|
import javax.servlet.http.HttpSession;
|
||||||
|
import javax.servlet.jsp.jstl.core.Config;
|
||||||
|
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
import org.dspace.content.Collection;
|
import org.dspace.content.Collection;
|
||||||
@@ -60,6 +60,7 @@ import org.dspace.core.ConfigurationManager;
|
|||||||
import org.dspace.core.Constants;
|
import org.dspace.core.Constants;
|
||||||
import org.dspace.core.Context;
|
import org.dspace.core.Context;
|
||||||
import org.dspace.core.Email;
|
import org.dspace.core.Email;
|
||||||
|
import org.dspace.core.I18nUtil;
|
||||||
import org.dspace.eperson.EPerson;
|
import org.dspace.eperson.EPerson;
|
||||||
import org.dspace.eperson.AuthenticationManager;
|
import org.dspace.eperson.AuthenticationManager;
|
||||||
|
|
||||||
@@ -106,13 +107,14 @@ public class UIUtil
|
|||||||
|
|
||||||
Context c = (Context) request.getAttribute("dspace.context");
|
Context c = (Context) request.getAttribute("dspace.context");
|
||||||
|
|
||||||
|
|
||||||
if (c == null)
|
if (c == null)
|
||||||
{
|
{
|
||||||
// No context for this request yet
|
// No context for this request yet
|
||||||
c = new Context();
|
c = new Context();
|
||||||
|
HttpSession session = request.getSession();
|
||||||
|
|
||||||
// See if a user has authentication
|
// See if a user has authentication
|
||||||
HttpSession session = request.getSession();
|
|
||||||
Integer userID = (Integer) session.getAttribute(
|
Integer userID = (Integer) session.getAttribute(
|
||||||
"dspace.current.user.id");
|
"dspace.current.user.id");
|
||||||
|
|
||||||
@@ -149,6 +151,11 @@ public class UIUtil
|
|||||||
request.setAttribute("dspace.context", c);
|
request.setAttribute("dspace.context", c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set the locale to be used
|
||||||
|
Locale sessionLocale = getSessionLocale(request);
|
||||||
|
Config.set(request.getSession(), Config.FMT_LOCALE, sessionLocale);
|
||||||
|
c.setCurrentLocale(sessionLocale);
|
||||||
|
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -263,12 +270,16 @@ public class UIUtil
|
|||||||
* if true, display the time with the date
|
* if true, display the time with the date
|
||||||
* @param localTime
|
* @param localTime
|
||||||
* if true, adjust for local timezone, otherwise GMT
|
* if true, adjust for local timezone, otherwise GMT
|
||||||
|
* @param request
|
||||||
|
* the servlet request
|
||||||
*
|
*
|
||||||
* @return the date in a human-readable form.
|
* @return the date in a human-readable form.
|
||||||
*/
|
*/
|
||||||
public static String displayDate(DCDate d, boolean time, boolean localTime)
|
public static String displayDate(DCDate d, boolean time, boolean localTime, HttpServletRequest request)
|
||||||
{
|
{
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuffer sb = new StringBuffer();
|
||||||
|
Locale locale = ((Context)request.getAttribute("dspace.context")).getCurrentLocale();
|
||||||
|
if (locale == null) locale = I18nUtil.DEFAULTLOCALE;
|
||||||
|
|
||||||
if (d != null)
|
if (d != null)
|
||||||
{
|
{
|
||||||
@@ -307,7 +318,7 @@ public class UIUtil
|
|||||||
sb.append(day + "-");
|
sb.append(day + "-");
|
||||||
}
|
}
|
||||||
|
|
||||||
sb.append(DCDate.getMonthName(month).substring(0, 3) + "-");
|
sb.append(DCDate.getMonthName(month, locale).substring(0, 3) + "-");
|
||||||
}
|
}
|
||||||
|
|
||||||
sb.append(year + " ");
|
sb.append(year + " ");
|
||||||
@@ -387,6 +398,58 @@ public class UIUtil
|
|||||||
return report;
|
return report;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the Locale for a session according to the user's language selection or language preferences.
|
||||||
|
* Order of selection
|
||||||
|
* - language selected via UI
|
||||||
|
* - language as set by application
|
||||||
|
* - language browser default
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* the request Object
|
||||||
|
* @return supportedLocale
|
||||||
|
* Locale supported by this DSpace Instance for this request
|
||||||
|
*/
|
||||||
|
public static Locale getSessionLocale(HttpServletRequest request)
|
||||||
|
|
||||||
|
{
|
||||||
|
String paramLocale = request.getParameter("locale");
|
||||||
|
Locale sessionLocale = null;
|
||||||
|
Locale supportedLocale = null;
|
||||||
|
|
||||||
|
if (paramLocale != null && paramLocale != "")
|
||||||
|
{
|
||||||
|
/* get session locale according to user selection */
|
||||||
|
sessionLocale = new Locale(paramLocale);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (sessionLocale == null)
|
||||||
|
{
|
||||||
|
/* get session locale set by application */
|
||||||
|
HttpSession session = request.getSession();
|
||||||
|
sessionLocale = (Locale) Config.get(session, Config.FMT_LOCALE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* if session not set by selection or application then default browser
|
||||||
|
* locale
|
||||||
|
*/
|
||||||
|
if (sessionLocale == null)
|
||||||
|
{
|
||||||
|
sessionLocale = request.getLocale();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (sessionLocale == null)
|
||||||
|
{
|
||||||
|
sessionLocale = I18nUtil.DEFAULTLOCALE;
|
||||||
|
}
|
||||||
|
supportedLocale = I18nUtil.getSupportedLocale(sessionLocale);
|
||||||
|
|
||||||
|
return supportedLocale;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Obtain a parameter from the given request as an int. <code>-1</code> is
|
* Obtain a parameter from the given request as an int. <code>-1</code> is
|
||||||
* returned if the parameter is garbled or does not exist.
|
* returned if the parameter is garbled or does not exist.
|
||||||
@@ -523,6 +586,7 @@ public class UIUtil
|
|||||||
public static void sendAlert(HttpServletRequest request, Exception exception)
|
public static void sendAlert(HttpServletRequest request, Exception exception)
|
||||||
{
|
{
|
||||||
String logInfo = UIUtil.getRequestLogInfo(request);
|
String logInfo = UIUtil.getRequestLogInfo(request);
|
||||||
|
Context c = (Context) request.getAttribute("dspace.context");
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -531,7 +595,7 @@ public class UIUtil
|
|||||||
|
|
||||||
if (recipient != null)
|
if (recipient != null)
|
||||||
{
|
{
|
||||||
Email email = ConfigurationManager.getEmail("internal_error");
|
Email email = ConfigurationManager.getEmail(I18nUtil.getEmailFilename(c.getCurrentLocale(), "internal_error"));
|
||||||
|
|
||||||
email.addRecipient(recipient);
|
email.addRecipient(recipient);
|
||||||
email.addArgument(ConfigurationManager
|
email.addArgument(ConfigurationManager
|
||||||
|
@@ -54,7 +54,7 @@ import org.dspace.browse.Browse;
|
|||||||
import org.dspace.core.ConfigurationManager;
|
import org.dspace.core.ConfigurationManager;
|
||||||
import org.dspace.core.Constants;
|
import org.dspace.core.Constants;
|
||||||
import org.dspace.core.Context;
|
import org.dspace.core.Context;
|
||||||
import org.dspace.core.I18N;
|
import org.dspace.core.I18nUtil;
|
||||||
import org.dspace.core.LogManager;
|
import org.dspace.core.LogManager;
|
||||||
import org.dspace.eperson.Group;
|
import org.dspace.eperson.Group;
|
||||||
import org.dspace.handle.HandleManager;
|
import org.dspace.handle.HandleManager;
|
||||||
@@ -389,7 +389,7 @@ public class Collection extends DSpaceObject
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
value = I18N.message("untitled", Collection.class);
|
value = I18nUtil.getMessage("org.dspace.workflow.WorkflowManager.untitled");
|
||||||
}
|
}
|
||||||
catch (MissingResourceException e)
|
catch (MissingResourceException e)
|
||||||
{
|
{
|
||||||
@@ -663,6 +663,18 @@ public class Collection extends DSpaceObject
|
|||||||
return license;
|
return license;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the license that users must grant before submitting to this
|
||||||
|
* collection.
|
||||||
|
*
|
||||||
|
* @return the license for this collection
|
||||||
|
*/
|
||||||
|
public String getLicenseCollection()
|
||||||
|
{
|
||||||
|
String license = collectionRow.getStringColumn("license");
|
||||||
|
return license;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find out if the collection has a custom license
|
* Find out if the collection has a custom license
|
||||||
*
|
*
|
||||||
|
@@ -52,7 +52,7 @@ import org.dspace.authorize.AuthorizeManager;
|
|||||||
import org.dspace.authorize.ResourcePolicy;
|
import org.dspace.authorize.ResourcePolicy;
|
||||||
import org.dspace.core.Constants;
|
import org.dspace.core.Constants;
|
||||||
import org.dspace.core.Context;
|
import org.dspace.core.Context;
|
||||||
import org.dspace.core.I18N;
|
import org.dspace.core.I18nUtil;
|
||||||
import org.dspace.core.LogManager;
|
import org.dspace.core.LogManager;
|
||||||
import org.dspace.eperson.Group;
|
import org.dspace.eperson.Group;
|
||||||
import org.dspace.handle.HandleManager;
|
import org.dspace.handle.HandleManager;
|
||||||
@@ -345,7 +345,7 @@ public class Community extends DSpaceObject
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
value = I18N.message("untitled", Community.class);
|
value = I18nUtil.getMessage("org.dspace.workflow.WorkflowManager.untitled");
|
||||||
}
|
}
|
||||||
catch (MissingResourceException e)
|
catch (MissingResourceException e)
|
||||||
{
|
{
|
||||||
|
@@ -39,9 +39,11 @@
|
|||||||
*/
|
*/
|
||||||
package org.dspace.content;
|
package org.dspace.content;
|
||||||
|
|
||||||
|
import java.text.DateFormatSymbols;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.GregorianCalendar;
|
import java.util.GregorianCalendar;
|
||||||
|
import java.util.Locale;
|
||||||
import java.util.TimeZone;
|
import java.util.TimeZone;
|
||||||
|
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
@@ -71,13 +73,6 @@ public class DCDate
|
|||||||
/** Logger */
|
/** Logger */
|
||||||
private static Logger cat = Logger.getLogger(DCDate.class);
|
private static Logger cat = Logger.getLogger(DCDate.class);
|
||||||
|
|
||||||
/**
|
|
||||||
* The month names
|
|
||||||
*/
|
|
||||||
private final static String[] MONTHNAMES = { "January", "February",
|
|
||||||
"March", "April", "May", "June", "July", "August", "September",
|
|
||||||
"October", "November", "December" };
|
|
||||||
|
|
||||||
/** The year, or -1 if none */
|
/** The year, or -1 if none */
|
||||||
private int year;
|
private int year;
|
||||||
|
|
||||||
@@ -102,6 +97,16 @@ public class DCDate
|
|||||||
*/
|
*/
|
||||||
private GregorianCalendar localGC;
|
private GregorianCalendar localGC;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* DateFormatSymbols for locale monthsname
|
||||||
|
*/
|
||||||
|
private static DateFormatSymbols dfs = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* note the session locale
|
||||||
|
*/
|
||||||
|
private static Locale langMonth = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Construct a clean date
|
* Construct a clean date
|
||||||
*/
|
*/
|
||||||
@@ -511,15 +516,21 @@ public class DCDate
|
|||||||
*
|
*
|
||||||
* @return the month name.
|
* @return the month name.
|
||||||
*/
|
*/
|
||||||
public static String getMonthName(int m)
|
public static String getMonthName(int m, Locale locale)
|
||||||
{
|
{
|
||||||
if ((m > 0) && (m < 13))
|
if ((m > 0) && (m < 13))
|
||||||
{
|
{
|
||||||
return MONTHNAMES[m - 1];
|
if (dfs == null || !langMonth.equals(locale))
|
||||||
|
{
|
||||||
|
dfs = new DateFormatSymbols(locale);
|
||||||
|
langMonth = locale;
|
||||||
|
}
|
||||||
|
return dfs.getMonths()[m-1];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return "Unspecified";
|
return "Unspecified";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -151,6 +151,42 @@ public class ConfigurationManager
|
|||||||
return intValue;
|
return intValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the License
|
||||||
|
*
|
||||||
|
* @param
|
||||||
|
* license file name
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* license text
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static String getLicenseText(String licenseFile)
|
||||||
|
{
|
||||||
|
// Load in default license
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
BufferedReader br = new BufferedReader(new FileReader(licenseFile));
|
||||||
|
String lineIn;
|
||||||
|
license = "";
|
||||||
|
while ((lineIn = br.readLine()) != null)
|
||||||
|
{
|
||||||
|
license = license + lineIn + '\n';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (IOException e)
|
||||||
|
{
|
||||||
|
fatal("Can't load configuration", e);
|
||||||
|
|
||||||
|
// FIXME: Maybe something more graceful here, but with the
|
||||||
|
// configuration we can't do anything
|
||||||
|
System.exit(1);
|
||||||
|
}
|
||||||
|
return license;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a configuration property as a boolean. True is indicated if the value
|
* Get a configuration property as a boolean. True is indicated if the value
|
||||||
* of the property is <code>TRUE</code> or <code>YES</code> (case
|
* of the property is <code>TRUE</code> or <code>YES</code> (case
|
||||||
@@ -224,8 +260,8 @@ public class ConfigurationManager
|
|||||||
* Get the template for an email message. The message is suitable for
|
* Get the template for an email message. The message is suitable for
|
||||||
* inserting values using <code>java.text.MessageFormat</code>.
|
* inserting values using <code>java.text.MessageFormat</code>.
|
||||||
*
|
*
|
||||||
* @param template
|
* @param emailFile
|
||||||
* name for the email template, for example "register".
|
* full name for the email template, for example "/dspace/config/emails/register".
|
||||||
*
|
*
|
||||||
* @return the email object, with the content and subject filled out from
|
* @return the email object, with the content and subject filled out from
|
||||||
* the template
|
* the template
|
||||||
@@ -234,7 +270,7 @@ public class ConfigurationManager
|
|||||||
* if the template couldn't be found, or there was some other
|
* if the template couldn't be found, or there was some other
|
||||||
* error reading the template
|
* error reading the template
|
||||||
*/
|
*/
|
||||||
public static Email getEmail(String template) throws IOException
|
public static Email getEmail(String emailFile) throws IOException
|
||||||
{
|
{
|
||||||
String subject = "";
|
String subject = "";
|
||||||
StringBuffer contentBuffer = new StringBuffer();
|
StringBuffer contentBuffer = new StringBuffer();
|
||||||
@@ -243,11 +279,7 @@ public class ConfigurationManager
|
|||||||
BufferedReader reader = null;
|
BufferedReader reader = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
reader = new BufferedReader(new FileReader(
|
reader = new BufferedReader(new FileReader(emailFile));
|
||||||
getProperty("dspace.dir") +
|
|
||||||
|
|
||||||
File.separator + "config" + File.separator + "emails"
|
|
||||||
+ File.separator + template));
|
|
||||||
|
|
||||||
boolean more = true;
|
boolean more = true;
|
||||||
|
|
||||||
@@ -322,18 +354,11 @@ public class ConfigurationManager
|
|||||||
* a constant indicating which file (top or side) should be read
|
* a constant indicating which file (top or side) should be read
|
||||||
* in.
|
* in.
|
||||||
*/
|
*/
|
||||||
public static String readNewsFile(int position)
|
public static String readNewsFile(String newsFile)
|
||||||
{
|
{
|
||||||
String fileName = getNewsFilePath();
|
String fileName = getNewsFilePath();
|
||||||
|
|
||||||
if (position == Constants.NEWS_TOP)
|
fileName += newsFile;
|
||||||
{
|
|
||||||
fileName += "news-top.html";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
fileName += "news-side.html";
|
|
||||||
}
|
|
||||||
|
|
||||||
String text = "";
|
String text = "";
|
||||||
|
|
||||||
@@ -371,18 +396,11 @@ public class ConfigurationManager
|
|||||||
* @param news
|
* @param news
|
||||||
* the text to be written to the file.
|
* the text to be written to the file.
|
||||||
*/
|
*/
|
||||||
public static String writeNewsFile(int position, String news)
|
public static String writeNewsFile(String newsFile, String news)
|
||||||
{
|
{
|
||||||
String fileName = getNewsFilePath();
|
String fileName = getNewsFilePath();
|
||||||
|
|
||||||
if (position == Constants.NEWS_TOP)
|
fileName += newsFile;
|
||||||
{
|
|
||||||
fileName += "news-top.html";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
fileName += "news-side.html";
|
|
||||||
}
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -896,4 +914,6 @@ public class ConfigurationManager
|
|||||||
log = Logger.getLogger(ConfigurationManager.class);
|
log = Logger.getLogger(ConfigurationManager.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -45,6 +45,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Locale;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
@@ -80,6 +81,9 @@ public class Context
|
|||||||
/** Current user - null means anonymous access */
|
/** Current user - null means anonymous access */
|
||||||
private EPerson currentUser;
|
private EPerson currentUser;
|
||||||
|
|
||||||
|
/** Current Locale */
|
||||||
|
private Locale currentLocale;
|
||||||
|
|
||||||
/** Extra log info */
|
/** Extra log info */
|
||||||
private String extraLogInfo;
|
private String extraLogInfo;
|
||||||
|
|
||||||
@@ -106,6 +110,7 @@ public class Context
|
|||||||
connection.setAutoCommit(false);
|
connection.setAutoCommit(false);
|
||||||
|
|
||||||
currentUser = null;
|
currentUser = null;
|
||||||
|
currentLocale = I18nUtil.DEFAULTLOCALE;
|
||||||
extraLogInfo = "";
|
extraLogInfo = "";
|
||||||
ignoreAuth = false;
|
ignoreAuth = false;
|
||||||
|
|
||||||
@@ -147,6 +152,28 @@ public class Context
|
|||||||
return currentUser;
|
return currentUser;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the current Locale
|
||||||
|
*
|
||||||
|
* @return Locale
|
||||||
|
* the current Locale
|
||||||
|
*/
|
||||||
|
public Locale getCurrentLocale()
|
||||||
|
{
|
||||||
|
return currentLocale;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* set the current Locale
|
||||||
|
*
|
||||||
|
* @param Locale
|
||||||
|
* the current Locale
|
||||||
|
*/
|
||||||
|
public void setCurrentLocale(Locale locale)
|
||||||
|
{
|
||||||
|
currentLocale = locale;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find out if the authorisation system should be ignored for this context.
|
* Find out if the authorisation system should be ignored for this context.
|
||||||
*
|
*
|
||||||
@@ -197,6 +224,7 @@ public class Context
|
|||||||
return extraLogInfo;
|
return extraLogInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Close the context object after all of the operations performed in the
|
* Close the context object after all of the operations performed in the
|
||||||
* context have completed succesfully. Any transaction with the database is
|
* context have completed succesfully. Any transaction with the database is
|
||||||
|
@@ -46,8 +46,11 @@ import java.util.ResourceBundle;
|
|||||||
* message(String, Class) and getMessage(String, Class) methods should be
|
* message(String, Class) and getMessage(String, Class) methods should be
|
||||||
* favoured.
|
* favoured.
|
||||||
*
|
*
|
||||||
|
* @deprecated
|
||||||
|
*
|
||||||
* @author Jim Downing
|
* @author Jim Downing
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public class I18N
|
public class I18N
|
||||||
{
|
{
|
||||||
|
|
||||||
|
455
dspace/src/org/dspace/core/I18nUtil.java
Normal file
455
dspace/src/org/dspace/core/I18nUtil.java
Normal file
@@ -0,0 +1,455 @@
|
|||||||
|
/*
|
||||||
|
* I18nUtil.java
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* Copyright (c) 2002-2007, Hewlett-Packard Company and Massachusetts
|
||||||
|
* Institute of Technology. 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 Hewlett-Packard Company nor the name of the
|
||||||
|
* Massachusetts Institute of Technology 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.dspace.core;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.util.Locale;
|
||||||
|
import java.util.MissingResourceException;
|
||||||
|
import java.util.ResourceBundle;
|
||||||
|
import java.util.StringTokenizer;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* I18nUtil.java
|
||||||
|
*
|
||||||
|
* Some Utilities for i18n Support.
|
||||||
|
* - getting the default Locale for this DSpace Instance
|
||||||
|
* - getting all supported Locales for this DSpace Instance
|
||||||
|
* - getting email template, help file, input forms for a given Locale
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @author Bernadette Schlonsok and Claudia Juergen
|
||||||
|
*
|
||||||
|
* @version 1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class I18nUtil
|
||||||
|
{
|
||||||
|
// the default Locale of this DSpace Instance
|
||||||
|
public static final Locale DEFAULTLOCALE = getDefaultLocale();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the default locale as defined in dspace.cfg If no default locale is
|
||||||
|
* defined, the Locale of the JVM is used
|
||||||
|
*
|
||||||
|
* @return defaultLocale
|
||||||
|
* the default Locale for this DSpace instance
|
||||||
|
*/
|
||||||
|
private static Locale getDefaultLocale()
|
||||||
|
{
|
||||||
|
Locale defaultLocale = null;
|
||||||
|
if ((ConfigurationManager.getProperty("default.locale") != null)
|
||||||
|
&& (ConfigurationManager.getProperty("default.locale") != ""))
|
||||||
|
{
|
||||||
|
StringTokenizer configDefaultLocale = new StringTokenizer(
|
||||||
|
ConfigurationManager.getProperty("default.locale"));
|
||||||
|
int countTokens = configDefaultLocale.countTokens();
|
||||||
|
switch (countTokens)
|
||||||
|
{
|
||||||
|
|
||||||
|
case 1:
|
||||||
|
defaultLocale = new Locale(configDefaultLocale.nextToken()
|
||||||
|
.trim());
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 2:
|
||||||
|
defaultLocale = new Locale(configDefaultLocale.nextToken()
|
||||||
|
.trim(), configDefaultLocale.nextToken().trim());
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
defaultLocale = new Locale(configDefaultLocale.nextToken()
|
||||||
|
.trim(), configDefaultLocale.nextToken().trim(),
|
||||||
|
configDefaultLocale.nextToken().trim());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
if (defaultLocale == null)
|
||||||
|
{
|
||||||
|
// use the Locale of the JVM
|
||||||
|
defaultLocale = Locale.getDefault();
|
||||||
|
}
|
||||||
|
|
||||||
|
return defaultLocale;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* get the available Locales for the User Interface as defined in dspace.cfg
|
||||||
|
* returns an array of Locales or null
|
||||||
|
*
|
||||||
|
* @return an array of supported Locales or null
|
||||||
|
*/
|
||||||
|
public static Locale[] getSupportedLocales()
|
||||||
|
{
|
||||||
|
Locale[] availableLocales;
|
||||||
|
|
||||||
|
if (ConfigurationManager.getProperty("webui.supported.locales") != null)
|
||||||
|
{
|
||||||
|
|
||||||
|
StringTokenizer configuredLocales = new StringTokenizer(
|
||||||
|
ConfigurationManager.getProperty("webui.supported.locales"),
|
||||||
|
",");
|
||||||
|
availableLocales = new Locale[configuredLocales
|
||||||
|
.countTokens()];
|
||||||
|
|
||||||
|
while (configuredLocales.hasMoreTokens())
|
||||||
|
{
|
||||||
|
StringTokenizer localeElements = new StringTokenizer(
|
||||||
|
configuredLocales.nextToken().trim(), "_");
|
||||||
|
int countTokens = localeElements.countTokens();
|
||||||
|
switch (countTokens)
|
||||||
|
{
|
||||||
|
|
||||||
|
case 1:
|
||||||
|
availableLocales[configuredLocales.countTokens()] = new Locale(
|
||||||
|
localeElements.nextToken().trim());
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 2:
|
||||||
|
availableLocales[configuredLocales.countTokens()] = new Locale(
|
||||||
|
localeElements.nextToken().trim(), localeElements
|
||||||
|
.nextToken().trim());
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
availableLocales[configuredLocales.countTokens()] = new Locale(
|
||||||
|
localeElements.nextToken().trim(), localeElements
|
||||||
|
.nextToken().trim(), localeElements
|
||||||
|
.nextToken().trim());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
availableLocales = new Locale[1];
|
||||||
|
availableLocales[0] = DEFAULTLOCALE;
|
||||||
|
}
|
||||||
|
return availableLocales;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the appropriate supported Locale according for a given Locale If
|
||||||
|
* no appropriate supported locale is found, the DEFAULTLOCALE is used
|
||||||
|
*
|
||||||
|
* @param locale
|
||||||
|
* Locale to find the corresponding Locale
|
||||||
|
* @return supportedLocale
|
||||||
|
* Locale for session according to locales supported by this DSpace instance as set in dspace.cfg
|
||||||
|
*/
|
||||||
|
|
||||||
|
public static Locale getSupportedLocale(Locale locale)
|
||||||
|
{
|
||||||
|
|
||||||
|
Locale[] availableLocales = getSupportedLocales();
|
||||||
|
boolean isSupported = false;
|
||||||
|
Locale supportedLocale = null;
|
||||||
|
String testLocale = "";
|
||||||
|
if (availableLocales == null)
|
||||||
|
{
|
||||||
|
supportedLocale = DEFAULTLOCALE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (!locale.getVariant().equals(""))
|
||||||
|
{
|
||||||
|
testLocale = locale.toString();
|
||||||
|
for (int i = 0; i < availableLocales.length; i++)
|
||||||
|
{
|
||||||
|
if (testLocale.equalsIgnoreCase(availableLocales[i]
|
||||||
|
.toString()))
|
||||||
|
{
|
||||||
|
isSupported = true;
|
||||||
|
supportedLocale = availableLocales[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!(isSupported && locale.getCountry().equals("")))
|
||||||
|
{
|
||||||
|
testLocale = locale.getLanguage() + "_"
|
||||||
|
+ locale.getCountry();
|
||||||
|
|
||||||
|
for (int i = 0; i < availableLocales.length; i++)
|
||||||
|
{
|
||||||
|
if (testLocale.equalsIgnoreCase(availableLocales[i]
|
||||||
|
.toString()))
|
||||||
|
{
|
||||||
|
isSupported = true;
|
||||||
|
supportedLocale = availableLocales[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
if (!isSupported)
|
||||||
|
{
|
||||||
|
testLocale = locale.getLanguage();
|
||||||
|
|
||||||
|
for (int i = 0; i < availableLocales.length; i++)
|
||||||
|
{
|
||||||
|
if (testLocale.equalsIgnoreCase(availableLocales[i]
|
||||||
|
.toString()))
|
||||||
|
{
|
||||||
|
isSupported = true;
|
||||||
|
supportedLocale = availableLocales[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!isSupported)
|
||||||
|
{
|
||||||
|
supportedLocale = DEFAULTLOCALE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return supportedLocale;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the appropriate localized version of input-forms.xml according to language settings
|
||||||
|
*
|
||||||
|
* @param locale
|
||||||
|
* Locale, the local to get the input-forms.xml for
|
||||||
|
* @return String - localized filename for input-forms.xml
|
||||||
|
*/
|
||||||
|
public static String getInputFormsFileName(Locale locale)
|
||||||
|
{
|
||||||
|
/** Name of the form definition XML file */
|
||||||
|
String fileName = "";
|
||||||
|
final String FORM_DEF_FILE = "input-forms";
|
||||||
|
final String FILE_TYPE = ".xml";
|
||||||
|
String defsFilename = ConfigurationManager.getProperty("dspace.dir")
|
||||||
|
+ File.separator + "config" + File.separator + FORM_DEF_FILE;
|
||||||
|
fileName = getFilename(locale, defsFilename, FILE_TYPE);
|
||||||
|
return fileName;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* et the i18n message string for a given key and use the default Locale
|
||||||
|
*
|
||||||
|
* @param key
|
||||||
|
* String - name of the key to get the message for
|
||||||
|
*
|
||||||
|
* @return message
|
||||||
|
* String of the message
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static String getMessage(String key) throws MissingResourceException
|
||||||
|
{
|
||||||
|
|
||||||
|
String message = getMessage(key.trim(), DEFAULTLOCALE);
|
||||||
|
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the i18n message string for a given key and locale
|
||||||
|
*
|
||||||
|
* @param key
|
||||||
|
* String - name of the key to get the message for
|
||||||
|
* @param locale
|
||||||
|
* Locale, to get the message for
|
||||||
|
*
|
||||||
|
* @return message
|
||||||
|
* String of the message
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static String getMessage(String key, Locale locale) throws MissingResourceException
|
||||||
|
{
|
||||||
|
String message = "";
|
||||||
|
if (locale == null)
|
||||||
|
{
|
||||||
|
locale = DEFAULTLOCALE;
|
||||||
|
}
|
||||||
|
ResourceBundle messages = ResourceBundle.getBundle("Messages", locale);
|
||||||
|
message = messages.getString(key.trim());
|
||||||
|
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the i18n message string for a given key and locale
|
||||||
|
*
|
||||||
|
* @param key
|
||||||
|
* String - name of the key to get the message for
|
||||||
|
* @param locale
|
||||||
|
* Locale, to get the message for
|
||||||
|
*
|
||||||
|
* @return message
|
||||||
|
* String of the message
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static String getMessage(String key, Context c) throws MissingResourceException
|
||||||
|
{
|
||||||
|
String message = getMessage(key.trim(), c.getCurrentLocale());
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the appropriate localized version of the default.license according to language settings
|
||||||
|
*
|
||||||
|
* @param context
|
||||||
|
* the current DSpace context
|
||||||
|
* @return fileName
|
||||||
|
* String - localized filename for default.license
|
||||||
|
*/
|
||||||
|
public static String getDefaultLicense(Context context)
|
||||||
|
{
|
||||||
|
Locale locale = context.getCurrentLocale();
|
||||||
|
String fileName = "";
|
||||||
|
/** Name of the default license */
|
||||||
|
final String DEF_LIC_FILE = "default";
|
||||||
|
final String FILE_TYPE = ".license";
|
||||||
|
String defsFilename = ConfigurationManager.getProperty("dspace.dir")
|
||||||
|
+ File.separator + "config" + File.separator + DEF_LIC_FILE;
|
||||||
|
|
||||||
|
fileName = getFilename(locale, defsFilename, FILE_TYPE);
|
||||||
|
|
||||||
|
return fileName;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Get the appropriate localized version of a file according to language settings
|
||||||
|
* e. g. help files in jsp/help/
|
||||||
|
*
|
||||||
|
* @param locale
|
||||||
|
* Locale to get the file for
|
||||||
|
* @param fileName
|
||||||
|
* String fileName, to get the localized file for
|
||||||
|
* @param fileType
|
||||||
|
* String file extension
|
||||||
|
* @return localizedFileName
|
||||||
|
* String - localized filename
|
||||||
|
*/
|
||||||
|
private static String getFilename(Locale locale, String fileName, String fileType)
|
||||||
|
{
|
||||||
|
String localizedFileName = null;
|
||||||
|
boolean fileFound = false;
|
||||||
|
// with Language, Country, Variant
|
||||||
|
String fileNameLCV = null;
|
||||||
|
// with Language, Country
|
||||||
|
String fileNameLC = null;
|
||||||
|
// with Language
|
||||||
|
String fileNameL = null;
|
||||||
|
fileNameL = fileName + "_" + locale.getLanguage();
|
||||||
|
|
||||||
|
if (fileType == null)
|
||||||
|
{
|
||||||
|
fileType = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!("".equals(locale.getCountry())))
|
||||||
|
{
|
||||||
|
fileNameLC = fileName + "_" + locale.getLanguage() + "_"
|
||||||
|
+ locale.getCountry();
|
||||||
|
|
||||||
|
if (!("".equals(locale.getVariant())))
|
||||||
|
{
|
||||||
|
fileNameLCV = fileName + "_" + locale.getLanguage() + "_"
|
||||||
|
+ locale.getCountry() + "_" + locale.getVariant();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fileNameLCV != null && !fileFound)
|
||||||
|
{
|
||||||
|
File fileTmp = new File(fileNameLCV + fileType);
|
||||||
|
if (fileTmp.exists())
|
||||||
|
{
|
||||||
|
fileFound = true;
|
||||||
|
localizedFileName = fileNameLCV + fileType;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fileNameLC != null && !fileFound)
|
||||||
|
{
|
||||||
|
File fileTmp = new File(fileNameLC + fileType);
|
||||||
|
if (fileTmp.exists())
|
||||||
|
{
|
||||||
|
fileFound = true;
|
||||||
|
localizedFileName = fileNameLC + fileType;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fileNameL != null && !fileFound)
|
||||||
|
{
|
||||||
|
File fileTmp = new File(fileNameL + fileType);
|
||||||
|
if (fileTmp.exists())
|
||||||
|
{
|
||||||
|
fileFound = true;
|
||||||
|
localizedFileName = fileNameL + fileType;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!fileFound)
|
||||||
|
{
|
||||||
|
localizedFileName = fileName + fileType;
|
||||||
|
}
|
||||||
|
return localizedFileName;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the appropriate localized version of an email template according to language settings
|
||||||
|
*
|
||||||
|
* @param locale
|
||||||
|
* Locale for this request
|
||||||
|
* @param name
|
||||||
|
* String - base name of the email template
|
||||||
|
* @return templateName
|
||||||
|
* String - localized filename of an email template
|
||||||
|
*/
|
||||||
|
public static String getEmailFilename(Locale locale, String name)
|
||||||
|
{
|
||||||
|
String templateName = "";
|
||||||
|
String templateFile = ConfigurationManager.getProperty("dspace.dir")
|
||||||
|
+ File.separator + "config" + File.separator + "emails"
|
||||||
|
+ File.separator + name;
|
||||||
|
|
||||||
|
templateName = getFilename(locale, templateFile, "");
|
||||||
|
return templateName;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@@ -43,17 +43,21 @@ import java.io.IOException;
|
|||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import java.sql.Timestamp;
|
import java.sql.Timestamp;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
import javax.mail.MessagingException;
|
import javax.mail.MessagingException;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
import org.dspace.authorize.AuthorizeException;
|
import org.dspace.authorize.AuthorizeException;
|
||||||
import org.dspace.core.ConfigurationManager;
|
import org.dspace.core.ConfigurationManager;
|
||||||
import org.dspace.core.Context;
|
import org.dspace.core.Context;
|
||||||
import org.dspace.core.Email;
|
import org.dspace.core.Email;
|
||||||
|
import org.dspace.core.I18nUtil;
|
||||||
import org.dspace.core.Utils;
|
import org.dspace.core.Utils;
|
||||||
import org.dspace.storage.rdbms.DatabaseManager;
|
import org.dspace.storage.rdbms.DatabaseManager;
|
||||||
import org.dspace.storage.rdbms.TableRow;
|
import org.dspace.storage.rdbms.TableRow;
|
||||||
|
import org.dspace.app.webui.util.UIUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Methods for handling registration by email and forgotten passwords. When
|
* Methods for handling registration by email and forgotten passwords. When
|
||||||
@@ -92,11 +96,11 @@ public class AccountManager
|
|||||||
* @param email
|
* @param email
|
||||||
* Email address to send the registration email to
|
* Email address to send the registration email to
|
||||||
*/
|
*/
|
||||||
public static void sendRegistrationInfo(Context context, String email)
|
public static void sendRegistrationInfo(HttpServletRequest request, Context context, String email)
|
||||||
throws SQLException, IOException, MessagingException,
|
throws SQLException, IOException, MessagingException,
|
||||||
AuthorizeException
|
AuthorizeException
|
||||||
{
|
{
|
||||||
sendInfo(context, email, true, true);
|
sendInfo(request, context, email, true, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -112,11 +116,11 @@ public class AccountManager
|
|||||||
* @param email
|
* @param email
|
||||||
* Email address to send the forgot-password email to
|
* Email address to send the forgot-password email to
|
||||||
*/
|
*/
|
||||||
public static void sendForgotPasswordInfo(Context context, String email)
|
public static void sendForgotPasswordInfo(HttpServletRequest request, Context context, String email)
|
||||||
throws SQLException, IOException, MessagingException,
|
throws SQLException, IOException, MessagingException,
|
||||||
AuthorizeException
|
AuthorizeException
|
||||||
{
|
{
|
||||||
sendInfo(context, email, false, true);
|
sendInfo(request, context, email, false, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -218,7 +222,7 @@ public class AccountManager
|
|||||||
* registration; otherwise, it is for forgot-password @param send If true,
|
* registration; otherwise, it is for forgot-password @param send If true,
|
||||||
* send email; otherwise do not send any email
|
* send email; otherwise do not send any email
|
||||||
*/
|
*/
|
||||||
protected static TableRow sendInfo(Context context, String email,
|
protected static TableRow sendInfo(HttpServletRequest request, Context context, String email,
|
||||||
boolean isRegister, boolean send) throws SQLException, IOException,
|
boolean isRegister, boolean send) throws SQLException, IOException,
|
||||||
MessagingException, AuthorizeException
|
MessagingException, AuthorizeException
|
||||||
{
|
{
|
||||||
@@ -251,7 +255,7 @@ public class AccountManager
|
|||||||
|
|
||||||
if (send)
|
if (send)
|
||||||
{
|
{
|
||||||
sendEmail(email, isRegister, rd);
|
sendEmail(request, email, isRegister, rd);
|
||||||
}
|
}
|
||||||
|
|
||||||
return rd;
|
return rd;
|
||||||
@@ -275,8 +279,8 @@ public class AccountManager
|
|||||||
* @exception IOException
|
* @exception IOException
|
||||||
* If an error occurs while reading the email template.
|
* If an error occurs while reading the email template.
|
||||||
*/
|
*/
|
||||||
private static void sendEmail(String email, boolean isRegister, TableRow rd)
|
private static void sendEmail(HttpServletRequest request, String email, boolean isRegister, TableRow rd)
|
||||||
throws MessagingException, IOException
|
throws MessagingException, IOException, SQLException
|
||||||
{
|
{
|
||||||
String base = ConfigurationManager.getProperty("dspace.url");
|
String base = ConfigurationManager.getProperty("dspace.url");
|
||||||
|
|
||||||
@@ -286,9 +290,9 @@ public class AccountManager
|
|||||||
isRegister ? "register" : "forgot").append("?")
|
isRegister ? "register" : "forgot").append("?")
|
||||||
.append("token=").append(rd.getStringColumn("token"))
|
.append("token=").append(rd.getStringColumn("token"))
|
||||||
.toString();
|
.toString();
|
||||||
|
Locale locale = UIUtil.obtainContext(request).getCurrentLocale();
|
||||||
Email bean = ConfigurationManager.getEmail(isRegister ? "register"
|
Email bean = ConfigurationManager.getEmail(I18nUtil.getEmailFilename(locale, isRegister ? "register"
|
||||||
: "change_password");
|
: "change_password"));
|
||||||
bean.addRecipient(email);
|
bean.addRecipient(email);
|
||||||
bean.addArgument(specialLink);
|
bean.addArgument(specialLink);
|
||||||
bean.send();
|
bean.send();
|
||||||
|
@@ -77,6 +77,9 @@ public class EPerson extends DSpaceObject
|
|||||||
/** The netid field (for sorting) */
|
/** The netid field (for sorting) */
|
||||||
public static final int NETID = 4;
|
public static final int NETID = 4;
|
||||||
|
|
||||||
|
/** The e-mail field (for sorting) */
|
||||||
|
public static final int LANGUAGE = 5;
|
||||||
|
|
||||||
/** log4j logger */
|
/** log4j logger */
|
||||||
private static Logger log = Logger.getLogger(EPerson.class);
|
private static Logger log = Logger.getLogger(EPerson.class);
|
||||||
|
|
||||||
@@ -358,6 +361,9 @@ public class EPerson extends DSpaceObject
|
|||||||
s = "email";
|
s = "email";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case LANGUAGE:
|
||||||
|
s = "language";
|
||||||
|
break;
|
||||||
case NETID:
|
case NETID:
|
||||||
s = "netid";
|
s = "netid";
|
||||||
break;
|
break;
|
||||||
@@ -484,6 +490,35 @@ public class EPerson extends DSpaceObject
|
|||||||
return myRow.getIntColumn("eperson_id");
|
return myRow.getIntColumn("eperson_id");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the e-person's language
|
||||||
|
*
|
||||||
|
* @return language
|
||||||
|
*/
|
||||||
|
public String getLanguage()
|
||||||
|
{
|
||||||
|
return myRow.getStringColumn("language");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the EPerson's laguage
|
||||||
|
*
|
||||||
|
* @param s
|
||||||
|
* language
|
||||||
|
*/
|
||||||
|
public void setLanguage(String language)
|
||||||
|
{
|
||||||
|
if (language != null)
|
||||||
|
{
|
||||||
|
language = language.toLowerCase();
|
||||||
|
}
|
||||||
|
|
||||||
|
myRow.setColumn("language", language);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public String getHandle()
|
public String getHandle()
|
||||||
{
|
{
|
||||||
// No Handles for e-people
|
// No Handles for e-people
|
||||||
|
@@ -45,6 +45,8 @@ import java.text.ParseException;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Locale;
|
||||||
|
import java.util.ResourceBundle;
|
||||||
|
|
||||||
import javax.mail.MessagingException;
|
import javax.mail.MessagingException;
|
||||||
|
|
||||||
@@ -58,6 +60,7 @@ import org.dspace.content.Item;
|
|||||||
import org.dspace.core.ConfigurationManager;
|
import org.dspace.core.ConfigurationManager;
|
||||||
import org.dspace.core.Context;
|
import org.dspace.core.Context;
|
||||||
import org.dspace.core.Email;
|
import org.dspace.core.Email;
|
||||||
|
import org.dspace.core.I18nUtil;
|
||||||
import org.dspace.core.LogManager;
|
import org.dspace.core.LogManager;
|
||||||
import org.dspace.handle.HandleManager;
|
import org.dspace.handle.HandleManager;
|
||||||
import org.dspace.search.Harvest;
|
import org.dspace.search.Harvest;
|
||||||
@@ -323,6 +326,11 @@ public class Subscribe
|
|||||||
List collections) throws IOException, MessagingException,
|
List collections) throws IOException, MessagingException,
|
||||||
SQLException
|
SQLException
|
||||||
{
|
{
|
||||||
|
// Get a resource bundle according to the eperson language preferences
|
||||||
|
Locale epersonLocale = new Locale(eperson.getLanguage());
|
||||||
|
Locale supportedLocale = I18nUtil.getSupportedLocale(epersonLocale);
|
||||||
|
ResourceBundle labels = ResourceBundle.getBundle("Messages", supportedLocale);
|
||||||
|
|
||||||
// Get the start and end dates for yesterday
|
// Get the start and end dates for yesterday
|
||||||
Date thisTimeYesterday = new Date(System.currentTimeMillis()
|
Date thisTimeYesterday = new Date(System.currentTimeMillis()
|
||||||
- (24 * 60 * 60 * 1000));
|
- (24 * 60 * 60 * 1000));
|
||||||
@@ -368,7 +376,7 @@ public class Subscribe
|
|||||||
isFirst = false;
|
isFirst = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
emailText.append("New items in collection ").append(
|
emailText.append(labels.getString("org.dspace.eperson.Subscribe.new-items")).append(
|
||||||
c.getMetadata("name")).append(": ").append(
|
c.getMetadata("name")).append(": ").append(
|
||||||
itemInfos.size()).append("\n\n");
|
itemInfos.size()).append("\n\n");
|
||||||
|
|
||||||
@@ -378,7 +386,7 @@ public class Subscribe
|
|||||||
.get(j);
|
.get(j);
|
||||||
|
|
||||||
DCValue[] titles = hii.item.getDC("title", null, Item.ANY);
|
DCValue[] titles = hii.item.getDC("title", null, Item.ANY);
|
||||||
emailText.append(" Title: ");
|
emailText.append(" ").append(labels.getString("org.dspace.eperson.Subscribe.title")).append(" ");
|
||||||
|
|
||||||
if (titles.length > 0)
|
if (titles.length > 0)
|
||||||
{
|
{
|
||||||
@@ -386,7 +394,7 @@ public class Subscribe
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
emailText.append("Untitled");
|
emailText.append(labels.getString("org.dspace.eperson.Subscribe.untitled"));
|
||||||
}
|
}
|
||||||
|
|
||||||
DCValue[] authors = hii.item.getDC("contributor", Item.ANY,
|
DCValue[] authors = hii.item.getDC("contributor", Item.ANY,
|
||||||
@@ -394,7 +402,7 @@ public class Subscribe
|
|||||||
|
|
||||||
if (authors.length > 0)
|
if (authors.length > 0)
|
||||||
{
|
{
|
||||||
emailText.append("\n Authors: ").append(
|
emailText.append("\n ").append(labels.getString("org.dspace.eperson.Subscribe.authors")).append(
|
||||||
authors[0].value);
|
authors[0].value);
|
||||||
|
|
||||||
for (int k = 1; k < authors.length; k++)
|
for (int k = 1; k < authors.length; k++)
|
||||||
@@ -404,7 +412,7 @@ public class Subscribe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
emailText.append("\n ID: ").append(
|
emailText.append("\n ").append(labels.getString("org.dspace.eperson.Subscribe.id")).append(
|
||||||
HandleManager.getCanonicalForm(hii.handle)).append(
|
HandleManager.getCanonicalForm(hii.handle)).append(
|
||||||
"\n\n");
|
"\n\n");
|
||||||
}
|
}
|
||||||
@@ -419,7 +427,7 @@ public class Subscribe
|
|||||||
// Send an e-mail if there were any new items
|
// Send an e-mail if there were any new items
|
||||||
if (emailText.length() > 0)
|
if (emailText.length() > 0)
|
||||||
{
|
{
|
||||||
Email email = ConfigurationManager.getEmail("subscription");
|
Email email = ConfigurationManager.getEmail(I18nUtil.getEmailFilename(supportedLocale, "subscription"));
|
||||||
|
|
||||||
email.addRecipient(eperson.getEmail());
|
email.addRecipient(eperson.getEmail());
|
||||||
email.addArgument(emailText.toString());
|
email.addArgument(emailText.toString());
|
||||||
|
@@ -44,7 +44,10 @@ import java.sql.SQLException;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Locale;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.MissingResourceException;
|
||||||
|
import java.util.ResourceBundle;
|
||||||
|
|
||||||
import javax.mail.MessagingException;
|
import javax.mail.MessagingException;
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
@@ -60,7 +63,7 @@ import org.dspace.content.WorkspaceItem;
|
|||||||
import org.dspace.core.ConfigurationManager;
|
import org.dspace.core.ConfigurationManager;
|
||||||
import org.dspace.core.Context;
|
import org.dspace.core.Context;
|
||||||
import org.dspace.core.Email;
|
import org.dspace.core.Email;
|
||||||
import org.dspace.core.I18N;
|
import org.dspace.core.I18nUtil;
|
||||||
import org.dspace.core.LogManager;
|
import org.dspace.core.LogManager;
|
||||||
import org.dspace.eperson.EPerson;
|
import org.dspace.eperson.EPerson;
|
||||||
import org.dspace.eperson.Group;
|
import org.dspace.eperson.Group;
|
||||||
@@ -666,25 +669,33 @@ public class WorkflowManager
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
// Get submitter
|
||||||
|
EPerson ep = i.getSubmitter();
|
||||||
|
// Get the Locale
|
||||||
|
Locale epLocale = new Locale(ep.getLanguage());
|
||||||
|
Locale supportedLocale = I18nUtil.getSupportedLocale(epLocale);
|
||||||
|
Email email = ConfigurationManager.getEmail(I18nUtil.getEmailFilename(supportedLocale, "submit_archive"));
|
||||||
|
|
||||||
// Get the item handle to email to user
|
// Get the item handle to email to user
|
||||||
String handle = HandleManager.findHandle(c, i);
|
String handle = HandleManager.findHandle(c, i);
|
||||||
|
|
||||||
// Get title
|
// Get title
|
||||||
DCValue[] titles = i.getDC("title", null, Item.ANY);
|
DCValue[] titles = i.getDC("title", null, Item.ANY);
|
||||||
String title = I18N.message("untitled", WorkflowManager.class);
|
String title = "";
|
||||||
|
try
|
||||||
|
{
|
||||||
|
title = I18nUtil.getMessage("org.dspace.workflow.WorkflowManager.untitled");
|
||||||
|
}
|
||||||
|
catch (MissingResourceException e)
|
||||||
|
{
|
||||||
|
title = "Untitled";
|
||||||
|
}
|
||||||
if (titles.length > 0)
|
if (titles.length > 0)
|
||||||
{
|
{
|
||||||
title = titles[0].value;
|
title = titles[0].value;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get submitter
|
|
||||||
EPerson ep = i.getSubmitter();
|
|
||||||
|
|
||||||
Email email = ConfigurationManager.getEmail("submit_archive");
|
|
||||||
|
|
||||||
email.addRecipient(ep.getEmail());
|
email.addRecipient(ep.getEmail());
|
||||||
|
|
||||||
email.addArgument(title);
|
email.addArgument(title);
|
||||||
email.addArgument(coll.getMetadata("name"));
|
email.addArgument(coll.getMetadata("name"));
|
||||||
email.addArgument(HandleManager.getCanonicalForm(handle));
|
email.addArgument(HandleManager.getCanonicalForm(handle));
|
||||||
@@ -851,30 +862,39 @@ public class WorkflowManager
|
|||||||
|
|
||||||
String message = "";
|
String message = "";
|
||||||
|
|
||||||
switch (wi.getState())
|
for (int i = 0; i < epa.length; i++)
|
||||||
{
|
{
|
||||||
case WFSTATE_STEP1POOL:
|
Locale epersonLocale = new Locale(epa[i].getLanguage());
|
||||||
message = I18N.message("step1", WorkflowManager.class);
|
Locale supportedLocale = I18nUtil.getSupportedLocale(epersonLocale);
|
||||||
break;
|
Email email = ConfigurationManager.getEmail(I18nUtil.getEmailFilename(supportedLocale, "submit_task"));
|
||||||
|
|
||||||
case WFSTATE_STEP2POOL:
|
|
||||||
message = I18N.message("step2", WorkflowManager.class);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case WFSTATE_STEP3POOL:
|
|
||||||
message = I18N.message("step3", WorkflowManager.class);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
Email email = ConfigurationManager.getEmail("submit_task");
|
|
||||||
|
|
||||||
email.addArgument(title);
|
email.addArgument(title);
|
||||||
email.addArgument(coll.getMetadata("name"));
|
email.addArgument(coll.getMetadata("name"));
|
||||||
email.addArgument(submitter);
|
email.addArgument(submitter);
|
||||||
|
|
||||||
|
ResourceBundle messages = ResourceBundle.getBundle("Messages", supportedLocale);
|
||||||
|
log.info("Locale des Resource Bundles: " + messages.getLocale().getDisplayName());
|
||||||
|
switch (wi.getState())
|
||||||
|
{
|
||||||
|
case WFSTATE_STEP1POOL:
|
||||||
|
message = messages.getString("org.dspace.workflow.WorkflowManager.step1");
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case WFSTATE_STEP2POOL:
|
||||||
|
message = messages.getString("org.dspace.workflow.WorkflowManager.step2");
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case WFSTATE_STEP3POOL:
|
||||||
|
message = messages.getString("org.dspace.workflow.WorkflowManager.step3");
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
email.addArgument(message);
|
email.addArgument(message);
|
||||||
email.addArgument(getMyDSpaceLink());
|
email.addArgument(getMyDSpaceLink());
|
||||||
|
email.addRecipient(epa[i].getEmail());
|
||||||
emailRecipients(c, epa, email);
|
email.send();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (MessagingException e)
|
catch (MessagingException e)
|
||||||
{
|
{
|
||||||
@@ -925,8 +945,9 @@ public class WorkflowManager
|
|||||||
|
|
||||||
// Get rejector's name
|
// Get rejector's name
|
||||||
String rejector = getEPersonName(e);
|
String rejector = getEPersonName(e);
|
||||||
|
Locale eLocale = new Locale(e.getLanguage());
|
||||||
Email email = ConfigurationManager.getEmail("submit_reject");
|
Locale supportedLocale = I18nUtil.getSupportedLocale(eLocale);
|
||||||
|
Email email = ConfigurationManager.getEmail(I18nUtil.getEmailFilename(supportedLocale,"submit_reject"));
|
||||||
|
|
||||||
email.addRecipient(getSubmitterEPerson(wi).getEmail());
|
email.addRecipient(getSubmitterEPerson(wi).getEmail());
|
||||||
email.addArgument(title);
|
email.addArgument(title);
|
||||||
@@ -973,7 +994,7 @@ public class WorkflowManager
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return I18N.message("untitled", WorkflowManager.class);
|
return I18nUtil.getMessage("org.dspace.workflow.WorkflowManager.untitled ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user