Skip to content

Commit

Permalink
More
Browse files Browse the repository at this point in the history
  • Loading branch information
janfaracik committed Jan 4, 2024
1 parent 4341e57 commit 6e51e40
Show file tree
Hide file tree
Showing 4 changed files with 89 additions and 52 deletions.
46 changes: 20 additions & 26 deletions core/src/main/resources/hudson/model/View/index.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -23,30 +23,24 @@ THE SOFTWARE.
-->

<?jelly escape-by-default='true'?>
<st:compress 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:layout title="${(it.class.name=='hudson.model.AllView' and it.ownerItemGroup == app) ? '%Dashboard' : it.displayName}${not empty it.ownerItemGroup.fullDisplayName?' ['+it.ownerItemGroup.fullDisplayName+']':''}">
<j:set var="view" value="${it}"/> <!-- expose view to the scripts we include from owner -->
<st:include page="sidepanel.jelly" />
<!-- no need for additional breadcrumb here as we're on an index page already including breadcrumb -->
<l:main-panel>
<st:include page="view-index-top.jelly" it="${it.owner}" optional="true">
<!-- allow the owner to take over the top section, but we also need the default to be backward compatible -->
<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>

<j:set var="items" value="${it.items}"/>
<st:include page="main.jelly" />
</l:main-panel>
<l:header>
<!-- for screen resolution detection -->
<l:yui module="cookie" />
<script id="screenResolution-script" data-use-secure-cookie="${request.secure}"/>
<st:adjunct includes="hudson.model.View.screen-resolution"/>
</l:header>
</l:layout>
<st:compress xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:l="/lib/layout" xmlns:t="/lib/hudson">
<l:layout title="${(it.class.name=='hudson.model.AllView' and it.ownerItemGroup == app) ? '%Dashboard' : it.displayName}${not empty it.ownerItemGroup.fullDisplayName?' ['+it.ownerItemGroup.fullDisplayName+']':''}">
<l:header>
<!-- for screen resolution detection -->
<l:yui module="cookie" />
<script id="screenResolution-script" data-use-secure-cookie="${request.secure}"/>
<st:adjunct includes="hudson.model.View.screen-resolution"/>
</l:header>

<j:set var="view" value="${it}"/> <!-- expose view to the scripts we include from owner -->

<!-- no need for additional breadcrumb here as we're on an index page already including breadcrumb -->

<st:include page="sidepanel.jelly" />

<l:main-panel>
<j:set var="items" value="${it.items}"/>
<st:include page="main.jelly" />
</l:main-panel>
</l:layout>
</st:compress>
25 changes: 0 additions & 25 deletions core/src/main/resources/hudson/model/View/main.groovy

This file was deleted.

64 changes: 64 additions & 0 deletions core/src/main/resources/hudson/model/View/main.jelly
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<!--
The MIT License
Copyright (c) 2004-2010, Sun Microsystems, Inc., Kohsuke Kawaguchi
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.
-->

<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:t="/lib/hudson">
<j:choose>
<j:when test="${empty(items)}">
<j:if test="${!empty(app.items)}">
<j:set var="views" value="${it.owner.views}"/>
<j:set var="currentView" value="${it}"/>
<st:include page="viewTabs.jelly" it="${it.owner.viewsTabBar}"/>
</j:if>
<st:include page="noJob.jelly" />
</j:when>
<j:otherwise>
<t:projectView jobs="${items}"
showViewTabs="true"
columnExtensions="${my.columns}"
indenter="${my.indenter}"
itemGroup="${my.owner.itemGroup}">
<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>
<st:include page="view-index-top.jelly" it="${it.owner}" optional="true">
<!-- allow the owner to take over the top section, but we also need the default to be backward compatible -->
<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>
</t:projectView>
</j:otherwise>
</j:choose>
</j:jelly>
6 changes: 5 additions & 1 deletion core/src/main/resources/hudson/model/View/sidepanel.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,17 @@ 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:s="/lib/form">
<l:header title="Jenkins">
<l:header>
<link rel="alternate" title="Jenkins:${it.viewName} (all builds)" href="${rootURL}/${it.url}rssAll" type="application/atom+xml" />
<link rel="alternate" title="Jenkins:${it.viewName} (all builds) (RSS 2.0)" href="${rootURL}/${it.url}rssAll?flavor=rss20" type="application/rss+xml" />
<link rel="alternate" title="Jenkins:${it.viewName} (failed builds)" href="${rootURL}/${it.url}rssFailed" type="application/atom+xml" />
<link rel="alternate" title="Jenkins:${it.viewName} (failed builds) (RSS 2.0)" href="${rootURL}/${it.url}rssFailed?flavor=rss20" type="application/rss+xml" />
</l:header>

<l:side-panel>
<l:app-bar title="Dashboard">

</l:app-bar>
<l:tasks>
<st:include page="tasks-top.jelly" it="${it.owner}" optional="true" />

Expand Down

0 comments on commit 6e51e40

Please sign in to comment.