Commit a2cdb2c1 authored by Gradl, Tobias's avatar Gradl, Tobias
Browse files

598: Implement CustomSearch as successor of user collections

Task-Url: https://pm.winseda.de/issues/598
parent 8154159a
......@@ -5,7 +5,7 @@
<div>
<div class="fileupload-buttonbar">
<span class="btn btn-primary fileinput-button" <c:if test="${fileName!=null}">style="display: none;"</c:if>> <span><s:message code="~de.dariah.genericsearch.view.common.upload" /></span><input type="file" name="file" /></span>
<span class="btn btn-primary fileinput-button" <c:if test="${fileName!=null}">style="display: none;"</c:if>> <span><s:message code="~eu.dariah.de.minfba.common.actions.upload" /></span><input type="file" name="file" /></span>
</div>
<div class="fileupload-progress hide">
<div class="progress progress-success progress-striped active" role="progressbar" aria-valuemin="0" aria-valuemax="100">
......
......@@ -7,17 +7,17 @@
<form method="POST" action="${saveUrl}" class="form-horizontal" id="frm-add-user-collections">
<div class="form-header">
<h2 id="form-header-title">
${userCollection.name}&nbsp;
<small><s:message code="~de.dariah.genericsearch.view.mycollection.add_collections" /></small>
${customSearch.name}&nbsp;
<small><s:message code="~eu.dariah.de.minfba.search.view.custom_search.view.labels.add_collections" /></small>
</h2>
<input type="hidden" id="ucId" name="ucId" value="${userCollection.id}" />
<input type="hidden" id="ucId" name="ucId" value="${customSearch.id}" />
</div>
<div class="form-content">
<table id="user-collections-add-collections-table" class="table table-bordered table-striped table-hover model-list">
<table id="user-collections-add-collections-table" class="table table-bordered table-striped table-hover default-table" style="width: 100%;">
<thead>
<tr>
<th></th>
<th width="100%"><s:message code="~de.dariah.genericsearch.model.dataProvider.name" /></th>
<th><s:message code="~eu.dariah.de.minfba.metamodel.collection.name" /></th>
</tr>
</thead>
<tbody>
......@@ -32,8 +32,8 @@
</div>
<div class="form-footer control-group">
<div class="controls">
<button class="btn cancel form-btn-cancel" type="reset"><i class="icon-ban-circle icon-black"></i><span><s:message code="~de.dariah.genericsearch.view.common.cancel" /></span></button>
<button id="btn-add-user-collections-submit" disabled="disabled" class="btn btn-primary start form-btn-submit" type="submit"><i class="icon-upload icon-white"></i><span><s:message code="~de.dariah.genericsearch.view.common.add" /></span></button>
<button class="btn cancel form-btn-cancel" type="reset"><i class="icon-ban-circle icon-black"></i><span><s:message code="~eu.dariah.de.minfba.common.actions.cancel" /></span></button>
<button id="btn-add-user-collections-submit" disabled="disabled" class="btn btn-primary start form-btn-submit" type="submit"><i class="icon-upload icon-white"></i><span><s:message code="~eu.dariah.de.minfba.common.actions.add" /></span></button>
</div>
</div>
</form>
......
......@@ -5,15 +5,15 @@
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<s:url value="${actionPath}" var="saveUrl" />
<sf:form method="POST" action="${saveUrl}" modelAttribute="uc" class="form-horizontal" >
<sf:form method="POST" action="${saveUrl}" modelAttribute="cs" class="form-horizontal" >
<div class="form-header">
<h3 id="form-header-title"><c:choose>
<c:when test="${isUpdate==true}">
<s:message code="~de.dariah.genericsearch.view.mycollection.edit_mycollection" />
<s:message code="~eu.dariah.de.minfba.common.titles.custom_search.edit" />
</c:when>
<c:otherwise>
<s:message code="~de.dariah.genericsearch.view.mycollection.new_mycollection" />
<s:message code="~eu.dariah.de.minfba.common.titles.custom_search.new" />
</c:otherwise>
</c:choose></h3>
<sf:hidden path="id"/>
......@@ -21,14 +21,14 @@
<div class="form-content">
<fieldset>
<div class="form-group">
<label class="control-label col-sm-2" for="group_name"><s:message code="~de.dariah.genericsearch.view.mycollection.model.name" />:</label>
<label class="control-label col-sm-2" for="group_name"><s:message code="~eu.dariah.de.minfba.search.model.custom_search.name" />:</label>
<div class="col-sm-10">
<sf:input path="name" class="form-control" id="userCollectionPojo_name" />
<sf:errors path="name" cssClass="error" />
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="group_name"><s:message code="~de.dariah.genericsearch.view.mycollection.model.description" />:</label>
<label class="control-label col-sm-2" for="group_name"><s:message code="~eu.dariah.de.minfba.search.model.custom_search.description" />:</label>
<div class="col-sm-10">
<sf:textarea path="description" rows="4" class="form-control" id="userCollectionPojo_description" />
<sf:errors path="description" cssClass="error" />
......@@ -36,88 +36,49 @@
</div>
</fieldset>
<fieldset>
<legend><s:message code="~de.dariah.genericsearch.view.mycollection.branded_search.title" /></legend>
<legend><s:message code="~eu.dariah.de.minfba.search.view.custom_search.view.dedicated_custom_search" /></legend>
<div class="form-group">
<div class="col-sm-10 col-sm-offset-2 checkbox">
<label>
<sf:checkbox path="brandedSearchActive" /> <s:message code="~de.dariah.genericsearch.view.mycollection.model.is_branded" />?
<sf:checkbox path="brandedSearch" /> <s:message code="~eu.dariah.de.minfba.search.model.custom_search.is_branded" />?
</label>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="group_name"><s:message code="~de.dariah.genericsearch.view.mycollection.model.uri_prefix" />:</label>
<label class="control-label col-sm-2" for="group_name"><s:message code="~eu.dariah.de.minfba.search.model.custom_search.prefix" />:</label>
<div class="col-sm-3">
<sf:input path="uriPrefix" class="form-control" id="userCollectionPojo_uriPrefix" />
<sf:input path="prefix" class="form-control" id="userCollectionPojo_prefix" />
</div>
<div class="col-sm-7">
<p class="form-control-static"><strong>.${urlSuffix}</strong></p>
<p class="form-control-static"><strong>.${pageContext.request.localName}</strong></p>
</div>
<div class="col-sm-10 col-sm-offset-2">
<sf:errors path="uriPrefix" cssClass="error" />
<sf:errors path="prefix" cssClass="error" />
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="userCollectionPojo_darkThemeColor"><s:message code="~de.dariah.genericsearch.view.mycollection.model.theme_dark_color" />:</label>
<label class="control-label col-sm-2" for="userCollectionPojo_darkThemeColor"><s:message code="~eu.dariah.de.minfba.search.model.custom_search.theme_dark_color" />:</label>
<div class="col-sm-2">
<sf:input path="darkThemeColor" class="form-control color-picker" id="userCollectionPojo_darkThemeColor" />
<sf:errors path="darkThemeColor" cssClass="error" />
</div>
<label class="control-label col-sm-2" style="padding-left: 0; padding-right: 0;" for="userCollectionPojo_lightThemeColor"><s:message code="~de.dariah.genericsearch.view.mycollection.model.theme_light_color" />:</label>
<label class="control-label col-sm-2" style="padding-left: 0; padding-right: 0;" for="userCollectionPojo_lightThemeColor"><s:message code="~eu.dariah.de.minfba.search.model.custom_search.theme_light_color" />:</label>
<div class="col-sm-2">
<sf:input path="lightThemeColor" class="form-control color-picker" id="userCollectionPojo_lightThemeColor" />
<sf:errors path="lightThemeColor" cssClass="error" />
</div>
<label class="control-label col-sm-2" style="padding-left: 0; padding-right: 0;" for="userCollectionPojo_contrastThemeColor"><s:message code="~de.dariah.genericsearch.view.mycollection.model.theme_contrast_color" />:</label>
<label class="control-label col-sm-2" style="padding-left: 0; padding-right: 0;" for="userCollectionPojo_contrastThemeColor"><s:message code="~eu.dariah.de.minfba.search.model.custom_search.theme_contrast_color" />:</label>
<div class="col-sm-2">
<sf:input path="contrastThemeColor" class="form-control color-picker" id="userCollectionPojo_contrastThemeColor" />
<sf:errors path="contrastThemeColor" cssClass="error" />
</div>
</div>
</fieldset>
<fieldset>
<legend></legend>
<div class="form-group custom-search-images">
<div class="col-sm-5 col-sm-offset-1">
<div>
<sf:hidden path="searchImageName" />
<label class="control-label"><s:message code="~de.dariah.genericsearch.view.mycollection.model.search_logo" /></label>
<input id="search_image" type="file" name="file" />
</div>
<div>
<c:choose>
<c:when test="${uc.searchImageName==null || uc.searchImageName==''}">
<img id="searchImage" src="#" style="display: none;" >
</c:when>
<c:otherwise>
<img id="searchImage" src="${uc.searchImageSrc}" >
</c:otherwise>
</c:choose>
</div>
</div>
<div class="col-sm-5 col-sm-offset-1">
<div>
<sf:hidden path="organizationImageName" />
<label class="control-label"><s:message code="~de.dariah.genericsearch.view.mycollection.model.organization_logo" /></label>
<input id="orga_image" type="file" name="file" />
</div>
<div>
<c:choose>
<c:when test="${uc.organizationImageName==null || uc.organizationImageName==''}">
<img id="organizationImage" src="#" style="display: none;" >
</c:when>
<c:otherwise>
<img id="organizationImage" src="${uc.organizationImageSrc}" >
</c:otherwise>
</c:choose>
</div>
</div>
</div>
</fieldset>
</div>
<div class="form-footer control-group">
<div class="controls">
<button class="btn cancel form-btn-cancel" type="reset"><span><s:message code="~de.dariah.genericsearch.view.common.cancel" /></span></button>
<button class="btn btn-primary start form-btn-submit" type="submit"><span><s:message code="~de.dariah.genericsearch.view.common.save" /></span></button>
<button class="btn cancel form-btn-cancel" type="reset"><span><s:message code="~eu.dariah.de.minfba.common.actions.cancel" /></span></button>
<button class="btn btn-primary start form-btn-submit" type="submit"><span><s:message code="~eu.dariah.de.minfba.common.actions.save" /></span></button>
</div>
</div>
</sf:form>
\ No newline at end of file
......@@ -10,20 +10,20 @@
<div id="content" class="primary-area">
<ul class="breadcrumb">
<li><a href="${home_url}"><s:message code="~de.dariah.genericsearch.view.search.title" /></a></li>
<li class="active"> <s:message code="~de.dariah.genericsearch.view.mycollection.title" /></li>
<li><a href="${home_url}"><s:message code="~eu.dariah.de.minfba.common.titles.administration" /></a></li>
<li class="active"> <s:message code="~eu.dariah.de.minfba.common.titles.custom_search" /></li>
</ul>
<div id="main-content">
<h1><s:message code="~de.dariah.genericsearch.view.mycollection.title" />&nbsp;<small id="user-collection-subheader"></small></h1>
<h1><s:message code="~eu.dariah.de.minfba.common.titles.custom_search" />&nbsp;<small id="user-collection-subheader"></small></h1>
<div class="row">
<button id="btn-new-user-collection" class="btn btn-default btn-sm">
<span class="glyphicon glyphicon-plus"></span> <s:message code="~de.dariah.genericsearch.view.mycollection.button.addUserCollection" />
<button id="btn-new-custom-search" class="btn btn-default btn-sm">
<span class="glyphicon glyphicon-plus"></span> <s:message code="~eu.dariah.de.minfba.search.view.custom_search.button.add_custom_search" />
</button>
<button id="btn-user-collection-edit" class="btn btn-default btn-sm">
<span class="glyphicon glyphicon-pencil"></span> <s:message code="~de.dariah.genericsearch.view.mycollection.button.editUserCollection" />
<button id="btn-custom-search-edit" class="btn btn-default btn-sm">
<span class="glyphicon glyphicon-pencil"></span> <s:message code="~eu.dariah.de.minfba.search.view.custom_search.button.edit_custom_search" />
</button>
<button id="btn-user-collection-delete" class="btn btn-default btn-sm">
<span class="glyphicon glyphicon-trash"></span> <s:message code="~de.dariah.genericsearch.view.mycollection.button.deleteUserCollection" />
<button id="btn-custom-search-delete" class="btn btn-default btn-sm">
<span class="glyphicon glyphicon-trash"></span> <s:message code="~eu.dariah.de.minfba.search.view.custom_search.button.delete_custom_search" />
</button>
<input type="hidden" id="user-collection-selectedUcId" value="0">
</div>
......@@ -31,25 +31,25 @@
<div class="col-md-4 no-padding" >
<ul class="nav nav-pills nav-stacked nav-condensed" id="source-select-ucIds">
<li class="source-select-ucId" style="margin-bottom:15px;" id="source-select-ucId-0">
<a href="#" onclick="editor.setActiveUc(0); editor.refresh(); return false;"><span class="glyphicon glyphicon-chevron-right pull-right"></span><span class="source-select-ucId-title"><s:message code="~de.dariah.genericsearch.view.source_selection.all_collections" /></span></a>
<a href="#" onclick="editor.setActiveUc(0); editor.refresh(); return false;"><span class="glyphicon glyphicon-chevron-right pull-right"></span><span class="source-select-ucId-title"><s:message code="~eu.dariah.de.minfba.search.options.actions.select_all_collections" /></span></a>
</li>
</ul>
</div>
<div class="col-md-8 model-details">
<ul id="user-collection-tab" class="nav nav-tabs">
<li id="user-collection-details-tab" class="active">
<a href="#user-collection-details" data-toggle="tab"><s:message code="~de.dariah.genericsearch.view.mycollection.model.details" />&nbsp;</a>
<a href="#user-collection-details" data-toggle="tab"><s:message code="~eu.dariah.de.minfba.search.model.custom_search.details" />&nbsp;</a>
</li>
<li id="user-collection-collections-tab">
<a href="#user-collection-collections" data-toggle="tab"><s:message code="~de.dariah.genericsearch.view.mycollection.collections" />&nbsp;
<a href="#user-collection-collections" data-toggle="tab"><s:message code="~eu.dariah.de.minfba.metamodel.collection" />&nbsp;
<button id="btn-add-collection" class="btn btn-default btn-xs">
<span class="glyphicon glyphicon-plus"></span>
</button>
</a>
</li>
<li id="user-collection-shares-tab" class="hide">
<a href="#user-collection-shares" data-toggle="tab"><s:message code="~de.dariah.genericsearch.view.mycollection.shares" />&nbsp;
<button id="btn-add-share" class="btn btn-default btn-xs">
<a href="#user-collection-shares" data-toggle="tab"><s:message code="~eu.dariah.de.minfba.search.model.custom_search.users" />&nbsp;
<button id="btn-add-user" class="btn btn-default btn-xs">
<span class="glyphicon glyphicon-plus"></span>
</button>
</a>
......@@ -60,39 +60,39 @@
<div id="search-results" class="tab-content">
<div class="tab-pane active" id="user-collection-details">
<div class="row">
<div class="col-sm-3"><label class="control-label"><s:message code="~de.dariah.genericsearch.view.mycollection.model.name" />:</label></div>
<div class="col-sm-3"><label class="control-label"><s:message code="~eu.dariah.de.minfba.search.model.custom_search.name" />:</label></div>
<div class="col-sm-9"><span id="user-collection-detail-name"></span></div>
</div>
<div class="row">
<div class="col-sm-3"><label class="control-label"><s:message code="~de.dariah.genericsearch.view.mycollection.model.description" />:</label></div>
<div class="col-sm-3"><label class="control-label"><s:message code="~eu.dariah.de.minfba.search.model.custom_search.description" />:</label></div>
<div class="col-sm-9"><span id="user-collection-detail-description"></span></div>
</div>
<div class="row">
<div class="col-sm-3"><label class="control-label"><s:message code="~de.dariah.genericsearch.view.mycollection.model.is_branded" />:</label></div>
<div class="col-sm-3"><label class="control-label"><s:message code="~eu.dariah.de.minfba.search.model.custom_search.is_branded" />:</label></div>
<div class="col-sm-9"><span id="user-collection-detail-is_branded"></span></div>
</div>
<div class="row">
<div class="col-sm-3"><label class="control-label"><s:message code="~de.dariah.genericsearch.view.mycollection.model.uri_prefix" />:</label></div>
<div class="col-sm-3"><label class="control-label"><s:message code="~eu.dariah.de.minfba.search.model.custom_search.prefix" />:</label></div>
<div class="col-sm-9"><span id="user-collection-detail-uri_prefix"></span></div>
</div>
<div class="row">
<div class="col-sm-3"><label class="control-label"><s:message code="~de.dariah.genericsearch.view.mycollection.model.theme_dark_color" />:</label></div>
<div class="col-sm-3"><label class="control-label"><s:message code="~eu.dariah.de.minfba.search.model.custom_search.theme_dark_color" />:</label></div>
<div class="col-sm-9"><span id="user-collection-detail-dark_color"></span></div>
</div>
<div class="row">
<div class="col-sm-3"><label class="control-label"><s:message code="~de.dariah.genericsearch.view.mycollection.model.theme_light_color" />:</label></div>
<div class="col-sm-3"><label class="control-label"><s:message code="~eu.dariah.de.minfba.search.model.custom_search.theme_light_color" />:</label></div>
<div class="col-sm-9"><span id="user-collection-detail-light_color"></span></div>
</div>
<div class="row">
<div class="col-sm-3"><label class="control-label"><s:message code="~de.dariah.genericsearch.view.mycollection.model.theme_contrast_color" />:</label></div>
<div class="col-sm-3"><label class="control-label"><s:message code="~eu.dariah.de.minfba.search.model.custom_search.theme_contrast_color" />:</label></div>
<div class="col-sm-9"><span id="user-collection-detail-contrast_color"></span></div>
</div>
<div class="row">
<div class="col-sm-3"><label class="control-label"><s:message code="~de.dariah.genericsearch.view.mycollection.model.search_logo" />:</label></div>
<div class="col-sm-3"><label class="control-label"><s:message code="~eu.dariah.de.minfba.search.model.custom_search.search_logo" />:</label></div>
<div class="col-sm-9"><img id="user-collection-detail-search_logo" /></div>
</div>
<div class="row">
<div class="col-sm-3"><label class="control-label"><s:message code="~de.dariah.genericsearch.view.mycollection.model.organization_logo" />:</label></div>
<div class="col-sm-3"><label class="control-label"><s:message code="~eu.dariah.de.minfba.search.model.custom_search.organization_logo" />:</label></div>
<div class="col-sm-9"><img id="user-collection-detail-organization_logo" /></div>
</div>
</div>
......@@ -101,12 +101,12 @@
<thead>
<tr>
<th></th>
<th><s:message code="~de.dariah.genericsearch.view.mycollection.model.name_of_collection" /></th>
<th><s:message code="~eu.dariah.de.minfba.metamodel.collection" /></th>
</tr>
</thead>
<tbody>
<tr>
<td colspan="2" align="center"><s:message code="~de.dariah.common.view.no_data_fetched_yet" /></td>
<td colspan="2" align="center"><s:message code="~eu.dariah.de.minfba.common.data_tables.no_data_fetched_yet" /></td>
</tr>
</tbody>
</table>
......@@ -117,12 +117,12 @@
<tr>
<th></th>
<th></th>
<th><s:message code="~de.dariah.genericsearch.view.mycollection.model.user" /></th>
<th><s:message code="~eu.dariah.de.minfba.search.model.custom_search.users" /></th>
</tr>
</thead>
<tbody>
<tr>
<td colspan="3" align="center"><s:message code="~de.dariah.common.view.no_data_fetched_yet" /></td>
<td colspan="3" align="center"><s:message code="~eu.dariah.de.minfba.common.data_tables.no_data_fetched_yet" /></td>
</tr>
</tbody>
</table>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment