Skip to content
Snippets Groups Projects
Commit 0f938946 authored by Lene Wasskog's avatar Lene Wasskog
Browse files

feat(observation): Adjust columns in observation list

parent 21d37f8f
No related branches found
No related tags found
No related merge requests found
...@@ -353,19 +353,18 @@ var renderObservationTable = function(data) ...@@ -353,19 +353,18 @@ var renderObservationTable = function(data)
if (obs.observationTimeSeriesLabel) { if (obs.observationTimeSeriesLabel) {
tbodyHTML.push( tbodyHTML.push(
"<td><a href='/observations/timeseries/" + obs.observationTimeSeriesId + "' target='new'><span class='timeseries-label'/> " + obs.observationTimeSeriesLabel + "</a></td>" "<td align='center'><a href='/observations/timeseries/" + obs.observationTimeSeriesId + "' target='new'><span class='timeseries-label'/> " + obs.observationTimeSeriesLabel + "</a></td>"
); );
} else { } else {
tbodyHTML.push("<td></td>"); tbodyHTML.push("<td></td>");
} }
tbodyHTML.push("<td align='center'><a href='/observations/" + obs.observationId + "' target='new'><i class='fa fa-info-circle' aria-hidden='true'/></a></td>");
if(Object.keys(measuredVal).length != 0){ if(Object.keys(measuredVal).length != 0){
tbodyHTML.push("<td><a tabindex='0' role='button' data-toggle='popover' data-placement='left' data-trigger='focus' data-html='true' data-content='" + printVal.join("<br/>").replace("'","&apos;") + "' ><span class='fa fa-balance-scale' aria-hidden='true'/></a></td>") tbodyHTML.push("<td align='center'><a tabindex='0' role='button' data-toggle='popover' data-placement='left' data-trigger='focus' data-html='true' data-content='" + printVal.join("<br/>").replace("'","&apos;") + "' ><i class='fa fa-balance-scale' aria-hidden='true'/></a></td>")
} else{ } else{
tbodyHTML.push("<td></td>") tbodyHTML.push("<td></td>")
} }
tbodyHTML.push("<td><a href='/observations/" + obs.observationId + "' target='new'>" + gettext("Details") + "</a></td>");
tbodyHTML.push("</tr>"); tbodyHTML.push("</tr>");
} }
tbody.innerHTML = tbodyHTML.join("\n"); tbody.innerHTML = tbodyHTML.join("\n");
......
...@@ -61,14 +61,15 @@ ...@@ -61,14 +61,15 @@
</div> </div>
<button type="submit" class="btn btn-primary">{% trans "Filter" %}</button> <button type="submit" class="btn btn-primary">{% trans "Filter" %}</button>
</form> </form>
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-striped" id="observationTable"> <table class="table table-striped" id="observationTable">
<thead> <thead>
<th>{% trans "Date of observation" %}</th> <th>{% trans "Date of observation" %}</th>
<th>{% trans "Organism" %}</th> <th>{% trans "Organism" %}</th>
<th>{% trans "Crop" %}</th> <th>{% trans "Crop" %}</th>
<th>{% trans "Heading" %}</th> <th>{% trans "Heading" %}</th>
<th></th> <th>{% trans "Time series" %}</th>
<th>{% trans "Details" %}</th>
<th></th> <th></th>
</thead> </thead>
<tbody id="observationTableBody"> <tbody id="observationTableBody">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment