Skip to content

Commit

Permalink
Updating the docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ctoestreich committed Apr 24, 2012
1 parent d62de5d commit ed934ff
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 3 deletions.
2 changes: 1 addition & 1 deletion grails-app/domain/com/team4/s4b/domain/Bribe.groovy
Expand Up @@ -17,7 +17,7 @@ class Bribe {
/** Hyperlink to external website if bribe exists on the web. */
String link
/** A picture of the bribe */
Byte[] picture
byte[] picture
/** Probability that the bribe will occur. Value will range from 1-100. Default will be 1. */
Integer probability = 1
/** How many of this bribe are available. Value of -1 means unlimted. Once 0 is reached this will no longer show up in bribe portfolio shake. */
Expand Down
12 changes: 10 additions & 2 deletions grails-app/views/bribe/_form.gsp
@@ -1,4 +1,4 @@
<%@ page import="com.team4.s4b.domain.BribePortfolio; com.team4.s4b.domain.Bribe" %>
<%@ page import="com.team4.s4b.domain.Bribe" %>



Expand All @@ -18,12 +18,20 @@
<g:select name="probability" from="${1..99999}" class="range" required="" value="${fieldValue(bean: bribeInstance, field: 'probability')}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: bribeInstance, field: 'availableCount', 'error')} required">
<label for="availableCount">
<g:message code="bribe.availableCount.label" default="Available Count" />
<span class="required-indicator">*</span>
</label>
<g:field type="number" name="availableCount" required="" value="${fieldValue(bean: bribeInstance, field: 'availableCount')}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: bribeInstance, field: 'bribePortfolio', 'error')} required">
<label for="bribePortfolio">
<g:message code="bribe.bribePortfolio.label" default="Bribe Portfolio" />
<span class="required-indicator">*</span>
</label>
<g:select id="bribePortfolio" name="bribePortfolio.id" from="${BribePortfolio.list()}" optionKey="id" required="" value="${bribeInstance?.bribePortfolio?.id}" class="many-to-one"/>
<g:select id="bribePortfolio" name="bribePortfolio.id" from="${com.team4.s4b.domain.BribePortfolio.list()}" optionKey="id" required="" value="${bribeInstance?.bribePortfolio?.id}" class="many-to-one"/>
</div>

<div class="fieldcontain ${hasErrors(bean: bribeInstance, field: 'link', 'error')} ">
Expand Down
4 changes: 4 additions & 0 deletions grails-app/views/bribe/list.gsp
Expand Up @@ -28,6 +28,8 @@

<g:sortableColumn property="probability" title="${message(code: 'bribe.probability.label', default: 'Probability')}" />

<g:sortableColumn property="availableCount" title="${message(code: 'bribe.availableCount.label', default: 'Available Count')}" />

<th><g:message code="bribe.bribePortfolio.label" default="Bribe Portfolio" /></th>

<g:sortableColumn property="link" title="${message(code: 'bribe.link.label', default: 'Link')}" />
Expand All @@ -44,6 +46,8 @@

<td>${fieldValue(bean: bribeInstance, field: "probability")}</td>

<td>${fieldValue(bean: bribeInstance, field: "availableCount")}</td>

<td>${fieldValue(bean: bribeInstance, field: "bribePortfolio")}</td>

<td>${fieldValue(bean: bribeInstance, field: "link")}</td>
Expand Down
9 changes: 9 additions & 0 deletions grails-app/views/bribe/show.gsp
Expand Up @@ -41,6 +41,15 @@
</li>
</g:if>

<g:if test="${bribeInstance?.availableCount}">
<li class="fieldcontain">
<span id="availableCount-label" class="property-label"><g:message code="bribe.availableCount.label" default="Available Count" /></span>

<span class="property-value" aria-labelledby="availableCount-label"><g:fieldValue bean="${bribeInstance}" field="availableCount"/></span>

</li>
</g:if>

<g:if test="${bribeInstance?.bribePortfolio}">
<li class="fieldcontain">
<span id="bribePortfolio-label" class="property-label"><g:message code="bribe.bribePortfolio.label" default="Bribe Portfolio" /></span>
Expand Down

0 comments on commit ed934ff

Please sign in to comment.