Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 0 additions & 58 deletions src/main/resources/hudson/model/View/index.jelly

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<!--
The MIT License

Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, 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.
-->

<!--
SectionedView-specific index page.

Classic mode: renders the standard layout without calling it.items (JENKINS-37174 fix —
each section computes its own items, so calling getItems() at page level is redundant).

Dashboard mode (Jenkins 2.534+): delegates to core's new-view-page.jelly which provides
the app bar, tabs, and inline widgets. The l:userExperimentalFlag tag gracefully returns
null on older Jenkins where the flag class does not exist.
-->
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:l="/lib/layout" xmlns:t="/lib/hudson">
<l:userExperimentalFlag var="newDashboardPage" flagClassName="jenkins.model.experimentalflags.NewDashboardPageUserExperimentalFlag" />

<j:choose>
<j:when test="${newDashboardPage}">
<st:include page="new-view-page.jelly" />
</j:when>
<j:otherwise>
<l:layout title="${it.displayName}${not empty it.ownerItemGroup.fullDisplayName?' ['+it.ownerItemGroup.fullDisplayName+']':''}">
<j:set var="view" value="${it}"/>
<st:include page="sidepanel.jelly" />
<l:main-panel>
<st:include page="view-index-top.jelly" it="${it.owner}" optional="true">
<div id="view-message">
<div id="systemmessage">
<j:out value="${app.systemMessage!=null ? app.markupFormatter.translate(app.systemMessage) : ''}" />
</div>
<t:editableDescription permission="${it.CONFIGURE}"/>
</div>
</st:include>

<!-- JENKINS-37174: Do not call it.items — each section computes its own items -->
<st:include page="main.jelly" />
</l:main-panel>
<l:header>
<script id="screenResolution-script" data-use-secure-cookie="${request.secure}"/>
<st:adjunct includes="hudson.model.View.screen-resolution"/>
</l:header>
</l:layout>
</j:otherwise>
</j:choose>
</j:jelly>
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ THE SOFTWARE.

<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form" xmlns:i="jelly:fmt">
<l:userExperimentalFlag var="newDashboardPage" flagClassName="jenkins.model.experimentalflags.NewDashboardPageUserExperimentalFlag" />

<j:choose>
<j:when test="${empty(it.sections)}">
<j:if test="${!empty(it.ownerItemGroup.items)}">
<j:if test="${!empty(it.ownerItemGroup.items) and !newDashboardPage}">
<j:set var="views" value="${it.owner.views}"/>
<j:set var="currentView" value="${it}"/>
<st:include page="viewTabs.jelly" it="${it.owner.viewsTabBar}"/>
Expand All @@ -39,16 +41,18 @@ THE SOFTWARE.
<t:setIconSize/>
<div class="dashboard">
<j:if test="${!empty(it.sections)}">
<j:set var="views" value="${it.owner.views}"/>
<j:set var="currentView" value="${it}"/>
<j:choose>
<j:when test="${it.owner.class.name=='hudson.model.MyViewsProperty'}">
<st:include page="myViewTabs.jelly" it="${it.owner.myViewsTabBar}"/>
</j:when>
<j:otherwise>
<st:include page="viewTabs.jelly" it="${it.owner.viewsTabBar}"/>
</j:otherwise>
</j:choose>
<j:if test="${!newDashboardPage}">
<j:set var="views" value="${it.owner.views}"/>
<j:set var="currentView" value="${it}"/>
<j:choose>
<j:when test="${it.owner.class.name=='hudson.model.MyViewsProperty'}">
<st:include page="myViewTabs.jelly" it="${it.owner.myViewsTabBar}"/>
</j:when>
<j:otherwise>
<st:include page="viewTabs.jelly" it="${it.owner.viewsTabBar}"/>
</j:otherwise>
</j:choose>
</j:if>
<!-- project list -->
<j:forEach var="section" items="${it.sections}">
<div style="${section.css}">
Expand Down
Loading