<div id='jobqueue-jobs' class='setuptab'>
<%
var myth = new Myth();
var sList;
var rowNum = 0;

function printJobRow(title, descKey, cmdKey) {
    var altText = "";

    if ((rowNum%2) == 1)
        altText = " class='alt'";

    os.writeln("<tr" + altText + "><td>" + sList.Settings[descKey] + "</td><td><input type=button onClick='javascript:editJob(\"" + title + "\", \"" + descKey + "\", \"" + cmdKey + "\")' value='<i18n>Edit</i18n>'></td></tr>");

    rowNum++;
}

%>

<!-- Eventually after the JobQueue reorg, we'll be able to do this:
<a href='javascript:createNewJob()'>Create New Job</a><br>
-->
<table width="100%">
<thead class='ui-widget-header'>
<tr><th><i18n>Description</i18n></th><th><i18n>Actions</i18n></th></tr>
</thead>
<tr><td><i18n>Transcoding</i18n></td><td><input type=button onClick='javascript:editJob("<i18n>Transcoder</i18n>", "", "JobQueueTranscodeCommand")' value='<i18n>Edit</i18n>'></td></tr>
<tr class='alt'><td><i18n>Commercial Flagging</i18n></td><td><input type=button onClick='javascript:editJob("<i18n>Commercial Flagger</i18n>", "", "JobQueueCommFlagCommand")' value='<i18n>Edit</i18n>'></td></tr>
<%
    if (myth.GetSetting("", "UserJobDesc1", "") != "")
        printJobRow(formatStr(qsTr("User Job #%1"), 1), "UserJobDesc1", "UserJob1");

    if (myth.GetSetting("", "UserJobDesc2", "") != "")
        printJobRow(formatStr(qsTr("User Job #%1"), 2), "UserJobDesc2", "UserJob2");

    if (myth.GetSetting("", "UserJobDesc3", "") != "")
        printJobRow(formatStr(qsTr("User Job #%1"), 3), "UserJobDesc3", "UserJob3");

    if (myth.GetSetting("", "UserJobDesc4", "") != "")
        printJobRow(formatStr(qsTr("User Job #%1"), 4), "UserJobDesc4", "UserJob4");
%>
</table>
</div>
