albertshaw 8 years ago
parent
commit
34b8768ffa

+ 22 - 0
src/main/webapp/WEB-INF/views/common.html

@@ -122,6 +122,28 @@
 			</li>
 		</ul>
 	</th:block>
+	
+	<th:block th:fragment="banners">
+		<div id="myCarousel" class="carousel slide" th:if="${banners!=null && banners.size() > 1}">
+			<ol class="carousel-indicators">
+				<th:block th:each="banner,bannerStat:${banners}">
+					<li data-target="#myCarousel" data-slide-to="0" th:class="${bannerStat.first?'active':''}"></li>
+				</th:block>
+			</ol>
+			<div class="carousel-inner">
+				<th:block  th:each="banner,bannerStat:${banners}">
+				<div class="item" th:classappend="${bannerStat.first?'active':''}">
+					<img th:src="${staticDomain +'/upload'+  banner.imgurl}" th:alt="${banner.text}">
+				</div>
+				</th:block>
+			</div>
+			<a class="carousel-control left" href="#myCarousel" data-slide="prev"><span class="glyphicon glyphicon-chevron-left"></span></a>
+			<a class="carousel-control right" href="#myCarousel" data-slide="next"><span class="glyphicon glyphicon-chevron-right"></span></a>
+		</div>
+		<div class="banner-item" th:if="${banners!=null && banners.size()==1}">
+			<img th:src="${staticDomain +'/upload'+  banners[0].imgurl}" th:alt="${banners[0].text}">
+		</div>
+	</th:block>
 
 	<th:block th:fragment="copyright">
 		<div onclick="window.open('http://wpa.qq.com/msgrd?v=3&uin=2035994611&site=qq&menu=yes', '_blank', 'height=502, width=644,toolbar=no,scrollbars=no,menubar=no,status=no');"

File diff suppressed because it is too large
+ 1 - 1
src/main/webapp/WEB-INF/views/portal/evaluation/index.html


+ 1 - 19
src/main/webapp/WEB-INF/views/portal/technologyTrading/index.html

@@ -32,25 +32,7 @@
 		</div>
 		<div class="secondary_navigation"></div>
 	</div>
-	<div id="myCarousel" class="carousel slide" th:if="${banners!=null && banners.size() > 1}">
-		<ol class="carousel-indicators">
-			<th:block th:each="banner,bannerStat:${banners}">
-				<li data-target="#myCarousel" data-slide-to="0" th:class="${bannerStat.first?'active':''}"></li>
-			</th:block>
-		</ol>
-		<div class="carousel-inner">
-			<th:block  th:each="banner,bannerStat:${banners}">
-			<div class="item" th:classappend="${bannerStat.first?'active':''}">
-				<img th:src="${staticDomain +'/upload'+  banner.imgurl}" th:alt="${banner.text}">
-			</div>
-			</th:block>
-		</div>
-		<a class="carousel-control left" href="#myCarousel" data-slide="prev"><span class="glyphicon glyphicon-chevron-left"></span></a>
-		<a class="carousel-control right" href="#myCarousel" data-slide="next"><span class="glyphicon glyphicon-chevron-right"></span></a>
-	</div>
-	<div class="banner-item" th:if="${banners!=null && banners.size()==1}">
-		<img th:src="${staticDomain +'/upload'+  banners[0].imgurl}" th:alt="${banners[0].text}">
-	</div>
+	<div th:replace="common::banners"></div>
 	<div class="banner-item" th:if="${banners==null}">
 		<img th:src="${portalHost + '/img/technologyTrading_index_banner.jpg'}" alt="First slide">
 	</div>