Skip to content

Commit

Permalink
Merge branch 'Gwenwyfar-css+templating' into release-2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Sesquipedalian committed Jun 30, 2018
2 parents ced0c32 + 3b4e63b commit a0ed2ce
Show file tree
Hide file tree
Showing 26 changed files with 585 additions and 519 deletions.
6 changes: 3 additions & 3 deletions SSI.php
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ function ssi_queryPosts($query_where = '', $query_where_params = array(), $query
<td style="vertical-align: top">
<a href="', $post['href'], '">', $post['subject'], '</a>
', $txt['by'], ' ', $post['poster']['link'], '
', $post['is_new'] ? '<a href="' . $scripturl . '?topic=' . $post['topic'] . '.msg' . $post['new_from'] . ';topicseen#new" rel="nofollow"><span class="new_posts">' . $txt['new'] . '</span></a>' : '', '
', $post['is_new'] ? '<a href="' . $scripturl . '?topic=' . $post['topic'] . '.msg' . $post['new_from'] . ';topicseen#new" rel="nofollow" class="new_posts">' . $txt['new'] . '</a>' : '', '
</td>
<td style="text-align: right; white-space: nowrap">
', $post['time'], '
Expand Down Expand Up @@ -664,7 +664,7 @@ function ssi_recentTopics($num_recent = 8, $exclude_boards = null, $include_boar
<td style="vertical-align: top">
<a href="', $post['href'], '">', $post['subject'], '</a>
', $txt['by'], ' ', $post['poster']['link'], '
', !$post['is_new'] ? '' : '<a href="' . $scripturl . '?topic=' . $post['topic'] . '.msg' . $post['new_from'] . ';topicseen#new" rel="nofollow"><span class="new_posts">' . $txt['new'] . '</span></a>', '
', !$post['is_new'] ? '' : '<a href="' . $scripturl . '?topic=' . $post['topic'] . '.msg' . $post['new_from'] . ';topicseen#new" rel="nofollow" class="new_posts">' . $txt['new'] . '</a>', '
</td>
<td style="text-align: right; white-space: nowrap">
', $post['time'], '
Expand Down Expand Up @@ -775,7 +775,7 @@ function ssi_topBoards($num_top = 10, $output_method = 'echo')
foreach ($boards as $sBoard)
echo '
<tr>
<td>', $sBoard['link'], $sBoard['new'] ? ' <a href="' . $sBoard['href'] . '"><span class="new_posts">' . $txt['new'] . '</span></a>' : '', '</td>
<td>', $sBoard['link'], $sBoard['new'] ? ' <a href="' . $sBoard['href'] . '" class="new_posts">' . $txt['new'] . '</a>' : '', '</td>
<td style="text-align: right">', comma_format($sBoard['num_topics']), '</td>
<td style="text-align: right">', comma_format($sBoard['num_posts']), '</td>
</tr>';
Expand Down
4 changes: 2 additions & 2 deletions Sources/ManageAttachments.php
Original file line number Diff line number Diff line change
Expand Up @@ -2790,8 +2790,8 @@ function TransferAttachments()
$percent_done = min(round($current_progress / $total_progress * 100, 0), 100);
$prog_bar = '
<div class="progress_bar">
<div class="full_bar">' . $percent_done . '%</div>
<div class="green_percent" style="width: ' . $percent_done . '%;">&nbsp;</div>
<div class="bar" style="width: ' . $percent_done . '%;"></div>
<span>' . $percent_done . '%</span>
</div>';
// Write it to a file so it can be displayed
$fp = fopen($boarddir . '/progress.php', "w");
Expand Down
4 changes: 2 additions & 2 deletions Sources/Profile-Modify.php
Original file line number Diff line number Diff line change
Expand Up @@ -2341,7 +2341,7 @@ function alert_notifications_topics($memID)
$link = $topic['link'];

if ($topic['new'])
$link .= ' <a href="' . $topic['new_href'] . '"><span class="new_posts">' . $txt['new'] . '</span></a>';
$link .= ' <a href="' . $topic['new_href'] . '" class="new_posts">' . $txt['new'] . '</a>';

$link .= '<br><span class="smalltext"><em>' . $txt['in'] . ' ' . $topic['board_link'] . '</em></span>';

Expand Down Expand Up @@ -2493,7 +2493,7 @@ function alert_notifications_boards($memID)
$link = $board['link'];

if ($board['new'])
$link .= ' <a href="' . $board['href'] . '"><span class="new_posts">' . $txt['new'] . '</span></a>';
$link .= ' <a href="' . $board['href'] . '" class="new_posts">' . $txt['new'] . '</a>';

return $link;
},
Expand Down
2 changes: 1 addition & 1 deletion Sources/Who.php
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,7 @@ function Credits($in_admin = false)
'<a href="https://techbase.kde.org/Projects/Oxygen/Licensing#Use_on_Websites">Oxygen Icons</a> | These icons are licensed under <a href="http://www.gnu.org/copyleft/lesser.html">GNU LGPLv3</a>',
),
'software' => array(
'<a href="https://jquery.org/">JQuery</a> | &copy; John Resig | Licensed under <a href="https://github.com/jquery/jquery/blob/master/MIT-LICENSE.txt">The MIT License (MIT)</a>',
'<a href="https://jquery.org/">JQuery</a> | &copy; John Resig | Licensed under <a href="https://github.com/jquery/jquery/blob/master/LICENSE.txt">The MIT License (MIT)</a>',
'<a href="https://briancherne.github.io/jquery-hoverIntent/">hoverIntent</a> | &copy; Brian Cherne | Licensed under <a href="https://en.wikipedia.org/wiki/MIT_License">The MIT License (MIT)</a>',
'<a href="https://www.sceditor.com/">SCEditor</a> | &copy; Sam Clarke | Licensed under <a href="https://en.wikipedia.org/wiki/MIT_License">The MIT License (MIT)</a>',
'<a href="http://wayfarerweb.com/jquery/plugins/animadrag/">animaDrag</a> | &copy; Abel Mohler | Licensed under <a href="https://en.wikipedia.org/wiki/MIT_License">The MIT License (MIT)</a>',
Expand Down
12 changes: 6 additions & 6 deletions Themes/default/Admin.template.php
Original file line number Diff line number Diff line change
Expand Up @@ -675,15 +675,15 @@ function template_not_done()
if (!empty($context['continue_percent']))
echo '
<div class="progress_bar">
<div class="full_bar">', $context['continue_percent'], '%</div>
<div class="green_percent" style="width: ', $context['continue_percent'], '%;"></div>
<span>', $context['continue_percent'], '%</span>
<div class="bar" style="width: ', $context['continue_percent'], '%;"></div>
</div>';

if (!empty($context['substep_enabled']))
echo '
<div class="progress_bar">
<div class="full_bar">', $context['substep_title'], ' (', $context['substep_continue_percent'], '%)</div>
<div class="blue_percent" style="width: ', $context['substep_continue_percent'], '%;"></div>
<div class="progress_bar progress_blue">
<span>', $context['substep_title'], ' (', $context['substep_continue_percent'], '%)</span>
<div class="bar" style="width: ', $context['substep_continue_percent'], '%;"></div>
</div>';

echo '
Expand Down Expand Up @@ -1625,7 +1625,7 @@ function template_admin_quick_search()
echo '
<span class="floatright admin_search">
<span class="generic_icons filter centericon"></span>
<input type="search" name="search_term" value="', $txt['admin_search'], '" onclick="if (this.value == \'', $txt['admin_search'], '\') this.value = \'\';">
<input type="search" name="search_term" placeholder="', $txt['admin_search'], '">
<select name="search_type">
<option value="internal"', (empty($context['admin_preferences']['sb']) || $context['admin_preferences']['sb'] == 'internal' ? ' selected' : ''), '>', $txt['admin_search_type_internal'], '</option>
<option value="member"', (!empty($context['admin_preferences']['sb']) && $context['admin_preferences']['sb'] == 'member' ? ' selected' : ''), '>', $txt['admin_search_type_member'], '</option>
Expand Down
2 changes: 1 addition & 1 deletion Themes/default/BoardIndex.template.php
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ function template_bi_board_children($board)
foreach ($board['children'] as $child)
{
if (!$child['is_redirect'])
$child['link'] = ''. ($child['new'] ? '<a href="' . $scripturl . '?action=unread;board=' . $child['id'] . '" title="' . $txt['new_posts'] . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')"><span class="new_posts">' . $txt['new'] . '</span></a>' : '') . '<a href="' . $child['href'] . '" ' . ($child['new'] ? 'class="board_new_posts" ' : '') . 'title="' . ($child['new'] ? $txt['new_posts'] : $txt['old_posts']) . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')">' . $child['name'] . '</a>';
$child['link'] = ''. ($child['new'] ? '<a href="' . $scripturl . '?action=unread;board=' . $child['id'] . '" title="' . $txt['new_posts'] . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')" class="new_posts">' . $txt['new'] . '</a>' : '') . '<a href="' . $child['href'] . '" ' . ($child['new'] ? 'class="board_new_posts" ' : '') . 'title="' . ($child['new'] ? $txt['new_posts'] : $txt['old_posts']) . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')">' . $child['name'] . '</a>';
else
$child['link'] = '<a href="' . $child['href'] . '" title="' . comma_format($child['posts']) . ' ' . $txt['redirects'] . ' - ' . $child['short_description'] . '">' . $child['name'] . '</a>';

Expand Down
32 changes: 24 additions & 8 deletions Themes/default/Display.template.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ function template_main()
{
echo '
<dt class="', $option['voted_this'] ? ' voted' : '', '">', $option['option'], '</dt>
<dd class="statsbar', $option['voted_this'] ? ' voted' : '', '">';
<dd class="statsbar generic_bar', $option['voted_this'] ? ' voted' : '', '">';

if ($context['allow_results_view'])
echo '
Expand Down Expand Up @@ -1024,13 +1024,29 @@ function template_quickreply()
</h3>
</div>
<div id="quickReplyOptions">
<div class="roundframe">
', empty($options['use_editor_quick_reply']) ? '
<p class="smalltext lefttext">' . $txt['quick_reply_desc'] . '</p>' : '', '
', $context['is_locked'] ? '<p class="alert smalltext">' . $txt['quick_reply_warning'] . '</p>' : '',
!empty($context['oldTopicError']) ? '<p class="alert smalltext">' . sprintf($txt['error_old_topic'], $modSettings['oldTopicDays']) . '</p>' : '', '
', $context['can_reply_approved'] ? '' : '<em>' . $txt['wait_for_approval'] . '</em>', '
', !$context['can_reply_approved'] && $context['require_verification'] ? '<br>' : '', '
<div class="roundframe">';

// Are we hiding the full editor?
if (empty($options['use_editor_quick_reply']))
echo '
<p class="smalltext lefttext">', $txt['quick_reply_desc'], '</p>';

// Is the topic locked?
if ($context['is_locked'])
echo '
<p class="alert smalltext">', $txt['quick_reply_warning'], '</p>';

// Show a warning if the topic is old
if (!empty($context['oldTopicError']))
echo '
<p class="alert smalltext">', sprintf($txt['error_old_topic'], $modSettings['oldTopicDays']), '</p>';

// Does the post need approval?
if (!$context['can_reply_approved'])
echo '
<p><em>', $txt['wait_for_approval'], '</em></p>';

echo '
<form action="', $scripturl, '?board=', $context['current_board'], ';action=post2" method="post" accept-charset="', $context['character_set'], '" name="postmodify" id="postmodify" onsubmit="submitonce(this);">
<input type="hidden" name="topic" value="', $context['current_topic'], '">
<input type="hidden" name="subject" value="', $context['response_prefix'], $context['subject'], '">
Expand Down
11 changes: 8 additions & 3 deletions Themes/default/Errors.template.php
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,14 @@ function template_attachment_errors()
<div class="padding">
<div class="noticebox">',
$context['error_message'], '
</div>',
!empty($context['back_link']) ? ('<a class="button" href="' . $scripturl . $context['back_link'] . '">' . $txt['back'] . '</a>') : '',
'<span style="float: right; margin:.5em;"></span>
</div>';

if (!empty($context['back_link']))
echo '
<a class="button" href="', $scripturl, $context['back_link'], '">', $txt['back'], '</a>';

echo '
<span style="float: right; margin:.5em;"></span>
<a class="button" href="', $scripturl, $context['redirect_link'], '">', $txt['continue'], '</a>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions Themes/default/ManageNews.template.php
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,8 @@ function template_email_members_send()
</div>
<div class="windowbg">
<div class="progress_bar">
<div class="full_bar">', $context['percentage_done'], '% ', $txt['email_done'], '</div>
<div class="green_percent" style="width: ', $context['percentage_done'], '%;"></div>
<span>', $context['percentage_done'], '% ', $txt['email_done'], '</span>
<div class="bar" style="width: ', $context['percentage_done'], '%;"></div>
</div>
<hr>
<input type="submit" name="b" value="', $txt['email_continue'], '" class="button">
Expand Down
4 changes: 2 additions & 2 deletions Themes/default/ManageSearch.template.php
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,8 @@ function template_create_index_progress()
<div>
<p>', $txt['search_create_index_not_ready'], '</p>
<div class="progress_bar">
<div class="full_bar">', $context['percentage'], '%</div>
<div class="green_percent" style="width: ', $context['percentage'], '%;"></div>
<span>', $context['percentage'], '%</span>
<div class="bar" style="width: ', $context['percentage'], '%;"></div>
</div>
</div>
<hr>
Expand Down
8 changes: 4 additions & 4 deletions Themes/default/Memberlist.template.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,13 @@ function template_main()
if (!isset($context['disabled_fields']['posts']))
{
echo '
<td class="centertext" style="white-space: nowrap; width: 15px">', $member['posts'], '</td>
<td class="centertext statsbar" style="width: 120px">';
<td class="centertext post_count">', $member['posts'], '</td>
<td class="statsbar">';

if (!empty($member['post_percent']))
echo '
<div class="bar" style="width: ', $member['post_percent'] + 4, 'px;">
<div style="width: ', $member['post_percent'], 'px;"></div>
<div class="generic_bar">
<div class="bar" style="width: ', $member['post_percent'], '%;"></div>
</div>';

echo '
Expand Down
4 changes: 2 additions & 2 deletions Themes/default/MessageIndex.template.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ function template_main()
foreach ($board['children'] as $child)
{
if (!$child['is_redirect'])
$child['link'] = ''. ($child['new'] ? '<a href="' . $scripturl . '?action=unread;board=' . $child['id'] . '" title="' . $txt['new_posts'] . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')"><span class="new_posts">' . $txt['new'] . '</span></a>' : '') . '<a href="' . $child['href'] . '" ' . ($child['new'] ? 'class="board_new_posts" ' : '') . 'title="' . ($child['new'] ? $txt['new_posts'] : $txt['old_posts']) . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')">' . $child['name'] . '</a>';
$child['link'] = ''. ($child['new'] ? '<a href="' . $scripturl . '?action=unread;board=' . $child['id'] . '" title="' . $txt['new_posts'] . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')" class="new_posts">' . $txt['new'] . '</a>' : '') . '<a href="' . $child['href'] . '" ' . ($child['new'] ? 'class="board_new_posts" ' : '') . 'title="' . ($child['new'] ? $txt['new_posts'] : $txt['old_posts']) . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')">' . $child['name'] . '</a>';
else
$child['link'] = '<a href="' . $child['href'] . '" title="' . comma_format($child['posts']) . ' ' . $txt['redirects'] . '">' . $child['name'] . '</a>';

Expand Down Expand Up @@ -257,7 +257,7 @@ function template_main()

echo '
<div class="message_index_title">
', $topic['new'] && $context['user']['is_logged'] ? '<a href="' . $topic['new_href'] . '" id="newicon' . $topic['first_post']['id'] . '"><span class="new_posts">' . $txt['new'] . '</span></a>' : '', '
', $topic['new'] && $context['user']['is_logged'] ? '<a href="' . $topic['new_href'] . '" id="newicon' . $topic['first_post']['id'] . '" class="new_posts">' . $txt['new'] . '</a>' : '', '
<span class="preview', $topic['is_sticky'] ? ' bold_text' : '', '" title="', $topic[(empty($modSettings['message_index_preview_first']) ? 'last_post' : 'first_post')]['preview'], '">
<span id="msg_', $topic['first_post']['id'], '">', $topic['first_post']['link'], (!$topic['approved'] ? '&nbsp;<em>(' . $txt['awaiting_approval'] . ')</em>' : ''), '</span>
</span>
Expand Down
13 changes: 6 additions & 7 deletions Themes/default/Packages.template.php
Original file line number Diff line number Diff line change
Expand Up @@ -1781,10 +1781,9 @@ function template_action_permissions()
<div class="windowbg">
<div>
<strong>', $progress_message, '</strong><br>
<br>
<div class="progress_bar">
<div class="full_bar">', $progress_percent, '%</div>
<div class="blue_percent" style="width: ', $progress_percent, '%;"></div>
<div class="progress_bar progress_blue">
<span>', $progress_percent, '%</span>
<div class="bar" style="width: ', $progress_percent, '%;"></div>
</div>
</div>';

Expand All @@ -1797,10 +1796,10 @@ function template_action_permissions()
echo '
<br>
<div>
<strong>', $file_progress_message, '</strong><br><br>
<strong>', $file_progress_message, '</strong><br>
<div class="progress_bar">
<div class="full_bar">', $file_progress_percent, '%</div>
<div class="green_percent" style="width: ', $file_progress_percent, '%;"></div>
<span>', $file_progress_percent, '%</span>
<div class="bar" style="width: ', $file_progress_percent, '%;"></div>
</div>
</div>';
}
Expand Down
23 changes: 16 additions & 7 deletions Themes/default/Post.template.php
Original file line number Diff line number Diff line change
Expand Up @@ -415,15 +415,19 @@ function addPollOption()
</div>
</div>
</div><!-- .attached_BBC -->
<div class="progressBar" role="progressBar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0"><span></span></div>
<div class="progress_bar" role="progressBar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0">
<div class="bar"></div>
</div>
<div class="attach-ui">
<a data-dz-remove class="button cancel">', $txt['modify_cancel'] ,'</a>
<a class="button upload">', $txt['upload'] ,'</a>
</div>
</div><!-- .attach-info -->
</div><!-- #au-template -->
</div><!-- #au-previews -->
<div id ="maxFiles_progress" class="maxFiles_progress progressBar"><span></span></div>
<div id ="maxFiles_progress" class="maxFiles_progress progress_bar">
<div class="bar"></div>
</div>
<div id ="maxFiles_progress_text"></div>';

echo '
Expand All @@ -437,10 +441,15 @@ function addPollOption()
<a class="button" id="attach-cancelAll">', $txt['attached_cancelAll'] ,'</a>
<a class="button" id="attach-uploadAll">', $txt['attached_uploadAll'] ,'</a>
<a class="button fileinput-button">', $txt['attach_add'] ,'</a>
<div id="total-progress" class="progressBar" role="progressBar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0"><span></span></div>
<div id="total-progress" class="progress_bar" role="progressBar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0">
<div class="bar"></div>
</div>
<div class="fallback">
<input type="file" multiple="multiple" name="attachment[]" id="attachment1" class="fallback"> (<a href="javascript:void(0);" onclick="cleanFileInput(\'attachment1\');">', $txt['clean_attach'], '</a>)
', empty($modSettings['attachmentSizeLimit']) ? '' : ('<input type="hidden" name="MAX_FILE_SIZE" value="' . $modSettings['attachmentSizeLimit'] * 1024 . '">');
<input type="file" multiple="multiple" name="attachment[]" id="attachment1" class="fallback"> (<a href="javascript:void(0);" onclick="cleanFileInput(\'attachment1\');">', $txt['clean_attach'], '</a>)';

if (!empty($modSettings['attachmentSizeLimit']))
echo '
<input type="hidden" name="MAX_FILE_SIZE" value="' . $modSettings['attachmentSizeLimit'] * 1024 . '">';

// Show more boxes if they aren't approaching that limit.
if ($context['num_allowed_attachments'] > 1)
Expand Down Expand Up @@ -1093,8 +1102,8 @@ function template_announcement_send()
', $txt['announce_sending'], ' <a href="', $scripturl, '?topic=', $context['current_topic'], '.0" target="_blank" rel="noopener">', $context['topic_subject'], '</a>
</p>
<div class="progress_bar">
<div class="full_bar">', $context['percentage_done'], '% ', $txt['announce_done'], '</div>
<div class="green_percent" style="width: ', $context['percentage_done'], '%;"></div>
<span>', $context['percentage_done'], '% ', $txt['announce_done'], '</span>
<div class="bar" style="width: ', $context['percentage_done'], '%;"></div>
</div>
<hr>
<div id="confirm_buttons">
Expand Down
Loading

0 comments on commit a0ed2ce

Please sign in to comment.