Files

Class Index [+]

Quicksearch

UbiquoCategories::Connectors::I18n::UbiquoCategoriesController::Helper

Public Instance Methods

uhook_category_filters(filter_set) click to toggle source

(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
uhook_category_form(form) click to toggle source

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
uhook_category_index_actions(category_set, category) click to toggle source

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
uhook_category_partial(category) click to toggle source

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
uhook_edit_category_sidebar(category) click to toggle source

Returns content to show in the sidebar when editing a category

     # File vendor/plugins/ubiquo_categories/lib/ubiquo_categories/connectors/i18n.rb, line 111
111:           def uhook_edit_category_sidebar category
112:             show_translations(category, :hide_preview_link => true)
113:           end
uhook_new_category_sidebar(category) click to toggle source

Returns content to show in the sidebar when creating a category

     # File vendor/plugins/ubiquo_categories/lib/ubiquo_categories/connectors/i18n.rb, line 116
116:           def uhook_new_category_sidebar category
117:             show_translations(category, :hide_preview_link => true)
118:           end

Disabled; run with $DEBUG to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.