Commit 3fe21cc2 authored by Florent Didier's avatar Florent Didier
Browse files

[dev] mw_utils.rb: add generate_hash_table method

parent fa8dbd1e
......@@ -147,6 +147,17 @@ module MW
return table_text
end
def self.generate_hash_table(hash)
format = " valign=\"top\" style=\"background-color: #f9f9f9; padding: 0px 10px 0px 3px;\" "
table = [MW::TABLE_START, MW::TABLE_ROW]
hash.each { |k, v|
table << MW::TABLE_CELL + format + MW::TABLE_CELL + "'''#{k}:'''"
table << MW::TABLE_CELL + " #{v}<br/>"
table << MW::TABLE_ROW
}
(table << MW::TABLE_END).join(MW::LINE_FEED)
end
def self.small(text)
"<small>" + text + "</small>"
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment