Clean up settings styles

* Capitalization of titles for consistency
* Change notification agents settings text for consistency
* Fix notification agents config modal column width for line breaks
This commit is contained in:
Jonathan Wong 2015-09-28 00:57:13 -07:00
parent 7327be1ff8
commit 59bb5139f7
3 changed files with 51 additions and 47 deletions

View file

@ -12,22 +12,30 @@ from plexpy import helpers
<div class="container-fluid"> <div class="container-fluid">
<div class="row"> <div class="row">
<form action="set_notification_config" method="post" class="form" id="set_notification_config" data-parsley-validate> <form action="set_notification_config" method="post" class="form" id="set_notification_config" data-parsley-validate>
<div class="col-md-8"> <div class="col-md-12">
% for item in data: % for item in data:
% if item['input_type'] == 'text' or item['input_type'] == 'number' or item['input_type'] == 'password': % if item['input_type'] == 'text' or item['input_type'] == 'number' or item['input_type'] == 'password':
<div class="form-group"> <div class="form-group">
<label for="${item['name']}">${item['label']}</label> <label for="${item['name']}">${item['label']}</label>
<input type="${item['input_type']}" class="form-control" id="${item['name']}" name="${item['name']}" value="${item['value']}" size="30"> <div class="row">
% if item['name'] == 'osx_notify_app': <div class="col-md-8">
<a href="javascript:void(0)" id="osxnotifyregister">Register</a> <input type="${item['input_type']}" class="form-control" id="${item['name']}" name="${item['name']}" value="${item['value']}" size="30">
% endif % if item['name'] == 'osx_notify_app':
<a href="javascript:void(0)" id="osxnotifyregister">Register</a>
% endif
</div>
</div>
<p class="help-block">${item['description']}</p> <p class="help-block">${item['description']}</p>
</div> </div>
% elif item['input_type'] == 'button': % elif item['input_type'] == 'button':
<div class="form-group"> <div class="form-group">
<input type="${item['input_type']}" class="btn btn-bright" id="${item['name']}" name="${item['name']}" value="${item['value']}"> <div class="row">
<div class="col-md-8">
<input type="${item['input_type']}" class="btn btn-bright" id="${item['name']}" name="${item['name']}" value="${item['value']}">
</div>
</div>
<p class="help-block">${item['description']}</p>
</div> </div>
<p class="help-block">${item['description']}</p>
% elif item['input_type'] == 'checkbox': % elif item['input_type'] == 'checkbox':
<div class="checkbox"> <div class="checkbox">
<label> <label>

View file

