Add custom modifiers to notification text

This commit is contained in:
JonnyWong16 2017-11-11 18:07:42 -08:00
commit 718049b9f3
3 changed files with 140 additions and 34 deletions

View file

@ -1342,6 +1342,57 @@
</div>
</div>
</div>
<div id="notify-text-modifiers-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="notify-text-modifiers-modal">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="fa fa-remove"></i></button>
<h4 class="modal-title">Notification Text Modifiers</h4>
</div>
<div class="modal-body">
<div>
<div>
<h4>Case Modifiers</h4>
</div>
<div>
<p class="help-block">Notification parameters with the <span class="inline-pre">!u</span> modifier will be converted to uppercase.</p>
<p><strong style="color: #fff;">Example:</strong></p>
<pre>{video_codec} --> hevc
{video_codec!u} --> HEVC</pre>
</div>
<div>
<p class="help-block">Notification parameters with the <span class="inline-pre">!l</span> modifier will be converted to lowercase.</p>
<p><strong style="color: #fff;">Example:</strong></p>
<pre>{content_rating} --> TV-PG
{content_rating!l} --> tv-pg</pre>
</div>
<div style="padding-bottom: 10px;">
<p class="help-block">Notification parameters with the <span class="inline-pre">!c</span> modifier will be converted to title case.</p>
<p><strong style="color: #fff;">Example:</strong></p>
<pre>{media_type} --> movie
{media_type!c} --> Movie</pre>
</div>
<div>
<h4>List Slicing</h4>
</div>
<div>
<p class="help-block">
Notification parameters which have a list of items can be sliced with a slice formatter <span class="inline-pre">:[X:Y]</span> to limit the number of items.
Note: the first item in the list is numbered <span class="inline-pre">0</span>.
</p>
<p><strong style="color: #fff;">Example:</strong></p>
<pre>{actors:[0]} --> Only include the 1st actor (Actors: 0)
{actors:[:4]} --> Only the first 4 actors (Actors: 0, 1, 2, 3)
{actors:[2:]} --> Only the 3rd to last actors (Actors: 2, 3, 4, ...)
{actors:[1:5]} --> Only the 2nd to 5th actors (Actors: 1, 2, 3, 4)</pre>
</div>
</div>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div>
<div id="notifier-text-preview-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="notifier-text-preview-modal">
</div>
<div id="changelog-modal" class="modal fade wide" tabindex="-1" role="dialog" aria-labelledby="changelog-modal">