Переглянути джерело

[MRM-89] add sitemesh

git-svn-id: https://svn.apache.org/repos/asf/maven/repository-manager/trunk@411760 13f79535-47bb-0310-9956-ffa450edef68
tags/archiva-0.9-alpha-1
Brett Porter 18 роки тому
джерело
коміт
bb0621fbde

+ 19
- 3
maven-repository-webapp/pom.xml Переглянути файл

@@ -1,5 +1,5 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.maven.repository</groupId>
@@ -10,6 +10,17 @@
<packaging>war</packaging>
<name>Maven Repository Manager Web Application</name>
<dependencies>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>opensymphony</groupId>
<artifactId>sitemesh</artifactId>
<version>2.2.1</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-xwork-integration</artifactId>
@@ -41,10 +52,15 @@
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty6-plugin</artifactId>
<version>6.0.0beta6</version>
<version>6.0.0beta11</version>
<configuration>
<webAppSourceDirectory>${basedir}/target/${artifactId}</webAppSourceDirectory>
<scanIntervalSeconds>10</scanIntervalSeconds>
<connectors>
<connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
<port>9000</port>
<maxIdleTime>60000</maxIdleTime>
</connector>
</connectors>
</configuration>
</plugin>
<plugin>

+ 5
- 0
maven-repository-webapp/src/main/webapp/WEB-INF/decorators.xml Переглянути файл

