Skip to content

Commit

Permalink
Separate out view hamlet.
Browse files Browse the repository at this point in the history
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
  • Loading branch information
ezyang committed Nov 19, 2012
1 parent 103f777 commit 7179f08
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
14 changes: 1 addition & 13 deletions backend/Handler/Home.hs
Expand Up @@ -67,19 +67,7 @@ getViewR hash = do
annotMap = IntMap.fromAscListWith (++) (map sliceAnnot annotations)
let html = do
setTitle . toHtml $ profileTitle profile
[whamlet|
<h1>
<a href=@{HomeR}>
\#{profileTitle profile}
<div>
<code>#{profileJob profile}</code>
<div>
\#{format (profileRunTime profile)} (uploaded #{format (profileUploadTime profile)});
<a href=@{lpath}>download .hp</a>
<div>
\#{profileDescription profile} (<a href=@{EditR hash}>Edit</a>)
<iframe width="100%" height="600px" frameborder="0" src=#{showreel} />
|]
$(widgetFile "view")
pdata = loadProfile hash
buildSeries (cid, samples) = object [ "cid" .= cid
, "values" .= array (map makePoint (insertMissing samples timetable))
Expand Down
11 changes: 11 additions & 0 deletions backend/templates/view.hamlet
@@ -0,0 +1,11 @@
<h1>
<a href=@{HomeR}>
#{profileTitle profile}
<div>
<code>#{profileJob profile}</code>
<div>
#{format (profileRunTime profile)} (uploaded #{format (profileUploadTime profile)});
<a href=@{lpath}>download .hp</a>
<div>
#{profileDescription profile} (<a href=@{EditR hash}>Edit</a>)
<iframe width="100%" height="600px" frameborder="0" src=#{showreel} />

0 comments on commit 7179f08

Please sign in to comment.