Changeset 1403


Ignore:
Timestamp:
Oct 11, 2011, 1:24:47 PM (10 years ago)
Author:
Martin Svensson
Message:

References #317 Added partition registration form.

Location:
extensions/net.sf.basedb.reggie/trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.reggie/trunk/META-INF/servlets.xml

    r1372 r1403  
    2121    <servlet-class>net.sf.basedb.reggie.servlet.SpecimenTubeServlet</servlet-class>
    2222  </servlet>
    23 
     23  <servlet>
     24    <servlet-name>PartitionRegistration</servlet-name>
     25    <servlet-class>net.sf.basedb.reggie.servlet.PartitionRegistrationServlet</servlet-class>
     26  </servlet>
    2427</servlets>
  • extensions/net.sf.basedb.reggie/trunk/resources/index.jsp

    r1378 r1403  
    3434  boolean isPatientCurator = false;
    3535  boolean hasCreateSamplePermission = false;
     36  boolean hasCreateExtractPermission = false;
    3637  try
    3738  {
     
    5859    {
    5960      hasCreateSamplePermission = true;
     61    }
     62  }
     63  catch(RuntimeException ex)
     64  {}
     65  try
     66  {
     67    if (sc.hasPermission(Permission.CREATE, Item.EXTRACT))
     68    {
     69      hasCreateExtractPermission = true;
    6070    }
    6171  }
     
    181191        <%
    182192      }
     193      if (hasCreateSamplePermission && hasCreateExtractPermission)
     194      {
     195        %>
     196        <dt>
     197          <table border="0" cellspacing="0" cellpadding="0">
     198          <tr>
     199            <td><base:icon image="file.gif" style="padding-right: 4px;"/></td>
     200            <td><a href="partitionform.jsp?ID=<%=ID%>">Partition registration wizard</a></td>
     201          </tr>
     202          </table>
     203        </dt>
     204        <dd>
     205          <ul>
     206          <li>Register new partitions of existing specimens.
     207          </ul>
     208        </dd>
     209        <%
     210      }
    183211      %>
    184212      </dl>
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/InstallServlet.java

    r1401 r1403  
    139139            new EnumerationOptions("SpecimenSurgery", "SpecimenCoreBiopsy", "SpecimenFineNeedleAspiration"),
    140140            effectiveOptions, createIfMissing));
     141        jsonChecks.add(checkAnnotationType(dc, Reggie.ANNOTATION_NOF_PIECES, Item.SAMPLE, Type.INT, 1,
     142            null, effectiveOptions, createIfMissing));
    141143               
    142144        json.put("checks", jsonChecks);
Note: See TracChangeset for help on using the changeset viewer.