Exemple #1
0
		        <li class="antrag"><h4><a href="<?php 
            the_permalink();
            ?>
"><?php 
            the_title();
            ?>
</a></h4>
		        <span class="steller">
		          <strong>AntragstellerInnen:</strong>
		          <?php 
            print get_post_meta($post->ID, 'cvtx_antrag_steller_short', true);
            ?>
		        </span>
		        <ul class="options">
		          <li><?php 
            if (function_exists('cvtx_get_file') && ($file = cvtx_get_file($post, 'pdf'))) {
                echo '<a href="' . $file . '">Download (pdf)</a>';
            } else {
                echo 'Kein PDF erstellt.';
            }
            ?>
</li>
		          <li><a href="<?php 
            the_permalink();
            ?>
#add_aeantrag" rel="extern" class="add_ae_antraeg" meta-id="<?php 
            print $post->ID;
            ?>
">Änderungsantrag hinzufügen</a></li>
		          <?php 
            $antrag_id = $post->ID;
Exemple #2
0
 /** @see WP_Widget::widget */
 function widget($args, $instance)
 {
     global $post;
     if (is_object($post) && property_exists($post, 'post_type') && $post->post_type == 'cvtx_event') {
         $event_id = $post->ID;
         $post_bak = $post;
         $loop = new WP_Query(array('post_type' => 'cvtx_reader', 'order' => 'ASC', 'post_status' => 'publish', 'meta_query' => array(array('key' => 'cvtx_reader_event', 'value' => $event_id, 'compare' => '=')), 'nopaging' => true));
         if ($loop->have_posts()) {
             extract($args);
             $title = apply_filters('widget_title', $instance['title']);
             echo $before_widget;
             if ($title) {
                 echo $before_title . $title . $after_title;
             }
             if (isset($instance['description'])) {
                 echo $instance['description'] . '<p/>';
             }
             echo '<ul>';
             while ($loop->have_posts()) {
                 $loop->the_post();
                 if ($file = cvtx_get_file($post, 'pdf')) {
                     echo the_title('<li><a href="' . $file . '" title="' . __('View PDF', 'cvtx') . '" class="extern">', '</a></li>');
                 }
             }
             echo '</ul>';
             echo $after_widget;
         }
         wp_reset_postdata();
         $post = $post_bak;
     }
 }
Exemple #3
0
function cvtx_application_file($post)
{
    if ($post->post_type == 'cvtx_application') {
        $appl = get_post(get_post_meta($post->ID, 'cvtx_antrag_info', true));
        echo cvtx_get_file($appl, 'pdf', 'dir');
    }
}
Exemple #4
0
/**
 *
 */
