Sha256: fd0bcd4055743b8eb7832c05d718fb300f8b91c40a49241f4734e966c988a439

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
          - 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"
          - if project.building?
            = "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 #{short_commit_identifier} (#{shortened_commit_message}) "
            = 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.2 views/home.haml