Changeset 156

Show
Ignore:
Timestamp:
11/17/08 16:20:28 (5 years ago)
Author:
samuraraujo
Message:
 
Location:
Explorator/trunk/app/helpers
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • Explorator/trunk/app/helpers/explorator_helper.rb

    r132 r156  
    1414  #return an interval of resources from the offset to the pagination attribute. 
    1515  #This method is used when the user is paginating a set of resources 
    16   def groupBy (type=:s)    
    17     puts '********************' 
    18     puts @resourceset 
    19         puts '********************' 
     16  def groupBy (type=:s)      
    2017    @resourceset.elements.collect{|s,p,o| eval(type.to_s)}.compact.uniq    
    2118  end 
     
    5249  end 
    5350  #Resource URI 
    54   def uri (resource)             
     51  def uri (resource)   
    5552    return resource.to_s.gsub("'","\\\\'")  if  (resource.instance_of? RDFS::Literal)     
    5653    return resource.gsub("'","\\\\'")  if  (resource.instance_of? String)    
  • Explorator/trunk/app/helpers/render_helper.rb

    r72 r156  
    2121  def render_resource (resource)    
    2222   
    23     return truncate(resource) if ! (resource.instance_of? RDFS::Resource)      
     23      
     24    return truncate(resource) if !(resource.instance_of? RDFS::Resource)      
    2425    #if a view was defined by the user.         
    2526    if  resource.explorator::view != nil && !is_class(resource)   
     
    3031      #render a default property: label, name, title, or the resource localname 
    3132    else 
     33      
    3234      if resource.label != nil 
    3335        truncate(resource.label)