Module: Sdb::SampleManifestsHelper
- Defined in:
- app/helpers/sdb/sample_manifests_helper.rb
Instance Method Summary collapse
- #count_barcode_heading_for(asset_type) ⇒ Object
-
#count_label_for(asset_type) ⇒ String
Returns suitable label text for the sample manifest count field.
- #count_labels ⇒ Object
- #purpose_label_for(asset_type) ⇒ Object
- #submit_label_for(asset_type) ⇒ Object
Instance Method Details
#count_barcode_heading_for(asset_type) ⇒ Object
31 32 33 |
# File 'app/helpers/sdb/sample_manifests_helper.rb', line 31 def (asset_type) asset_type == 'tube_rack' ? 'Tube Racks' : 'Barcodes' end |
#count_label_for(asset_type) ⇒ String
TODO:
Switch to just using I18n
Returns suitable label text for the sample manifest count field
19 20 21 |
# File 'app/helpers/sdb/sample_manifests_helper.rb', line 19 def count_label_for(asset_type) count_labels.fetch(asset_type, 'Count') end |
#count_labels ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'app/helpers/sdb/sample_manifests_helper.rb', line 3 def count_labels { '1dtube' => 'Tubes required', 'plate' => 'Plates required', 'library' => 'Tubes required', 'multiplexed_library' => 'Number of samples in library', 'tube_rack' => 'Tube racks required' } end |
#purpose_label_for(asset_type) ⇒ Object
27 28 29 |
# File 'app/helpers/sdb/sample_manifests_helper.rb', line 27 def purpose_label_for(asset_type) asset_type == 'tube_rack' ? 'Tube purpose' : 'Purpose' end |
#submit_label_for(asset_type) ⇒ Object
23 24 25 |
# File 'app/helpers/sdb/sample_manifests_helper.rb', line 23 def submit_label_for(asset_type) asset_type == 'tube_rack' ? 'Create manifest' : 'Create manifest and print labels' end |