Skip to content

Commit

Permalink
#912 Small refactorings
Browse files Browse the repository at this point in the history
  • Loading branch information
Yannick committed Sep 7, 2014
1 parent ca63295 commit 57fa45e
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 36 deletions.
32 changes: 32 additions & 0 deletions style/Sunrise/objects/comment.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<div class="postview">
<div id="p<?php echo $cur_post['id'] ?>" class="row topic <?php echo ($post_count % 2 == 0) ? ' roweven' : ' rowodd' ?><?php if ($cur_post['id'] == $cur_topic['first_post_id']) echo ' firstpost'; ?><?php if ($post_count == 1) echo ' onlypost'; ?><?php if ($cur_post['marked'] == true) echo ' marked'; ?>">
<div class="col-md-3">
<div class="profile-card">
<div class="profile-card-head">
<div class="user-avatar thumbnail <?php echo $is_online; ?>">
<?php echo $user_avatar ?>
</div>
<h2><?php echo $username ?></h2>
<h3><?php echo $user_title ?></h3>
</div>
<div class="profile-card-body hidden-sm hidden-xs">
<?php if (count($user_info)) echo "\t\t\t\t\t\t".implode("\n\t\t\t\t\t\t", $user_info)."\n"; ?>
</div>
</div>
</div>
<div class="col-md-9">
<div class="panel panel-default panel-topic panel-border">
<div class="panel-heading">
<div class="comment-arrow hidden-sm hidden-xs"></div>
<h3 class="panel-title"><span class="postnr">#<?php echo ($start_from + $post_count) ?><span class="pull-right"><a class="posttime" href="viewtopic.php?pid=<?php echo $cur_post['id'].'#p'.$cur_post['id'] ?>"><?php echo format_time($cur_post['posted']) ?></a></span></span></h3>
</div>
<div class="panel-body">
<?php echo $cur_post['message']."\n" ?>
<?php if (($signature != '') || (!$luna_user['is_guest'])) echo '<hr />'; ?>
<?php if ($signature != '') echo "\t\t\t\t\t".'<div class="postsignature">'.$signature.'</div>'."\n"; ?>
<?php if (!$luna_user['is_guest']) { ?><div class="pull-right post-actions btn-group"><?php if (count($post_actions)) echo "\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t".implode("\n\t\t\t\t\t\t", $post_actions)."\n\t\t\t\t\t\n\t\t\t\t\n" ?></div><?php } ?>
</div>
</div>
</div>
</div>
</div>
39 changes: 3 additions & 36 deletions style/Sunrise/thread.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,51 +12,18 @@
<div class="btn-breadcrumb">
<a class="btn btn-primary" href="viewforum.php?id=<?php echo $cur_topic['forum_id'] ?>"><span class="fa fa-chevron-left"></span> <?php echo luna_htmlspecialchars($cur_topic['forum_name']) ?></a>
</div>
<ul class="pagination pull-right btn-toolbar">
<ul class="pagination pull-right">
<?php echo $paging_links ?>
<?php echo $post_link ?>
</ul>
</div>

<div class="postview">
<div id="p<?php echo $cur_post['id'] ?>" class="row topic <?php echo ($post_count % 2 == 0) ? ' roweven' : ' rowodd' ?><?php if ($cur_post['id'] == $cur_topic['first_post_id']) echo ' firstpost'; ?><?php if ($post_count == 1) echo ' onlypost'; ?><?php if ($cur_post['marked'] == true) echo ' marked'; ?>">
<div class="col-md-3">
<div class="profile-card">
<div class="profile-card-head">
<div class="user-avatar thumbnail <?php echo $is_online; ?>">
<?php echo $user_avatar ?>
</div>
<h2><?php echo $username ?></h2>
<h3><?php echo $user_title ?></h3>
</div>
<div class="profile-card-body hidden-sm hidden-xs">
<?php if (count($user_info)) echo "\t\t\t\t\t\t".implode("\n\t\t\t\t\t\t", $user_info)."\n"; ?>
</div>
</div>
</div>
<div class="col-md-9">
<div class="panel panel-default panel-topic panel-border">
<div class="panel-heading">
<div class="comment-arrow hidden-sm hidden-xs"></div>
<h3 class="panel-title"><span class="postnr">#<?php echo ($start_from + $post_count) ?><span class="pull-right"><a class="posttime" href="viewtopic.php?pid=<?php echo $cur_post['id'].'#p'.$cur_post['id'] ?>"><?php echo format_time($cur_post['posted']) ?></a></span></span></h3>
</div>
<div class="panel-body">
<?php echo $cur_post['message']."\n" ?>
<?php if (($signature != '') || (!$luna_user['is_guest'])) echo '<hr />'; ?>
<?php if ($signature != '') echo "\t\t\t\t\t".'<div class="postsignature">'.$signature.'</div>'."\n"; ?>
<?php if (!$luna_user['is_guest']) { ?><div class="pull-right post-actions btn-group"><?php if (count($post_actions)) echo "\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t".implode("\n\t\t\t\t\t\t", $post_actions)."\n\t\t\t\t\t\n\t\t\t\t\n" ?></div><?php } ?>
</div>
</div>
</div>
</div>
</div>
<?php require get_view_path('comment.php'); ?>

<div class="row-nav">
<div class="btn-breadcrumb">
<a class="btn btn-primary" href="viewforum.php?id=<?php echo $cur_topic['forum_id'] ?>"><span class="fa fa-chevron-left"></span> <?php echo luna_htmlspecialchars($cur_topic['forum_name']) ?></a>
</div>
<ul class="pagination pull-right btn-toolbar">
<ul class="pagination pull-right">
<?php echo $paging_links ?>
<?php echo $post_link ?>
</ul>
</div>

0 comments on commit 57fa45e

Please sign in to comment.