Skip to content

Commit

Permalink
Restylish edit community / i18n improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrea Bollini committed Oct 8, 2013
1 parent 9c72db3 commit 4596e41
Show file tree
Hide file tree
Showing 3 changed files with 110 additions and 115 deletions.
4 changes: 4 additions & 0 deletions dspace-api/src/main/resources/Messages.properties
Expand Up @@ -1211,6 +1211,8 @@ jsp.tools.curate.select-group.tag = Choose from th
jsp.tools.curate.select-task.tag = Task
jsp.tools.curate.task.name = Task: {0}
jsp.tools.edit-collection.button.delete = Delete this Collection...
jsp.tools.edit-collection.form.basic-metadata = Collection's Metadata
jsp.tools.edit-collection.form.collection-settings = Collection's settings
jsp.tools.edit-collection.form.button.add-logo = Upload new logo...
jsp.tools.edit-collection.form.button.cancel = Cancel
jsp.tools.edit-collection.form.button.create = Create...
Expand Down Expand Up @@ -1258,6 +1260,8 @@ jsp.tools.edit-collection.wf-role1 = Accept/Reject
jsp.tools.edit-collection.wf-role2 = Accept/Reject/Edit Metadata
jsp.tools.edit-collection.wf-role3 = Edit Metadata
jsp.tools.edit-community.button.delete = Delete this Community...
jsp.tools.edit-community.form.basic-metadata = Community's metadata
jsp.tools.edit-community.form.community-settings = Community's settings
jsp.tools.edit-community.form.button.add-logo = Upload new logo...
jsp.tools.edit-community.form.button.cancel = Cancel
jsp.tools.edit-community.form.button.create = Create
Expand Down
4 changes: 2 additions & 2 deletions dspace-jspui/src/main/webapp/tools/edit-collection.jsp
Expand Up @@ -171,7 +171,7 @@
Basic metadata
=========================================================== --%>
<div class="panel panel-primary">
<div class="panel-heading">Collection's Metadata</div>
<div class="panel-heading"><fmt:message key="jsp.tools.edit-collection.form.basic-metadata" /></div>
<div class="panel-body">
<div class="row">
<label class="col-md-3" for="name"><fmt:message key="jsp.tools.edit-collection.form.label1"/></label>
Expand Down Expand Up @@ -315,7 +315,7 @@
</div>
<% } %>
<div class="panel panel-default">
<div class="panel-heading">Content settings</div>
<div class="panel-heading"><fmt:message key="jsp.tools.edit-collection.form.collection-settings" /></div>
<div class="panel-body">
<% if(bTemplateButton) { %>
<div class="row">
Expand Down
217 changes: 104 additions & 113 deletions dspace-jspui/src/main/webapp/tools/edit-community.jsp
Expand Up @@ -71,135 +71,133 @@
}
%>

<dspace:layout titlekey="jsp.tools.edit-community.title"
<dspace:layout style="submission" titlekey="jsp.tools.edit-community.title"
navbar="admin"
locbar="link"
parentlink="/dspace-admin"
parenttitlekey="jsp.administer" nocache="true">

