ontology_helper.rb revision b299dbef5e70f4f78937112b19370a4d5d0e04e3
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano o = @ontology.parent ? @ontology.parent : @ontology
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano repository_ontology_ontology_version_path(*resource_chain, resource.versions.done.latest.first)
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano version = resource.is_a?(Ontology) ? resource.current_version : resource
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano version.ontology.repository, version.ontology, version)
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano if %w(pending fetching processing).include? resource.state
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano html << " " << image_tag('spinner-16x16.gif', class: 'spinner')
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano if resource.state == 'failed' and resource.is_a? Ontology
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano version = resource.versions.last
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano link = ' ('
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano link << link_to('error',
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano [resource.repository, resource, :ontology_versions],
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano :'data-original-title' => version.last_error,
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano class: 'help'
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano link << ')'
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano html << content_tag(:span, link.html_safe, class: 'error')
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano def last_file_path(resource)
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano repository_ref_path(repository_id: resource.repository.to_param,
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano ref: resource.current_version.commit_oid,
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano path: resource.current_version.path,
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano action: :show)