diff options
Diffstat (limited to 'app/views/common/_table.html.haml')
-rw-r--r-- | app/views/common/_table.html.haml | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/app/views/common/_table.html.haml b/app/views/common/_table.html.haml new file mode 100644 index 0000000..3c6bf2e --- /dev/null +++ b/app/views/common/_table.html.haml @@ -0,0 +1,18 @@ +-# +-# A simple table with headers, content and a message if there is no +-# content. +-# You can use the table helper method to translate the headers and +-# error message. +-# +%table.table.table-striped.table-bordered + %thead + %tr + - headers.each do |header| + %th= header + %tbody + - if content.any? + = render content.all + - else + %tr + %td{:colspan=>headers.count}= none + |