<table width="95%">
<tr>
<td align="left">
<div class="row">
<%
if (community == null)
{
%>
<h1><fmt:message key="jsp.tools.edit-community.heading1"/></h1>
<h3 class="col-md-8"><fmt:message key="jsp.tools.edit-community.heading1"/>
<span class="pull-right">
<dspace:popup page="<%= LocaleSupport.getLocalizedMessage(pageContext, \"help.site-admin\") + \"#editcommunity\"%>"><fmt:message key="jsp.help"/></dspace:popup>
</span>
</h3>
<%
}
else
{
%>
<h1><fmt:message key="jsp.tools.edit-community.heading2">
<h3 class="col-md-8"><fmt:message key="jsp.tools.edit-community.heading2">
<fmt:param><%= community.getHandle() %></fmt:param>
</fmt:message>
</h1>
<span class="pull-right">
<dspace:popup page="<%= LocaleSupport.getLocalizedMessage(pageContext, \"help.site-admin\") + \"#editcommunity\"%>"><fmt:message key="jsp.help"/></dspace:popup>
</span>
</h3>
<% if(bDelete) { %>
<center>
<table width="70%">
<tr>
<td class="standard">
<form method="post" action="">
<form class="col-md-4" method="post" action="">
<input type="hidden" name="action" value="<%= EditCommunitiesServlet.START_DELETE_COMMUNITY %>" />
<input type="hidden" name="community_id" value="<%= community.getID() %>" />
<input type="submit" name="submit" value="<fmt:message key="jsp.tools.edit-community.button.delete"/>" />
<input class="col-md-12 btn btn-danger" type="submit" name="submit" value="<fmt:message key="jsp.tools.edit-community.button.delete"/>" />
</form>
</td>
</tr>
</table>
</center>
<% } %>
<%
}
%>
</td>
<td align="right" class="standard">
<dspace:popup page="<%= LocaleSupport.getLocalizedMessage(pageContext, \"help.site-admin\") + \"#editcommunity\"%>"><fmt:message key="jsp.help"/></dspace:popup>
</td>
</tr>
</table>
<form method="post" action="">
<table>
</div>
<form method="post" action="">
<div class="row">
<div class="col-md-8">
<div class="panel panel-primary">
<div class="panel-heading"><fmt:message key="jsp.tools.edit-community.form.basic-metadata"/></div>
<div class="panel-body">
<%-- ===========================================================
Basic metadata
=========================================================== --%>
<tr>
<td class="submitFormLabel"><fmt:message key="jsp.tools.edit-community.form.label1"/></td>
<td><input type="text" name="name" value="<%= Utils.addEntities(name) %>" size="50" /></td>
</tr>
<tr>
<td class="submitFormLabel"><fmt:message key="jsp.tools.edit-community.form.label2"/></td>
<td>
<input type="text" name="short_description" value="<%= Utils.addEntities(shortDesc) %>" size="50" />
</td>
</tr>
<tr>
<td class="submitFormLabel"><fmt:message key="jsp.tools.edit-community.form.label3"/></td>
<td>
<textarea name="introductory_text" rows="6" cols="50"><%= Utils.addEntities(intro) %></textarea>
</td>
</tr>
<tr>
<td class="submitFormLabel"><fmt:message key="jsp.tools.edit-community.form.label4"/></td>
<td>
<textarea name="copyright_text" rows="6" cols="50"><%= Utils.addEntities(copy) %></textarea>
</td>
</tr>
<tr>
<td class="submitFormLabel"><fmt:message key="jsp.tools.edit-community.form.label5"/></td>
<td>
<textarea name="side_bar_text" rows="6" cols="50"><%= Utils.addEntities(side) %></textarea>
</td>
</tr>
<div class="row">
<label for="name" class="col-md-3"><fmt:message key="jsp.tools.edit-community.form.label1"/></label>
<span class="col-md-9"><input class="form-control" type="text" name="name" value="<%= Utils.addEntities(name) %>" size="50" /></span>
</div><br/>
<div class="row">
<label for="short_description" class="col-md-3"><fmt:message key="jsp.tools.edit-community.form.label2"/></label>
<span class="col-md-9"><input class="form-control" type="text" name="short_description" value="<%= Utils.addEntities(shortDesc) %>" size="50" />
</span>
</div><br/>
<div class="row">
<label class="col-md-3" for="introductory_text"><fmt:message key="jsp.tools.edit-community.form.label3"/></label>
<span class="col-md-9"><textarea class="form-control" name="introductory_text" rows="6" cols="50"><%= Utils.addEntities(intro) %></textarea>
</span>
</div><br/>
<div class="row">
<label class="col-md-3" for="copyright_text"><fmt:message key="jsp.tools.edit-community.form.label4"/></label>
<span class="col-md-9">
<textarea class="form-control" name="copyright_text" rows="6" cols="50"><%= Utils.addEntities(copy) %></textarea>
</span>
</div><br/>
<div class="row">
<label class="col-md-3"><fmt:message key="jsp.tools.edit-community.form.label5"/></label>
<span class="col-md-9">
<textarea class="form-control" name="side_bar_text" rows="6" cols="50"><%= Utils.addEntities(side) %></textarea>
</span>
</div><br/>
<%-- ===========================================================
Logo
=========================================================== --%>
<tr>
<td class="submitFormLabel"><fmt:message key="jsp.tools.edit-community.form.label6"/></td>
<td>
<div class="row">
<label class="col-md-3"><fmt:message key="jsp.tools.edit-community.form.label6"/></label>
<div class="col-md-9">
<% if (logo != null) { %>
<table>
<tr>
<td>
<img src="<%= request.getContextPath() %>/retrieve/<%= logo.getID() %>" alt="logo" />
</td>
<td>
<input type="submit" name="submit_set_logo" value="<fmt:message key="jsp.tools.edit-community.form.button.add-logo"/>" /><br/><br/>
<input type="submit" name="submit_delete_logo" value="<fmt:message key="jsp.tools.edit-community.form.button.delete-logo"/>" />
</td>
</tr>
</table>
<span class="col-md-6">
<img class="img-responsive" src="<%= request.getContextPath() %>/retrieve/<%= logo.getID() %>" alt="logo" />
</span>
<input class="col-md-3 btn btn-default" type="submit" name="submit_set_logo" value="<fmt:message key="jsp.tools.edit-community.form.button.add-logo"/>" />
<input class="col-md-3 btn btn-danger" type="submit" name="submit_delete_logo" value="<fmt:message key="jsp.tools.edit-community.form.button.delete-logo"/>" />
<% } else { %>
<input type="submit" name="submit_set_logo" value="<fmt:message key="jsp.tools.edit-community.form.button.set-logo"/>" />
<input class="col-md-12 btn btn-success" type="submit" name="submit_set_logo" value="<fmt:message key="jsp.tools.edit-community.form.button.set-logo"/>" />
<% } %>
</td>
</tr>
<% if(bAdminCreateGroup || (admins != null && bAdminRemoveGroup)) { %>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-4">
<div class="panel panel-default">
<div class="panel-heading"><fmt:message key="jsp.tools.edit-community.form.community-settings" /></div>
<div class="panel-body">
<% if(bAdminCreateGroup || (admins != null && bAdminRemoveGroup)) { %>
<%-- ===========================================================
Community Administrators
=========================================================== --%>
<tr>
<td class="submitFormLabel"><fmt:message key="jsp.tools.edit-community.form.label8"/></td>
<td>
<div class="row">
<label class="col-md-6" for="submit_admins_create"><fmt:message key="jsp.tools.edit-community.form.label8"/></label>
<span class="col-md-6 btn-group">
<% if (admins == null) {
if (bAdminCreateGroup) {
%>
<input type="submit" name="submit_admins_create" value="<fmt:message key="jsp.tools.edit-community.form.button.create"/>" />
<input class="btn btn-success col-md-12" type="submit" name="submit_admins_create" value="<fmt:message key="jsp.tools.edit-community.form.button.create"/>" />
<% }
}
else
{
if (bAdminCreateGroup) { %>
<input type="submit" name="submit_admins_edit" value="<fmt:message key="jsp.tools.edit-community.form.button.edit"/>" />
<input class="btn btn-default col-md-6" type="submit" name="submit_admins_edit" value="<fmt:message key="jsp.tools.edit-community.form.button.edit"/>" />
<% }
if (bAdminRemoveGroup) { %>
<input type="submit" name="submit_admins_remove" value="<fmt:message key="jsp.tools.edit-community.form.button.remove"/>" />
<input class="btn btn-danger col-md-6" type="submit" name="submit_admins_remove" value="<fmt:message key="jsp.tools.edit-community.form.button.remove"/>" />
<% }
}
%>
</td>
</tr>
</span>
</div>
<% }
Expand All @@ -210,67 +208,60 @@
<%-- ===========================================================
Edit community's policies
=========================================================== --%>
<tr>
<td class="submitFormLabel"><fmt:message key="jsp.tools.edit-community.form.label7"/></td>
<td>
<input type="submit" name="submit_authorization_edit" value="<fmt:message key="jsp.tools.edit-community.form.button.edit"/>" />
</td>
</tr>
<div class="row">
<label class="col-md-6" for="submit_authorization_edit"><fmt:message key="jsp.tools.edit-community.form.label7"/></label>
<span class="col-md-6 btn-group">
<input class="col-md-12 btn btn-success" type="submit" name="submit_authorization_edit" value="<fmt:message key="jsp.tools.edit-community.form.button.edit"/>" />
</span>
</div>
<% }
if (bAdminCommunity) {
%>
<%-- ===========================================================
Curate Community
=========================================================== --%>
<tr>
<td class="submitFormLabel"><fmt:message key="jsp.tools.edit-community.form.label9"/></td>
<td>
<input type="submit" name="submit_curate_community" value="<fmt:message key="jsp.tools.edit-community.form.button.curate"/>" />
</td>
</tr>
<div class="row">
<label for="submit_curate_community" class="col-md-6"><fmt:message key="jsp.tools.edit-community.form.label9"/></label>
<span class="col-md-6">
<input class="col-md-12 btn btn-success" type="submit" name="submit_curate_community" value="<fmt:message key="jsp.tools.edit-community.form.button.curate"/>" />
</span>
</div>
<% } %>
</div>
</div>
</div>
</div>
</table>
<p>&nbsp;</p>
<center>
<table width="70%">
<tr>
<td class="standard">
<div class="row">
<div class="btn-group col-md-12">
<%
if (community == null)
{
%>
<input type="hidden" name="parent_community_id" value="<%= parentID %>" />
<input type="hidden" name="create" value="true" />
<input type="submit" name="submit" value="<fmt:message key="jsp.tools.edit-community.form.button.create"/>" />
</td>
<td>
<input class="col-md-6 btn btn-success" type="submit" name="submit" value="<fmt:message key="jsp.tools.edit-community.form.button.create"/>" />
<input type="hidden" name="parent_community_id" value="<%= parentID %>" />
<input type="hidden" name="action" value="<%= EditCommunitiesServlet.CONFIRM_EDIT_COMMUNITY %>" />
<input type="submit" name="submit_cancel" value="<fmt:message key="jsp.tools.edit-community.form.button.cancel"/>" />
<input class="col-md-6 btn btn-warning" type="submit" name="submit_cancel" value="<fmt:message key="jsp.tools.edit-community.form.button.cancel"/>" />
<%
}
else
{
%>
<input type="hidden" name="community_id" value="<%= community.getID() %>" />
<input type="hidden" name="create" value="false" />
<input type="submit" name="submit" value="<fmt:message key="jsp.tools.edit-community.form.button.update"/>" />
</td>
<td>
<input class="col-md-6 btn btn-success" type="submit" name="submit" value="<fmt:message key="jsp.tools.edit-community.form.button.update"/>" />
<input type="hidden" name="community_id" value="<%= community.getID() %>" />
<input type="hidden" name="action" value="<%= EditCommunitiesServlet.CONFIRM_EDIT_COMMUNITY %>" />
<input type="submit" name="submit_cancel" value="<fmt:message key="jsp.tools.edit-community.form.button.cancel"/>" />
<input class="col-md-6 btn btn-warning" type="submit" name="submit_cancel" value="<fmt:message key="jsp.tools.edit-community.form.button.cancel"/>" />
<%
}
%>
</td>
</tr>
</table>
</center>
</div>
</div>
</form>
</dspace:layout>

0 comments on commit 4596e41

Please sign in to comment.