Sha256: 12402c6d0a1e0c9a3bfd3a4ee2d39bb40657b20e5e85a50a99703585e7f1b21f

Contents?: true

Size: 652 Bytes

Versions: 7

Compression:

Stored size: 652 Bytes

Contents

module Odania
	module ApplicationHelper
		def format_date(datum)
			if datum.nil? then
				return '';
			end

			return datum.strftime('%d.%m.%Y')
		end

		def list_languages(languages)
			result = []
			languages.each do |language|
				result << language.iso_639_1
			end
			result.join(', ')
		end

		def icon_for_bool(b)
			return '<span class="glyphicon glyphicon-ok"></span>'.html_safe if b
			'<span class="glyphicon glyphicon-remove"></span>'.html_safe
		end

		def star_icon_for_bool(b)
			return '<span class="glyphicon glyphicon-star"></span>'.html_safe if b
			'<span class="glyphicon glyphicon-star-empty"></span>'.html_safe
		end
	end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
odania_core-0.0.7 app/helpers/odania/application_helper.rb
odania_core-0.0.6 app/helpers/odania/application_helper.rb
odania_core-0.0.5 app/helpers/odania/application_helper.rb
odania_core-0.0.4 app/helpers/odania/application_helper.rb
odania_core-0.0.3 app/helpers/odania/application_helper.rb
odania_core-0.0.2 app/helpers/odania/application_helper.rb
odania_core-0.0.1 app/helpers/odania/application_helper.rb