Commit e2d7b53e authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Correct link to parent class in doc-page.

Removed needless cruft from class properties list:

- Package name can be seen from class name.
- Class name can be clearly seen from heading.
- Defined in is currently not implemented.
parent 8134f676
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -35,14 +35,15 @@ module JsDuck
    def abstract
      [
       "<table cellspacing='0'>",
       abstract_row("Package:", @cls.package_name),
       abstract_row("Defined In:", "sample.js"),
       abstract_row("Class:", "<a href='source/sample.html#cls-#{@cls.full_name}'>#{@cls.short_name}</a>"),
       abstract_row("Extends:", @cls[:extends] || "Object"),
        abstract_row("Extends:", @cls.parent ? class_link(@cls.parent.full_name) : "Object"),
       "</table>",
      ].join("\n")
    end

    def class_link(name)
      "<a href='output/#{name}.html' ext:cls='#{name}'>#{name}</a>"
    end

    def abstract_row(label, info)
      "<tr><td class='label'>#{label}</td><td class='hd-info'>#{info}</td></tr>"
    end