Sha256: 4d6b741685eea662e27958febe90a7979e5e735b81a23f09df2395cddc7a827f

Contents?: true

Size: 1.54 KB

Versions: 19

Compression:

Stored size: 1.54 KB

Contents

- displayable_parameters = exclude_keys(@expected_variables,@reserved_variables_used)

%section
	=fullwidth do
		=section_title("#{ @sparql_query ? 'Edit' : 'Enter' } query")
	=fullwidth do
		= form_tag sparql_endpoint_path, method: :get do
			= text_area_tag :query, @query_text || default_query
			- # interpolated variables - ie anything in %{} in the query
			- # example query to generate interpolations:
			- #		SELECT * WHERE { ?%{foo}  ?p ?o}
			- # example query to generate interpolations with reserved words:
			- # 	SELECT * WHERE { ?%{controller}  ?p ?o}
			- if @expected_variables && @expected_variables.any?
				%fieldset#sparql_parameters
					%h4 Special parameters
					%p
						:markdown
							Values supplied 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 => 'pmd_field_error')
							end
						= content_tag :div, field_options do
							- if @missing_variables && @missing_variables.include?(v)
								%label="#{v}: can't be blank"
							- else
								%label="#{v}: "
							= text_field_tag v, @interpolations[v]

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

/
	:javascript
		$(function(){
			var editor = CodeMirror.fromTextArea(document.getElementById("query"), {
				mode: "application/x-sparql-query",
				tabMode: "indent",
				matchBrackets: true
			});
		});

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
publish_my_data-1.3.25 app/views/publish_my_data/stripes/_sparql_console.html.haml
publish_my_data-1.3.24 app/views/publish_my_data/stripes/_sparql_console.html.haml
publish_my_data-1.3.23 app/views/publish_my_data/stripes/_sparql_console.html.haml
publish_my_data-1.3.22 app/views/publish_my_data/stripes/_sparql_console.html.haml
publish_my_data-1.3.21 app/views/publish_my_data/stripes/_sparql_console.html.haml
publish_my_data-1.3.20 app/views/publish_my_data/stripes/_sparql_console.html.haml
publish_my_data-1.3.19 app/views/publish_my_data/stripes/_sparql_console.html.haml
publish_my_data-1.3.18 app/views/publish_my_data/stripes/_sparql_console.html.haml
publish_my_data-1.3.17 app/views/publish_my_data/stripes/_sparql_console.html.haml
publish_my_data-1.3.16 app/views/publish_my_data/stripes/_sparql_console.html.haml
publish_my_data-1.3.15 app/views/publish_my_data/stripes/_sparql_console.html.haml
publish_my_data-1.3.14 app/views/publish_my_data/stripes/_sparql_console.html.haml
publish_my_data-1.3.13 app/views/publish_my_data/stripes/_sparql_console.html.haml
publish_my_data-1.3.12 app/views/publish_my_data/stripes/_sparql_console.html.haml
publish_my_data-1.3.11 app/views/publish_my_data/stripes/_sparql_console.html.haml
publish_my_data-1.3.10 app/views/publish_my_data/stripes/_sparql_console.html.haml
publish_my_data-1.3.9 app/views/publish_my_data/stripes/_sparql_console.html.haml
publish_my_data-1.3.8 app/views/publish_my_data/stripes/_sparql_console.html.haml
publish_my_data-1.3.7 app/views/publish_my_data/stripes/_sparql_console.html.haml