Sha256: 0638801cab7be95e2b6026fee318a479b5556287a7e6361f82e21b4c57cbb794

Contents?: true

Size: 1.46 KB

Versions: 4

Compression:

Stored size: 1.46 KB

Contents

<% unless defined?(array)
     hs={}
     hs["name"]=name if defined?(name)
     hs["heads"]=heads if defined?(heads)
     hs["items"]=items if defined?(items)
     array=[]
     array << hs
   end
%>
<tbody>
<% array.each do |x| %>
<%   if x["name"] %>
:colspan="5" class="bh2"><%= x["name"] %>
<%   end %>
<%   if x["heads"] %>
<%     fields = x["heads"].size %>
<%     case fields %>
<%     when 5 %>
:th><%= x["heads"][0] %>
::th><%= x["heads"][1] %>
:::th><%= x["heads"][2] %>
::::th><%= x["heads"][3] %>
:::::th><%= x["heads"][4] %>
<%     when 4 %>
:th><%= x["heads"][0] %>
::th><%= x["heads"][1] %>
:::th><%= x["heads"][2] %>
::::th><%= x["heads"][3] %>
<%     when 3 %>
:th><%= x["heads"][0] %>
::th><%= x["heads"][1] %>
:::th><%= x["heads"][2] %>
<%     when 2 %>
:th><%= x["heads"][0] %>
::th><%= x["heads"][1] %>
<%     when 1 %>
:th><%= x["heads"][0] %>
<%     else %>
<%       # do nothing %>
<%     end %>
<%   end %>
<%   if x["items"] %>
<%      x["items"].each do |y| %>
<%          fields = y.size %>
<%        case fields %>
<%        when 5 %>
:<%= y[0] %>
::<%= y[1] %>
:::<%= y[2] %>
::::<%= y[3] %>
:::::<%= y[4] %>
<%        when 4 %>
:<%= y[0] %>
::<%= y[1] %>
:::<%= y[2] %>
::::<%= y[3] %>
<%        when 3 %>
:<%= y[0] %>
::<%= y[1] %>
:::<%= y[2] %>
<%        when 2 %>
:<%= y[0] %>
::<%= y[1] %>
<%        when 1 %>
: colspan="3" align="right"><%= y[0] %>
<%        else %>
<%          # do nothing %>
<%        end %>
<%      end %>
<%   end %>
<% end %>
</tbody>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
md2site-0.1.6 data/template/5col_no_attr.erb
md2site-0.1.5 data/template/5col_no_attr.erb
md2site-0.1.4 data/template/5col_no_attr.erb
md2site-0.1.2 data/template/5col_no_attr.erb