Skip to:
Content

bbPress.org


Ignore:
Timestamp:
02/04/2011 05:14:50 PM (15 years ago)
Author:
johnjamesjacoby
Message:

Clean up merge and split template files. Only show certain options if other topics exist within the current forum. Add bbp-template-notice.info class for general informational messages.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/plugin/bbp-themes/bbp-twentyten/form-bbp_merge.php

    r2818 r2837  
    2020                <legend><?php printf( __( 'Merge topic "%s"', 'bbpress' ), bbp_get_topic_title() ); ?></legend>
    2121
    22                 <div class="alignleft">
     22                <div>
    2323
    24                     <p><?php _e( 'Select the topic to merge this one into. The destination topic will remain the lead topic, and this one will change into a reply.', 'bbpress' ); ?></p>
    25 
    26                     <p><?php _e( 'To keep this topic as the lead, go to the other topic and use the merge tool from there instead.', 'bbpress' ); ?></p>
     24                    <div class="bbp-template-notice info">
     25                        <p><?php _e( 'Select the topic to merge this one into. The destination topic will remain the lead topic, and this one will change into a reply.', 'bbpress' ); ?></p>
     26                        <p><?php _e( 'To keep this topic as the lead, go to the other topic and use the merge tool from there instead.', 'bbpress' ); ?></p>
     27                    </div>
    2728
    2829                    <div class="bbp-template-notice">
     
    3132
    3233                    <div class="bbp-template-notice error">
    33                         <p><?php _e( '<strong>WARNING:</strong> This process cannot undone, so double-check everything before you .', 'bbpress' ); ?></p>
     34                        <p><?php _e( '<strong>WARNING:</strong> This process cannot undone.', 'bbpress' ); ?></p>
    3435                    </div>
    35 
    36                     <?php // @todo Make a codex and add the merge topic docs. ?>
    37                     <?php // printf( __( 'For more information, check <a href="%s">this documentation</a>.', 'bbpress' ), 'http://codex.bbpress.org/Merge_Topics' ); ?>
    3836
    3937                    <fieldset>
    4038                        <legend><?php _e( 'Destination', 'bbpress' ); ?></legend>
    4139                        <div>
    42                             <label for="bbp_destination_topic"><?php _e( 'Merge with this topic:', 'bbpress' ); ?></label>
    43                             <?php
    44                                 global $bbp;
    45                                 bbp_dropdown( array( 'post_type' => $bbp->topic_id, 'post_parent' => bbp_get_topic_forum_id( bbp_get_topic_id() ), 'selected' => -1, 'exclude' => bbp_get_topic_id(), 'select_id' => 'bbp_destination_topic', 'none_found' => __( 'No topics were found to which the topic could be merged to!', 'bbpress' ) ) );
    46                             ?>
     40                            <?php if ( bbp_has_topics( array( 'ignore_sticky_topics' => true, 'post_parent' => bbp_get_topic_forum_id( bbp_get_topic_id() ), 'post__not_in' => array( bbp_get_topic_id() ) ) ) ) : ?>
     41
     42                                <label for="bbp_destination_topic"><?php _e( 'Merge with this topic:', 'bbpress' ); ?></label>
     43
     44                                <?php
     45                                    global $bbp;
     46                                    bbp_dropdown( array(
     47                                        'post_type'   => $bbp->topic_id,
     48                                        'post_parent' => bbp_get_topic_forum_id( bbp_get_topic_id() ),
     49                                        'selected'    => -1,
     50                                        'exclude'     => bbp_get_topic_id(),
     51                                        'select_id'   => 'bbp_destination_topic',
     52                                        'none_found'  => __( 'No topics were found to which the topic could be merged to!', 'bbpress' )
     53                                    ) );
     54                                ?>
     55
     56                            <?php else : ?>
     57
     58                                <label><?php _e( 'There are no other topics in this forum to merge with.', 'bbpress' ); ?></label>
     59
     60                            <?php endif; ?>
     61
    4762                        </div>
    4863                    </fieldset>
Note: See TracChangeset for help on using the changeset viewer.