Sha256: 19d28d12b364c89211f60294f9dbf87c0b94833da25cb64609d0f7792a893377

Contents?: true

Size: 1.96 KB

Versions: 9

Compression:

Stored size: 1.96 KB

Contents

Houston.config.add_navigation_renderer :sprint do
  if can?(:read, Sprint)
    render_nav_link "Sprint", main_app.current_sprint_path, icon: "fa-burndown"
  end
end



Houston.config.add_project_feature :ideas do
  name "Ideas"
  icon "fa-lightbulb-o"
  path { |project| Houston::Application.routes.url_helpers.project_open_ideas_path(project) }
  ability { |ability, project| ability.can?(:read, project.tickets.build) }
end

Houston.config.add_project_feature :bugs do
  name "Bugs"
  icon "fa-bug"
  path { |project| Houston::Application.routes.url_helpers.project_open_bugs_path(project) }
  ability { |ability, project| ability.can?(:read, project.tickets.build) }
end

Houston.config.add_project_feature :testing do
  name "Testing"
  icon "fa-comments"
  path { |project| Houston::Application.routes.url_helpers.project_testing_report_path(project) }
end

Houston.config.add_project_feature :releases do
  name "Releases"
  icon "fa-paper-plane"
  path { |project| Houston::Application.routes.url_helpers.releases_path(project) }
  ability { |ability, project| ability.can?(:read, project.releases.build) }

  field "releases.environments" do
    name "Environments"
    html do |f|
      if @project.environments.none?
        ""
      else
        html = <<-HTML
        <p class="instructions">
          Generate release notes for these environments:
        </p>
        HTML
        @project.environments.each do |environment|
          id = :"releases.ignore.#{environment}"
          value = f.object.public_send(id) || "0"
          html << f.label(id, class: "checkbox") do
            f.check_box(id, {checked: value == "0"}, "0", "1") +
            " #{environment.titleize}"
          end
        end
        html
      end
    end
  end

end

Houston.config.add_project_feature :settings do
  name "Settings"
  icon "fa-gear"
  path { |project| Houston::Application.routes.url_helpers.edit_project_path(project) }
  ability { |ability, project| ability.can?(:update, project) }
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
houston-core-0.6.0 config/initializers/add_navigation_renderers.rb
houston-core-0.5.6 config/initializers/add_navigation_renderers.rb
houston-core-0.5.5 config/initializers/add_navigation_renderers.rb
houston-core-0.5.4 config/initializers/add_navigation_renderers.rb
houston-core-0.5.3 config/initializers/add_navigation_renderers.rb
houston-core-0.5.2 config/initializers/add_navigation_renderers.rb
houston-core-0.5.1 config/initializers/add_navigation_renderers.rb
houston-core-0.5.0 config/initializers/add_navigation_renderers.rb
houston-core-0.5.0.beta1 config/initializers/add_navigation_renderers.rb