Module: Content::ContentViewsHelper

Defined in:
app/helpers/content/content_views_helper.rb

Instance Method Summary collapse

Instance Method Details

#next_or_cancel(path, args = {}) ⇒ Object



12
13
14
15
16
17
18
# File 'app/helpers/content/content_views_helper.rb', line 12

def next_or_cancel path, args={}
  args[:cancel_path] ||= send("#{controller_name}_path")
  (:div, :class => "form-actions") do
    link_to(_("Cancel"), args[:cancel_path], :class => "btn") + " " +
    submit_tag( _("Next"), :class => "btn btn-primary")
  end
end

#repositories(view) ⇒ Object



4
5
6
7
8
9
10
# File 'app/helpers/content/content_views_helper.rb', line 4

def repositories(view)
  if view.new_record?
    view.source_repositories + view.repository_clones
  else
    view.repository_clones
  end
end