자료 상세조회시 메타데이터
This commit is contained in:
parent
2578081a33
commit
c2fed07127
@ -5,6 +5,8 @@ import java.io.InputStreamReader;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
@ -14,6 +16,7 @@ import java.util.Map;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import javax.activation.MimetypesFileTypeMap;
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
@ -326,6 +329,22 @@ public class NlibSearchController extends NlibCommonController {
|
||||
|
||||
vo.setBookIndex(bookIndex);
|
||||
}
|
||||
MimetypesFileTypeMap mimetypesFileTypeMap = new MimetypesFileTypeMap();
|
||||
String imageType = mimetypesFileTypeMap.getContentType(vo.getRprsThumbUrl());
|
||||
String imagePath = "";
|
||||
String councilDnsHost = StringUtil.getHostName(request.getRequestURL().toString());
|
||||
|
||||
//이미지 확장자를 판별할 수 없을때
|
||||
if(!imageType.startsWith("image"))
|
||||
{
|
||||
imageType = "jpeg";
|
||||
imagePath = "https://" + councilDnsHost + ".nculture.org/images/meta_og_image.jpg";
|
||||
}else {
|
||||
imagePath = StringUtil.getString(vo.getRprsThumbUrl(),"");
|
||||
}
|
||||
|
||||
model.addAttribute("imageType",imageType);
|
||||
model.addAttribute("imagePath",imagePath);
|
||||
model.addAttribute("keywordList",keywordList);
|
||||
model.addAttribute("result", vo);
|
||||
model.addAttribute("searchVO", searchVO);
|
||||
|
||||
@ -32,7 +32,6 @@
|
||||
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
|
||||
<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %>
|
||||
<script src="/js/qrcode.js"></script>
|
||||
|
||||
<c:set var="pageTitle">자료 상세</c:set>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
@ -47,8 +46,6 @@ $(document).ready(function(){
|
||||
|
||||
})
|
||||
|
||||
|
||||
//다른자료 상세보기
|
||||
function goDetail(masterId){
|
||||
$("#masterId").val(masterId);
|
||||
document.referenceDetailForm.action="/search/searchItemDetail.do";
|
||||
|
||||
@ -129,7 +129,7 @@ $( document ).ready(function() {
|
||||
<h3>소장자료관 접속현황</h3>
|
||||
<div class="key-box">
|
||||
<c:forEach var="itemVisitedOrgs" items="${visitedOrgs }">
|
||||
<a href="javascript:void(0);" onclick="gfn_openNewWindow('https://${itemVisitedOrgs.domainHostNm}.nculture.org')"><span class="button">${itemVisitedOrgs.deptNm }</span></a>
|
||||
<a href="javascript:void(0);" title="새 창 열림" onclick="gfn_openNewWindow('https://${itemVisitedOrgs.domainHostNm}.nculture.org')"><span class="button">${itemVisitedOrgs.deptNm }</span></a>
|
||||
</c:forEach>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
81
src/main/webapp/WEB-INF/tiles/tiles-layout-detail.jsp
Normal file
81
src/main/webapp/WEB-INF/tiles/tiles-layout-detail.jsp
Normal file
@ -0,0 +1,81 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
||||
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %>
|
||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
|
||||
<%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles"%>
|
||||
<%
|
||||
String councilNm = (String)session.getAttribute("councilNm");
|
||||
String councilDnsHost = (String)session.getAttribute("councilDnsHost");
|
||||
%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="format-detection" content="telephone=no" />
|
||||
|
||||
<meta id="meta_og_title" property="og:title" content="${result.title }">
|
||||
<meta id="meta_og_url" property="og:url" content="https://<%=councilDnsHost %>.nculture.org">
|
||||
<meta id="meta_og_type" property="og:type" content="website" />
|
||||
<meta id="meta_og_image" property="og:image" content="${imagePath }" />
|
||||
<meta id="meta_og_image_type" property="og:image:type" content="image/${imageType }" />
|
||||
<meta id="meta_og_description" property="og:description" content="<%=councilNm %> 온라인 대출/알람예약 서비스를 통해 문화원 소장자료들을 만나보세요.">
|
||||
<meta id="meta_description" name="description" content="<%=councilNm %> 온라인 대출/알람예약 서비스를 통해 문화원 소장자료들을 만나보세요.">
|
||||
|
||||
<!-- <link rel="shortcut icon" type="image/x-icon" href="#"> 2번 호출되는 문제로 주석처리 -->
|
||||
<link href="/css/common.css" rel="stylesheet">
|
||||
<link href="/css/jquery.mCustomScrollbar.css" rel="stylesheet">
|
||||
<link href="/css/swiper.min.css" rel="stylesheet">
|
||||
<link href="/css/default.css" rel="stylesheet">
|
||||
<link href="/css/media.css" rel="stylesheet">
|
||||
|
||||
<script src="/js/jquery/jquery.min.js"></script>
|
||||
<script src="/js/jquery.mCustomScrollbar.js"></script>
|
||||
<script src="/js/swiper.min.js"></script>
|
||||
<script src="/js/default.js"></script>
|
||||
|
||||
<script src="/js/nlib.js"></script>
|
||||
<script src="/js/cart.js"></script>
|
||||
|
||||
<title>${councilNm } 소장자료관</title>
|
||||
|
||||
<script>
|
||||
// 제목 설정
|
||||
function fn_setPageTitle(title) {
|
||||
document.title = "${councilNm } - " + title + " : 소장자료관";
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<!-- <div class="wrap sub"> sub는 서브페이지 -->
|
||||
<div id="DIV_PAGE_MAIN" class="wrap sub">
|
||||
|
||||
<!-- 헤더 -->
|
||||
<header id="header">
|
||||
<tiles:insertAttribute name="header" />
|
||||
</header>
|
||||
|
||||
<!-- 메뉴 -->
|
||||
<div class="nav-wrap">
|
||||
<tiles:insertAttribute name="menu" />
|
||||
</div>
|
||||
|
||||
<!-- 메인컨텐츠 -->
|
||||
<tiles:insertAttribute name="main" />
|
||||
|
||||
<!-- 풋터 -->
|
||||
<footer id="footer">
|
||||
<tiles:insertAttribute name="footer" />
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
<!-- Layer Popup -->
|
||||
<div id="NLIB_LAYER_POPUP" style="display:none;">
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@ -5,6 +5,13 @@
|
||||
|
||||
<tiles-definitions>
|
||||
|
||||
<!-- 자료상세조회 -->
|
||||
<definition name="searchDetail" template="/WEB-INF/tiles/tiles-layout-detail.jsp">
|
||||
<put-attribute name="header" value="/WEB-INF/tiles/inc/header.jsp" />
|
||||
<put-attribute name="menu" value="/WEB-INF/tiles/inc/menu.jsp" />
|
||||
<put-attribute name="footer" value="/WEB-INF/tiles/inc/footer.jsp" />
|
||||
</definition>
|
||||
|
||||
<!-- 일반화면용 -->
|
||||
<definition name="template" template="/WEB-INF/tiles/tiles-layout.jsp">
|
||||
<put-attribute name="header" value="/WEB-INF/tiles/inc/header.jsp" />
|
||||
@ -24,7 +31,11 @@
|
||||
<put-attribute name="header" value="/WEB-INF/tiles/inc-sub/header-sub.jsp" />
|
||||
<put-attribute name="footer" value="/WEB-INF/tiles/inc-sub/footer-sub.jsp" />
|
||||
</definition>
|
||||
|
||||
|
||||
<definition name="*/*/*searchItemDetail" extends="searchDetail">
|
||||
<put-attribute name="main" value="/WEB-INF/jsp/{1}/{2}/searchItemDetail.jsp" />
|
||||
</definition>
|
||||
|
||||
<definition name="*/*SubPart" extends="sub">
|
||||
<put-attribute name="main" value="/WEB-INF/jsp/{1}/{2}SubPart.jsp" />
|
||||
</definition>
|
||||
@ -41,7 +52,6 @@
|
||||
<put-attribute name="main" value="/WEB-INF/jsp/{1}/{2}/{3}Popup.jsp" />
|
||||
</definition>
|
||||
|
||||
|
||||
<definition name="*" extends="template">
|
||||
<put-attribute name="main" value="/WEB-INF/jsp/{1}.jsp" />
|
||||
</definition>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user