<% if self.controller.respond_to?(:entry_class) && self.controller.entry_class %> <% unless self.controller.entry_class.respond_to?(:disable_all?) && self.controller.entry_class.disable_all? %> <%= left_menu_item_title(I18n.t("common.labels.actions')) %> <%= left_menu_item_link(I18n.t("#{::ChupakabraTools::ClassHelper.controller_to_i18n(entry ? entry.class.management_controller : self.controller)}.buttons.to_list"), url_for(controller: ::ChupakabraTools::ClassHelper.controller_underscore(entry ? entry.class.management_controller : self.controller)), "/assets/Documents.gif") %> <% if self.controller.entry_class && self.controller.entry_class.standard_action_allowed?(:new) %> <%= left_menu_item_link(I18n.t("#{::ChupakabraTools::ClassHelper.controller_to_i18n(entry ? entry.class.management_controller : self.controller)}.buttons.new"), self.controller.entry_class.portal_new_url, "/assets/Documents.gif") %> <% else %> <%= left_menu_item_disabled(I18n.t("#{::ChupakabraTools::ClassHelper.controller_to_i18n(self.controller)}.buttons.new"), "/assets/Documents.gif") %> <% end %> <% if entry && entry.id && entry.class.standard_action_allowed?(:edit) %> <%= left_menu_item_link(I18n.t("#{::ChupakabraTools::ClassHelper.controller_to_i18n(entry.class.management_controller)}.buttons.edit"), entry.portal_edit_url, "/assets/Documents.gif") %> <% else %> <%= left_menu_item_disabled(I18n.t("#{::ChupakabraTools::ClassHelper.controller_to_i18n(entry ? entry.class.management_controller : self.controller)}.buttons.edit"), "/assets/Documents.gif") %> <% end %> <% if entry && entry.id && entry.class.standard_action_allowed?(:show) %> <%= left_menu_item_link(I18n.t("#{::ChupakabraTools::ClassHelper.controller_to_i18n(entry.class.management_controller)}.buttons.show"), entry.portal_show_url, "/assets/Documents.gif") %> <% else %> <%= left_menu_item_disabled(I18n.t("#{::ChupakabraTools::ClassHelper.controller_to_i18n(self.controller)}.buttons.show"), "/assets/Documents.gif") %> <% end %> <%= left_menu_item_divider %> <% if entry && entry.id && entry.class.standard_action_allowed?(:delete) %> <%= left_menu_item_link(I18n.t("#{::ChupakabraTools::ClassHelper.controller_to_i18n(entry.class.management_controller)}.buttons.delete"), entry.portal_delete_url, "/assets/Documents.gif") %> <% else %> <%= left_menu_item_disabled(I18n.t("#{::ChupakabraTools::ClassHelper.controller_to_i18n(self.controller)}.buttons.delete"), "/assets/Documents.gif") %> <% end %> <%= left_menu_item_divider %> <% end %> <% if self.controller.action_name == "index" && self.controller.entry_class.respond_to?(:export_types_set) && self.controller.entry_class.export_types_set.count > 0 %> <%= left_menu_item_title(I18n.t("common.export')) %> <% self.controller.entry_class.export_types_set.each do |exp| %> <% if exp[:name] == "xml" %> <%= left_menu_item_link( "XML", url_for(controller: ::ChupakabraTools::ClassHelper.controller_underscore(entry ? entry.class.management_controller : self.controller), action: :export, type: :xml), "/assets/Documents.gif") %> <% elsif exp[:name] == "json" %> <%= left_menu_item_link( "JSON", url_for(controller: ::ChupakabraTools::ClassHelper.controller_underscore(entry ? entry.class.management_controller : self.controller), action: :export, type: :json), "/assets/Documents.gif") %> <% end %> <% end %> <% else %> <% end %> <% end %>