mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-19 21:03:21 -07:00
Early implementation of friendly names. This be aware that this writes a new table to your plexWatch database.
Note: To edit friendly name, go to user page and click the pencil icon next to the user name. Currently only works on home stats and user info page. Adjust some table styling issues. Fix bug with user IP modal details not showing. Fix users default list order.
This commit is contained in:
parent
762199344c
commit
e7b305a1d5
11 changed files with 155 additions and 25 deletions
56
data/interfaces/default/edit_user.html
Normal file
56
data/interfaces/default/edit_user.html
Normal file
|
@ -0,0 +1,56 @@
|
|||
<%doc>
|
||||
USAGE DOCUMENTATION :: PLEASE LEAVE THIS AT THE TOP OF THIS FILE
|
||||
|
||||
For Mako templating syntax documentation please visit: http://docs.makotemplates.org/en/latest/
|
||||
|
||||
Filename: edit_user.html
|
||||
Version: 0.1
|
||||
Variable names: data [list]
|
||||
|
||||
data :: Usable parameters
|
||||
|
||||
== Global keys ==
|
||||
user Return the real Plex username
|
||||
friendly_name Returns the friendly edited Plex username
|
||||
|
||||
DOCUMENTATION :: END
|
||||
</%doc>
|
||||
|
||||
% if data is not None:
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="fa fa-remove"></i></button>
|
||||
<h3>Edit user <strong>${data['user']}</strong></h3>
|
||||
</div>
|
||||
<div class="modal-body" id="modal-text">
|
||||
<div class="card-back">
|
||||
<div class="form-group">
|
||||
<label for="friendly_name">Friendly Name</label>
|
||||
<input type="text" id="friendly_name" name="friendly_name" value="${data['friendly_name']}" size="30">
|
||||
<p class="help-block">Replace all occurances of the username with this name.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<div>
|
||||
<input type="button" id="save_user_name" class="btn btn-primary" value="Save">
|
||||
<span id="edit-user-status-message"></span>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
// Set new friendly name
|
||||
$("#save_user_name").click(function() {
|
||||
var friendly_name = $("#friendly_name").val();
|
||||
$.ajax({
|
||||
url: 'edit_user',
|
||||
data: {user: '${data['user']}', friendly_name: friendly_name},
|
||||
cache: false,
|
||||
async: true,
|
||||
success: function(data) {
|
||||
$("#edit-user-status-message").html(data);
|
||||
$(".set-username").html(friendly_name);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
% endif
|
Loading…
Add table
Add a link
Reference in a new issue