@@ -0,0 +1,5 @@
<decorators defaultdir="/WEB-INF/jsp/decorators">
<decorator name="default" page="default.jsp">
<pattern>/*</pattern>
</decorator>
</decorators>

+ 108
- 0
maven-repository-webapp/src/main/webapp/WEB-INF/jsp/decorators/default.jsp Переглянути файл

@@ -0,0 +1,108 @@
<%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator" prefix="decorator" %>
<html>
<head>
<title><decorator:title default="Maven Repository Manager" /></title>

<style type="text/css" media="all">
@import url( "./css/maven-base.css" );
@import url( "./css/maven-theme.css" );
@import url( "./css/site.css" );
</style>
<link rel="stylesheet" href="./css/print.css" type="text/css" media="print" />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
</head>

<body class="composite">
<div id="banner">
<span id="bannerLeft">
<img src="http://www.apache.org/images/asf_logo_wide.gif" alt="" width="537" height="51" />
</span>
<span id="bannerRight">
<!-- img src="..." alt="" /> -->
</span>

<div class="clear">
<hr />
</div>
</div>

<div id="breadcrumbs">


<div class="xleft">
</div>

<div class="xright">
</div>

<div class="clear">
<hr />
</div>
</div>

<div id="leftColumn">

<div id="navcolumn">


<h5>Find</h5>
<ul>

<li class="none">
<a href="index.html">Search</a>
</li>

<li class="none">
<a href="find-artifact.html">Find Artifact</a>

</li>

<li class="none">
<a href="browse.html">Browse</a>
</li>
</ul>
<h5>Manage</h5>
<ul>

<li class="none">

<a href="reports.html">Reports</a>
</li>

<li class="none">
<strong>Synchronisation</strong>
</li>

<li class="none">
<a href="admin.html">Administration</a>

</li>
</ul>


</div>
</div>

<div id="bodyColumn">
<div id="contentBox">
<decorator:body />
</div>

</div>

<div class="clear">
<hr />
</div>

<div id="footer">
<div class="xright">&#169;
2005-2006 Apache Software Foundation
</div>

<div class="clear">
<hr />

</div>
</div>
</body>
</html>

+ 19
- 68
maven-repository-webapp/src/main/webapp/WEB-INF/jsp/form.jspf Переглянути файл

@@ -22,83 +22,34 @@
}
</script>

<p>Search by MD5 (select an artifact):
<p>Search by MD5 (select an artifact):</p>

<form action="search.action"
onsubmit="this.md5.value = doSomething(this.file.value); this.file.disabled = true;">
<input name="md5" type="hidden"/>
<input type="file" name="file"/>
<input type="submit" value="Search"/>
<input name="md5" type="hidden" />
<input type="file" name="file" />
<input type="submit" value="Search" />
</form>

<!--"CONVERTED_APPLET"-->
<!-- HTML CONVERTER -->
<script language="JavaScript" type="text/javascript"><!--
var _info = navigator.userAgent;
var _ns = false;
var _ns6 = false;
var _ie = (_info.indexOf("MSIE") > 0 && _info.indexOf("Win") > 0 && _info.indexOf("Windows 3.1") < 0);
//--></script>

<comment>
<script language="JavaScript" type="text/javascript"><!--
var _ns = (navigator.appName.indexOf("Netscape") >= 0 && ((_info.indexOf("Win") > 0 && _info.indexOf("Win16") < 0 &&
java.lang.System.getProperty("os.version").indexOf("3.5") <
0) || (_info.indexOf("Sun") > 0) ||
(_info.indexOf("Linux") > 0) ||
(_info.indexOf("AIX") > 0) || (_info.indexOf("OS/2") > 0) ||
(_info.indexOf("IRIX") > 0)));
var _ns6 = ((_ns == true) && (_info.indexOf("Mozilla/5") >= 0));
//--></script>
</comment>

<script language="JavaScript" type="text/javascript"><!--
if ( _ie ==
true ) document.writeln('<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" WIDTH = "400" HEIGHT = "20" NAME = "ChecksumApplet" codebase="http://java.sun.com/update/1.5.0/jinstall-1_5-windows-i586.cab#Version=5,0,0,5"><noembed><xmp>');
else if ( _ns == true && _ns6 == false ) document.writeln('<embed ' + 'type="application/x-java-applet;version=1.5" \
CODE = "org/apache/maven/repository/applet/ChecksumApplet.class" \
ARCHIVE = "maven-repository-artifact-applet.jar" \
NAME = "ChecksumApplet" \
WIDTH = "400" \
HEIGHT = "20" ' + 'scriptable=false ' + 'pluginspage="http://java.sun.com/products/plugin/index.html#download"><noembed><xmp>');
//--></script>
<applet CODE="org/apache/maven/repository/applet/ChecksumApplet.class" ARCHIVE="maven-repository-artifact-applet.jar"
WIDTH="400" HEIGHT="20" NAME="ChecksumApplet"></xmp>
<PARAM NAME=CODE VALUE="org/apache/maven/repository/applet/ChecksumApplet.class">
<PARAM NAME=ARCHIVE VALUE="maven-repository-artifact-applet.jar">
<PARAM NAME=NAME VALUE="ChecksumApplet">

<param name="type" value="application/x-java-applet;version=1.5">
<param name="scriptable" value="false">


</applet>
</noembed>
</embed>
</object>

<!--
<APPLET CODE = "org/apache/maven/repository/applet/ChecksumApplet.class" ARCHIVE =
"maven-repository-artifact-applet.jar" WIDTH = "400" HEIGHT = "20" NAME = "ChecksumApplet">
<p>
<applet code="org/apache/maven/repository/applet/ChecksumApplet.class" archive="maven-repository-artifact-applet.jar"
width="400" height="20" name="ChecksumApplet" />
</p>
-->

<p>Search:</p>

</APPLET>
-->
<!--"END_CONVERTED_APPLET"-->
</p>
<form action="searchg.action">
<input name="searchString" type="text" />
<input type="submit" value="Search" />
</form>

<p>Search:
<form action="searchg.action">
<input name="searchString" type="text"/>
<input type="submit" value="Search"/>
</form>
</p>
<p>Search by Java Package:</p>

<p>Search by Java Package:
<form action="search.action">
<input name="packageName" type="text"/>
<input type="submit" value="Search"/>
</form>
</p>
<form action="search.action">
<input name="packageName" type="text" />
<input type="submit" value="Search" />
</form>



+ 11
- 5
maven-repository-webapp/src/main/webapp/WEB-INF/web.xml Переглянути файл

@@ -5,6 +5,16 @@
<web-app>
<display-name>Maven Repository Manager</display-name>

<filter>
<filter-name>sitemesh</filter-name>
<filter-class>com.opensymphony.module.sitemesh.filter.PageFilter</filter-class>
</filter>

<filter-mapping>
<filter-name>sitemesh</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

<listener>
<listener-class>org.codehaus.plexus.servlet.PlexusServletContextListener</listener-class>
</listener>
@@ -29,10 +39,6 @@

<welcome-file-list>
<welcome-file>index.action</welcome-file>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>

<taglib>
<taglib-uri>webwork</taglib-uri>
<taglib-location>/WEB-INF/lib/webwork-2.1.7.jar</taglib-location>
</taglib>
</web-app>

+ 184
- 0
maven-repository-webapp/src/main/webapp/css/maven-base.css Переглянути файл

@@ -0,0 +1,184 @@
body {
margin: 0px;
padding: 0px;
}

img {
border: none;
}

table {
padding: 0px;
width: 100%;
margin-left: -2px;
margin-right: -2px;
}

acronym {
cursor: help;
border-bottom: 1px dotted #feb;
}

table.bodyTable th, table.bodyTable td {
padding: 2px 4px 2px 4px;
vertical-align: top;
}

div.clear {
clear: both;
visibility: hidden;
}

div.clear hr {
display: none;
}

#bannerLeft, #bannerRight {
font-size: xx-large;
font-weight: bold;
}

#bannerLeft img, #bannerRight img {
margin: 0px;
}

.xleft, #bannerLeft img {
float: left;
text-shadow: #7CFC00;
}

.xright, #bannerRight img {
float: right;
text-shadow: #7CFC00;
}

#banner {
padding: 0px;
}

#banner img {
border: none;
}

#breadcrumbs {
padding: 3px 10px 3px 10px;
}

#leftColumn {
width: 170px;
float: left;
overflow: auto;
}

#bodyColumn {
margin-right: 1.5em;
margin-left: 197px;
}

#legend {
padding: 8px 0 8px 0;
}

#navcolumn {
padding: 8px 4px 0 8px;
}

#navcolumn h5 {
margin: 0;
padding: 0;
font-size: small;
}

#navcolumn ul {
margin: 0;
padding: 0;
font-size: small;
}

#navcolumn li {
list-style-type: none;
background-image: none;
background-repeat: no-repeat;
background-position: 0 0.4em;
padding-left: 16px;
list-style-position: outside;
line-height: 1.2em;
font-size: smaller;
}

#navcolumn li.expanded {
background-image: url( ../images/expanded.gif );
}

#navcolumn li.collapsed {
background-image: url( ../images/collapsed.gif );
}

#poweredBy {
text-align: center;
}

#navcolumn img {
margin-top: 10px;
margin-bottom: 3px;
}

#poweredBy img {
display: block;
margin: 20px 0 20px 17px;
border: 1px solid black;
width: 90px;
height: 30px;
}

#search img {
margin: 0px;
display: block;
}

#search #q, #search #btnG {
border: 1px solid #999;
margin-bottom: 10px;
}

#search form {
margin: 0px;
}

#lastPublished {
font-size: x-small;
}

.navSection {
margin-bottom: 2px;
padding: 8px;
}

.navSectionHead {
font-weight: bold;
font-size: x-small;
}

.section {
padding: 4px;
}

#footer {
padding: 3px 10px 3px 10px;
font-size: x-small;
}

#breadcrumbs {
font-size: x-small;
margin: 0pt;
}

.source {
padding: 12px;
margin: 1em 7px 1em 7px;
}

.source pre {
margin: 0px;
padding: 0px;
}

+ 164
- 0
maven-repository-webapp/src/main/webapp/css/maven-theme.css Переглянути файл

@@ -0,0 +1,164 @@
body {
padding: 0px 0px 10px 0px;
}

body, td, select, input, li {
font-family: Verdana, Helvetica, Arial, sans-serif;
font-size: 13px;
}

code {
font-family: Courier, monospace;
font-size: 13px;
}

a {
text-decoration: none;
}

a:link {
color: #36a;
}

a:visited {
color: #47a;
}

a:active, a:hover {
color: #69c;
}

#legend li.externalLink {
background: url( ../images/external.png ) left top no-repeat;
padding-left: 18px;
}

a.externalLink, a.externalLink:link, a.externalLink:visited, a.externalLink:active, a.externalLink:hover {
background: url( ../images/external.png ) right center no-repeat;
padding-right: 18px;
}

#legend li.newWindow {
background: url( ../images/newwindow.png ) left top no-repeat;
padding-left: 18px;
}

a.newWindow, a.newWindow:link, a.newWindow:visited, a.newWindow:active, a.newWindow:hover {
background: url( ../images/newwindow.png ) right center no-repeat;
padding-right: 18px;
}

h2 {
padding: 4px 4px 4px 6px;
border: 1px solid #999;
color: #900;
background-color: #ddd;
font-weight: 900;
font-size: x-large;
}

h3 {
padding: 4px 4px 4px 6px;
border: 1px solid #aaa;
color: #900;
background-color: #eee;
font-weight: normal;
font-size: large;
}

h4 {
padding: 4px 4px 4px 6px;
border: 1px solid #bbb;
color: #900;
background-color: #fff;
font-weight: normal;
font-size: large;
}

h5 {
padding: 4px 4px 4px 6px;
color: #900;
font-size: normal;
}

p {
line-height: 1.3em;
font-size: small;
}

#breadcrumbs {
border-top: 1px solid #aaa;
border-bottom: 1px solid #aaa;
background-color: #ccc;
}

#leftColumn {
margin: 10px 0 0 5px;
border: 1px solid #999;
background-color: #eee;
}

#navcolumn h5 {
font-size: smaller;
border-bottom: 1px solid #aaaaaa;
padding-top: 2px;
color: #000;
}

table.bodyTable th {
color: white;
background-color: #bbb;
text-align: left;
font-weight: bold;
}

table.bodyTable th, table.bodyTable td {
font-size: 1em;
}

table.bodyTable tr.a {
background-color: #ddd;
}

table.bodyTable tr.b {
background-color: #eee;
}

.source {
border: 1px solid #999;
}

dl {
padding: 4px 4px 4px 6px;
border: 1px solid #aaa;
background-color: #ffc;
}

dt {
color: #900;
}

#organizationLogo img, #projectLogo img, #projectLogo span {
margin: 8px;
}

#banner {
border-bottom: 1px solid #fff;
}

.errormark, .warningmark, .donemark, .infomark {
background: url( ../images/icon_error_sml.gif ) no-repeat;
}

.warningmark {
background-image: url( ../images/icon_warning_sml.gif );
}

.donemark {
background-image: url( ../images/icon_success_sml.gif );
}

.infomark {
background-image: url( ../images/icon_info_sml.gif );
}


+ 8
- 0
maven-repository-webapp/src/main/webapp/css/print.css Переглянути файл

@@ -0,0 +1,8 @@
#banner, #footer, #leftcol, #breadcrumbs, .docs #toc, .docs .courtesylinks, #leftColumn, #navColumn {
display: none !important;
}

#bodyColumn, body.docs div.docs {
margin: 0 !important;
border: none !important
}

+ 96
- 0
maven-repository-webapp/src/main/webapp/css/site.css Переглянути файл

@@ -0,0 +1,96 @@
#sidebar {
float: right;
font-size: small;
margin: 10px;
padding: 10px;
border: 1px black solid;
width: 10em;
}

#contentArea {
border: 1px solid black;
border-style: groove;
margin-right: 15em;
padding: 1em;
}

#tabs b {
border: 1px solid black;
padding-left: 1em;
padding-right: 1em;
}

#tabs a {
border: 1px solid black;
padding-left: 1em;
padding-right: 1em;
text-decoration: none;
}

#tabArea {
border: 1px solid black;
padding: 1em;
}

#searchBox p {
font-size: x-small;
text-align: center;
color: gray;
}

#searchTypes {
text-align: right;
font-size: xx-small;
}

#notes {
border: double blue;
margin-top: 20px;
margin-right: 15em;
padding: 5px;
}

#notes p:first-child {
border-bottom: 1px solid blue;
font-weight: bold;
text-align: center;
}

#feed {
float: right;
}

.downloadButton {
background-color: green;
border: double white;
float: right;
padding: 5px;
}

.downloadButton a {
font-size: large;
color: white;
font-weight: bold;
text-decoration: none;
}

#labels {
background-color: #f2f2f2;
padding: 0.5em 1em 0.5em 1em;
}

.statusOk {
color: green;
font-weight: bold;
}

.statusFailed {
color: red;
font-weight: bold;
}

.statusWarn {
color: orange;
font-weight: bold;
}


+ 1
- 0
maven-repository-webapp/src/main/webapp/index.jsp Переглянути файл

@@ -0,0 +1 @@
<%response.sendRedirect( request.getContextPath() + "/index.action" );%>

Завантаження…
Відмінити
Зберегти