Skip to content
This repository has been archived by the owner on Jun 13, 2023. It is now read-only.

Commit

Permalink
move everything to the summary instead of the config page
Browse files Browse the repository at this point in the history
… looks way nicer
  • Loading branch information
simschla committed May 27, 2013
1 parent b15245e commit 60131dd
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 23 deletions.
Expand Up @@ -6,23 +6,4 @@
<f:entry title="${%User.CurrentScore}">
<f:textbox name="game.score" value="${instance.score}" disabled="disabled" readonly="readonly"/>
</f:entry>
<f:entry title="${%User.MostRecentScores}">
<table class="pane sortable" style="width:50%" id="game.scores">
<tr>
<td class="pane-header" align="left">${%User.Score}</td>
<td class="pane-header" align="left">${%User.ScoreSource}</td>
</tr>
<j:forEach var="scoreEntry" items="${instance.mostRecentScores}">
<tr>
<td><j:out value="${scoreEntry.awardedScoreString}"/></td>
<td>
<j:forEach var="scoredJob" items="${scoreEntry.awardingRuns}">
<a href="${rootURL}/${scoredJob.url}cigame/">${scoredJob.fullDisplayName}</a>
<j:out value=" "/>
</j:forEach>
</td>
</tr>
</j:forEach>
</table>
</f:entry>
</j:jelly>
@@ -1,5 +1,2 @@
User.IsParticipating=Is participating in game
User.CurrentScore=Current score
User.MostRecentScores=Most recent point awards
User.Score=Score
User.ScoreSource=Source
User.CurrentScore=Current score
@@ -0,0 +1,49 @@
<?jelly escape-by-default='true'?>
<j:jelly xmlns="http://www.w3.org/1999/xhtml" xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form">
<j:if test="${it.isParticipatingInGame()}">
<style type="text/css">
.green-bg {
background-color: #DFF0D8;
}

.red-bg {
background-color: #F2DEDE;
}

.grey-bg {
background-color: #F9F9F9;
}

.current-score {
font-size: 200%;
font-weight: lighter;
padding: 7px 14px;
}
</style>
<h2><img src="${rootURL}/plugin/ci-game/icons/game-32x32.png"/><span style="padding-left: 1ex;"><st:out value="${%cigame.title}"/></span></h2>
<j:set var="scoreColor" value="${it.score &gt;= 0 ? 'green-bg' : (it.score &lt; 0 ? 'red-bg' : 'grey-bg')}" />
<div style="vertical-align: baseline;">
<span style="padding-right: 1em;"><st:out value="${%User.Score}"/></span>
<span class="current-score ${scoreColor}"><st:out value="${it.score}"/></span>
</div>
<h3><st:out value="${%User.MostRecentScores}"/></h3>
<table class="pane sortable" style="width: 60%;" id="game.scores">
<tr>
<td class="pane-header" style="text-align: right;">${%User.Score}</td>
<td class="pane-header" style="text-align: left;">${%User.ScoreSource}</td>
</tr>
<j:forEach var="scoreEntry" items="${it.mostRecentScores}">
<j:set var="scoreEntryColor" value="${scoreEntry.awardedScoreString.startsWith('+') ? 'green-bg' : (scoreEntry.awardedScoreString.startsWith('-') ? 'red-bg' : 'grey-bg')}" />
<tr class="${scoreEntryColor}" >
<td style="text-align: right; padding: 4px;"><st:out value="${scoreEntry.awardedScoreString}"/></td>
<td>
<j:forEach var="scoredJob" items="${scoreEntry.awardingRuns}">
<a href="${rootURL}/${scoredJob.url}cigame/">${scoredJob.fullDisplayName}</a>
<st:nbsp/>
</j:forEach>
</td>
</tr>
</j:forEach>
</table>
</j:if>
</j:jelly>
@@ -0,0 +1,5 @@
User.CurrentScore=Current score
User.MostRecentScores=Most recent point awards
User.Score=Score
User.ScoreSource=Source
cigame.title=Continuous integration game
@@ -0,0 +1,2 @@
User.CurrentScore=Antal po\u00E4ng
cigame.title=CI Spelet

0 comments on commit 60131dd

Please sign in to comment.