Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move plate edit functionality from own plate edit page to plate view …
…page
- Loading branch information
Showing
5 changed files
with
146 additions
and
196 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,145 @@ | ||
[%- META title="View Plate"; META tab_name = "Browse" %] | ||
[%- META title="View Plate"; META tab_name = "Plates" %] | ||
|
||
<div class="page-header"> | ||
<h1>Plate <small>[% plate.name %]</small></h1> | ||
</div> | ||
|
||
<table class="table"> | ||
<thead> | ||
<tr> | ||
<th>Plate Name</th> | ||
<th>Plate Type</th> | ||
<th>Description</th> | ||
<th>Created By</th> | ||
<th>Created At</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<td>[% plate.name %]</td> | ||
<td>[% plate.type.id %] ([% plate.type.description %])</td> | ||
<td>[% plate.description %]</td> | ||
<td>[% plate.created_by.name %]</td> | ||
<td>[% plate.created_at.ymd %]</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
|
||
<h2>Comments</h2> | ||
[% IF plate.plate_comments.size %] | ||
<dl> | ||
[% FOR comment IN plate.plate_comments %] | ||
<dt>[% comment.created_by.name %], [% comment.created_at.ymd %]</dt> | ||
<dd> | ||
<p>[% comment.comment_text %]</p> | ||
</dd> | ||
[% END %] | ||
</dl> | ||
[% ELSE %] | ||
<p><em>No comments for this plate.</em></p> | ||
[% END %] | ||
<div class="row"> | ||
<div class="span6"> | ||
<table class="table"> | ||
|
||
<tr> | ||
<td> | ||
<strong>Name</strong> | ||
</td> | ||
<td> | ||
[% plate.name %] | ||
</td> | ||
<td> | ||
<a class="btn btn-primary" role="button" href="#RenamePlateModal" data-toggle="modal"> | ||
<i class="icon-pencil"></i> Rename | ||
</a> | ||
</td> | ||
</tr> | ||
|
||
<tr> | ||
<td> | ||
<strong>Type</strong> | ||
</td> | ||
<td> | ||
[% plate.type.id %] ([% plate.type.description %]) | ||
</td> | ||
<td></td> | ||
</tr> | ||
|
||
<tr> | ||
<td> | ||
<strong>Description</strong> | ||
</td> | ||
<td> | ||
[% plate.description %] | ||
</td> | ||
<td></td> | ||
</tr> | ||
|
||
<tr> | ||
<td> | ||
<strong>Created By</strong> | ||
</td> | ||
<td> | ||
[% plate.created_by.name %] | ||
</td> | ||
<td></td> | ||
</tr> | ||
|
||
<tr> | ||
<td> | ||
<strong>Created At</strong> | ||
</td> | ||
<td> | ||
[% plate.created_at.ymd %] | ||
</td> | ||
<td></td> | ||
</tr> | ||
|
||
</table> | ||
|
||
</div> | ||
|
||
<div class="span6"> | ||
<div class="well"> | ||
<h2>Comments</h2> | ||
[% IF plate.plate_comments.size %] | ||
<dl> | ||
[% FOR comment IN plate.plate_comments %] | ||
<dt>[% comment.created_by.name %], [% comment.created_at.ymd %]</dt> | ||
<dd> | ||
<p>[% comment.comment_text %]</p> | ||
</dd> | ||
[% END %] | ||
</dl> | ||
[% ELSE %] | ||
<p><em>No comments for this plate.</em></p> | ||
[% END %] | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<a class="btn" href="[% c.uri_for('/user/edit_plate', { id => plate.id } ) %]"> | ||
<i class="icon-pencil"></i> Edit Plate | ||
</a> | ||
|
||
<div class="modal hide fade" id="RenamePlateModal"> | ||
<form method="POST" id="plate_rename" action="[% c.uri_for( '/user/rename_plate' ) %]" class="modal-form" enctype="multipart/form-data" > | ||
<div class="modal-header"> | ||
<button type="button" class="close" data-dismiss="modal">×</button> | ||
<h3 id="myModalLabel">Rename Plate</h3> | ||
</div> | ||
|
||
<div class="modal-body"> | ||
<input type="hidden" name="id" value="[% plate.id %]" /> | ||
<input type="hidden" name="name" value="[% plate.name %]" /> | ||
Rename plate from <strong>[% plate.name %]</strong> to <input name="new_name" id="new_name" type="text" /> | ||
</div> | ||
|
||
<div class="modal-footer"> | ||
<button class="btn" data-dismiss="modal">Cancel</button> | ||
<button name="plate_rename" id="plate_rename" type="submit" value="plate_rename" class="btn btn-primary"> | ||
<i class="icon-pencil"></i> Rename Plate | ||
</button> | ||
</div> | ||
</form> | ||
</div> | ||
|
||
[% UNLESS plate.has_child_wells %] | ||
<div class="row"> | ||
<div class="span2"> | ||
<a id="delete_plate_button" class="btn btn-danger" role="button" href="#DeletePlateModal" data-toggle="modal"> | ||
<i class="icon-remove icon-white"></i> Delete Plate | ||
</a> | ||
</div> | ||
</div> | ||
</br> | ||
|
||
<div class="modal hide fade" id="DeletePlateModal"> | ||
<form method="POST" id="plate_delete" action="[% c.uri_for( '/user/delete_plate' ) %]" class="modal-form" enctype="multipart/form-data" > | ||
<div class="modal-header"> | ||
<button type="button" class="close" data-dismiss="modal">×</button> | ||
<h3 id="myModalLabel">Delete Plate</h3> | ||
</div> | ||
|
||
<div class="modal-body" align="center"> | ||
<input type="hidden" name="id" value="[% plate.id %]" /> | ||
<input type="hidden" name="name" value="[% plate.name %]" /> | ||
Are you sure you want to delete plate <strong>[% plate.name %]</strong>? | ||
</div> | ||
|
||
<div class="modal-footer"> | ||
<button class="btn" data-dismiss="modal">Cancel</button> | ||
<button type="submit" value="delete_plate" class="btn btn-danger" id="delete_plate_button" > | ||
<i class="icon-remove icon-white"></i> Confirm Delete Plate | ||
</button> | ||
</div> | ||
</form> | ||
</div> | ||
[% END %] | ||
|
||
<h2>Wells</h2> | ||
<a class="btn btn-primary" href="[% well_report_uri %]"><i class="icon-list icon-white"></i> Well Details</a> |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.