some beautyfication

This commit is contained in:
nek0 2014-09-05 21:00:03 +02:00
parent 55e7cfac0f
commit 4ff66317fa
4 changed files with 28 additions and 18 deletions

View file

@ -12,6 +12,8 @@ getMediumR mediumId = do
ownerId <- return $ mediumOwner medium
owner <- runDB $ getJust ownerId
ownerName <- return $ userName owner
albumId <- return $ mediumAlbum medium
album <- runDB $ getJust albumId
msu <- lookupSession "userId"
presence <- case msu of
Just tempUserId -> do

View file

@ -11,8 +11,10 @@ by <a href=@{UserR ownerName}>#{ownerName}</a>
This album is empty
$else
Images in this album:
$forall (Entity mediumId medium) <- media
<div class="thumbnails">
<a href=@{MediumR mediumId}>
<img src=#{mediumPath medium}><br>
#{mediumTitle medium}
<ul class="media">
<li>
$forall (Entity mediumId medium) <- media
<div class="thumbnails">
<a href=@{MediumR mediumId}>
<img src=#{mediumPath medium}><br>
#{mediumTitle medium}

View file

@ -1,6 +1,6 @@
<h3>#{mediumTitle medium}
by <a href=@{UserR ownerName}>#{ownerName}</a>
by <a href=@{UserR ownerName}>#{ownerName}</a> from album <a href=@{AlbumR albumId}>#{albumTitle album}</a>

View file

@ -4,23 +4,29 @@ $if presence == True
<a href=@{ProfileSettingsR ownerId}>Change your profile settings
$if null userAlbs
This user has no albums yet
<ul class="noalbum">
<li>
This user has no albums yet
$else
Albums of this user:
$forall (Entity albumId album) <- userAlbs
<div class="thumbnails">
<a href=@{AlbumR albumId}>
$if (albumSamplePic album) == Nothing
<img width="200px" src="/static/img/album.jpg"><br>
$else
<img width="200px" src=#{T.pack $ fromJust $ albumSamplePic album}><br>
#{albumTitle album}
<ul class="albums">
<li>
<div class="thumbnails">
<a href=@{AlbumR albumId}>
$if (albumSamplePic album) == Nothing
<img width="200px" src="/static/img/album.jpg"><br>
$else
<img width="200px" src=#{T.pack $ fromJust $ albumSamplePic album}><br>
#{albumTitle album}
$if null recentMedia
This user has not uploaded any images
$else
Newest images:
$forall (Entity mediumId medium) <- take 10 recentMedia
<div class="thumbnails">
<a href=@{MediumR mediumId}>
<img src=#{mediumPath medium}>
<ul class="media">
<li>
$forall (Entity mediumId medium) <- take 10 recentMedia
<div class="thumbnails">
<a href=@{MediumR mediumId}>
<img src=#{mediumPath medium}>