-
-
Notifications
You must be signed in to change notification settings - Fork 408
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
) * Working on #2972 Template Conversion to Twig Format (private.php) Part 1 - PM searching * Working on #2972 Template Conversion to Twig Format (private.php) Part 2 - Sending a PM * Working on #2972 Template Conversion to Twig Format (private.php) Part 3 - Reading a PM * Working on #2972 Template Conversion to Twig Format (private.php) Part 4 - PM tracking * Working on #2972 Template Conversion to Twig Format (private.php) Part 5 - Managing PM folders * Working on #2972 Template Conversion to Twig Format (private.php) Part 6 - Exporting PMs * Working on #2972 Template Conversion to Twig Format (private.php) Part 7 - PM folders * Fixed formatting issue
- Loading branch information
1 parent
dfdd3a7
commit fefaac8
Showing
18 changed files
with
2,609 additions
and
1,887 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
{% extends 'layouts/master.twig' %} | ||
|
||
{% block head %} | ||
<title>{{ mybb.settings.bbname }} - {{ lang.advanced_private_message_search }}</title> | ||
{% endblock head %} | ||
|
||
{% block body %} | ||
<form action="private.php" method="post" name="pmForm"> | ||
<input type="hidden" name="my_post_key" value="{{ mybb.post_code }}" /> | ||
<input type="hidden" name="action" value="do_search" /> | ||
<table width="100%" border="0" align="center"> | ||
<tr> | ||
{# To do: usercpnav #} | ||
<td valign="top"> | ||
<table border="0" cellspacing="{{ theme.borderwidth }}" cellpadding="{{ theme.tablespace }}" class="tborder"> | ||
<tr> | ||
<td class="thead" colspan="2"><strong>{{ lang.advanced_private_message_search }}</strong></td> | ||
</tr> | ||
<tr> | ||
<td class="tcat" colspan="2"><strong>{{ lang.search_criteria }}</strong></td> | ||
</tr> | ||
<tr> | ||
<td class="trow1" width="20%"><strong><label for="keywords">{{ lang.keywords }}</label></strong></td> | ||
<td class="trow1"> | ||
<input type="text" class="textbox" name="keywords" id="keywords" size="35" maxlength="250" /> | ||
<br /> | ||
<span class="smalltext"> | ||
<label><input type="checkbox" name="subject" checked="checked" value="1" /> {{ lang.search_in_subject }}</label><br /> | ||
<label><input type="checkbox" name="message" checked="checked" value="1" /> {{ lang.search_in_message }}</label> | ||
</span> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td class="trow2"><strong><label for="sender">{{ lang.sender }}</label></strong></td> | ||
<td class="trow2"><input type="text" class="textbox" name="sender" id="sender" size="35" maxlength="250" /></td> | ||
</tr> | ||
<tr> | ||
<td class="trow1"><strong>{{ lang.message_status }}</strong></td> | ||
<td class="trow1 smalltext"> | ||
<label><input type="checkbox" name="status[new]" checked="checked" value="1" /> {{ lang.message_status_new }}</label><br /> | ||
<label><input type="checkbox" name="status[replied]" checked="checked" value="1" /> {{ lang.message_status_replied_to }}</label><br /> | ||
<label><input type="checkbox" name="status[forwarded]" checked="checked" value="1" /> {{ lang.message_status_forwarded }}</label><br /> | ||
<label><input type="checkbox" name="status[read]" checked="checked" value="1" /> {{ lang.message_status_read }}</label> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td class="trow2"><strong><label for="folder">{{ lang.folder }}</label></strong> | ||
</td> | ||
<td class="trow2"> | ||
<select multiple="multiple" name="folder[]" id="folder"> | ||
<option selected="selected">{{ lang.all_folders }}</option> | ||
{% for folder in folders %} | ||
<option value="{{ folder.id }}"{% if folder.sel %} selected="selected"{% endif %}>{{ folder.name }}</option> | ||
{% endfor %} | ||
</select> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td class="tcat" colspan="2"><strong>{{ lang.search_options }}</strong></td> | ||
</tr> | ||
<tr> | ||
<td class="trow1" width="20%"><strong><label for="sort">{{ lang.sort_by }}</label></strong></td> | ||
|
||
<td class="trow1"> | ||
<select name="sort" id="sort"> | ||
<option value="subject">{{ lang.sort_by_subject }}</option> | ||
<option value="sender">{{ lang.sort_by_sender }}</option> | ||
<option value="dateline" selected="selected">{{ lang.sort_by_date }}</option> | ||
</select><br /> | ||
<span class="smalltext"> | ||
<input type="radio" class="radio" name="sortordr" id="order_asc" value="asc" /> <label for="order_asc">{{ lang.ascending_order }}</label><br /> | ||
<input type="radio" class="radio" name="sortordr" id="order_desc" checked="checked" value="desc" /> <label for="order_desc">{{ lang.descending_order }}</label> | ||
</span> | ||
</td> | ||
</tr> | ||
</table> | ||
<br /> | ||
<div align="center"><input type="submit" value="{{ lang.search_private_messages }}" class="button" /></div> | ||
</td> | ||
</tr> | ||
</table> | ||
</form> | ||
<link rel="stylesheet" href="{{ asset_url('jscripts/select2/select2.css') }}"> | ||
<script type="text/javascript" src="{{ asset_url('jscripts/select2/select2.min.js') }}"></script> | ||
<script type="text/javascript"> | ||
<!-- | ||
if({{ mybb.settings.use_xmlhttprequest }}) | ||
{ | ||
MyBB.select2(); | ||
$("#sender").select2({ | ||
placeholder: "{{ lang.search_user }}", | ||
minimumInputLength: 2, | ||
multiple: false, | ||
ajax: { // instead of writing the function to execute the request we use Select2's convenient helper | ||
url: "xmlhttp.php?action=get_users", | ||
dataType: 'json', | ||
data: function (term, page) { | ||
return { | ||
query: term, // search term | ||
}; | ||
}, | ||
results: function (data, page) { // parse the results into the format expected by Select2. | ||
// since we are using custom formatting functions we do not need to alter remote JSON data | ||
return {results: data}; | ||
} | ||
}, | ||
initSelection: function(element, callback) { | ||
var value = $(element).val(); | ||
if (value !== "") { | ||
callback({ | ||
id: value, | ||
text: value | ||
}); | ||
} | ||
} | ||
}); | ||
} | ||
// --> | ||
</script> | ||
{% endblock body %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{% extends 'layouts/master.twig' %} | ||
|
||
{% block head %} | ||
<title>{{ mybb.settings.bbname }} - {{ lang.empty_folders }}</title> | ||
{% endblock head %} | ||
|
||
{% block body %} | ||
<form action="private.php" method="post"> | ||
<input type="hidden" name="my_post_key" value="{{ mybb.post_code }}" /> | ||
<table width="100%" border="0" align="center"> | ||
<tr> | ||
{# To do: usercpnav #} | ||
<td valign="top"> | ||
<table border="0" cellspacing="{{ theme.borderwidth }}" cellpadding="{{ theme.tablespace }}" class="tborder"> | ||
<tr> | ||
<td class="thead" colspan="3"><strong>{{ lang.empty_folders }}</strong></td> | ||
</tr> | ||
<tr> | ||
<td class="trow1" colspan="3"><span class="smalltext">{{ lang.empty_note|raw }}</span></td> | ||
</tr> | ||
<tr> | ||
<td class="tcat" align="center"><strong>{{ lang.export_folder }}</strong></td> | ||
<td class="tcat" align="center"><strong>{{ lang.num_messages }}</strong></td> | ||
<td class="tcat" align="center"><strong>{{ lang.empty_q }}</strong></td> | ||
</tr> | ||
{% for folder in folderlist %} | ||
<tr> | ||
<td class="trow1"><strong>{{ folder.foldername }}</strong></td> | ||
<td class="trow1" align="center">{{ folder.foldercount }}</td> | ||
<td class="trow1" align="center"><input type="checkbox" class="checkbox" name="empty[{{ folder.fid }}]" value="1" /></td> | ||
</tr> | ||
{% endfor %} | ||
<tr> | ||
<td class="trow2" align="center" colspan="3"><input type="checkbox" class="checkbox" name="keepunread" value="1" checked="checked" /><strong>{{ lang.keep_unread }}</strong></td> | ||
</tr> | ||
</table> | ||
<br /> | ||
<div align="center"> | ||
<input type="hidden" name="action" value="do_empty" /> | ||
<input type="submit" class="button" name="submit" value="{{ lang.delete }}" /> | ||
</div> | ||
</td> | ||
</tr> | ||
</table> | ||
</form> | ||
{% endblock body %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
{% extends 'layouts/master.twig' %} | ||
|
||
{% block head %} | ||
<title>{{ mybb.settings.bbname }} - {{ lang.archive_messages }}</title> | ||
{% endblock head %} | ||
|
||
{% block body %} | ||
<form action="private.php" method="post"> | ||
<input type="hidden" name="my_post_key" value="{{ mybb.post_code }}" /> | ||
<table width="100%" border="0" align="center"> | ||
<tr> | ||
{# To do: usercpnav #} | ||
<td valign="top"> | ||
<table border="0" cellspacing="{{ theme.borderwidth }}" cellpadding="{{ theme.tablespace }}" class="tborder"> | ||
<tr> | ||
<td class="thead" colspan="2"><strong>{{ lang.archive_messages }}</strong></td> | ||
</tr> | ||
<tr> | ||
<td class="tcat" colspan="2"><span class="smalltext">{{ lang.archive_note }}</span></td> | ||
</tr> | ||
<tr> | ||
<td class="trow1" valign="top" width="30%"><strong>{{ lang.folders }}</strong></td> | ||
<td class="trow1"> | ||
<select name="exportfolders[]" multiple="multiple"> | ||
<option value="all" selected="selected">{{ lang.all_folders }}</option> | ||
{% for folder in folderlist %} | ||
<option value="{{ folder.id }}">{{ folder.name }}</option> | ||
{% endfor %} | ||
</select> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td class="trow2" valign="top" width="30%"><strong>{{ lang.date_limit }}</strong></td> | ||
<td class="trow2"> | ||
<select name="dayway"> | ||
<option value="older">{{ lang.date_limit_older }}</option> | ||
<option value="newer">{{ lang.date_limit_newer }}</option> | ||
<option value="disregard">{{ lang.date_limit_disregard }}</option> | ||
</select> | ||
<input type="text" class="textbox" name="daycut" value="30" size="3" maxlength="4" /> {{ lang.date_limit_days }}</td> | ||
</tr> | ||
<tr> | ||
<td class="trow1" valign="top" width="30%"><strong>{{ lang.export_unread }}</strong></td> | ||
<td class="trow1"> | ||
<input type="radio" class="radio" name="exportunread" value="1" /> {{ lang.yes }} <input type="radio" class="radio" name="exportunread" value="0" checked="checked" /> {{ lang.no }} | ||
</td> | ||
</tr> | ||
<tr> | ||
<td class="trow2" valign="top" width="30%"><strong>{{ lang.delete_archived }}</strong><br /><span class="smalltext">{{ lang.delete_archived_note }}</span></td> | ||
<td class="trow2"><input type="radio" class="radio" name="deletepms" value="1" /> {{ lang.yes }} <input type="radio" class="radio" name="deletepms" value="0" checked="checked" /> {{ lang.no }} </td> | ||
</tr> | ||
<tr> | ||
<td class="trow1" valign="top" width="30%"><strong>{{ lang.export_format }}</strong><br /><span class="smalltext">{{ lang.export_format_note }}</span></td> | ||
<td class="trow1"> | ||
<input type="radio" class="radio" name="exporttype" value="html" checked="checked" /> {{ lang.export_html }}<br /> | ||
<input type="radio" class="radio" name="exporttype" value="txt" /> {{ lang.export_txt }}<br /> | ||
<input type="radio" class="radio" name="exporttype" value="csv" /> {{ lang.export_csv }} | ||
</td> | ||
</tr> | ||
</table> | ||
<br /> | ||
<div align="center"> | ||
<input type="hidden" name="action" value="do_export" /> | ||
<input type="submit" class="button" name="submit" value="{{ lang.archive_messages }}" /> | ||
</div> | ||
</td> | ||
</tr> | ||
</table> | ||
</form> | ||
{% endblock body %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{{ lang.export_date_sent }},{{ lang.export_folder }},{{ lang.export_subject }},{{ lang.export_to }},{{ lang.export_from }},{{ lang.export_message }} | ||
{% for message in pmsdownload %} | ||
{{ message.senddate }},"{{ message.foldername }}","{{ message.subject }}","{{ message.tousername }}","{{ message.fromusername }}","{{ message.message }}" | ||
{% endfor %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<html> | ||
<head> | ||
<title>{{ mybb.settings.bbname }} - {{ lang.private_messages_for }}</title> | ||
<style type="text/css">{{ css|raw }} | ||
* {text-align: left}</style> | ||
</head> | ||
<body> | ||
<br /> | ||
<table border="0" cellspacing="{{ theme.borderwidth }}" cellpadding="{{ theme.tablespace }}" class="tborder"> | ||
<tr> | ||
<td class="thead" colspan="1"><span class="largetext"><strong>{{ lang.private_messages_for }}</strong></span></td> | ||
</tr> | ||
{% for message in pmsdownload %} | ||
{% if message.isfolderheader %} | ||
</table> | ||
<br /> | ||
<table border="0" cellspacing="{{ theme.borderwidth }}" cellpadding="{{ theme.tablespace }}" class="tborder"> | ||
<tr> | ||
<td class="tcat" colspan="2"><strong>{{ lang.folder }} {{ message.foldername }}</strong></td> | ||
</tr> | ||
{% else %} | ||
<tr> | ||
<td class="trow1"> | ||
<strong>{{ lang.subject }} {{ message.subject }}</strong><br /> | ||
<em>{{ lang.to }} {{ message.tousername }}<br />{{ lang.from }} {{ message.fromusername }}<br />{{ lang.sent }} {{ message.senddate }}</em> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td class="trow2">{{ message.message }}</td> | ||
</tr> | ||
<tr> | ||
<td class="tcat" height="3"> </td> | ||
</tr> | ||
{% endif %} | ||
{% endfor %} | ||
</table> | ||
<br /> | ||
<table border="0" cellspacing="{{ theme.borderwidth }}" cellpadding="{{ theme.tablespace }}" class="tborder"> | ||
<tr> | ||
<td class="trow1" colspan="1">{{ lang.exported_date }}<br /><a href="{{ mybb.settings.bburl }}">{{ mybb.settings.bbname }}</a></td> | ||
</tr> | ||
</table> | ||
</body> | ||
</html> | ||
|
Oops, something went wrong.