Changeset 2081


Ignore:
Timestamp:
Oct 17, 2013, 2:43:31 PM (9 years ago)
Author:
olle
Message:

Refs #471. Library preparation information in 'Case Summary' updated in RNA section by adding a row with flag information below the RNA name, if an Annotationtype.FLAG string annotation exists for the RNA extract:

  1. Class/file CaseSummaryServlet.java in reggie/src/net/sf/basedb/reggie/servlet/ updated in private method void loadRnaInfo(DbControl dc, Rna rna) to add the flag annotation value to data access object Rna with JSON key "flag".
  2. JSP script case_summary.jsp in reggie/resources/reports/ updated:
    a. New dynamic column with id "rna.flag" added to HTML section. It belongs to class "dynamic-column", which ensures that when data are added with function addColumn(id, value), it will only be shown if value differs from null.
    b. Function init() updated in RNA section to call function addColumn(id, value) with id set to rna.flag and value to asFlagInfo(r.flag, 'flag.png'), if r.flag differs from null.
    c. New function asFlagInfo(message, icon) returns an HTML span tag with the message text followed by the icon image.
Location:
extensions/net.sf.basedb.reggie/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.reggie/trunk/resources/reports/case_summary.jsp

    r2078 r2081  
    9898}
    9999
     100// Style the message as a 'flag information' message
     101function asFlagInfo(message, icon)
     102{
     103  message = '<span class="flag-info">' + message + '&nbsp;' + '<img src="../images/'+icon+'"></span>';
     104  return message;
     105}
     106
    100107function asConsent(consent, consentDate)
    101108{
     
    512519      var r = rna[i];
    513520      addColumn('rna.name', makeLink('EXTRACT', r));
     521      addColumn('rna.flag', r.flag ? asFlagInfo(r.flag, 'flag.png') : null);
    514522      addColumn('rna.registrationDate', formatDate(r.registrationDate));
    515523      addColumn('rna.storageBox', asBioPlateLocation(r.bioWell));
     
    10531061          </thead>
    10541062          <tbody id="rna-details">
     1063            <tr id="rna.flag" class="dynamic-column">
     1064              <th>Flag</th>
     1065            </tr>
    10551066            <tr id="rna.registrationDate">
    10561067              <th>Registration date</th>
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/CaseSummaryServlet.java

    r2065 r2081  
    412412    rna.loadBioPlateLocation();
    413413    rna.setAnnotation("registrationDate", Reggie.CONVERTER_DATE_TO_STRING.convert(e.getEntryDate()));
     414    rna.setAnnotation("flag", (String) Annotationtype.FLAG.getAnnotationValue(dc, e));
    414415    rna.setAnnotation("editable", e.hasPermission(Permission.WRITE));
    415416    rna.setAnnotation("usedQuantity", created.getUsedQuantity((Extract)e.getParent()));
Note: See TracChangeset for help on using the changeset viewer.