@ -31,7 +31,7 @@ available_notification_agents = notifiers.available_notification_agents()
</div> </div>
<div class="row"> <div class="row">
<!-- Nav tabs --> <!-- Nav tabs -->
<div class="col-md-4"> <div class="col-md-3">
<ul class="nav-settings list-unstyled" role="tablist"> <ul class="nav-settings list-unstyled" role="tablist">
<li role="presentation" class="active"><a href="#tabs-1" aria-controls="tabs-1" role="tab" data-toggle="tab">General</a></li> <li role="presentation" class="active"><a href="#tabs-1" aria-controls="tabs-1" role="tab" data-toggle="tab">General</a></li>
<li role="presentation"><a href="#tabs-2" aria-controls="tabs-2" role="tab" data-toggle="tab">Homepage Statistics</a></li> <li role="presentation"><a href="#tabs-2" aria-controls="tabs-2" role="tab" data-toggle="tab">Homepage Statistics</a></li>
@ -45,7 +45,7 @@ available_notification_agents = notifiers.available_notification_agents()
<li role="presentation"><a href="#tabs-10" aria-controls="tabs-10" role="tab" data-toggle="tab">Notification Agents</a></li> <li role="presentation"><a href="#tabs-10" aria-controls="tabs-10" role="tab" data-toggle="tab">Notification Agents</a></li>
</ul> </ul>
</div> </div>
<div class="col-md-8"> <div class="col-md-9">
<form action="configUpdate" method="post" class="form" id="configUpdate" data-parsley-validate> <form action="configUpdate" method="post" class="form" id="configUpdate" data-parsley-validate>
<div class="tab-content"> <div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="tabs-1"> <div role="tabpanel" class="tab-pane active" id="tabs-1">
@ -133,7 +133,7 @@ available_notification_agents = notifiers.available_notification_agents()
</div> </div>
<div class="checkbox"> <div class="checkbox">
<label> <label>
<input type="checkbox" id="home_stats_type" name="home_stats_type" value="1" ${config['home_stats_type']}> Use play duration <input type="checkbox" id="home_stats_type" name="home_stats_type" value="1" ${config['home_stats_type']}> Use Play Duration
</label> </label>
<p class="help-block">Use play duration instead of play count to generate statistics.</p> <p class="help-block">Use play duration instead of play count to generate statistics.</p>
</div> </div>
@ -339,7 +339,7 @@ available_notification_agents = notifiers.available_notification_agents()
<h3>Friends List</h3> <h3>Friends List</h3>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="refresh_users_interval">User list Refresh Interval</label> <label for="refresh_users_interval">User List Refresh Interval</label>
<div class="row"> <div class="row">
<div class="col-md-2"> <div class="col-md-2">
<input type="text" class="form-control" data-parsley-type="integer" id="refresh_users_interval" name="refresh_users_interval" value="${config['refresh_users_interval']}" size="5" data-parsley-range="[1,24]" data-parsley-trigger="change" data-parsley-errors-container="#refresh_users_interval_error" required> <input type="text" class="form-control" data-parsley-type="integer" id="refresh_users_interval" name="refresh_users_interval" value="${config['refresh_users_interval']}" size="5" data-parsley-range="[1,24]" data-parsley-trigger="change" data-parsley-errors-container="#refresh_users_interval_error" required>
@ -350,7 +350,7 @@ available_notification_agents = notifiers.available_notification_agents()
</div> </div>
<div class="checkbox"> <div class="checkbox">
<label> <label>
<input type="checkbox" id="refresh_users_on_startup" name="refresh_users_on_startup" value="1" ${config['refresh_users_on_startup']}> Refresh user list on startup <input type="checkbox" id="refresh_users_on_startup" name="refresh_users_on_startup" value="1" ${config['refresh_users_on_startup']}> Refresh User List on Startup
</label> </label>
<p class="help-block">Refresh the user list when PlexPy starts.</p> <p class="help-block">Refresh the user list when PlexPy starts.</p>
</div> </div>
@ -364,7 +364,7 @@ available_notification_agents = notifiers.available_notification_agents()
<div class="checkbox"> <div class="checkbox">
<label> <label>
<input type="checkbox" id="pms_use_bif" name="pms_use_bif" value="1" ${config['pms_use_bif']}> Use video preview thumbnails (BIF) <input type="checkbox" id="pms_use_bif" name="pms_use_bif" value="1" ${config['pms_use_bif']}> Use Video Preview Thumbnails (BIF)
</label> </label>
<p class="help-block">If you have media indexing enabled on your server, use these on the activity pane.</p> <p class="help-block">If you have media indexing enabled on your server, use these on the activity pane.</p>
</div> </div>
@ -407,6 +407,12 @@ available_notification_agents = notifiers.available_notification_agents()
</label> </label>
<p class="help-block">Keep records of all video items played from your Plex Media Server.</p> <p class="help-block">Keep records of all video items played from your Plex Media Server.</p>
</div> </div>
<div class="checkbox">
<label>
<input type="checkbox" id="music_logging_enable" name="music_logging_enable" value="1" ${config['music_logging_enable']}> Log Music
</label>
<p class="help-block">Keep records of all audio items played from your Plex Media Server. VERY experimental.</p>
</div>
<div class="form-group"> <div class="form-group">
<label for="logging_ignore_interval">Ignore Interval</label> <label for="logging_ignore_interval">Ignore Interval</label>
<div class="row"> <div class="row">
@ -417,16 +423,6 @@ available_notification_agents = notifiers.available_notification_agents()
</div> </div>
<p class="help-block">The interval (in seconds) an item must be in a playing state before logging it. 0 to disable.</p> <p class="help-block">The interval (in seconds) an item must be in a playing state before logging it. 0 to disable.</p>
</div> </div>
<div class="checkbox">
<label>
<input type="checkbox" id="music_logging_enable" name="music_logging_enable" value="1" ${config['music_logging_enable']}> Log Music
</label>
<p class="help-block">Keep records of all audio items played from your Plex Media Server. VERY experimental.</p>
</div>
<div class="padded-header">
<h3>IP Logging</h3>
</div>
<div class="checkbox"> <div class="checkbox">
<label> <label>
<input type="checkbox" id="ip_logging_enable" name="ip_logging_enable" value="1" ${config['ip_logging_enable']}> Enable IP Logging <input type="checkbox" id="ip_logging_enable" name="ip_logging_enable" value="1" ${config['ip_logging_enable']}> Enable IP Logging

