Sha256: 02019428c000013d34cfa796bbbd0cd64b2f74a99efb73a3baaeb37bf7a06a65

Contents?: true

Size: 966 Bytes

Versions: 4

Compression:

Stored size: 966 Bytes

Contents

= form_tag sparql_endpoint_path, method: :get do
  .form-group
    = text_area_tag :query, @query_text

  - # this is the interpolation form:
  - if @expected_variables && @expected_variables.any?
    %fieldset.sparql-parameters
      %legend Parameters

      :markdown
        Values supplied below will be substituted into the query in place of the <code>%{tokens}</code>. See the [developer docs](/docs) for more details.

      - @expected_variables.each do |v|

        :ruby
          field_options = {:class => 'field'}

          if @missing_variables && @missing_variables.include?(v)
            field_options.merge!(:class => 'field has-error')
          end

        - unless @reserved_variables_used && @reserved_variables_used.include?(v)
          - # don't include reserved ones
          = content_tag :div, field_options do
            %label=v
            = text_field_tag v, @interpolations[v]

  = submit_tag "Run Query", id: 'run-sparql-query'

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
publish_my_data-1.0.3 app/views/publish_my_data/sparql/_form.html.haml
publish_my_data-1.0.2 app/views/publish_my_data/sparql/_form.html.haml
publish_my_data-1.0.1 app/views/publish_my_data/sparql/_form.html.haml
publish_my_data-1.0.0 app/views/publish_my_data/sparql/_form.html.haml