Commit 04c7ad56 authored by Gradl, Tobias's avatar Gradl, Tobias
Browse files

985: Complete branding of custom searches

Task-Url: https://pm.winseda.de/issues/985
parent 2c0a6995
......@@ -21,15 +21,15 @@
<div class="form-content">
<fieldset>
<div class="form-group">
<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">
<label class="control-label col-sm-3" for="group_name"><s:message code="~eu.dariah.de.minfba.search.model.custom_search.name" />:</label>
<div class="col-sm-9">
<sf:input path="name" class="form-control" id="customSearch_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="~eu.dariah.de.minfba.search.model.custom_search.description" />:</label>
<div class="col-sm-10">
<label class="control-label col-sm-3" for="group_name"><s:message code="~eu.dariah.de.minfba.search.model.custom_search.description" />:</label>
<div class="col-sm-9">
<sf:textarea path="description" rows="4" class="form-control" id="customSearch_description" />
<sf:errors path="description" cssClass="error" />
</div>
......@@ -38,34 +38,34 @@
<fieldset>
<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">
<div class="col-sm-9 col-sm-offset-3 checkbox">
<label>
<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="~eu.dariah.de.minfba.search.model.custom_search.prefix" />:</label>
<label class="control-label col-sm-3" for="group_name"><s:message code="~eu.dariah.de.minfba.search.model.custom_search.prefix" />:</label>
<div class="col-sm-3">
<sf:input path="prefix" class="form-control" id="customSearch_prefix" />
</div>
<div class="col-sm-7">
<div class="col-sm-6">
<p class="form-control-static"><strong>.${urlSuffix}</strong></p>
</div>
<div class="col-sm-10 col-sm-offset-2">
<div class="col-sm-9 col-sm-offset-3">
<sf:errors path="prefix" cssClass="error" />
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="group_name"><s:message code="~eu.dariah.de.minfba.search.model.custom_search.datamodel" />:</label>
<div class="col-sm-10 checkbox">
<label class="control-label col-sm-3" for="group_name"><s:message code="~eu.dariah.de.minfba.search.model.custom_search.datamodel" />:</label>
<div class="col-sm-9 checkbox">
<label>
<sf:checkbox path="isDatamodelFixed" onchange="$(this).prop('checked') ? $('#datamodelId').removeProp('disabled') : $('#datamodelId').prop('disabled', 'disabled')" /> <s:message code="~eu.dariah.de.minfba.search.model.custom_search.has_datamodel" />?
</label>
</div>
</div>
<div class="form-group">
<div class="col-sm-10 col-sm-offset-2">
<div class="col-sm-9 col-sm-offset-3">
<sf:select disabled="${!cs.isDatamodelFixed}" cssClass="form-control" path="datamodelId" items="${datamodels}" itemLabel="name" itemValue="id" />
</div>
</div>
......@@ -87,7 +87,39 @@
<sf:input path="contrastThemeColor" class="form-control color-picker" id="customSearch_contrastThemeColor" />
<sf:errors path="contrastThemeColor" cssClass="error" />
</div>
</div>
</div>
<legend><s:message code="~eu.dariah.de.minfba.search.view.custom_search.view.images" /></legend>
<div class="form-group">
<label class="control-label col-sm-3"><s:message code="~eu.dariah.de.minfba.search.model.custom_search.search_logo" />:</label>
<div class="col-sm-9">
<c:set var="imgSrc" value="${cs.searchImageSrc}" />
<c:set var="imgId" value="${cs.searchImageId}" />
<c:set var="imgSet" value="search" />
<c:set var="inputId" value="searchImageId" />
<%@ include file="../incl/image_container.jsp" %>
</div>
</div>
<div id="organization-image-container" class="form-group">
<label class="control-label col-sm-3"><s:message code="~eu.dariah.de.minfba.search.model.custom_search.organization_logos" />:</label>
<div class="col-sm-9">
<a href="javascript:void(0)" onclick="editor.triggerAddOrganizationImage();" class="btn btn-primary">
<i class="fa fa-plus" aria-hidden="true"></i> <s:message code="~eu.dariah.de.minfba.search.view.custom_search.button.add_organization_image" />
</a>
</div>
<c:forEach items="${cs.organizationImageIdSrcMap}" var="organizationImageEntry">
<div class="col-sm-9 col-sm-offset-3">
<c:set var="imgSrc" value="${organizationImageEntry.value}" />
<c:set var="imgId" value="${organizationImageEntry.key}" />
<c:set var="imgSet" value="organization" />
<c:set var="inputId" value="organizationImage[]" />
<%@ include file="../incl/image_container.jsp" %>
</div>
</c:forEach>
</div>
</fieldset>
</div>
<div class="form-footer control-group">
......
......@@ -102,8 +102,8 @@
<td><img id="user-collection-detail-search_logo" /></td>
</tr>
<tr>
<th style="white-space: nowrap;"><s:message code="~eu.dariah.de.minfba.search.model.custom_search.organization_logo" />:</th>
<td><img id="user-collection-detail-organization_logo" /></td>
<th style="white-space: nowrap;"><s:message code="~eu.dariah.de.minfba.search.model.custom_search.organization_logos" />:</th>
<td id="user-collection-detail-organization_logo_container"></td>
</tr>
</table>
......
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="s" uri="http://www.springframework.org/tags" %>
<c:set var="stylePic" value="${imgSrc==null ? 'style=\"display: none;\"' : ''}" />
<c:set var="styleNoPic" value="${imgSrc!=null ? 'style=\"display: none;\"' : ''}" />
<div class="custom-image-container" style="margin-top: 10px;">
<div>
<a ${stylePic}class="custom-image-preview" href="${imgSrc}/DISPLAY" data-lightbox="${imgSet}" data-title="${imgSrc}/DISPLAY">
<c:choose>
<c:when test="${imgSrc==null}">
<img src="" />
</c:when>
<c:otherwise>
<img src="${imgSrc}/THUMBNAIL" />
</c:otherwise>
</c:choose>
</a>
<img ${styleNoPic}class="custom-image-placeholder" src='<s:url value="/resources/img/page_icon_faded.png"></s:url>' />
</div>
<a href="javascript:void(0)" ${stylePic} onclick="editor.triggerRemoveImage(this);" class="btn-remove-custom-image btn btn-xs pull-left btn-link">
<i class="fa fa-trash" aria-hidden="true"></i>
</a>
<label class="custom-image-hint">
<c:choose>
<c:when test="${imgSrc!=null}">
<a target='_blank' href="${imgSrc}">${imgSrc}</a>
</c:when>
<c:otherwise>
<s:message code="~eu.dariah.de.minfba.search.view.custom_search.view.info.no_image" />
</c:otherwise>
</c:choose>
</label>
<input class="custom-image-id" type="hidden" name="${inputId}" id="${inputId}" value="${imgId}" />
<input class="custom-image-file" name="custom-image-file" type="file" onchange="editor.triggerUploadImage(event, this);" />
</div>
\ No newline at end of file
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