View file

@ -1,4 +1,4 @@
# This file is part of PlexPy. # This file is part of PlexPy.
# #
# PlexPy is free software: you can redistribute it and/or modify # PlexPy is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
@ -385,16 +385,16 @@ class GROWL(object):
self.notify('ZOMG Lazors Pewpewpew!', 'Test Message') self.notify('ZOMG Lazors Pewpewpew!', 'Test Message')
def return_config_options(self): def return_config_options(self):
config_option = [{'label': 'Host', config_option = [{'label': 'Growl Host',
'value': self.host, 'value': self.host,
'name': 'growl_host', 'name': 'growl_host',
'description': 'Set the hostname.', 'description': 'Your Growl hostname.',
'input_type': 'text' 'input_type': 'text'
}, },
{'label': 'Password', {'label': 'Growl Password',
'value': self.password, 'value': self.password,
'name': 'growl_password', 'name': 'growl_password',
'description': 'Set the password.', 'description': 'Your Growl password.',
'input_type': 'password' 'input_type': 'password'
} }
] ]
@ -458,16 +458,16 @@ class PROWL(object):
self.notify('ZOMG Lazors Pewpewpew!', 'Test Message') self.notify('ZOMG Lazors Pewpewpew!', 'Test Message')
def return_config_options(self): def return_config_options(self):
config_option = [{'label': 'API Key', config_option = [{'label': 'Prowl API Key',
'value': self.keys, 'value': self.keys,
'name': 'prowl_keys', 'name': 'prowl_keys',
'description': 'Set the API key.', 'description': 'Your Prowl API key.',
'input_type': 'text' 'input_type': 'text'
}, },
{'label': 'Priority (-2,-1,0,1 or 2)', {'label': 'Priority',
'value': self.priority, 'value': self.priority,
'name': 'prowl_priority', 'name': 'prowl_priority',
'description': 'Set the priority.', 'description': 'Set the priority (-2,-1,0,1 or 2).',
'input_type': 'number' 'input_type': 'number'
} }
] ]
@ -542,19 +542,19 @@ class XBMC(object):
config_option = [{'label': 'XBMC Host:Port', config_option = [{'label': 'XBMC Host:Port',
'value': self.hosts, 'value': self.hosts,
'name': 'xbmc_host', 'name': 'xbmc_host',
'description': 'e.g. http://localhost:8080. Separate hosts with commas.', 'description': 'Host running XBMC (e.g. http://localhost:8080). Separate multiple hosts with commas.',
'input_type': 'text' 'input_type': 'text'
}, },
{'label': 'Username', {'label': 'XBMC Username',
'value': self.username, 'value': self.username,
'name': 'xbmc_username', 'name': 'xbmc_username',
'description': 'Set the Username.', 'description': 'Your XBMC username.',
'input_type': 'text' 'input_type': 'text'
}, },
{'label': 'Password', {'label': 'XBMC Password',
'value': self.password, 'value': self.password,
'name': 'xbmc_password', 'name': 'xbmc_password',
'description': 'Set the Password.', 'description': 'Your XMBC password.',
'input_type': 'password' 'input_type': 'password'
} }
] ]
@ -689,13 +689,13 @@ class NMA(object):
config_option = [{'label': 'NotifyMyAndroid API Key', config_option = [{'label': 'NotifyMyAndroid API Key',
'value': plexpy.CONFIG.NMA_APIKEY, 'value': plexpy.CONFIG.NMA_APIKEY,
'name': 'nma_apikey', 'name': 'nma_apikey',
'description': 'Separate multiple api keys with commas.', 'description': 'Your NotifyMyAndroid API key. Separate multiple api keys with commas.',
'input_type': 'text' 'input_type': 'text'
}, },
{'label': 'Priority', {'label': 'Priority',
'value': plexpy.CONFIG.NMA_PRIORITY, 'value': plexpy.CONFIG.NMA_PRIORITY,
'name': 'nma_priority', 'name': 'nma_priority',
'description': 'Priority (-2,-1,0,1 or 2).', 'description': 'Set the priority (-2,-1,0,1 or 2).',
'input_type': 'number' 'input_type': 'number'
} }
] ]
@ -761,7 +761,7 @@ class PUSHBULLET(object):
self.notify('Main Screen Activate', 'Test Message') self.notify('Main Screen Activate', 'Test Message')
def return_config_options(self): def return_config_options(self):
config_option = [{'label': 'API Key', config_option = [{'label': 'Pushbullet API Key',
'value': self.apikey, 'value': self.apikey,
'name': 'pushbullet_apikey', 'name': 'pushbullet_apikey',
'description': 'Your Pushbullet API key.', 'description': 'Your Pushbullet API key.',
@ -829,7 +829,7 @@ class PUSHALOT(object):
return False return False
def return_config_options(self): def return_config_options(self):
config_option = [{'label': 'API Key', config_option = [{'label': 'Pushalot API Key',
'value': plexpy.CONFIG.PUSHALOT_APIKEY, 'value': plexpy.CONFIG.PUSHALOT_APIKEY,
'name': 'pushalot_apikey', 'name': 'pushalot_apikey',
'description': 'Your Pushalot API key.', 'description': 'Your Pushalot API key.',
@ -901,7 +901,7 @@ class PUSHOVER(object):
self.notify('Main Screen Activate', 'Test Message') self.notify('Main Screen Activate', 'Test Message')
def return_config_options(self): def return_config_options(self):
config_option = [{'label': 'API Key', config_option = [{'label': 'Pushover API Key',
'value': self.keys, 'value': self.keys,
'name': 'pushover_keys', 'name': 'pushover_keys',
'description': 'Your Pushover API key.', 'description': 'Your Pushover API key.',
@ -910,13 +910,13 @@ class PUSHOVER(object):
{'label': 'Priority', {'label': 'Priority',
'value': self.priority, 'value': self.priority,
'name': 'pushover_priority', 'name': 'pushover_priority',
'description': 'Priority (-1,0, or 1).', 'description': 'Set the priority (-2,-1,0,1 or 2).',
'input_type': 'number' 'input_type': 'number'
}, },
{'label': 'API Token', {'label': 'Pushover API Token',
'value': plexpy.CONFIG.PUSHOVER_APITOKEN, 'value': plexpy.CONFIG.PUSHOVER_APITOKEN,
'name': 'pushover_apitoken', 'name': 'pushover_apitoken',
'description': 'Leave blank to use PlexPy default.', 'description': 'Your Pushover API toekn. Leave blank to use PlexPy default.',
'input_type': 'text' 'input_type': 'text'
} }
] ]
@ -1161,7 +1161,7 @@ class BOXCAR(object):
return False return False
def return_config_options(self): def return_config_options(self):
config_option = [{'label': 'Access Token', config_option = [{'label': 'Boxcar Access Token',
'value': plexpy.CONFIG.BOXCAR_TOKEN, 'value': plexpy.CONFIG.BOXCAR_TOKEN,
'name': 'boxcar_token', 'name': 'boxcar_token',
'description': 'Your Boxcar access token.', 'description': 'Your Boxcar access token.',
@ -1216,7 +1216,7 @@ class Email(object):
{'label': 'To', {'label': 'To',
'value': plexpy.CONFIG.EMAIL_TO, 'value': plexpy.CONFIG.EMAIL_TO,
'name': 'email_to', 'name': 'email_to',
'description': 'Who should the recipeint be.', 'description': 'Who should the recipient be.',
'input_type': 'text' 'input_type': 'text'
}, },
{'label': 'SMTP Server', {'label': 'SMTP Server',