compass/doc-src/layouts/partials/reference/constants.haml
2010-01-24 01:53:59 -08:00

30 lines
1.2 KiB
Plaintext

- if (constant_defs = constants(@item)).any?
%h2 Constants
- show_description = constant_defs.detect{|d| d.comment } && true
- cycle 'even', 'odd' do |row_classes|
- cycle 'even', 'odd' do |col_classes|
%table.constants{:cellspacing => "0", :cellpadding=>"0", :border => "0"}
%thead
%tr{:class => row_classes.next}
%th{:class => col_classes.next} Constant
%th{:class => col_classes.next} Value
- if show_description
%th{:class => col_classes.next} Description
%th{:class => col_classes.next} Configurable?
- col_classes.reset!
- constant_defs.each do |constant_def|
%tr{:class => row_classes.next}
%td{:class => col_classes.next}
%code= "!"+constant_def.name
%td{:class => col_classes.next}
%code= constant_def.expr.to_sass(:html)
- if show_description
%td{:class => col_classes.next}
- if constant_def.comment
= format_doc constant_def.comment
- else
 
%td{:class => col_classes.next}
%code= constant_def.guarded ? "Y" : "N"
- col_classes.reset!