Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/24/2011 02:45:58 PM (11 years ago)
Author:
johnjamesjacoby
Message:

Normalize single topic and topic/post edit templates, and clean up associated CSS

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-themes/bp-default/groups/single/forum/edit.php

    r3771 r3912  
    1 <?php do_action( 'bp_before_group_forum_edit_form' ) ?>
     1<?php do_action( 'bp_before_group_forum_edit_form' ); ?>
    22
    33<?php if ( bp_has_forum_topic_posts() ) : ?>
    44
    5     <form action="<?php bp_forum_topic_action() ?>" method="post" id="forum-topic-form" class="standard-form">
     5    <form action="<?php bp_forum_topic_action(); ?>" method="post" id="forum-topic-form" class="standard-form">
     6
     7        <div class="item-list-tabs" id="subnav" role="navigation">
     8            <ul>
     9                <li>
     10                    <a href="#post-topic-reply">&darr; <?php _e( 'Reply', 'buddypress' ); ?></a>
     11                </li>
     12
     13                <?php if ( !bp_forum_directory_is_disabled() ) : ?>
     14
     15                    <li>
     16                        <a href="<?php bp_forum_directory_permalink(); ?>"><?php _e( 'Forum Directory', 'buddypress'); ?></a>
     17                    </li>
     18
     19                <?php endif; ?>
     20
     21            </ul>
     22        </div>
    623
    724        <div id="topic-meta">
    8             <h3><?php bp_the_topic_title() ?> (<?php bp_the_topic_total_post_count() ?>)</h3>
    9             <a class="button" href="<?php bp_forum_permalink() ?>/">&larr; <?php _e( 'Group Forum', 'buddypress' ) ?></a> &nbsp; <a class="button" href="<?php bp_forum_directory_permalink() ?>/"><?php _e( 'Group Forum Directory', 'buddypress') ?></a>
     25            <h3><?php _e( 'Edit:', 'buddypress' ); ?> <?php bp_the_topic_title(); ?> (<?php bp_the_topic_total_post_count(); ?>)</h3>
    1026
    1127            <?php if ( bp_group_is_admin() || bp_group_is_mod() || bp_get_the_topic_is_mine() ) : ?>
    12                 <div class="admin-links"><?php bp_the_topic_admin_links() ?></div>
     28
     29                <div class="last admin-links">
     30
     31                    <?php bp_the_topic_admin_links(); ?>
     32
     33                </div>
     34
    1335            <?php endif; ?>
     36
     37            <?php do_action( 'bp_group_forum_topic_meta' ); ?>
     38
    1439        </div>
    1540
     
    2045                <div id="edit-topic">
    2146
    22                     <?php do_action( 'bp_group_before_edit_forum_topic' ) ?>
     47                    <?php do_action( 'bp_group_before_edit_forum_topic' ); ?>
    2348
    24                     <p><strong><?php _e( 'Edit Topic:', 'buddypress' ) ?></strong></p>
     49                    <label for="topic_title"><?php _e( 'Title:', 'buddypress' ); ?></label>
     50                    <input type="text" name="topic_title" id="topic_title" value="<?php bp_the_topic_title(); ?>" />
    2551
    26                     <label for="topic_title"><?php _e( 'Title:', 'buddypress' ) ?></label>
    27                     <input type="text" name="topic_title" id="topic_title" value="<?php bp_the_topic_title() ?>" />
     52                    <label for="topic_text"><?php _e( 'Content:', 'buddypress' ); ?></label>
     53                    <textarea name="topic_text" id="topic_text"><?php bp_the_topic_text(); ?></textarea>
    2854
    29                     <label for="topic_text"><?php _e( 'Content:', 'buddypress' ) ?></label>
    30                     <textarea name="topic_text" id="topic_text"><?php bp_the_topic_text() ?></textarea>
     55                    <?php do_action( 'bp_group_after_edit_forum_topic' ); ?>
    3156
    32                     <?php do_action( 'bp_group_after_edit_forum_topic' ) ?>
     57                    <p class="submit"><input type="submit" name="save_changes" id="save_changes" value="<?php _e( 'Save Changes', 'buddypress' ); ?>" /></p>
    3358
    34                     <p class="submit"><input type="submit" name="save_changes" id="save_changes" value="<?php _e( 'Save Changes', 'buddypress' ) ?>" /></p>
    35 
    36                     <?php wp_nonce_field( 'bp_forums_edit_topic' ) ?>
     59                    <?php wp_nonce_field( 'bp_forums_edit_topic' ); ?>
    3760
    3861                </div>
     
    4265                <div id="edit-post">
    4366
    44                     <?php do_action( 'bp_group_before_edit_forum_post' ) ?>
     67                    <?php do_action( 'bp_group_before_edit_forum_post' ); ?>
    4568
    46                     <p><strong><?php _e( 'Edit Post:', 'buddypress' ) ?></strong></p>
    47 
    48                     <textarea name="post_text" id="post_text"><?php bp_the_topic_post_edit_text() ?></textarea>
     69                    <textarea name="post_text" id="post_text"><?php bp_the_topic_post_edit_text(); ?></textarea>
    4970
    5071                    <?php do_action( 'bp_group_after_edit_forum_post' ) ?>
    5172
    52                     <p class="submit"><input type="submit" name="save_changes" id="save_changes" value="<?php _e( 'Save Changes', 'buddypress' ) ?>" /></p>
     73                    <p class="submit"><input type="submit" name="save_changes" id="save_changes" value="<?php _e( 'Save Changes', 'buddypress' ); ?>" /></p>
    5374
    54                     <?php wp_nonce_field( 'bp_forums_edit_post' ) ?>
     75                    <?php wp_nonce_field( 'bp_forums_edit_post' ); ?>
    5576
    5677                </div>
     
    6586
    6687    <div id="message" class="info">
    67         <p><?php _e( 'This topic does not exist.', 'buddypress' ) ?></p>
     88        <p><?php _e( 'This topic does not exist.', 'buddypress' ); ?></p>
    6889    </div>
    6990
    7091<?php endif;?>
    7192
    72 <?php do_action( 'bp_after_group_forum_edit_form' ) ?>
     93<?php do_action( 'bp_after_group_forum_edit_form' ); ?>
Note: See TracChangeset for help on using the changeset viewer.