[ Index ] |
PHP Cross Reference of BuddyPress |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * BP Nouveau Messages main template. 4 * 5 * This template is used to inject the BuddyPress Backbone views 6 * dealing with user's private messages. 7 * 8 * @since 3.0.0 9 * @version 10.0.0 10 */ 11 12 // Backward Compatibility for plugins still needing the placeholders to be located into this file. 13 if ( ! did_action( '_bp_nouveau_messages_print_placeholders' ) ) { 14 bp_nouveau_messages_print_placeholders(); 15 } 16 ?> 17 18 <script type="text/html" id="tmpl-bp-messages-feedback"> 19 <div class="bp-feedback {{data.type}}"> 20 <span class="bp-icon" aria-hidden="true"></span> 21 <p>{{{data.message}}}</p> 22 </div> 23 </script> 24 25 <?php 26 /** 27 * This view is used to inject hooks buffer 28 */ 29 ?> 30 <script type="text/html" id="tmpl-bp-messages-hook"> 31 {{{data.extraContent}}} 32 </script> 33 34 <script type="text/html" id="tmpl-bp-messages-form"> 35 <?php bp_nouveau_messages_hook( 'before', 'compose_content' ); ?> 36 37 <label for="send-to-input"><?php esc_html_e( 'Send @Username', 'buddypress' ); ?></label> 38 <input type="text" name="send_to" class="send-to-input" id="send-to-input" /> 39 40 <label for="subject"><?php _e( 'Subject', 'buddypress' ); ?></label> 41 <input type="text" name="subject" id="subject"/> 42 43 <div id="bp-message-content"></div> 44 45 <?php bp_nouveau_messages_hook( 'after', 'compose_content' ); ?> 46 47 <div class="submit"> 48 <input type="button" id="bp-messages-send" class="button bp-primary-action" value="<?php echo esc_attr_x( 'Send', 'button', 'buddypress' ); ?>"/> 49 <input type="button" id="bp-messages-reset" class="text-button small bp-secondary-action" value="<?php echo esc_attr_x( 'Reset', 'form reset button', 'buddypress' ); ?>"/> 50 </div> 51 </script> 52 53 <script type="text/html" id="tmpl-bp-messages-editor"> 54 <?php 55 // Add a temporary filter on editor buttons 56 add_filter( 'mce_buttons', 'bp_nouveau_messages_mce_buttons', 10, 1 ); 57 58 wp_editor( 59 '', 60 'message_content', 61 array( 62 'textarea_name' => 'message_content', 63 'teeny' => false, 64 'media_buttons' => false, 65 'dfw' => false, 66 'tinymce' => true, 67 'quicktags' => false, 68 'tabindex' => '3', 69 'textarea_rows' => 5, 70 ) 71 ); 72 73 // Remove the temporary filter on editor buttons 74 remove_filter( 'mce_buttons', 'bp_nouveau_messages_mce_buttons', 10, 1 ); 75 ?> 76 </script> 77 78 <script type="text/html" id="tmpl-bp-messages-paginate"> 79 <# if ( 1 !== data.page ) { #> 80 <button id="bp-messages-prev-page"class="button messages-button"> 81 <span class="dashicons dashicons-arrow-left"></span> 82 <span class="bp-screen-reader-text"><?php echo esc_html_x( 'Previous page', 'link', 'buddypress' ); ?></span> 83 </button> 84 <# } #> 85 86 <# if ( data.total_page !== data.page ) { #> 87 <button id="bp-messages-next-page"class="button messages-button"> 88 <span class="dashicons dashicons-arrow-right"></span> 89 <span class="bp-screen-reader-text"><?php echo esc_html_x( 'Next page', 'link', 'buddypress' ); ?></span> 90 </button> 91 <# } #> 92 </script> 93 94 <script type="text/html" id="tmpl-bp-messages-filters"> 95 <li class="user-messages-search" role="search" data-bp-search="{{data.box}}"> 96 <div class="bp-search messages-search"> 97 <?php bp_nouveau_message_search_form(); ?> 98 </div> 99 </li> 100 <li class="user-messages-bulk-actions"></li> 101 </script> 102 103 <script type="text/html" id="tmpl-bp-bulk-actions"> 104 <input type="checkbox" id="user_messages_select_all" value="1"/> 105 <label for="user_messages_select_all"><?php esc_html_e( 'All Messages', 'buddypress' ); ?></label> 106 <div class="bulk-actions-wrap bp-hide"> 107 <div class="bulk-actions select-wrap"> 108 <label for="user-messages-bulk-actions" class="bp-screen-reader-text"> 109 <?php esc_html_e( 'Select bulk action', 'buddypress' ); ?> 110 </label> 111 <select id="user-messages-bulk-actions"> 112 <# for ( i in data ) { #> 113 <option value="{{data[i].value}}">{{data[i].label}}</option> 114 <# } #> 115 </select> 116 <span class="select-arrow" aria-hidden="true"></span> 117 </div> 118 <button class="messages-button bulk-apply bp-tooltip" type="submit" data-bp-tooltip="<?php echo esc_attr_x( 'Apply', 'button', 'buddypress' ); ?>"> 119 <span class="dashicons dashicons-yes" aria-hidden="true"></span> 120 <span class="bp-screen-reader-text"><?php echo esc_html_x( 'Apply', 'button', 'buddypress' ); ?></span> 121 </button> 122 </div> 123 </script> 124 125 <script type="text/html" id="tmpl-bp-messages-thread"> 126 <div class="thread-cb"> 127 <input class="message-check" type="checkbox" name="message_ids[]" id="bp-message-thread-{{data.id}}" value="{{data.id}}"> 128 <label for="bp-message-thread-{{data.id}}" class="bp-screen-reader-text"><?php esc_html_e( 'Select message:', 'buddypress' ); ?> {{data.subject}}</label> 129 </div> 130 131 <# if ( ! data.recipientsCount ) { #> 132 <div class="thread-from"> 133 <a class="user-link" href="{{data.sender_link}}"> 134 <img class="avatar" src="{{{data.sender_avatar}}}" alt="" /> 135 <span class="bp-screen-reader-text"><?php esc_html_e( 'From:', 'buddypress' ); ?></span> 136 <span class="user-name">{{data.sender_name}}</span> 137 </a> 138 </div> 139 <# } else { 140 var recipient = _.first( data.recipients ); 141 #> 142 <div class="thread-to"> 143 <a class="user-link" href="{{recipient.user_link}}"> 144 <img class="avatar" src="{{{recipient.avatar}}}" alt="" /> 145 <span class="bp-screen-reader-text"><?php esc_html_e( 'To:', 'buddypress' ); ?></span> 146 <span class="user-name">{{recipient.user_name}}</span> 147 </a> 148 149 <# if ( data.toOthers ) { #> 150 <span class="num-recipients">{{data.toOthers}}</span> 151 <# } #> 152 </div> 153 <# } #> 154 155 <div class="thread-content" data-thread-id="{{data.id}}"> 156 <div class="thread-subject"> 157 <span class="thread-count">({{data.count}})</span> 158 <a class="subject" href="../view/{{data.id}}/">{{data.subject}}</a> 159 </div> 160 <p class="excerpt">{{data.excerpt}}</p> 161 </div> 162 <div class="thread-date"> 163 <time datetime="{{data.date.toISOString()}}">{{data.display_date}}</time> 164 </div> 165 </script> 166 167 <script type="text/html" id="tmpl-bp-messages-preview"> 168 <# if ( undefined !== data.content ) { #> 169 170 <h2 class="message-title preview-thread-title"><?php esc_html_e( 'Active conversation:', 'buddypress' ); ?><span class="messages-title">{{{data.subject}}}</span></h2> 171 <div class="preview-content"> 172 <header class="preview-pane-header"> 173 174 <# if ( undefined !== data.recipients ) { #> 175 <dl class="thread-participants"> 176 <dt><?php esc_html_e( 'Participants:', 'buddypress' ); ?></dt> 177 <dd> 178 <ul class="participants-list"> 179 <# for ( i in data.recipients ) { #> 180 <li><a href="{{data.recipients[i].user_link}}" class="bp-tooltip" data-bp-tooltip="{{data.recipients[i].user_name}}"><img class="avatar mini" src="{{{data.recipients[i].avatar}}}" alt="{{data.recipients[i].user_name}}" /></a></li> 181 <# } #> 182 </ul> 183 </dd> 184 </dl> 185 <# } #> 186 187 <div class="actions"> 188 189 <button type="button" class="message-action-delete bp-tooltip bp-icons" data-bp-action="delete" data-bp-tooltip="<?php esc_attr_e( 'Delete conversation.', 'buddypress' ); ?>"> 190 <span class="bp-screen-reader-text"><?php esc_html_e( 'Delete conversation.', 'buddypress' ); ?></span> 191 </button> 192 193 <# if ( undefined !== data.recipients && data.recipients.length > 2 ) { #> 194 <button type="button" class="message-action-exit bp-tooltip bp-icons" data-bp-action="exit" data-bp-tooltip="<?php esc_attr_e( 'Exit conversation.', 'buddypress' ); ?>"> 195 <span class="bp-screen-reader-text"><?php esc_html_e( 'Exit conversation.', 'buddypress' ); ?></span> 196 </button> 197 <# } #> 198 199 <# if ( undefined !== data.star_link ) { #> 200 201 <# if ( false !== data.is_starred ) { #> 202 <a role="button" class="message-action-unstar bp-tooltip bp-icons" href="{{data.star_link}}" data-bp-action="unstar" aria-pressed="true" data-bp-tooltip="<?php esc_attr_e( 'Unstar Conversation', 'buddypress' ); ?>"> 203 <span class="bp-screen-reader-text"><?php esc_html_e( 'Unstar Conversation', 'buddypress' ); ?></span> 204 </a> 205 <# } else { #> 206 <a role="button" class="message-action-star bp-tooltip bp-icons" href="{{data.star_link}}" data-bp-action="star" aria-pressed="false" data-bp-tooltip="<?php esc_attr_e( 'Star Conversation', 'buddypress' ); ?>"> 207 <span class="bp-screen-reader-text"><?php esc_html_e( 'Star Conversation', 'buddypress' ); ?></span> 208 </a> 209 <# } #> 210 211 <# } #> 212 213 <a href="../view/{{data.id}}/" class="message-action-view bp-tooltip bp-icons" data-bp-action="view" data-bp-tooltip="<?php esc_attr_e( 'View full conversation and reply.', 'buddypress' ); ?>"> 214 <span class="bp-screen-reader-text"><?php esc_html_e( 'View full conversation and reply.', 'buddypress' ); ?></span> 215 </a> 216 217 <# if ( data.threadOptions ) { #> 218 <span class="bp-messages-hook thread-options"> 219 {{{data.threadOptions}}} 220 </span> 221 <# } #> 222 </div> 223 </header> 224 225 <div class='preview-message'> 226 {{{data.content}}} 227 </div> 228 229 <# if ( data.inboxListItem ) { #> 230 <table class="bp-messages-hook inbox-list-item"> 231 <tbody> 232 <tr>{{{data.inboxListItem}}}</tr> 233 </tbody> 234 </table> 235 <# } #> 236 </div> 237 <# } #> 238 </script> 239 240 <script type="text/html" id="tmpl-bp-messages-single-header"> 241 <h2 id="message-subject" class="message-title single-thread-title">{{{data.subject}}}</h2> 242 <header class="single-message-thread-header"> 243 <# if ( undefined !== data.recipients ) { #> 244 <dl class="thread-participants"> 245 <dt><?php esc_html_e( 'Participants:', 'buddypress' ); ?></dt> 246 <dd> 247 <ul class="participants-list"> 248 <# for ( i in data.recipients ) { #> 249 <li><a href="{{data.recipients[i].user_link}}" class="bp-tooltip" data-bp-tooltip="{{data.recipients[i].user_name}}"><img class="avatar mini" src="{{{data.recipients[i].avatar}}}" alt="{{data.recipients[i].user_name}}" /></a></li> 250 <# } #> 251 </ul> 252 </dd> 253 </dl> 254 <# } #> 255 256 <div class="actions"> 257 <button type="button" class="message-action-delete bp-tooltip bp-icons" data-bp-action="delete" data-bp-tooltip="<?php esc_attr_e( 'Delete conversation.', 'buddypress' ); ?>"> 258 <span class="bp-screen-reader-text"><?php esc_html_e( 'Delete conversation.', 'buddypress' ); ?></span> 259 </button> 260 261 <# if ( undefined !== data.recipients && data.recipients.length > 2 ) { #> 262 <button type="button" class="message-action-exit bp-tooltip bp-icons" data-bp-action="exit" data-bp-tooltip="<?php esc_attr_e( 'Exit conversation.', 'buddypress' ); ?>"> 263 <span class="bp-screen-reader-text"><?php esc_html_e( 'Exit conversation.', 'buddypress' ); ?></span> 264 </button> 265 <# } #> 266 </div> 267 </header> 268 </script> 269 270 <script type="text/html" id="tmpl-bp-messages-single-list"> 271 <div class="message-metadata"> 272 <# if ( data.beforeMeta ) { #> 273 <div class="bp-messages-hook before-message-meta">{{{data.beforeMeta}}}</div> 274 <# } #> 275 276 <a href="{{data.sender_link}}" class="user-link"> 277 <img class="avatar" src="{{{data.sender_avatar}}}" alt="" /> 278 <strong>{{data.sender_name}}</strong> 279 </a> 280 281 <time datetime="{{data.date.toISOString()}}" class="activity">{{data.display_date}}</time> 282 283 <div class="actions"> 284 <# if ( undefined !== data.star_link ) { #> 285 286 <button type="button" class="message-action-unstar bp-tooltip bp-icons <# if ( false === data.is_starred ) { #>bp-hide<# } #>" data-bp-star-link="{{data.star_link}}" data-bp-action="unstar" data-bp-tooltip="<?php esc_attr_e( 'Unstar Message', 'buddypress' ); ?>"> 287 <span class="bp-screen-reader-text"><?php esc_html_e( 'Unstar Message', 'buddypress' ); ?></span> 288 </button> 289 290 <button type="button" class="message-action-star bp-tooltip bp-icons <# if ( false !== data.is_starred ) { #>bp-hide<# } #>" data-bp-star-link="{{data.star_link}}" data-bp-action="star" data-bp-tooltip="<?php esc_attr_e( 'Star Message', 'buddypress' ); ?>"> 291 <span class="bp-screen-reader-text"><?php esc_html_e( 'Star Message', 'buddypress' ); ?></span> 292 </button> 293 294 <# } #> 295 </div> 296 297 <# if ( data.afterMeta ) { #> 298 <div class="bp-messages-hook after-message-meta">{{{data.afterMeta}}}</div> 299 <# } #> 300 </div> 301 302 <# if ( data.beforeContent ) { #> 303 <div class="bp-messages-hook before-message-content">{{{data.beforeContent}}}</div> 304 <# } #> 305 306 <div class="message-content">{{{data.content}}}</div> 307 308 <# if ( data.afterContent ) { #> 309 <div class="bp-messages-hook after-message-content">{{{data.afterContent}}}</div> 310 <# } #> 311 312 </script> 313 314 <script type="text/html" id="tmpl-bp-messages-single"> 315 <?php bp_nouveau_messages_hook( 'before', 'thread_content' ); ?> 316 317 <div id="bp-message-thread-header" class="message-thread-header"></div> 318 319 <?php bp_nouveau_messages_hook( 'before', 'thread_list' ); ?> 320 321 <ul id="bp-message-thread-list"></ul> 322 323 <?php bp_nouveau_messages_hook( 'after', 'thread_list' ); ?> 324 325 <?php bp_nouveau_messages_hook( 'before', 'thread_reply' ); ?> 326 327 <form id="send-reply" class="standard-form send-reply"> 328 <div class="message-box"> 329 <div class="message-metadata"> 330 331 <?php bp_nouveau_messages_hook( 'before', 'reply_meta' ); ?> 332 333 <div class="avatar-box"> 334 <?php bp_loggedin_user_avatar( 'type=thumb&height=30&width=30' ); ?> 335 336 <strong><?php esc_html_e( 'Send a Reply', 'buddypress' ); ?></strong> 337 </div> 338 339 <?php bp_nouveau_messages_hook( 'after', 'reply_meta' ); ?> 340 341 </div><!-- .message-metadata --> 342 343 <div class="message-content"> 344 345 <?php bp_nouveau_messages_hook( 'before', 'reply_box' ); ?> 346 347 <label for="message_content" class="bp-screen-reader-text"><?php _e( 'Reply to Message', 'buddypress' ); ?></label> 348 <div id="bp-message-content"></div> 349 350 <?php bp_nouveau_messages_hook( 'after', 'reply_box' ); ?> 351 352 <div class="submit"> 353 <input type="submit" name="send" value="<?php echo esc_attr_x( 'Send Reply', 'button', 'buddypress' ); ?>" id="send_reply_button"/> 354 </div> 355 356 </div><!-- .message-content --> 357 358 </div><!-- .message-box --> 359 </form> 360 361 <?php bp_nouveau_messages_hook( 'after', 'thread_reply' ); ?> 362 363 <?php bp_nouveau_messages_hook( 'after', 'thread_content' ); ?> 364 </script>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Fri Feb 14 01:00:59 2025 | Cross-referenced by PHPXref 0.7.1 |