Commit 8154159a authored by Gradl, Tobias's avatar Gradl, Tobias
Browse files

968: Reimplement user collection stack

Task-Url: https://pm.winseda.de/issues/968
parent 69d39280
<%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="s" uri="http://www.springframework.org/tags" %>
<ul class="breadcrumb">
<li class="active"><s:message code="~eu.dariah.de.minfba.common.titles.administration" /></li>
<li><a href="<s:url value="/collections" />"><s:message code="~eu.dariah.de.minfba.search.view.titles.collection_management" /></a></li>
<li class="active">${collectionName}</li>
</ul>
<div id="main-content">
<div class="row">
<div class="col-lg-12">
<h2>
${collectionName}
<small>
<c:if test="${_auth==null || _auth.auth==false}">
<span class="glyphicon glyphicon-lock" data-toggle="tooltip" data-placement="left" title="<s:message code="~eu.dariah.de.minfba.common.notification.limited_access" />"></span>
</c:if>
</small>
</h2>
<table class="default-table">
<tbody>
<tr>
<th><s:message code="~eu.dariah.de.minfba.metamodel.common.id" /></th>
<td>${collection.id}</td>
</tr>
<tr>
<th><s:message code="~eu.dariah.de.minfba.metamodel.common.source" /></th>
<td><a title="<s:message code="~eu.dariah.de.minfba.search.actions.collections.show_in_cr" />" href="#" target='_blank'>${collection.linkUrl} <i class="fa fa-external-link"></i></a></td>
</tr>
</tbody>
</table>
<div id="endpoint-table-container" class="row">
<div class="col-sm-6">
<h4><s:message code="~eu.dariah.de.minfba.search.view.labels.data_sources" /></h4>
<table id="endpoint-table" class="state-table state-table-selectable state-table-navigatable">
<tbody>
<c:set var="i" value="0" />
<c:forEach items="${collection.endpoints}" var="ep">
<c:forEach items="${ep.datasetPojos}" var="ds">
<%@ include file="incl/incl_dataset_table_row.jsp" %>
</c:forEach>
</c:forEach>
</tbody>
</table>
</div>
<div id="detailsContainer" class="col-sm-6">
<c:set var="index" value="0" />
<c:forEach items="${collection.endpoints}" var="ep">
<c:forEach items="${ep.datasetPojos}" var="ds">
<%@ include file="incl/incl_dataset_detail.jsp" %>
</c:forEach>
</c:forEach>
</div>
</div>
</div>
</div>
<%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="s" uri="http://www.springframework.org/tags" %>
<ul class="breadcrumb">
<li class="active"><s:message code="~eu.dariah.de.minfba.common.titles.administration" /></li>
<li><a href="<s:url value="/collections" />"><s:message code="~eu.dariah.de.minfba.search.view.titles.collection_management" /></a></li>
<li class="active">${collectionName}</li>
</ul>
<div id="main-content">
<div class="row">
<div class="col-lg-12">
<h2>
${collectionName}
<small>
<c:if test="${_auth==null || _auth.auth==false}">
<span class="glyphicon glyphicon-lock" data-toggle="tooltip" data-placement="left" title="<s:message code="~eu.dariah.de.minfba.common.notification.limited_access" />"></span>
</c:if>
</small>
</h2>
<table class="default-table">
<tbody>
<tr>
<th><s:message code="~eu.dariah.de.minfba.metamodel.common.id" /></th>
<td>${collection.id}</td>
</tr>
<tr>
<th><s:message code="~eu.dariah.de.minfba.metamodel.common.source" /></th>
<td><a title="<s:message code="~eu.dariah.de.minfba.search.actions.collections.show_in_cr" />" href="#" target='_blank'>${collection.linkUrl} <i class="fa fa-external-link"></i></a></td>
</tr>
</tbody>
</table>
<div id="endpoint-table-container" class="row">
<div class="col-sm-6">
<h4><s:message code="~eu.dariah.de.minfba.search.view.labels.data_sources" /></h4>
<table id="endpoint-table" class="state-table state-table-selectable state-table-navigatable">
<tbody>
<c:set var="i" value="0" />
<c:forEach items="${collection.endpoints}" var="ep">
<c:forEach items="${ep.datasetPojos}" var="ds">
<%@ include file="incl/incl_dataset_table_row.jsp" %>
</c:forEach>
</c:forEach>
</tbody>
</table>
</div>
<div id="detailsContainer" class="col-sm-6">
<c:set var="index" value="0" />
<c:forEach items="${collection.endpoints}" var="ep">
<c:forEach items="${ep.datasetPojos}" var="ds">
<%@ include file="incl/incl_dataset_detail.jsp" %>
</c:forEach>
</c:forEach>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="sf" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="s" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<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>
</div>
<div class="fileupload-progress hide">
<div class="progress progress-success progress-striped active" role="progressbar" aria-valuemin="0" aria-valuemax="100">
<div class="bar" style="width: 25%;"></div>
</div>
<div class="progress-extended">&nbsp;</div>
</div>
<div class="fileupload-files" role="presentation" data-toggle="modal-gallery" data-target="#modal-gallery">
<c:if test="${fileName!=null}">
<table id="fileupload-table-${fileId}" class="fileupload-files-preexisting">
<tbody>
<tr>
<td class='file-actions'>
<span class="btn">
<span class="glyphicon glyphicon-trash"></span>
<input type="hidden" class="deleteLink" value="/async/deleteFile?id=${fileId}" />
<input type="hidden" class="removeSelector" value="#fileupload-table-${fileId}" />
</span>
</td>
<td class='file-name'>${fileName}</td>
<td class='file-size'>(${fileSize})</td>
</tr>
</tbody>
</table>
</c:if>
</div>
</div>
\ No newline at end of file
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="s" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="sf" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<s:url value="${actionPath}" var="saveUrl" />
<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>
</h2>
<input type="hidden" id="ucId" name="ucId" value="${userCollection.id}" />
</div>
<div class="form-content">
<table id="user-collections-add-collections-table" class="table table-bordered table-striped table-hover model-list">
<thead>
<tr>
<th></th>
<th width="100%"><s:message code="~de.dariah.genericsearch.model.dataProvider.name" /></th>
</tr>
</thead>
<tbody>
<c:forEach items="${collections}" var="collection">
<tr>
<td><input onchange="editor.triggerAddCollectionDialogChkChange($(this).val(), $(this).prop('checked'));" type="checkbox" class="chk-collection" value="${collection.id}" /></td>
<td><c:out value="${collection.name}" /></td>
</tr>
</c:forEach>
</tbody>
</table>
</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>
</div>
</div>
</form>
<%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="s" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<s:url value="${actionPath}" var="saveUrl" />
<form method="POST" action="${saveUrl}" 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.update_share" />
</c:when>
<c:otherwise>
<s:message code="~de.dariah.genericsearch.view.mycollection.add_share" />
</c:otherwise>
</c:choose></h3>
<input type="hidden" value="${ucId}" name="ucId" />
<input type="hidden" value="${userId}" name="userId" />
</div>
<div class="form-content">
<div class="form-group">
<label class="control-label col-sm-3" for="usercollection_username"><s:message code="~de.dariah.common.titles.user" />:</label>
<div class="col-sm-9">
<c:choose>
<c:when test="${isUpdate==true}">
<p class="form-control-static">${eppn}</p>
<input type="hidden" name="user" id="usercollection_username" value="${eppn}" />
</c:when>
<c:otherwise>
<input name="user" id="usercollection_username" class="form-control" value="${eppn}" />
</c:otherwise>
</c:choose>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3">Rights:</label>
<div class="col-sm-9">
<div class="radio">
<label>
<input name="hasWriteAccess" value="true" type="radio"<c:if test="${rw==true}"> checked="checked"</c:if>> <s:message code="~de.dariah.common.view.write_access" />
</label>
</div>
<div class="radio">
<label>
<input name="hasWriteAccess" value="false" type="radio"<c:if test="${rw==false}"> checked="checked"</c:if>> <s:message code="~de.dariah.common.view.read_only" />
</label>
</div>
</div>
</div>
</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>
</div>
</div>
</form>
\ No newline at end of file
<%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="sf" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="s" uri="http://www.springframework.org/tags" %>
<%@ 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" >
<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" />
</c:when>
<c:otherwise>
<s:message code="~de.dariah.genericsearch.view.mycollection.new_mycollection" />
</c:otherwise>
</c:choose></h3>
<sf:hidden path="id"/>
</div>
<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>
<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>
<div class="col-sm-10">
<sf:textarea path="description" rows="4" class="form-control" id="userCollectionPojo_description" />
<sf:errors path="description" cssClass="error" />
</div>
</div>
</fieldset>
<fieldset>
<legend><s:message code="~de.dariah.genericsearch.view.mycollection.branded_search.title" /></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" />?
</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>
<div class="col-sm-3">
<sf:input path="uriPrefix" class="form-control" id="userCollectionPojo_uriPrefix" />
</div>
<div class="col-sm-7">
<p class="form-control-static"><strong>.${urlSuffix}</strong></p>
</div>
<div class="col-sm-10 col-sm-offset-2">
<sf:errors path="uriPrefix" 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>
<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>
<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>
<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>
</div>
</div>
</sf:form>
\ No newline at end of file
<%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="s" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="t" uri="http://tiles.apache.org/tags-tiles" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<s:url value="/search" var="home_url" />
<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>
</ul>
<div id="main-content">
<h1><s:message code="~de.dariah.genericsearch.view.mycollection.title" />&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>
<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>
<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>
<input type="hidden" id="user-collection-selectedUcId" value="0">
</div>
<div class="row">
<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>
</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>
</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;
<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">
<span class="glyphicon glyphicon-plus"></span>
</button>
</a>
</li>
</ul>
<!-- Tab panes -->
<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-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-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-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-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-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-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-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-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-9"><img id="user-collection-detail-organization_logo" /></div>
</div>
</div>
<div class="tab-pane" id="user-collection-collections">
<table id="user-collection-collections-table" class="table table-striped table-bordered table-condensed model-list">
<thead>
<tr>
<th></th>
<th><s:message code="~de.dariah.genericsearch.view.mycollection.model.name_of_collection" /></th>
</tr>
</thead>
<tbody>
<tr>
<td colspan="2" align="center"><s:message code="~de.dariah.common.view.no_data_fetched_yet" /></td>
</tr>
</tbody>
</table>
</div>
<div class="tab-pane" id="user-collection-shares">
<table id="user-collection-shares-table" class="table table-striped table-bordered table-condensed model-list">
<thead>
<tr>
<th></th>
<th></th>
<th><s:message code="~de.dariah.genericsearch.view.mycollection.model.user" /></th>
</tr>
</thead>
<tbody>
<tr>
<td colspan="3" align="center"><s:message code="~de.dariah.common.view.no_data_fetched_yet" /></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
Markdown is supported
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