<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

  <title>dtl make result</title>
</head>

<body>
  <h1>dtl make result</h1>

  <erl>
out(Arg) ->
    {ok, Result} = dtl_server:make(),
    Rows = lists:map(fun ({FilePath, ModuleName, Time, Status}) ->
                             {{Year, Month, Day}, {Hour, Min, Sec}} = Time,
                             {tr, [],
                              [{td, [], FilePath},
                               {td, [], atom_to_list(ModuleName)},
                               {td, [], f("~b-~2..0b-~2..0b ~2..0b:~2..0b:~2..0b",
                                          [Year, Month, Day, Hour, Min, Sec])},
                               {td, [], Status}]}
                     end, Result),
    {ehtml,
     {table, [{border, "1"}, {cellpadding, "2"}, {cellspacing, "2"}],
      [{thead, [],
        {tr, [],
         [{th, [], "File path"},
          {th, [], "Module name"},
          {th, [], "Last modified time"},
          {th, [], "Status"}]}},
       {tbody, [], Rows}]}}.
  </erl>
</body>
</html>