提交 602b194f 编写于 作者: K kohsuke

moving the plugin to the plugins directory

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@35882 71c3de6d-444a-0410-be80-ed276b4c234a
上级 7d936e95
<!--
The MIT License
Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Daniel Dyer, Erik Ramfelt, Stephen Connolly, Tom Huybrechts
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->
<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">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.jvnet.hudson.main</groupId>
<artifactId>pom</artifactId>
<version>1.380-SNAPSHOT</version>
</parent>
<artifactId>multiline-tabbar-plugin</artifactId>
<packaging>hpi</packaging>
<name>Multiline Views TabBar Plugin</name>
<description>This plug-in provides a multi-line TabBar extension Extension to Views Tababar</description>
<dependencies>
<dependency>
<groupId>org.jvnet.hudson.main</groupId>
<artifactId>hudson-core</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jvnet.hudson.main</groupId>
<artifactId>hudson-war</artifactId>
<type>war</type>
<version>1.378-SNAPSHOT<!-- replace this with the version you want-->
</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<!--
Since new versions need to overwrite old versions, it's better
not to have version number in the .hpi file name.
-->
<finalName>${project.artifactId}</finalName>
<defaultGoal>package</defaultGoal>
<plugins>
<plugin>
<groupId>org.jvnet.hudson.tools</groupId>
<artifactId>maven-hpi-plugin</artifactId>
<version>1.54</version>
<extensions>true</extensions>
<configuration>
<showDeprecation>true</showDeprecation>
<disabledTestInjection>true</disabledTestInjection>
</configuration>
</plugin>
<plugin>
<groupId>org.kohsuke.stapler</groupId>
<artifactId>maven-stapler-plugin</artifactId>
<version>1.12</version>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.jvnet.localizer</groupId>
<artifactId>maven-localizer-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<fileMask>Messages.properties</fileMask>
<outputDirectory>target/generated-sources/localizer</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
/*
* The MIT License
*
* Copyright (c) 2010, Winston.Prakash@Oracle.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package hudson.views.tabbar;
import hudson.Extension;
import hudson.views.ViewsTabBar;
import hudson.views.ViewsTabBarDescriptor;
import org.kohsuke.stapler.DataBoundConstructor;
/**
* The Multi-line ViewsTabBar Extension for {@link ViewsTabBar}.
*
* @author Winston Prakash
* @since 1.378
* @see ViewsTabBar
*/
public class MultilineViewsTabBar extends ViewsTabBar {
@DataBoundConstructor
public MultilineViewsTabBar() {
}
@Extension
public static class DescriptorImpl extends ViewsTabBarDescriptor {
@Override
public String getDisplayName() {
//return Messages.DefaultViewsTabsBar_DisplayName();
//return "Multiline Views TabBar";
return "Multi-row Views TabBar";
}
}
}
<!--
The MIT License
Copyright (c) 2010, Winston.Prakash@Oracle.com
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->
<!--
<%@ attribute name="it" required="true" type="<Your Plugin Class>" %>
<%@ attribute name="views" required="true" type="java.util.Collection<hudson.model.View>" %>
<%@ attribute name="currentView" required="true" type="hudson.model.View" %>
-->
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:lc="/lib/layout/tabbar" >
<!-- view tab bar -->
<lc:tabBar>
<j:forEach var="v" items="${views}">
<lc:tab name="${v.viewName}" active="${v==currentView}" href="${rootURL}/${v.url}" />
</j:forEach>
<j:if test="${currentView.hasPermission(currentView.CREATE)}">
<lc:tab name="+" href="${rootURL}/${currentView.owner.url}newView" active="false"
title="${%New View}" />
</j:if>
</lc:tabBar>
</j:jelly>
<!--
The MIT License
Copyright (c) 2010, Winston.Prakash@Oracle.com
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->
<!--
<%@ attribute name="name" required="true" type="java.lang.String" %>
<%@ attribute name="href" required="true" type="java.lang.String" %>
<%@ attribute name="active" required="true" type="java.lang.Boolean" %>
<%@ attribute name="title" required="false" type="java.lang.String" %>
-->
<j:jelly xmlns:j="jelly:core">
<j:choose>
<j:when test="${active}">
<li id="active">
<a id="current" href="${href}" title="${attrs.title}">${name}</a>
</li>
</j:when>
<j:otherwise>
<li>
<a href="${href}" title="${attrs.title}">${name}</a>
</li>
</j:otherwise>
</j:choose>
</j:jelly>
<!--
The MIT License
Copyright (c) 2010, Winston.Prakash@Oracle.com
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->
<j:jelly xmlns:j="jelly:core" xmlns:d="jelly:define" xmlns:st="jelly:stapler">
<style type="text/css">
/* CSS Tabs */
#tabBarContainer {
background: #E6E6E6;
margin: 10px auto 0;
padding: 3px;
border: 1px solid #BBBBBB;
}
/* to stretch the container div to contain floated list */
#tabBarContainer:after {
content: ".";
display: block;
line-height: 1px;
font-size: 1px;
clear: both;
}
ul#tabList {
list-style: none;
padding: 0;
margin: 0 auto;
width: 100%;
}
ul#tabList li {
display: block;
float: left;
/*width: 10%;*/
margin: 0;
padding: 0;
text-align: center
}
ul#tabList li a {
display: block;
width: 100%;
padding: 6px;
border-width: 1px;
border-color: #ffe #aaab9c #ccc #fff;
border-style: solid;
color: #777;
text-decoration: none;
background: #FEFEEE;
}
#tabBarContainer>ul#tabList li a { width: auto; }
ul#tabList li#active a {
background: #E0E0F0;
color: #800000;
}
ul#tabList li a:hover, ul#tabList li#active a:hover {
color: #800000;
background: transparent;
border-color: #aaab9c #fff #fff #ccc;
}
</style>
<div id="tabBarContainer">
<ul id="tabList">
<j:set var="tab" value="${tabs}" />
<d:invokeBody />
</ul>
</div>
</j:jelly>
\ No newline at end of file
Tag files used in project pages
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册