12345678910111213141516171819202122 |
- -module(element_list).
- %%-author('Rusty Klophaus').
- -include_lib("nitro/include/nitro.hrl").
- -export([
- render_element/1
- ]).
- render_element(Record = #list{}) ->
- Tag = case Record#list.numbered of
- true -> <<"ol">>;
- _ -> <<"ul">>
- end,
-
- wf_tags:emit_tag(Tag, nitro:render(Record#list.body), [
- {<<"id">>, Record#list.id},
- {<<"class">>, Record#list.class},
- {<<"style">>, Record#list.style} | Record#list.data_fields
- ]).
|