"""
if lychee.publicMode is false
if data.star is '1' then html += ""
if data.public is '1' then html += ""
if data.unsorted is '1' then html += ""
if data.recent is '1' then html += ""
html += "
"
return html
build.photo = (data) ->
return '' if not data?
title = data.title
longTitle = ''
if title? and title.length > 18
title = data.title.substr(0, 18) + '...'
longTitle = data.title
html = """
"
if data.star is '1' then html += ""
if lychee.publicMode is false and data.public is '1' and album.json.public isnt '1' then html += ""
html += "
"
return html
build.imageview = (data, size, visibleControls) ->
return '' if not data?
html = """
"""
if size is 'big'
if visibleControls is true
html += ""
else
html += ""
else if size is 'medium'
if visibleControls is true
html += ""
else
html += ""
else if size is 'small'
if visibleControls is true
html += ""
else
html += ""
return html
build.no_content = (typ) ->
html = """
"""
switch typ
when 'search' then html += "
No results
"
when 'share' then html += "
No public albums
"
when 'cog' then html += "
No configuration
"
html += "
"
return html
build.modal = (title, text, button, marginTop, closeButton) ->
if marginTop? then custom_style = "style='margin-top: #{ marginTop }px;'"
else custom_style = ''
html = """
#{ title }
"""
if closeButton isnt false then html += ""
html += "
#{ text }
"
$.each button, (index) ->
if this[0] isnt ''
if index is 0 then html += "#{ this[0] }"
else html += "#{ this[0] }"
html += """
"""
return html
build.tags = (tags, forView) ->
html = ''
if forView is true or lychee.publicMode is true then editTagsHTML = ''
else editTagsHTML = ' ' + build.editIcon('edit_tags')
if tags isnt ''
tags = tags.split ','
tags.forEach (tag, index, array) ->
html += "#{ tag }"
html += editTagsHTML
else
html = "
No Tags#{ editTagsHTML }
"
return html
build.infoboxPhoto = (data, forView) ->
html = """