| Module | Admin::DocumentsHelper |
| In: |
app/helpers/admin/documents_helper.rb
|
# 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)}> #{dept[0]}</option>"
17: end
18: txt << "</optgroup>"
19: end
20: txt
21: end
# 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
# 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