Class: Vitae::Nodes::ProjectNode
Instance Attribute Summary
Attributes inherited from Node
Instance Method Summary collapse
Methods inherited from Node
#child_node_class, #child_node_class_from_name, #child_node_class_from_yaml, #collection_wrapper, #initialize, #node_wrapper, #output_data, set, #show_data, #show_hash, #to_s, types
Methods included from Helpers
#content_tag, #current_theme, #include_theme_css, #include_theme_js, #link_to, #tag
Constructor Details
This class inherits a constructor from Vitae::Nodes::Node
Instance Method Details
#html ⇒ Object
156 157 158 159 160 161 162 163 164 165 166 167 168 169 |
# File 'lib/vitae/server/node.rb', line 156 def html link = link_to(name, data["url"]) if data["url"] haml_tag "h#{level}" do haml_tag "span.location", (link||name) if data["role"] haml_concat " - " haml_tag "span.summary", data["role"] end show_date_range end haml_tag "p.job-description", data["description"] # show_data end |
#show_date_range ⇒ Object
171 172 173 174 175 176 177 178 179 180 181 182 |
# File 'lib/vitae/server/node.rb', line 171 def show_date_range return unless data["start"] || data["end"] start_text = data["start"] ? data["start"].strftime("%B %Y") : nil end_text = data["end"] ? data["end"].strftime("%B %Y") : "Present" haml_tag "span.dtrange" do haml_tag "span.dtstart", start_text, :title => data["start"] if start_text haml_concat "-" haml_tag "span.dtend", end_text, :title => data["end"] if end_text end end |