Sha256: c60f32293fdce4da825272d4289aac2725d509c4204a1357005c201e355e80d2
Contents?: true
Size: 1.66 KB
Versions: 5
Compression:
Stored size: 1.66 KB
Contents
- if show_sample_data?(dataset) %section = fullwidth do = section_title("Sample data") %p This dataset contains = pluralize dataset.types.length, 'type' of resource: - dataset.example_resources.each do |resource| %table %thead %tr %td(colspan="2") =label resource.read_predicate(RDF.type).many? ? 'Types' : 'Type' %h4{style:"line-height:1.2em;"}= resource.read_predicate(RDF.type).map { |t| resource_uri_or_label(resource, t) }.join("<br>").html_safe %h5 Subject: = link_to (resource.label || resource.uri), resource_path_from_uri(resource.uri) %tr %th{style:"width:50%;"} Predicate %th{style:"width:50%;"} Object - resource.predicates.each do |pred| %tr %td{style:"width:50%;"} = resource_uri_or_label(resource, pred) =# maybe_link_to_vocabulary(dataset,pred) %td{style:"width:50%;"} - resource.read_predicate(pred).each do |obj| %div = resource_uri_or_label(resource, obj) =# maybe_link_to_vocabulary(dataset,obj) %tfoot %tr %th(colspan="2") %div = link_to show_resource_path(uri: resource.uri, format: 'ttl'), target: 'blank' do Raw data for this resource (.ttl) %i.icon-popup %ul.resource_links_list - types_for_example_resource(dataset, resource).each do |type| %li View = link_to list_resources_path(dataset: dataset, type_uri: type) do all = dataset.type_count(type.uri) resources of type %strong = type.label.nil? ? type.uri : type.label
Version data entries
5 entries across 5 versions & 1 rubygems