Module Admin::DocumentsHelper
In: app/helpers/admin/documents_helper.rb

Methods

Public Instance methods

[Source]

    # File app/helpers/admin/documents_helper.rb, line 10
10:   def dept_select(dept_id)
11:     txt = ""
12:     Department.grouped_options.each do |opt_group|
13:       txt << "<optgroup>"
14:       txt << "<option value='#{opt_group[0][1]}' #{"selected" if opt_group[0][1].to_i.eql?(dept_id.to_i)}>#{opt_group[0][0]}</option>"
15:       opt_group[1].each do |dept|
16:         txt << "<option value='#{dept[1]}' #{"selected" if dept[1].to_i.eql?(dept_id.to_i)}>&nbsp;&nbsp;&nbsp;#{dept[0]}</option>"
17:       end
18:       txt << "</optgroup>"
19:     end
20:     txt
21:   end

[Source]

    # File app/helpers/admin/documents_helper.rb, line 23
23:   def dept_title(doc)
24:     doc.organization.is_a?(Department) ? t("shared.Departamento") : t("shared.Organismo")
25:   end

[Source]

   # File app/helpers/admin/documents_helper.rb, line 2
2:   def pretty_translated(doc, lang_code)
3:     doc.translated_to?(lang_code) ? "Traducido" : "Sin traducir"
4:   end

[Source]

   # File app/helpers/admin/documents_helper.rb, line 6
6:   def si_o_no(val)
7:     val ? t('si') : t('not')
8:   end

[Validate]