Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…sepress@14838 f53fe46e-8c02-459b-9fdd-93e75771b278
  • Loading branch information
marko committed Jun 9, 2014
1 parent cc44f7d commit 9f8e82e
Show file tree
Hide file tree
Showing 5 changed files with 99 additions and 6 deletions.
13 changes: 7 additions & 6 deletions coursepress.php
Original file line number Diff line number Diff line change
Expand Up @@ -238,10 +238,9 @@ function virtual_page_template() {

if (isset($post) && $post->post_type == 'virtual_page') {
//$theme_file = locate_template(array('page.php'));

//if ($theme_file != '') {
include(TEMPLATEPATH . "/page.php");
exit;
include(TEMPLATEPATH . "/page.php");
exit;
//}
}
}
Expand Down Expand Up @@ -774,10 +773,12 @@ function add_custom_before_course_single_content($content) {

function courses_archive_custom_content($content) {
global $post;
/* if (locate_template(array('archive-course.php'))) {
return $post->post_excerpt;
} else {
$content = $post->post_excerpt;

return $content;
} */
include($this->plugin_dir . 'includes/templates/archive-courses-single.php');
}

function get_template_details($template, $args = array()) {
Expand Down
57 changes: 57 additions & 0 deletions css/front_general.css
Original file line number Diff line number Diff line change
Expand Up @@ -529,4 +529,61 @@ h1.notification-title{
background-color: #ff6600;
color: #fff;
display: none;
}

.post-type-archive-course .quick-course-info .course-time{
width: 25%;
float: left;
font-size: 12px;
font-weight: 400;
color: #828282;
background-image: url("../images/time-icon.png");
background-repeat: no-repeat;
padding-left: 20px;
margin-top: 13px;
display: block;
text-transform: uppercase;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

.post-type-archive-course .quick-course-info .course-lang{
width: 18%;
float: left;
font-size: 12px;
font-weight: 400;
color: #828282;
background-image: url("../images/language-icon.png");
background-repeat: no-repeat;
padding-left: 20px;
margin-top: 13px;
display: block;
margin-left: 2%;
text-transform: uppercase;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

.post-type-archive-course .quick-course-info .go-to-course-button{
width: 44%;
float: right;
display: block;
background-color: #0facd9;
color: #fff;
text-align: center;
padding: 6px 0 6px 0px;
font-family: 'Dosis', sans-serif;
font-size: 22px;
text-transform: uppercase;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 180px;
}

.course-excerpt{
margin-bottom: 25px;
margin-top: 25px;
}
Binary file added images/language-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/time-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions includes/templates/archive-courses-single.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php
global $post;

$course = new Course(get_the_ID());
$course_language = $course->details->course_language;
?>

<?php
$course_thumbnail = $course->get_course_thumbnail();
if ($course_thumbnail) {
?>
<figure>
<img src="<?php echo $course_thumbnail; ?>">
</figure>
<?php
} else {
$extended_class = 'quick-course-info-extended';
}
?>

<div class="instructors-content">
<?php echo do_shortcode('[course_instructors list="true" link="true"]'); ?>
</div>

<div class="course-excerpt">
<?php echo $post->post_excerpt; ?>
</div>

<div class="quick-course-info <?php echo (isset($extended_class) ? $extended_class : ''); ?>">
<span class="course-time"><?php echo do_shortcode('[course_details field="course_start_date"]'); ?></span>
<?php if (isset($course_language) && $course_language !== '') { ?>
<span class="course-lang"><?php echo $course_language; ?></span>
<?php } ?>
<a class="go-to-course-button" href="<?php the_permalink(); ?>"><?php _e('Go to Course', 'coursepress'); ?></a>
</div>

0 comments on commit 9f8e82e

Please sign in to comment.