Adds a locale filter to the received filter_set
# File vendor/plugins/ubiquo_media/lib/ubiquo_media/connectors/i18n.rb, line 115
115: def uhook_asset_filters filter_set
116: filter_set.locale
117: end
Returns any necessary extra code to be inserted in the asset form
# File vendor/plugins/ubiquo_media/lib/ubiquo_media/connectors/i18n.rb, line 158
158: def uhook_asset_form form
159: (form.hidden_field :content_id) + (hidden_field_tag(:from, params[:from]))
160: end
Returns the available actions links for a given asset
# File vendor/plugins/ubiquo_media/lib/ubiquo_media/connectors/i18n.rb, line 130
130: def uhook_asset_index_actions asset
131: actions = []
132: if asset.in_locale?(current_locale)
133: actions << link_to(t("ubiquo.edit"), edit_ubiquo_asset_path(asset))
134: end
135:
136: unless asset.in_locale?(current_locale)
137: actions << link_to(
138: t("ubiquo.translate"),
139: new_ubiquo_asset_path(:from => asset.content_id)
140: )
141: end
142:
143: actions << link_to(t("ubiquo.remove"),
144: ubiquo_asset_path(asset, :destroy_content => true),
145: :confirm => t("ubiquo.media.confirm_asset_removal"), :method => :delete
146: )
147:
148: if asset.in_locale?(current_locale, :skip_any => true)
149: actions << link_to(t("ubiquo.remove_translation"), ubiquo_asset_path(asset),
150: :confirm => t("ubiquo.media.confirm_asset_removal"), :method => :delete
151: )
152: end
153:
154: actions
155: end
Disabled; run with $DEBUG to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.