genome/dgi-db

View on GitHub
app/views/static/search_interactions.html.haml.old

Summary

Maintainability
Test Coverage
=content_for :title do
  =tx "title"
=content_for :header do
  %h2
    =tx "title_main"
    %small
      =tx "title_small"
      %a(href="/faq#goal")
        =icon('question-sign')
- cache do
  .container.search-container
    .row-fluid
      .span8
        %form.form-horizontal(action="interaction_search_results" method="post" enctype="multipart/form-data")
          %fieldset
            .control-group
              .controls
                .btn-group#toggleIdentifiers(data-toggle='buttons-radio')
                  %input#geneSearch(type='radio' name='search_mode' value='genes' style='display:none;' checked='checked')
                  %label.btn.radio.active(for='geneSearch') Genes
                  %input#drugSearch(type='radio' name='search_mode' value='drugs' style='display:none;')
                  %label.btn.radio(for='drugSearch') Drugs
            .control-group
              %label.control-label(id='ids_flag')
                #ids_text Genes
                =icon(:flag, title: tx("ids_flag"), class: 'tip')
                %a(href="/faq#types")
                  =icon('question-sign')
              .controls
                %textarea#identifiers(name='identifiers' rows="13")
            .control-group
              .controls
                %button.btn.btn-small.btn-primary#defaultIdentifiers(type='button') Replace Identifiers with Demo List
                %button.btn.btn-small.btn-danger#clear(type='button') Clear All Identifiers
            =render partial: 'shared/multiselect', locals: { control_group_name: 'Source Databases',
              flag_text_key: 'source_database_flag', select_tag_name: 'interaction_sources', collection: @sources,
              name_meth: 'to_s', value_meth: 'to_s', tour_id: 'sources_tour' }
            =render partial: 'shared/multiselect', locals: { control_group_name: 'Gene Categories',
              flag_text_key: 'gene_category_flag', select_tag_name: 'gene_categories', collection: @gene_categories,
              name_meth: 'to_s', value_meth: 'to_s', tour_id: 'gene_cateogories_tour' }
            =render partial: 'shared/multiselect', locals: { control_group_name: 'Interaction Types',
              flag_text_key: 'interaction_type_flag', select_tag_name: 'interaction_types', collection: @interaction_types,
              name_meth: 'to_s', value_meth: 'to_s', tour_id: 'interaction_types_tour' }
            .form-actions
              %button.btn.btn-success(type="submit" id='search-btn')
                =icon('search', class: 'icon-white')
                Find Drug-Gene Interactions

  =render partial: 'shared/loading_modal', locals: {title: "Searching Drug-Gene Interactions..."}

  =javascript_include_tag 'jquery-ui-1.8.21.custom.min'
  =javascript_include_tag 'jquery.multiselect.min'
  =javascript_include_tag 'jquery.multiselect.filter.min'
  =javascript_include_tag 'bootstrap3-typeahead.min'
  =javascript_include_tag 'search_interactions'