Advertisement
nlozovan

Untitled

Oct 3rd, 2014
251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.21 KB | None | 0 0
  1. <?php
  2. /**
  3. * Template for the Detailed mode - artist single page.
  4. */
  5.  
  6. get_header();
  7. ?>
  8. <div class="container-fluid">
  9. <div class="row">
  10. <div class="col-xs-12">
  11. <ul class="list-group">
  12. <li class="list-group-item">
  13. <div class="ap-header">
  14. <div class="row">
  15. <div class="col-xs-12 col-sm-7 col-md-8">
  16. <div class="pull-left">
  17. <div class="ap-header-title">
  18. <h5><?php the_title(); ?></h5>
  19. <h4>
  20. <small><?php _e( 'EDIT VIEW', 'tuffaha' ); ?></small>
  21. </h4>
  22. </div> <!-- end ap-header-title -->
  23. </div>
  24. </div>
  25. <div class="col-xs-12 col-sm-5 col-md-4">
  26. <div class="pull-right">
  27. <div class="ap-header-views">
  28. <div class="btn-group">
  29. <a href="?view_type=simple" class="btn btn-default"><?php _e( 'SIMPLE', 'tuffaha' ); ?></a>
  30. <a href="?view_type=detailed" class="btn btn-default"><?php _e( 'DETAILED', 'tuffaha' ); ?></a>
  31. <a href="?view_type=edit" class="btn btn-default active"><?php _e( 'EDIT', 'tuffaha' ); ?></a>
  32. </div>
  33. </div> <!-- end ap-header-views -->
  34. </div>
  35. </div>
  36. </div>
  37. </div> <!-- end ap-header -->
  38. </li>
  39.  
  40. <li class="list-group-item">
  41. <div class="ap-content">
  42. <div class="row">
  43. <div class="col-xs-12 col-sm-3 col-sm-push-9 col-md-4 col-md-push-8">
  44. <div class="ap-content-featimg">
  45. <a href="#" class="thumbnail" onclick="event.preventDefault()">
  46. <img class="thumb" src="<?php echo Tuffaha::get_post_img( get_the_ID(), 720, 720, true ); ?>" alt="<?php echo Tuffaha::get_alt_image(); ?>">
  47. </a>
  48. <input type="file" id="featured" name="featured" accept="image/*" class="hidden"/>
  49. <div class="ap-gallery-item-control">
  50. <div class="ap-gallery-item-buttons">
  51. <i class="icon-like"></i>
  52. <i class="icon-dislike"></i>
  53. <i class="icon-pending"></i>
  54. <i class="icon-delete"></i>
  55. </div>
  56. <div class="ap-gallery-item-info">
  57. <span><a href="#"><?php _e( 'Suggest better image', 'tuffaha' ); ?></a></span>
  58. </div>
  59. </div>
  60. </div> <!-- end ap-content-featimg -->
  61. </div>
  62. <div class="col-xs-12 col-sm-9 col-sm-pull-3 col-md-8 col-md-pull-4">
  63. <div class="ap-content-terms">
  64. <dl class="dl-horizontal">
  65.  
  66. <?php $boxes = get_option( 'post_boxes' );
  67. $boxes_positions = get_option( 'post_box_position' );
  68.  
  69. foreach ( $boxes_positions as $position => $box_id ) {
  70.  
  71. $post_cats = wp_get_post_terms( get_the_ID(), 'category', array(
  72. 'fields' => 'ids'
  73. ) );
  74. $post_tags = wp_get_post_terms( get_the_ID(), 'post_tag', array(
  75. 'fields' => 'ids'
  76. ) );
  77.  
  78. // if intersection of box cats/tags with post cats/tags aren't equal with box cats/tags
  79. if ( count( array_intersect( $post_cats, $boxes[ $box_id]['categories'] ) ) != count( $boxes[ $box_id]['categories'] )
  80. && count( array_intersect( $post_tags, $boxes[ $box_id]['tags'] ) ) != count( $boxes[ $box_id]['tags'] ) ) {
  81.  
  82. continue; // continue next foreach cycle without ending current one
  83. } ?>
  84.  
  85. <dt>
  86. <?php echo $boxes[ $box_id ]['name']; ?>:
  87. </dt>
  88. <dd>
  89. <ul class="list-inline">
  90. <!-- foreach within this box terms -->
  91. <li>asdhashd</li>
  92. <li>asdhashd</li>
  93. <li>asdhashd</li>
  94. <li>asdhashd</li>
  95. <li>asdhashd</li>
  96. <li>asdhashd</li>
  97. <li class="suggest"><a href="javascript:void(0)"><?php _e( 'Suggest more', 'tuffaha' ); ?></a></li>
  98. </ul>
  99. </dd>
  100.  
  101. <?php } ?>
  102.  
  103. </dl>
  104. </div> <!-- end ap-content-terms -->
  105. </div>
  106. </div>
  107. </div> <!-- end ap-content -->
  108. </li>
  109.  
  110. <li class="list-group-item">
  111. <div class="ap-detailed">
  112. <a href="?view_type=detailed"><?php _e( 'View detailed information', 'tuffaha' ); ?></a>
  113. </div> <!-- end ap-detailed -->
  114. </li>
  115.  
  116. <li class="list-group-item">
  117. <div class="ap-gallery">
  118. <ul class="block-grid-xs-2 block-grid-sm-4 block-grid-md-6">
  119.  
  120. <?php foreach ( Tuffaha::get_post_media_attachments( get_the_ID() )['media'] as $media ) { ?>
  121.  
  122. <li class="block-grid-item">
  123. <div class="ap-gallery-item">
  124. <a href="#" class="thumbnail" onclick="event.preventDefault()">
  125. <img class="thumb" src="<?php echo $media[1]; ?>" id="<?php echo $media[0]; ?>" alt="<?php echo Tuffaha::get_alt_image(); ?>">
  126. </a>
  127. <div class="ap-gallery-item-control">
  128. <div class="ap-gallery-item-buttons">
  129. <i class="icon-like"></i>
  130. <i class="icon-dislike"></i>
  131. <i class="icon-pending"></i>
  132. <i class="icon-delete"></i>
  133. </div>
  134. <div class="ap-gallery-item-info">
  135. <span><a href="<?php echo $media[2];?>"><?php _e( 'Add Info', 'tuffaha' ); ?></a></span>
  136. </div>
  137. </div>
  138. </div>
  139. </li>
  140.  
  141. <?php } ?>
  142. <li class="block-grid-item">
  143. <div class="gallery-add-item">
  144. <a href="#" class="thumbnail" onclick="event.preventDefault()">
  145. <img class="thumb" src="<?php echo Tuffaha::get_alt_image(); ?>" alt="<?php echo Tuffaha::get_alt_image(); ?>">
  146. <div class="add-item">
  147. <i class="icon-more"></i>
  148. <br/>
  149. <span><?php _e('Suggest more images', 'tuffaha'); ?></span>
  150. </div>
  151. </a>
  152. <input type="file" multiple="multiple" id="select-images" name="select-images" class="select-images hidden" accept="image/*"/>
  153. </div>
  154. </li>
  155. <li class="block-grid-item new hidden">
  156. <div class="ap-gallery-item">
  157. <a href="#" class="thumbnail" onclick="event.preventDefault()">
  158. <img class="thumb" src="<?php echo Tuffaha::get_alt_image(); ?>" alt="<?php echo Tuffaha::get_alt_image(); ?>">
  159. </a>
  160. <div class="ap-gallery-item-control">
  161. <div class="progress">
  162. <div class="progress-bar progress-bar-info progress-bar-striped active" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100">
  163. <span class="sr-only">Complete (success)</span>
  164. </div>
  165. </div>
  166. <div class="ap-gallery-item-buttons">
  167. <i class="icon-like"></i>
  168. <i class="icon-dislike"></i>
  169. <i class="icon-pending"></i>
  170. <i class="icon-delete"></i>
  171. </div>
  172. <div class="ap-gallery-item-info">
  173. <span><a href="#"><?php _e( 'Add Info', 'tuffaha' ); ?></a></span>
  174. </div>
  175. </div>
  176. </div>
  177. </li>
  178. </ul>
  179. </div> <!-- end ap-gallery -->
  180. </li>
  181.  
  182. <li class="list-group-item">
  183. <div class="ap-references">
  184. <h5><?php _e( 'References', 'tuffaha' ); ?></h5>
  185. <hr/>
  186. <ul class="list-unstyled">
  187. <li><sup>1</sup> Book Author: <i>Book Title</i>. Publisher Name. City. Year, page #.</li>
  188. <li><sup>2</sup> Article Author: <i>Article Title</i>. Website Name. www.example.com. Year, Month.</li>
  189. <li><sup>3</sup> Dany Jhones: <i>Beauty and the Beast</i>. Cambrige Press. London. 2006, p. 12.</li>
  190. <li><sup>4</sup> Book Author: <i>Book Title</i>. Publisher Name. City. Year, page #.</li>
  191. <li><sup>5</sup> Book Author: <i>Book Title</i>. Publisher Name. City. Year, page #.</li>
  192. </ul>
  193. </div> <!-- end ap-references -->
  194. </li>
  195.  
  196. <li class="list-group-item">
  197. <div class="ap-helpers">
  198. <h5><?php _e( 'Helpers', 'tuffaha' ); ?></h5>
  199. <hr/>
  200. <ul class="list-unstyled">
  201. <li>Suggested by: Someone Name</li>
  202. <li>Edited by: Other person, Good Person, Fine Person</li>
  203. </ul>
  204. </div> <!-- end ap-helpers -->
  205. </li>
  206.  
  207. </ul>
  208. </div>
  209. </div>
  210. </div>
  211. <?php
  212. get_footer();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement