source: trunk/grails-app/views/eventDescription/showPartial.gsp @ 288

Last change on this file since 288 was 288, checked in by jahn, 13 years ago

Event's create and edit action have been tested and are now working.

Also, the old problem of adding Samples has been addressed. When a new event is created as a SamplingEvent?, no new samples can be added directly. The reason for this is, that the event is not yet assigned to any Subject, and thus the non nullable subject field of a new sample (belonging to the new event) cannot be filled.
Similarly, when a SamplingEvent? event is edited, new samples can only be added, if the event already is assigned to belong to a subject. New samples are always added to the same subject as the first (random) sample belonging to the SamplingEvent?.

However, there are still open questions:

(1) Should the sample also be assigned to the samples of its subject's Study?

(2) Should a sample also be assigned, if there are no samples assigned yet, but there is a subject assigned to this event?

(3) Should the user be allowed to chose to assign a subject if the event is assigned to a Study that contains multiple subjects?

File size: 1.5 KB
Line 
1
2
3
4
5
6
7
8
9            <% def list = [] %>
10            <g:each in="${description.protocol.parameters}" > <% list.add( it )%> </g:each>
11            <% list.sort{ a,b -> a.name <=> b.name }%>
12
13
14
15            <g:each in="${list}" var="${parameter}">
16
17                 <tr class="prop">
18                 <td valign="top" class="name" width=200>
19                 <label for="parameter"><g:message code="${parameter.name}" /></label>
20                 </td>
21
22                 <td valign="top" class="name">
23
24                 <g:if test="${parameter.type==dbnp.studycapturing.ProtocolParameterType.STRINGLIST}">
25                          <g:select name="parameterValue.${parameter.id}" id="protocol" from="${parameter.listEntries}" optionKey="id" optionValue="${{it.name}}" value="${{it?.id}}" />
26                 </g:if>
27                 <g:else>
28                          <% def value = '' %>
29                          <g:if test="${event!=null}">
30                          <% if(  parameter.type==dbnp.studycapturing.ProtocolParameterType.FLOAT  ) { value= event.parameterFloatValues[parameter.name]   } %>
31                          <% if(  parameter.type==dbnp.studycapturing.ProtocolParameterType.STRING ) { value= event.parameterStringValues[parameter.name]  } %>
32                          <% if(  parameter.type==dbnp.studycapturing.ProtocolParameterType.INTEGER) { value= event.parameterIntegerValues[parameter.name] } %>
33                          </g:if>
34                          <g:textField name="parameterValue.${parameter.id}" value="${value}" />
35                 </g:else>
36                 </td>
37
38                 </tr>
39
40            </g:each>
41
42
43
44
45
46
47
Note: See TracBrowser for help on using the repository browser.