We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 50c5596f authored by Matt Lee's avatar Matt Lee

fixes

parent 030a7931
{include file='header.tpl'}
<h2 property="dc:title">{t}Profile deleted{/t}</h2>
<div class="alert alert-danger">
<p>{t}Your account has been deleted.{/t}</p>
</div>
{include file='footer.tpl'}
{include file='header.tpl'}
{if isset($errors)}
<div id="errors">
{section loop=$errors name=error}
<div class="alert alert-danger">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
<p>{$errors[error]}</p>
</div>
{/section}
</div>
{/if}
<div about="{$id}" typeof="mo:Record" class="haudio">
<div class="vcard">
<form action='' method='post'>
<div class="form-group">
<label for='name'>{t}Album Name{/t}</label>
<input class="form-control" type='text' name='name'
id='name' {if $edit}disabled{/if} value='{$name|escape:'htmlall'}' />
<p class="help-block">{t}The name of the album{/t}</p>
</div>
<div class="form-group">
<label for='image'>{t}Cover Image{/t}</label>
<input class="form-control" type='text' name='image'
id='image' value='{$image|escape:'htmlall'}' />
<p class="help-block">
{t}Address linking to the album's cover image{/t}
</p>
</div>
{if $edit}
<button class="btn btn-primary" type='submit' name='submit' value='{t}Edit Album{/t}'>
{t}Edit Album{/t}
</button>
{else}
<button class="btn btn-primary" type='submit' name='submit' value='{t}Create Album{/t}'>
{t}Create Album{/t}
</button>
{/if}
</form>
</div>
</div>
{include file='footer.tpl'}
<div id="album-header">
<div class="row">
<div class="col-sm-2">
<img class="img-responsive"
{if $album->image}src="{$album->image}"{else}src="{$img_url}/qm160.png"{/if}
alt="[ Album Image ]" />
</div>
<div class="col-sm-10">
<h2>
{$album->name}
</h2>
<p>by <a href="{$artist->getURL()}">{$artist->name}</a></p>
{if $album->releasedate}
<p>Released on {$album->releasedate|date_format:"%Y-%m-%d"}</p>
{/if}
</div>
</div>
<div class="margin-top">
{include file='submenu.tpl'}
</div>
</div>
<br />
{include file='header.tpl' subheader='album-header.tpl'}
<br/><br/>
<h4>Tracks</h4>
{artisttracks artist=$album->artist_name album=$album->name}
{include file='tracklist.tpl' class=#table# items=$artisttracks fstream=true}
{if $add_track_link}<a href='{$add_track_link}'><strong>{t}Add new track{/t}</strong></a>{/if}
{* Hack to get an album player for now, $album->isStreamable() would be better *}
{if $artisttracks[0].streamable}
{$streamable = true}
{$album_station = "librefm://artist/{$album->artist_name}/album/{$album->name}"}
{/if}
{include file='footer.tpl' sideplayer=true station=$album_station}
{* ------------------
albumlist.tpl
------------------
Dynamic smarty template intended to be used on any page with a list of albums.
@param array items Array of albums ((artist, album, streamable, image, artistlibraryurl, albumlibraryurl, artisturl, albumurl, tagged, tag, freq) .. )
@param string class Additional CSS table classes
@param bool thead Show table header
@param bool fstream Show streamable field, used by $i.streamable
@param bool fartist Show artist in name field, used by $i.artist
@param bool fimage Show image field, used by $i.image
@param bool fbutton Show button field, used by button if page is owned by user
@param bool fcount Show count field, used by $i.freq)
@param string url_sort_name URL string to toggle sort order by name
@param string url_sort_count URL string to toggle sort order by count
@param string type Type of list, 'tagged' (used to show correct button)
*}
<table class="{$class} albumlist">
{if $thead}
<thead><tr>
{if $fstream}
<th class="icon"></th>
{/if}
{if $fimage}
<th></th>
{/if}
<th class="title">Title</th>
{if $fbutton}
<th class="buttons"></th>
{/if}
{if $fcount}
<th class="count">Plays</th>
{/if}
</thead>
{/if}
{foreach from=$items item=i}
<tr>
{if $fstream}
{if $i.streamable}
<td class="icon" title="Album has streamable tracks">
<span class="glyphicon glyphicon-music"></span>
</td>
{else}
<td class="icon">
</td>
{/if}
{/if}
{if $fimage && $i.image}
<td class="image"><img src="{$i.image}" alt="[ Album Image ]"/></td>
{elseif $fimage}
<td class="image"></td>
{/if}
<td class="name">
{if $i.albumlibraryurl}
<a href="{$i.albumlibraryurl|escape:'html'}">{$i.album}</a>
{else}
<a href="{$i.albumurl|escape:'html'}">{$i.album}</a>
{/if}
{if $fartist} by
{if $i.artistlibraryurl}
<a href="{$i.artistlibraryurl|escape:'html'}">{$i.artist}</a>
{else}
<a href="{$i.artisturl|escape:'html'}">{$i.artist}</a>
{/if}
{/if}
</td>
{if $fbutton}
<td class="buttons">
{if $page->ownedbyme}
{if $type == 'tagged'}
<form method='post' action=''><input type=hidden name='removeartist' value="{$i.artist}" /><input type=hidden name='removealbum' value="{$i.album}" /><input type=hidden name='removetag' value="{$i.tag}" /><button name='albumremovetag' type='submit'>remove</button></form>
{/if}
{/if}
</td>
{/if}
{if $fcount}
<td class="count"><span>{$i.freq}</span></td>
{/if}
{if $ftime}
<td class="time"><span>{$i.timehuman}</span></td>
{/if}
</tr>
{/foreach}
</table>
<div id="artist-header">
<div class="row">
<div class="col-sm-2">
<img class="img-responsive" {if $artist->image_medium}src="{$artist->image_medium}"{else}src="{$img_url}qm160.png"{/if}
alt= "[ {$artist->name} photo ]"/>
</div>
<div class="col-sm-10">
<h1>{$artist->name}
</h1>
{if $artist->getListenerCount()}
<p>
<span class="label label-primary">
<span class="glyphicon glyphicon-headphones"></span>
{$artist->getListenerCount()} listeners</span>
</p>
{/if}
{if $artist->homepage}
<p><a href="{$artist->homepage}">{$artist->homepage}</a></p>
{/if}
</div>
</div>
<div class="margin-top">
{include file='submenu.tpl'}
</div>
</div>
<br/>
{include file='header.tpl'}
{if isset($errors)}
<div id="errors">
{section loop=$errors name=error}
<p>{$errors[error]}</p>
{/section}
</div>
{/if}
<div about="{$id}" typeof="mo:MusicArtist">
<div class="vcard">
<form action='' method='post'>
<div class="form-group">
<label for='homepage'>Home Page</label>
<input class="form-control" type='text' name='homepage' id='homepage' value='{$homepage|escape:'htmlall'}' />
<p class="help-block">A link to the {$name|escape:'htmlall'}'s website.</p>
</div>
<div class="form-group">
<label for='bio_summary'>Short Biography</label>
<textarea class="form-control" name='bio_summary' id='bio_summary'>{$bio_summary|escape:'html':'UTF-8'}</textarea>
<p class="help-block">Provide a short summary of {$name|escape:'htmlall'}'s biography.</p>
</div>
<div class="form-group">
<label for='bio_content'>Full Biography</label>
<textarea class="form-control" name='bio_content' id='bio_content'>{$bio_content|escape:'html':'UTF-8'}</textarea>
<p class="help-block">Provide a more detailed biography of {$name|escape:'htmlall'}.</p>
</div>
<div class="form-group">
<label for='image'>Image</label>
<input class="form-control" type='text' name='image' id='image' value='{$image|escape:'htmlall'}' />
<p class="help-block">Provide a link to an image of {$name|escape:'htmlall'}, this should be no larger than 256x256 pixels. If you need somewhere to upload your image we recommend <a href='http://imgur.com'>Imgur</a>, <a href='http://www.flickr.com'>Flickr</a> or <a href='http://www.archive.org'>Archive.org</a>.
</p>
</div>
<div class="form-group">
<label for='flattr_uid'>Flattr Username</label>
<input class="form-control" type='text' name='flattr_uid' id='flattr_uid' value='{$flattr_uid|escape:'htmlall'}' />
<p class="help-block">If you have a <a href='http://flattr.com'>flattr account</a> simply enter your flattr username and we'll automatically put flattr buttons on your artist and track pages. This way your fans will be able to show their appreciation with the occasional tip.</p>
</div>
<button class="btn btn-primary btn-block" type='submit' name='submit' value='Update' >Update</button>
</form>
</div>
<ul>
{section name=i loop=$albums}
{if $albums[i]->name}
<li about="{$albums[i]->id}" property="dc:title" content="{$albums[i]->name|escape:'html':'UTF-8'}" typeof="mo:Record" class="haudio">
<a rel="foaf:page" href="{$albums[i]->getURL()}">{$albums[i]->name|escape:'html':'UTF-8'}</a>
</li>
{/if}
{/section}
</ul>
<br />
</div>
{include file='footer.tpl'}
{include file='header.tpl'}
{if ($logged_in)}
{if $creating}
{if $already_exists}
{if !empty($managers)}
{t}We already have an artist by that name and they're already managed by:{/t}
<ul>
{section name=i loop=$managers}
<li><a href='{$managers[i]->getURL()}'>{$managers[i]->name}</a></li>
{/section}
</ul>
<p>{t escape=no}If you believe these users shouldn't be managing this artist please <a href='https://git.gnu.io/foocorp/librefm/issues/new'>raise a support ticket in our bug tracker</a> and we'll check in to it.{/t}</p>
<p>{t escape=no}Otherwise please <a href='{$base_url}/artist-signup.php'>try again</a> with a new artist name.{/t}</p>
{else}
<p>{t escape=no artisturl=$artist->getURL()}We already have an artist by that name, but they're currently not being managed by anyone. Does <a href='%1' target='_blank'>this</a> look like you?{/t}</p>
<form method='post' action=''>
<input type='hidden' value='{$artist->name}' name='artist_name' />
<button class="btn btn-primary" type='submit' value="{t}Yes, that's me!{/t}" name='confirm_artist' />
{t}Yes, that's me!{/t}
</button>
<button class="btn btn-primary" type='submit' value="{t}No, that's not me.{/t}" name='reject_artist' />
{t}No, that's not me.{/t}
</button>
</form>
{/if}
{/if}
{elseif $created}
<p>{t escape=no managementurl=$artist->getManagementURL()}Awesome, you're all ready to start sharing your music! To get started head over to your <a href='%1'>artist management page</a> and start filling in a few details about yourself.{/t}</p>
{elseif $too_popular}
<p>{t escape=no}Wow, you're pretty popular! To make sure you're really associated with this band we're going to have to do some extra checks before enabling your artist account. If you're on Jamendo we'll typically send you a message there to check, otherwise we'll try to send an e-mail to the address on your band's website. Once that's all sorted we'll send you an e-mail letting you know that your account is ready for you!{/t}</p>
{else}
{if $reject_artist}
<p class="text-center"><strong>{t}Sorry, in that case you'll have to pick a new name.{/t}</strong></p>
{/if}
<form method='post' action=''>
<div class="form-group">
<label for="artist_name">
{t}Artist name:{/t}
</label>
<input class="form-control" type='text' name='artist_name' id='artist_name' />
<p class="help-block">
{t}To start off just let us know the name that you like to perform under:{/t}
</p>
</div>
<button class="btn btn-primary" type="submit" value="{t}Create artist account{/t}">
{t}Create artist account{/t}
</button>
</form>
{/if}
{else}
<p>{t site=$site_name escape=no}Before creating an artist account you first need to <a href='{$base_url}/register.php'>register</a> or <a href='{$base_url}/login.php'>log in</a> with a normal %1 account.{/t}</p>
{/if}
{include file='footer.tpl'}
{include file='header.tpl' subheader='artist-header.tpl'}
<div about="{$id}" typeof="mo:MusicArtist">
{if !empty($tagcloud)}
<h3 style='text-align: center; clear: left;'>{t}Popular tags other people used to describe this artist{/t}</h3>
<ul class="tagcloud">
{section name=i loop=$tagcloud}
<li style='font-size:{$tagcloud[i].size}'><a href='{$tagcloud[i].pageurl}' title='{t uses=$tagcloud[i].count}This tag was used %1 times{/t}' rel='tag'>{$tagcloud[i].name}</a></li>
{/section}
</ul>
{/if}
{if !empty($mytags)}
<h3 style='text-align: center; clear: left;'>{t}Tags you've used for this artist{/t}</h3>
<ul class="tagcloud">
{section name=i loop=$mytags}
<li>{$mytags[i].tag}</li>
{/section}
</ul>
{/if}
<br />
<div class="row">
<div class="col-sm-8">
<form action='' method='post'>
<div class="form-group">
<label for='tags'>{t}Add tags:{/t}</label>
<div class="input-group">
<input class="form-control" type='text' name='tags' id='tags'
placeholder="guitar, violin, female vocals, piano" />
<span class="input-group-btn">
<button class="btn btn-default" type='submit' name='tag' id='tag' value='tag'>
{t}Tag{/t}
</button>
</span>
</div>
</div>
</form>
</div>
</div>
</div>
{include file='footer.tpl'}
<h4>{t}Albums{/t}</h4>
{artistalbums artist=$artist->name}
{include file='albumlist.tpl' class=#table# items=$artistalbums fimage=true fstream=true ftime=true}
{if $add_album_link}<a href='{$add_album_link}'><strong>{t}Add new album{/t}</strong></a>{/if}
<h4>{t}Tracks{/t}</h4>
{artisttracks artist=$artist->name}
{include file='tracklist.tpl' class=#table# items=$artisttracks fimage=true fstream=true}
{include file='header.tpl' subheader='artist-header.tpl'}
{if $flattr_uid}
{include file='flattr.tpl'}
{/if}
<div about="{$id}" typeof="mo:MusicArtist">
<div class="vcard">
{* We load player in sidebar instead, see footer include at bottom of file
{if $streamable}
<div id='player-container'>
{include file='player.tpl'}
</div>
{/if}
*}
{if $bio_summary}
<div class="note" id="bio" property="bio:olb" datatype="" style='clear: left;'>
<h4>{t}Biography{/t}</h4>
<p>{$bio_summary}</p>
{if $bio_content}
<p id='bio_content'>{$bio_content}</p>
{/if}
</div>
{/if}
</div>
{include file='flattr-artist-button.tpl'}
<h3>{t}Albums{/t}</h3>
<ul>
{section name=i loop=$albums}
{if $albums[i]->name}
<li about="{$albums[i]->id}" property="dc:title" content="{$albums[i]->name|escape:'html':'UTF-8'}" typeof="mo:Record" class="haudio">
<a rel="foaf:page" href="{$albums[i]->getURL()}">{$albums[i]->name|escape:'html':'UTF-8'}</a>
</li>{/if}
{/section}
{if $add_album_link}<li><a href='{$add_album_link}'><strong>[{t}Add new album{/t}]</strong></a></li>{/if}
</ul>
<br />
{if !empty($similarArtists)}
<h3 style='text-align: center; clear: left;'>{t}Similar free artists{/t}</h3>
<ul class="tagcloud">
{section name=i loop=$similarArtists}
<li style='font-size:{$similarArtists[i].size}'><a href='{$similarArtists[i].url}'>{$similarArtists[i].artist}</a></li>
{/section}
</ul>
{/if}
<br />
{if !empty($tagcloud)}
<h3 style='text-align: center; clear: left;'>{t}Tags used to describe this artist{/t}</h3>
<ul class="tagcloud">
{section name=i loop=$tagcloud}
<li style='font-size:{$tagcloud[i].size}'><a href='{$tagcloud[i].pageurl}' title='{t uses=$tagcloud[i].count}This tag was used %1 times{/t}' rel='tag'>{$tagcloud[i].name}</a></li>
{/section}
</ul>
{/if}
<br />
</div>
{include file='footer.tpl' sideplayer=true}
{* ------------------
artistlist.tpl
------------------
Dynamic smarty template intended to be used on any page with a list of artists.
@param array items Array of artists ((artist, streamable, image, artistlibraryurl, artisturl, tagged, tag, freq, time) .. )
@param string class Additional CSS table classes
@param bool thead Show table header
@param bool fstream Show streamable field, used by $i.streamable
@param bool fimage Show image field, used by $i.image
@param bool ftag Show tag field, used by $i.tag
@param bool fbutton Show button field, used by button if list is owned by user
@param bool fcount Show count field, used by $i.freq)
@param boot ftime Show timestamp field, used by $i.time)
@param string type Type of list, 'tagged' (used to show correct button)
*}
<table class="{$class} artistlist">
{if $thead}
<thead><tr>
{if $fstream}
<th></th>
{/if}
{if $fimage}
<th></th>
{/if}
<th class="title"><a href="{$page->urls.sort_name}">Title</a></th>
{if $ftag}
<th></th>
{/if}
{if $fbutton}
<th></th>
{/if}
{if $fcount}
<th><a href="{$page->urls.sort_count}">Plays</a></th>
{/if}
{if $ftime}
<th></th>
{/if}
</tr></thead>
{/if}
{foreach from=$items item=i}
<tr>
{if $fstream}
{if $i.streamable}
<td class="icon" title="Artist has streamable tracks">
<span class="glyphicon glyphicon-music">
</span>
</td>
{else}
<td>
</td>
{/if}
{/if}
{if $fimage}
<td class="image">
<img class="img-responsive" src="{$i.image}" alt="[ Artist Image ]"/>
</td>
{/if}
<td class="name">
{if $i.artistlibraryurl}
<a href="{$i.artistlibraryurl}">{$i.artist}</a>
</td>
{else}
<a href="{$i.artisturl}">{$i.artist}</a>
</td>
{/if}
{if $ftag}
{if $i.tagged}
<td class="icon" title="{$page->user->name} has tagged this artist">
<span class="glyphicon glyphicon-tag"></span>
</td>
{else}
<td class="icon">
</td>
{/if}
{/if}
{if $fbutton}
<td class="buttons">
{if $page->ownedbyme}
{if $type == 'tagged'}
<form method='post' action=''>
<input type=hidden name='removeartist' value="{$i.artist}" />
<input type=hidden name='removetag' value="{$i.tag}" />
<button class="btn btn-danger btn-xs"
name='artistremovetag' type='submit'>
remove
</button>
</form>
{/if}
{/if}
</td>
{/if}
{if $fcount}
<td class="count">
<span>{$i.freq}</span>
</td>
{/if}