function cvtx_top_action($post_id = false)
{
    if (!isset($post_id) || !$post_id) {
        global $post;
    } else {
        $post = get_post($post_id);
    }
    if (is_object($post)) {
        // query top-content
        $loop2 = new WP_Query(array('post_type' => array('cvtx_antrag'), 'meta_key' => 'cvtx_sort', 'orderby' => 'meta_value', 'nopaging' => true, 'order' => 'ASC', 'meta_query' => array(array('key' => 'cvtx_antrag_top', 'value' => $post->ID, 'compare' => '='))));
        echo '<ul id="antraege">';
        while ($loop2->have_posts()) {
            $loop2->the_post();
            echo '<li class="top"><h3><a href="';
            the_permalink();
            echo '">';
            the_title();
            echo '</a></h3>';
            echo '<div class="top_content">';
            echo '<span class="steller">';
            echo '<strong>' . __('Author(s)', 'cvtx') . ':</strong> ';
            echo get_post_meta($post->ID, 'cvtx_antrag_steller_short', true);
            echo '</span>';
            echo '<ul class="options">';
            echo '<li>';
            if (function_exists('cvtx_get_file') && ($file = cvtx_get_file($post, 'pdf'))) {
                echo '<a href="' . $file . '">' . __('Download', 'cvtx') . ' (pdf)</a>';
            } else {
                _e('No PDF available.', 'cvtx');
            }
            echo '</li>';
            echo '<li><a href="';
            the_permalink();
            echo '#add_aeantrag" rel="extern" class="add_ae_antraeg" meta-id="' . $post->ID . '">' . __('Add amendment', 'cvtx') . '</a></li>';
            $loop3 = new WP_Query(array('post_type' => 'cvtx_aeantrag', 'meta_key' => 'cvtx_sort', 'orderby' => 'meta_value', 'order' => 'ASC', 'nopaging' => true, 'meta_query' => array(array('key' => 'cvtx_aeantrag_antrag', 'value' => $post->ID, 'compare' => '='))));
            if ($loop3->have_posts()) {
                echo '<li><a href="';
                the_permalink();
                echo '" rel="extern" class="ae_antraege_overview" meta-id="' . $post->ID . '">' . __('Overview', 'cvtx') . '</a></li>';
            }
            echo '</ul>';
            echo '<div id="result-' . $post->ID . '" class="ae_antraege_result"></div>';
            if ($loop3->have_posts()) {
                echo '<ul class="ae_antraege">';
                echo '<h4>' . __('Amendments', 'cvtx') . '</h4>';
                while ($loop3->have_posts()) {
                    $loop3->the_post();
                    echo '<li><span>';
                    the_title();
                    echo '</span> (' . __('Author(s)', 'cvtx') . ': <em>';
                    echo get_post_meta($post->ID, 'cvtx_aeantrag_steller_short', true) . '</em>)</li>';
                }
                echo '</ul>';
            }
            echo '<div class="clear-block"></div></div>';
            echo '</li>';
            // end li.top
        }
        echo '</ul>';
        // end ul#antraege
        wp_reset_postdata();
    }
}
Exemple #5
0
function cvtx_format_lists($column)
{
    $options = get_option('cvtx_options');
    global $post;
    switch ($column) {
        // Reader
        case 'cvtx_reader_status':
            echo $post->post_status == 'publish' ? '+ ' : '';
            if ($file = cvtx_get_file($post, 'pdf', 'url')) {
                echo '<a href="' . $file . '">' . __('Download', 'cvtx') . ' (pdf)</a>';
            }
            break;
            // TOPs
        // TOPs
        case 'cvtx_top_ord':
            echo cvtx_get_short($post);
            break;
        case 'cvtx_top_short':
            echo get_post_meta($post->ID, 'cvtx_top_short', true);
            break;
        case 'cvtx_top_status':
            echo $post->post_status == 'publish' ? '+' : '';
            break;
            // Anträge
        // Anträge
        case 'cvtx_antrag_ord':
            echo cvtx_get_short($post);
            break;
        case 'cvtx_sort':
            echo get_post_meta($post->ID, 'cvtx_sort', true);
            break;
        case 'cvtx_antrag_steller':
            echo get_post_meta($post->ID, 'cvtx_antrag_steller_short', true);
            break;
        case "cvtx_antrag_top":
            $top_id = get_post_meta($post->ID, 'cvtx_antrag_top', true);
            echo get_the_title($top_id);
            break;
        case "cvtx_antrag_status":
            echo $post->post_status == 'publish' ? '+ ' : '';
            if ($file = cvtx_get_file($post, 'pdf', 'url')) {
                echo '<a href="' . $file . '">' . __('Download', 'cvtx') . ' (pdf)</a>';
            }
            break;
        case "cvtx_antrag_poll":
            echo get_post_meta($post->ID, 'cvtx_antrag_poll', true);
            break;
            // Ä-Anträge
        // Ä-Anträge
        case 'cvtx_aeantrag_ord':
            echo cvtx_get_short($post);
            break;
        case 'cvtx_aeantrag_steller':
            echo get_post_meta($post->ID, 'cvtx_aeantrag_steller_short', true);
            break;
        case "cvtx_aeantrag_verfahren":
            echo get_post_meta($post->ID, 'cvtx_aeantrag_verfahren', true);
            break;
        case "cvtx_aeantrag_antrag":
            $antrag_id = get_post_meta($post->ID, 'cvtx_aeantrag_antrag', true);
            echo get_the_title($antrag_id);
            break;
        case "cvtx_aeantrag_status":
            echo $post->post_status == 'publish' ? '+ ' : '';
            $dir = wp_upload_dir();
            if (isset($options['cvtx_aeantrag_pdf']) && ($file = cvtx_get_file($post, 'pdf', 'url'))) {
                echo '<a href="' . $file . '">' . __('Download', 'cvtx') . ' (pdf)</a>';
            }
            break;
        case "cvtx_aeantrag_poll":
            echo get_post_meta($post->ID, 'cvtx_aeantrag_poll', true);
            break;
            // Applications
        // Applications
        case 'cvtx_application_ord':
            echo cvtx_get_short($post);
            break;
        case "cvtx_application_top":
            $top_id = get_post_meta($post->ID, 'cvtx_application_top', true);
            echo get_the_title($top_id);
            break;
        case "cvtx_application_status":
            echo $post->post_status == 'publish' ? '+ ' : '';
            if ($file = cvtx_get_file($post, 'pdf', 'url')) {
                echo '<a href="' . $file . '">' . __('Download', 'cvtx') . ' (pdf)</a>';
            }
            break;
    }
}
?>

\setlength{\cftbeforesubsecskip}{8pt}

\begin{document}

<?php 
if (get_bloginfo('language') == 'de-DE') {
    ?>
    \shorthandoff{"}
<?php 
}
?>

<?php 
if (cvtx_get_file($post, 'reader_titlepage')) {
    ?>
\includepdf{<?php 
    cvtx_reader_titlepage_file($post);
    ?>
}
\thispagestyle{empty}
\newpage
<?php 
}
?>

<?php 
if (get_post_meta($post->ID, 'cvtx_reader_page_start', true)) {
    ?>
\setcounter{page}{<?php 
Exemple #7
0
/**
 * Returns the download link for a specific resolution / amendment
 */
function cvtx_get_rss_after_content($post)
{
    $output = '';
    if (function_exists('cvtx_get_file') && ($file = cvtx_get_file($post, 'pdf'))) {
        $output = '<p><a href="' . $file . '">' . __('Download', 'cvtx') . ' (pdf)</a></p>';
    }
    return $output;
}
% Author(s)
\subsection*{<?php 
        cvtx_print_latex(__('Author(s)', 'cvtx'));
        ?>
}
<?php 
        cvtx_antragsteller($item);
        ?>

<?php 
    } else {
        if ($item->post_type == 'cvtx_application') {
            // Include pdf or load latex file?
            $manually = get_post_meta($item->ID, 'cvtx_application_manually', true) == 'on';
            // Include PDF
            if ($manually && cvtx_get_file($item)) {
                ?>
% Start New Page
\newpage

% Define Headline Text
\ohead{<?php 
                cvtx_print_latex(__('Application', 'cvtx'));
                ?>
 <?php 
                cvtx_kuerzel($item);
                ?>
 <?php 
                cvtx_titel($item);
                ?>
}