<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:t="http://www.participatorypolitics.org/"
      xmlns:i18n="http://www.participatoryculture.org/i18n"
      eventCookie="@@@eventCookie@@@" dtvPlatform="@@@dtvPlatform@@@">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />

<link href="resource:css/main.css" rel="stylesheet" type="text/css" />
<t:include filename="dynamic.js" />
<t:include filename="settings.js" />
</head>
    <t:execOnLoad><![CDATA[
feed = app.controller.currentSelectedTab.obj
]]></t:execOnLoad>

<body>

<!-- TITLE BAR ************************************************************ -->
<div id="main-titlebar">
	<div id="main-titlebar-avatar"><img src="***feed.getThumbnail()***" alt="" /></div>
	<div id="main-titlebar-channelname">
		<h1 t:replaceMarkup="feed.getTitle()" />
		<div id="main-titlebar-autodownload">
			<form name="setAuto">
				<input type="hidden" name="feed" value="@@@feed.getID()@@@" />
				<input type="checkbox" name="automatic" t:hideIf="not feed.isAutoDownloadable()" value="1" checked="checked" onClick="javascript:setAutoDownloadableFeed()" />
				<input type="checkbox" name="automatic" t:hideIf="feed.isAutoDownloadable()" value="1" onClick="javascript:setAutoDownloadableFeed()" />
				<span class="auto_link" i18n:translate="">Auto Download</span>
			</form>
		</div>
	</div>
	<div id="main-titlebar-tasks">
		<div id="main-titlebar-tasks-settings">
			<p><a href="#" onclick="eventURL('template:feed-settings');">Settings</a></p>
		</div>
		<div id="main-titlebar-tasks-recommend">
		    <p><a onclick="document.location = 'mailto:?subject=@@@feed.getTitle()@@@&amp;body=%0D%0A%0D%0AYou should check out the Internet TV channel &quot;@@@feed.getTitle()@@@&quot;. If you don\'t have the Democracy Player, you can get it here:%0D%0A%0D%0Ahttp://www.getdemocracy.com/%0D%0A%0D%0AAnd then subscribe to this channel:%0D%0A%0D%0A@@@feed.getURL()@@@" class="recommend_link'; return false;" i18n:translate="">Recommend</a></p>
		</div>
		<div id="main-titlebar-tasks-search">
		    <input type="search" placeholder="Search Channel" class="main-titlebar-tasks-search" disabled="1" />
		</div>
	</div>
</div>
<!-- / TITLE BAR -->

<div id="main-container">

<form action="action:changeFeedSettings" method="GET" name="settings">
	<input name="feed" type="hidden" value="@@@feed.getID()@@@" />
	
	<div class="main-content" style="text-align:center; margin-left:-40px;">
		<h3><a onclick="eventURL('template:channel');" href="#" 
i18n:translate="">Back to Channel</a></h3>
	</div>

	<div id="main-channelbar" class="main-channelbar">
		<h1 i18n:translate="">Channel Settings</h1>
	</div>

	<div style="margin:20px 10px;">
		<span style="display:inline; width:150px;" i18n:translate="">
			Videos expire after:
		</span>
		<select name="expireAfter" onChange="javascript:setExpiration();">
			<option value="system" selected="1" 
t:hideIf="feed.getExpirationType() != 'system'"><span i18n:translate="">Default</span> 
(<span t:replace="feed.getFormattedDefaultExpiration()" />)</option>
			<option value="system" t:hideIf="feed.getExpirationType() == 
'system'"><span i18n:translate="">Default</span> (<span i18n:name="expiration"
t:replace="feed.getFormattedDefaultExpiration()" />)</option>
			<option value="3" selected="1" t:hideIf="feed.getExpirationTime() 
!= 3" i18n:translate="">3 hours</option>
			<option value="3" t:hideIf="feed.getExpirationTime() == 3" 
i18n:translate="">3 hours</option>
			<option value="24" selected="1" 
t:hideIf="feed.getExpirationTime() != 24" i18n:translate="">1 day</option>
			<option value="24" t:hideIf="feed.getExpirationTime() == 24" 
i18n:translate="">1 day</option>
			<option value="72" selected="1" 
t:hideIf="feed.getExpirationTime() != 72" i18n:translate="">3 days</option>
			<option value="72" t:hideIf="feed.getExpirationTime() == 72" 
i18n:translate="">3 days</option>
			<option value="144" selected="1" 
t:hideIf="feed.getExpirationTime() != 144" i18n:translate="">6 days</option>
			<option value="144" t:hideIf="feed.getExpirationTime() == 144" 
i18n:translate="">6 days</option>
			<option value="240" selected="1" 
t:hideIf="feed.getExpirationTime() != 240" i18n:translate="">10 days</option>
			<option value="240" t:hideIf="feed.getExpirationTime() == 240" 
i18n:translate="" >10 days</option>
			<option value="720" selected="1" 
t:hideIf="feed.getExpirationTime() != 720" i18n:translate="">1 month</option>
			<option value="720" t:hideIf="feed.getExpirationTime() == 720" 
i18n:translate="">1 month</option>
			<option value="never" selected="1" 
t:hideIf="feed.getExpirationType() != 'never'" i18n:translate="">Never</option>
			<option value="never" t:hideIf="feed.getExpirationType() == 
'never'" i18n:translate="">Never</option>
		</select>
	</div>
	<div style="margin:0px 10px 20px 10px;">
		<span style="width:150px;" i18n:translate="">
			Auto download should:
		</span>
		<select name="autoDownloadGets" onChange="javascript:setAutoDownloadGets();">
			<option t:hideIf="feed.getEverything" selected="1" value="False" 
i18n:translate="" >Download new videos only</option>
			<option t:hideIf="not feed.getEverything" value="False" 
i18n:translate="">Download new videos only</option>
			<option t:hideIf="not feed.getEverything" value="True" 
selected="1" i18n:translate="">Download all videos</option>
			<option t:hideIf="feed.getEverything" value="True" 
i18n:translate="">Download all videos</option>
		</select>
	</div>

	<div style="margin:0px 10px;">
		<input type="checkbox" name="maxOutDownloads" onClick="javascript:setMaxNew();" checked="checked" t:hideIf="feed.getMaxNew() == 'unlimited'" />
		<input type="checkbox" name="maxOutDownloads" onClick="javascript:setMaxNew();" t:hideIf="feed.getMaxNew() != 'unlimited'"/>
		<span i18n:translate="">If I have
		<input i18n:name="maxnew" name="maxNew" type="text" size="4" value="0" disabled="1" onBlur="javascript:setMaxNew();" t:hideIf="feed.getMaxNew() != 'unlimited'"/>
		<input i18n:name="maxnew2" name="maxNew" type="text" size="4" value="@@@feed.getMaxNew()@@@" onBlur="javascript:setMaxNew();" t:hideIf="feed.getMaxNew() == 'unlimited'"/>
		videos waiting, don't auto download more.</span><br />
		<span style="font-size:90%; color:#666666; margin-left: 25px" 
i18n:translate="">(Keeps channel from hogging disk space)</span>
	</div>

    <div style="position: absolute; bottom:0%; margin:0px 10px 10px 10px;">
        <span i18n:translate="">Channel URL</span>: <span t:replace="feed.getURL()" 
class="selectable" />
    </div>

</form>
	
</div>

</body>
</html>
