(Not documented)
# File vendor/plugins/ubiquo_categories/lib/ubiquo_categories/connectors/i18n.rb, line 106
106: def uhook_category_filters(filter_set)
107: filter_set.locale
108: end
Returns any necessary extra code to be inserted in the category form
# File vendor/plugins/ubiquo_categories/lib/ubiquo_categories/connectors/i18n.rb, line 155
155: def uhook_category_form form
156: (form.hidden_field :content_id) + (hidden_field_tag(:from, params[:from]))
157: end
Returns the available actions links for a given category
# File vendor/plugins/ubiquo_categories/lib/ubiquo_categories/connectors/i18n.rb, line 121
121: def uhook_category_index_actions category_set, category
122: actions = []
123: if category.in_locale?(current_locale)
124: actions << link_to(t("ubiquo.view"), [:ubiquo, category_set, category])
125: end
126:
127: if category.in_locale?(current_locale)
128: actions << link_to(t("ubiquo.edit"), [:edit, :ubiquo, category_set, category])
129: end
130:
131: unless category.in_locale?(current_locale)
132: actions << link_to(
133: t("ubiquo.translate"),
134: new_ubiquo_category_set_category_path(
135: :from => category.content_id
136: )
137: )
138: end
139:
140: actions << link_to(t("ubiquo.remove"),
141: ubiquo_category_set_category_path(category_set, category, :destroy_content => true),
142: :confirm => t("ubiquo.category.index.confirm_removal"), :method => :delete
143: )
144:
145: if category.in_locale?(current_locale, :skip_any => true) && !category.translations.empty?
146: actions << link_to(t("ubiquo.remove_translation"), [:ubiquo, category_set, category],
147: :confirm => t("ubiquo.category.index.confirm_removal"), :method => :delete
148: )
149: end
150:
151: actions
152: end
Returns the locale information of this category
# File vendor/plugins/ubiquo_categories/lib/ubiquo_categories/connectors/i18n.rb, line 160
160: def uhook_category_partial category
161: locale = ::Locale.find_by_iso_code(category.locale)
162: content_tag(:dt, ::Category.human_attribute_name("locale") + ':') +
163: content_tag(:dd, (locale.native_name rescue t('ubiquo.category.any')))
164: end
Disabled; run with $DEBUG to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.