Commit 9f09e96b authored by echel0n's avatar echel0n
Browse files

Refactored preview rename view CSS

parent e39068a6
# Changelog
- * 4fa3564 - 2018-07-27: Pre-Release v9.3.56.dev5
- * 5913920 - 2018-07-27: Refactored preview rename view CSS
- * e39068a - 2018-07-27: Pre-Release v9.3.56.dev5
- * 169b960 - 2018-07-27: Refactored list group in subtitles config view
- * 1867aaf - 2018-07-27: Fixed provider view list items
- * 1243962 - 2018-07-27: Fixed file browser modal
......
......@@ -60,7 +60,7 @@ class UPNPClient(threading.Thread):
self.add_nat_portmap()
def add_nat_portmap(self):
sickrage.app.log.debug("Adding SiCKRAGE UPNP portmap...")
#sickrage.app.log.debug("Adding SiCKRAGE UPNP portmap...")
try:
upnp_dev = self._discover_upnp_device()
......@@ -97,10 +97,10 @@ class UPNPClient(threading.Thread):
NewLeaseDuration=self._nat_portmap_lifetime,
)
sickrage.app.log.debug("UPnP port forwarding successfully added")
#sickrage.app.log.debug("UPnP port forwarding successfully added")
def delete_nat_portmap(self):
sickrage.app.log.debug("Deleting SiCKRAGE UPNP portmap...")
#sickrage.app.log.debug("Deleting SiCKRAGE UPNP portmap...")
upnp_dev = self._discover_upnp_device()
if upnp_dev is None:
......@@ -120,7 +120,7 @@ class UPNPClient(threading.Thread):
NewProtocol=protocol,
)
sickrage.app.log.debug("UPnP port forwarding successfully deleted")
#sickrage.app.log.debug("UPnP port forwarding successfully deleted")
def _discover_upnp_device(self):
devices = upnpclient.discover()
......
......@@ -11,94 +11,130 @@
from sickrage.core.updaters import tz_updater
%>
<%block name="content">
<input type="hidden" id="showID" value="${show.indexerid}"/>
<h3>${_('Preview of the proposed name changes')}</h3>
<blockquote>
% if int(show.air_by_date) == 1 and sickrage.app.config.naming_custom_abd:
${sickrage.app.config.naming_abd_pattern}
% elif int(show.sports) == 1 and sickrage.app.config.naming_custom_sports:
${sickrage.app.config.naming_sports_pattern}
% else:
${sickrage.app.config.naming_pattern}
% endif
</blockquote>
<div class="row">
<div class="col-md-8 mx-auto">
<div class="card mt-3 mb-3">
<div class="card-header">
<h3>${title}</h3>
</div>
<div class="card-body">
<input type="hidden" id="showID" value="${show.indexerid}"/>
<% curSeason = -1 %>
<% odd = False%>
<div class="row">
<div class="col mx-auto">
<table id="SelectAllTable" class="table" cellspacing="1" border="0" cellpadding="0">
<thead>
<tr class="seasonheader" id="season-all">
<td colspan="4">
<h2>${_('All Seasons')}</h2>
</td>
</tr>
<tr class="seasoncols" id="selectall">
<th class="col-checkbox">
<input type="checkbox" class="seriesCheck" id="SelectAll"/>
</th>
<th align="left" valign="top" class="text-nowrap">${_('Select All')}</th>
<th width="100%" class="col-name d-none"></th>
</tr>
</thead>
</table>
<div class="card mb-3">
<div class="card-body">
<h3>${_('Preview of the proposed name changes')}</h3>
<blockquote>
% if int(show.air_by_date) == 1 and sickrage.app.config.naming_custom_abd:
${sickrage.app.config.naming_abd_pattern}
% elif int(show.sports) == 1 and sickrage.app.config.naming_custom_sports:
${sickrage.app.config.naming_sports_pattern}
% else:
${sickrage.app.config.naming_pattern}
% endif
</blockquote>
</div>
</div>
</div>
</div>
<br>
<% curSeason = -1 %>
<% odd = False%>
<input type="submit" value="${_('Rename Selected')}" class="btn btn-success"/>
<a href="${srWebRoot}/home/displayShow?show=${show.indexerid}" class="btn btn-danger">${_('Cancel Rename')}</a>
<div class="row">
<div class="col mx-auto">
<div class="card mb-3">
<div class="card-header">
<h3>${_('All Seasons')}</h3>
</div>
<div class="card-body">
<table id="SelectAllTable" class="table" cellspacing="1" border="0" cellpadding="0">
<thead>
<tr class="seasoncols" id="selectall">
<th class="col-checkbox">
<input type="checkbox" class="seriesCheck" id="SelectAll"/>
</th>
<th align="left" valign="top" class="text-nowrap">${_('Select All')}</th>
<th width="100%" class="col-name d-none"></th>
</tr>
</thead>
</table>
</div>
<div class="card-footer">
<input type="submit" value="${_('Rename Selected')}" class="btn btn-success"/>
<a href="${srWebRoot}/home/displayShow?show=${show.indexerid}"
class="btn btn-danger">${_('Cancel Rename')}</a>
</div>
</div>
</div>
</div>
<table id="testRenameTable" class="table" cellspacing="1" border="0" cellpadding="0">
% for cur_ep_obj in ep_obj_list:
<%
curLoc = cur_ep_obj.location[len(cur_ep_obj.show.location)+1:]
curExt = curLoc.split('.')[-1]
newLoc = cur_ep_obj.proper_path() + '.' + curExt
%>
% if int(cur_ep_obj.season) != curSeason:
<thead>
<tr class="seasonheader" id="season-${cur_ep_obj.season}">
<td colspan="4">
<br>
<h2>${('Season '+str(cur_ep_obj.season), 'Specials')[int(cur_ep_obj.season) == 0]}</h2>
</td>
</tr>
<tr class="seasoncols" id="season-${cur_ep_obj.season}-cols">
<th class="col-checkbox">
<input type="checkbox" class="seasonCheck" id="${cur_ep_obj.season}"/>
</th>
<th class="text-nowrap">${_('Episode')}</th>
<th class="col-name">${_('Old Location')}</th>
<th class="col-name">${_('New Location')}</th>
</tr>
</thead>
<% curSeason = int(cur_ep_obj.season) %>
% endif
<tbody>
<%
odd = not odd
epStr = str(cur_ep_obj.season) + "x" + str(cur_ep_obj.episode)
epList = sorted([cur_ep_obj.episode] + [x.episode for x in cur_ep_obj.relatedEps])
if len(epList) > 1:
epList = [min(epList), max(epList)]
%>
<tr class="season-${curSeason} ${('wanted', 'good')[curLoc == newLoc]} seasonstyle">
<td class="col-checkbox">
% if curLoc != newLoc:
<input type="checkbox" class="epCheck"
id="${"{}x{}".format(cur_ep_obj.season, cur_ep_obj.episode)}"
name="${"{}x{}".format(cur_ep_obj.season, cur_ep_obj.episode)}"/>
% endif
</td>
<td align="center" valign="top" class="text-nowrap">${"-".join(map(str, epList))}</td>
<td width="50%" class="col-name">${curLoc}</td>
<td width="50%" class="col-name">${newLoc}</td>
</tr>
</tbody>
% endfor
</table><br>
<input type="submit" value="${_('Rename Selected')}" class="btn btn-success"/>
<a href="${srWebRoot}/home/displayShow?show=${show.indexerid}" class="btn btn-danger">${_('Cancel Rename')}</a>
<div class="row">
<div class="col mx-auto">
<div class="card mb-3">
<div class="card-body">
<table id="testRenameTable" class="table">
% for cur_ep_obj in ep_obj_list:
<%
curLoc = cur_ep_obj.location[len(cur_ep_obj.show.location)+1:]
curExt = curLoc.split('.')[-1]
newLoc = cur_ep_obj.proper_path() + '.' + curExt
%>
% if int(cur_ep_obj.season) != curSeason:
<thead>
<tr id="season-${cur_ep_obj.season}">
<td colspan="4">
<h2>${('Season '+str(cur_ep_obj.season), 'Specials')[int(cur_ep_obj.season) == 0]}</h2>
</td>
</tr>
<tr class="seasoncols" id="season-${cur_ep_obj.season}-cols">
<th class="col-checkbox">
<input type="checkbox" class="seasonCheck"
id="${cur_ep_obj.season}"/>
</th>
<th class="table-fit">${_('Episode')}</th>
<th class="text-nowrap">${_('Old Location')}</th>
<th class="text-nowrap">${_('New Location')}</th>
</tr>
</thead>
<% curSeason = int(cur_ep_obj.season) %>
% endif
<tbody>
<%
odd = not odd
epStr = str(cur_ep_obj.season) + "x" + str(cur_ep_obj.episode)
epList = sorted([cur_ep_obj.episode] + [x.episode for x in cur_ep_obj.relatedEps])
if len(epList) > 1:
epList = [min(epList), max(epList)]
%>
<tr class="season-${curSeason} ${('wanted', 'good')[curLoc == newLoc]} text-dark">
<td class="table-fit">
% if curLoc != newLoc:
<input type="checkbox" class="epCheck"
id="${"{}x{}".format(cur_ep_obj.season, cur_ep_obj.episode)}"
name="${"{}x{}".format(cur_ep_obj.season, cur_ep_obj.episode)}"/>
% endif
</td>
<td class="text-center">${"-".join(map(str, epList))}</td>
<td>${curLoc}</td>
<td>${newLoc}</td>
</tr>
</tbody>
% endfor
</table>
</div>
<div class="card-footer">
<input type="submit" value="${_('Rename Selected')}" class="btn btn-success"/>
<a href="${srWebRoot}/home/displayShow?show=${show.indexerid}"
class="btn btn-danger">${_('Cancel Rename')}</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</%block>
......@@ -336,42 +336,42 @@
</nav>
% endif
<div class="container-fluid">
% if submenu:
<div class="container-fluid">
<div class="row sickrage-submenu">
<div class="col">
<div class="text-center d-print-none">
<% first = True %>
% for menuItem in submenu:
% if menuItem.get('requires', 1):
% if isinstance(menuItem['path'], dict):
${("</span><span>", "")[bool(first)]}<b>${menuItem['title']}</b>
<%
first = False
inner_first = True
%>
% for cur_link in menuItem['path']:
${("&middot;", "")[bool(inner_first)]}
<a href="${srWebRoot}${menuItem['path'][cur_link]}"
class="inner ${menuItem.get('class', '')} m-1">
${cur_link}
</a>
<% inner_first = False %>
% endfor
% else:
<a href="${srWebRoot}${menuItem['path']}"
class="btn ${('', ' confirm ')['confirm' in menuItem]} ${menuItem.get('class', '')} m-1">
<i class='${menuItem.get('icon', '')}'></i> ${menuItem['title']}
</a>
<% first = False %>
% endif
<div class="row sickrage-submenu">
<div class="col">
<div class="text-center d-print-none">
<% first = True %>
% for menuItem in submenu:
% if menuItem.get('requires', 1):
% if isinstance(menuItem['path'], dict):
${("</span><span>", "")[bool(first)]}<b>${menuItem['title']}</b>
<%
first = False
inner_first = True
%>
% for cur_link in menuItem['path']:
${("&middot;", "")[bool(inner_first)]}
<a href="${srWebRoot}${menuItem['path'][cur_link]}"
class="inner ${menuItem.get('class', '')} m-1">
${cur_link}
</a>
<% inner_first = False %>
% endfor
% else:
<a href="${srWebRoot}${menuItem['path']}"
class="btn ${('', ' confirm ')['confirm' in menuItem]} ${menuItem.get('class', '')} m-1">
<i class='${menuItem.get('icon', '')}'></i> ${menuItem['title']}
</a>
<% first = False %>
% endif
% endfor
</div>
% endif
% endfor
</div>
</div>
</div>
% endif
</div>
<div class="container-fluid">
<%block name="content" />
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment