This repository has been archived by the owner on Jun 13, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move everything to the summary instead of the config page
… looks way nicer
- Loading branch information
Showing
5 changed files
with
57 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 1 addition & 4 deletions
5
src/main/resources/hudson/plugins/cigame/UserScoreProperty/config.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
49 changes: 49 additions & 0 deletions
49
src/main/resources/hudson/plugins/cigame/UserScoreProperty/summary.jelly
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 >= 0 ? 'green-bg' : (it.score < 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> |
5 changes: 5 additions & 0 deletions
5
src/main/resources/hudson/plugins/cigame/UserScoreProperty/summary.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
2 changes: 2 additions & 0 deletions
2
src/main/resources/hudson/plugins/cigame/UserScoreProperty/summary_sv.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
User.CurrentScore=Antal po\u00E4ng | ||
cigame.title=CI Spelet |