app/helpers/application_helper.rb in tawork-0.0.31 vs app/helpers/application_helper.rb in tawork-0.0.33
- old
+ new
@@ -15,6 +15,21 @@
creator: current_user,
parent_id: params[:parent_id]
)
end
end
+
+ def title(page_title)
+ content_for(:title) { page_title }
+ end
+
+ def icon_for(thing)
+ case thing
+ when Space
+ icon = "bullseye"
+ when Page
+ icon = "file"
+ end
+
+ tag(:i, class: "fa fa-#{icon}")
+ end
end