Sha256: 21cc8b788bca0cc4d33f5cbf5f5b2f75fec8d5603bd0deefcf654900ebc86ee6

Contents?: true

Size: 1.26 KB

Versions: 1

Compression:

Stored size: 1.26 KB

Contents

- if @projects.empty?
  .blank_slate
    %p None yet, huh?
    %h1
      Why don't you
      = succeed "?" do
        %a{ :href => "/new" } create your first project
- else
  %ul#projects
    - @projects.each do |project|
      %li{ :class => cycle("even", "odd") + (project.building? ? ' building' : '') + (project.last_build ? (project.last_build.successful? ? ' success' : ' failed') : '') }
        %a{ :href => project_url(project) }&= project.name
        .meta
          - if project.building?
            - last_build = project.last_build
            - short_commit_identifier = last_build ? last_build.short_commit_identifier : "unknown commit"
            - commit_message = last_build ? last_build.commit_message : "unknown commit message"
            - shortened_commit_message = commit_message ? commit_message.slice(0,40) + "..." : "unknown commit message"
            = "Building #{short_commit_identifier} (#{shortened_commit_message}) for #{pretty_time_since(project.started_build_at)}"
          - elsif project.last_build.nil?
            Never built yet
          - else
            = "Built #{project.last_build.short_commit_identifier}"
            = project.last_build.successful? ? "successfully" : "and failed"
  %p#new
    %a{ :href => "/new" } Add a new project

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bantic-integrity-0.1.4.1 views/home.haml