Permalink
Browse files

Updating the docs

  • Loading branch information...
1 parent d62de5d commit ed934ff0d390c150c967b67edf977b43df232c79 @ctoestreich committed Apr 24, 2012
View
2 grails-app/domain/com/team4/s4b/domain/Bribe.groovy
@@ -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. */
View
12 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" %>
@@ -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')} ">
View
4 grails-app/views/bribe/list.gsp
@@ -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')}" />
@@ -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>
View
9 grails-app/views/bribe/show.gsp
@@ -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>

0 comments on commit ed934ff

Please sign in to comment.