Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Updating the docs

  • Loading branch information...
commit ed934ff0d390c150c967b67edf977b43df232c79 1 parent d62de5d
Christian Oestreich authored
2  grails-app/domain/com/team4/s4b/domain/Bribe.groovy
@@ -17,7 +17,7 @@ class Bribe {
17 17
     /** Hyperlink to external website if bribe exists on the web. */
18 18
     String link
19 19
     /** A picture of the bribe */
20  
-    Byte[] picture
  20
+    byte[] picture
21 21
     /** Probability that the bribe will occur.  Value will range from 1-100.  Default will be 1. */
22 22
     Integer probability = 1
23 23
     /** 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. */
12  grails-app/views/bribe/_form.gsp
... ...
@@ -1,4 +1,4 @@
1  
-<%@ page import="com.team4.s4b.domain.BribePortfolio; com.team4.s4b.domain.Bribe" %>
  1
+<%@ page import="com.team4.s4b.domain.Bribe" %>
2 2
 
3 3
 
4 4
 
@@ -18,12 +18,20 @@
18 18
 	<g:select name="probability" from="${1..99999}" class="range" required="" value="${fieldValue(bean: bribeInstance, field: 'probability')}"/>
19 19
 </div>
20 20
 
  21
+<div class="fieldcontain ${hasErrors(bean: bribeInstance, field: 'availableCount', 'error')} required">
  22
+	<label for="availableCount">
  23
+		<g:message code="bribe.availableCount.label" default="Available Count" />
  24
+		<span class="required-indicator">*</span>
  25
+	</label>
  26
+	<g:field type="number" name="availableCount" required="" value="${fieldValue(bean: bribeInstance, field: 'availableCount')}"/>
  27
+</div>
  28
+
21 29
 <div class="fieldcontain ${hasErrors(bean: bribeInstance, field: 'bribePortfolio', 'error')} required">
22 30
 	<label for="bribePortfolio">
23 31
 		<g:message code="bribe.bribePortfolio.label" default="Bribe Portfolio" />
24 32
 		<span class="required-indicator">*</span>
25 33
 	</label>
26  
-	<g:select id="bribePortfolio" name="bribePortfolio.id" from="${BribePortfolio.list()}" optionKey="id" required="" value="${bribeInstance?.bribePortfolio?.id}" class="many-to-one"/>
  34
+	<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"/>
27 35
 </div>
28 36
 
29 37
 <div class="fieldcontain ${hasErrors(bean: bribeInstance, field: 'link', 'error')} ">
4  grails-app/views/bribe/list.gsp
@@ -28,6 +28,8 @@
28 28
 					
29 29
 						<g:sortableColumn property="probability" title="${message(code: 'bribe.probability.label', default: 'Probability')}" />
30 30
 					
  31
+						<g:sortableColumn property="availableCount" title="${message(code: 'bribe.availableCount.label', default: 'Available Count')}" />
  32
+					
31 33
 						<th><g:message code="bribe.bribePortfolio.label" default="Bribe Portfolio" /></th>
32 34
 					
33 35
 						<g:sortableColumn property="link" title="${message(code: 'bribe.link.label', default: 'Link')}" />
@@ -44,6 +46,8 @@
44 46
 					
45 47
 						<td>${fieldValue(bean: bribeInstance, field: "probability")}</td>
46 48
 					
  49
+						<td>${fieldValue(bean: bribeInstance, field: "availableCount")}</td>
  50
+					
47 51
 						<td>${fieldValue(bean: bribeInstance, field: "bribePortfolio")}</td>
48 52
 					
49 53
 						<td>${fieldValue(bean: bribeInstance, field: "link")}</td>
9  grails-app/views/bribe/show.gsp
@@ -41,6 +41,15 @@
41 41
 				</li>
42 42
 				</g:if>
43 43
 			
  44
+				<g:if test="${bribeInstance?.availableCount}">
  45
+				<li class="fieldcontain">
  46
+					<span id="availableCount-label" class="property-label"><g:message code="bribe.availableCount.label" default="Available Count" /></span>
  47
+					
  48
+						<span class="property-value" aria-labelledby="availableCount-label"><g:fieldValue bean="${bribeInstance}" field="availableCount"/></span>
  49
+					
  50
+				</li>
  51
+				</g:if>
  52
+			
44 53
 				<g:if test="${bribeInstance?.bribePortfolio}">
45 54
 				<li class="fieldcontain">
46 55
 					<span id="bribePortfolio-label" class="property-label"><g:message code="bribe.bribePortfolio.label" default="Bribe Portfolio" /></span>

0 notes on commit ed934ff

Please sign in to comment.
Something went wrong with that request. Please try again.