Sha256: e587c0afa01d86f62ec9e3b9bb3e24a93ad6148ff223fa6f8ed35b8505163a48

Contents?: true

Size: 752 Bytes

Versions: 21

Compression:

Stored size: 752 Bytes

Contents

# -*- coding: utf-8 -*-
#
# @file 
# @brief
# @author ongaeshi
# @date   2013/05/04

module Milkode
  class InfoHome
    attr_reader :record_content
    attr_reader :summary_content

    def initialize(suburl)
      packages       = Database.instance.packages(nil)

      @summary_content = <<EOF
<table class="table-striped table-bordered table-condensed">
  <tr><td>パッケージ数</td><td align="right">#{packages.size}</td></tr>
  <tr><td>ファイル数</td><td align="right">#{Database.instance.totalRecords}</td></tr>
</table>
EOF

      @record_content = packages.map do |name|
        "<dt class='result-file'><img src='#{suburl}/images/info.png'/><a href='#{suburl}/info/#{name}'>#{name}</a></dt>"
      end.join("\n")
    end

  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
milkode-1.8.9.2 lib/milkode/cdweb/lib/info_home.rb
milkode-1.8.9.1 lib/milkode/cdweb/lib/info_home.rb
milkode-1.8.9 lib/milkode/cdweb/lib/info_home.rb
milkode-1.8.8 lib/milkode/cdweb/lib/info_home.rb
milkode-1.8.7 lib/milkode/cdweb/lib/info_home.rb
milkode-1.8.6 lib/milkode/cdweb/lib/info_home.rb
milkode-1.8.5 lib/milkode/cdweb/lib/info_home.rb
milkode-1.8.4 lib/milkode/cdweb/lib/info_home.rb
milkode-1.8.3 lib/milkode/cdweb/lib/info_home.rb
milkode-1.8.2 lib/milkode/cdweb/lib/info_home.rb
milkode-1.8.1 lib/milkode/cdweb/lib/info_home.rb
milkode-1.8.0 lib/milkode/cdweb/lib/info_home.rb
milkode-1.7.1 lib/milkode/cdweb/lib/info_home.rb
milkode-1.7.0 lib/milkode/cdweb/lib/info_home.rb
milkode-1.6.1 lib/milkode/cdweb/lib/info_home.rb
milkode-1.6.0 lib/milkode/cdweb/lib/info_home.rb
milkode-1.5.0 lib/milkode/cdweb/lib/info_home.rb
milkode-1.4.0 lib/milkode/cdweb/lib/info_home.rb
milkode-1.3.0 lib/milkode/cdweb/lib/info_home.rb
milkode-1.2.0 lib/milkode/cdweb/lib/info_home.rb