Example #1
0
 function fmt($row)
 {
     $url = article_url($row['id']);
     $permalink = $row['permalink'];
     $adm_url = article_adm_url($row['id']);
     return sprintf('<a href="%s">%s</a><small> [<a href="%s">source</a>]</small>', $adm_url, $row['title'], $permalink);
 }
    function emit_core()
    {
        $ae =& $this->submitted;
        /*
                $actions = array();
                if($ae->expected_journo && $ae->article) {
           $actions[] = 'add_journo';
           $actions[] = 'replace_journo';
                }
        */
        $struck = false;
        if ($ae->status == 'resolved' || $ae->status == 'rejected') {
            $struck = true;
        }
        ?>

<?php 
        if ($struck) {
            ?>
<del>
<?php 
        }
        ?>
<small>submitted <?php 
        echo pretty_date(strtotime($ae->when_submitted));
        ?>
 
<?php 
        if (!is_null($ae->submitted_by)) {
            ?>
by <a href="/adm/useraccounts?person_id=<?php 
            echo $ae->submitted_by->id;
            ?>
"><?php 
            echo $ae->submitted_by->email;
            ?>
</a> (<?php 
            echo $ae->submitted_by->name;
            ?>
)
<?php 
        }
        ?>
</small>
<br/>

<a href="<?php 
        echo $ae->url;
        ?>
"><?php 
        echo $ae->url;
        ?>
</a><br/>
problem: <?php 
        echo $ae->status;
        ?>
<br/>


<?php 
        if (!is_null($ae->article)) {
            ?>
article in the database: <a href="<?php 
            echo article_adm_url($ae->article->id);
            ?>
"><?php 
            echo $ae->article->title;
            ?>
</a>
<a class="button edit" href="/adm/editarticle?id36=<?php 
            echo article_id_to_id36($ae->article->id);
            ?>
">edit</a><br/>
<?php 
            if (sizeof($ae->article->authors) > 0) {
                ?>
&nbsp;&nbsp;attributed to:
<?php 
                foreach ($ae->article->authors as $author) {
                    echo admJournoLink($author->ref);
                    ?>
&nbsp;
<?php 
                }
            }
            ?>
<br/>
&nbsp;&nbsp;raw byline: <?php 
            echo $ae->article->byline;
            ?>
<br/>
<?php 
        }
        ?>


<?php 
        if (!is_null($ae->expected_journo)) {
            ?>
expected journo: <a class="journo-info" href="/adm/<?php 
            echo $ae->expected_journo->ref;
            ?>
"><?php 
            echo $ae->expected_journo->ref;
            ?>
</a><br/>
<?php 
        }
        ?>


<?php 
        if (!is_null($this->scraper_output)) {
            ?>
<div>
raw scraper output:
<pre><code>
<?php 
            echo admMarkupPlainText($this->scraper_output);
            ?>
</code></pre>
</div>
<?php 
        }
        ?>

<?php 
        if ($struck) {
            ?>
</del>
<?php 
        }
        ?>

<?php 
        foreach ($this->allowed_actions() as $action) {
            echo $this->action_link($action);
        }
        ?>

<?php 
    }
Example #3
0
function template($vars)
{
    extract($vars);
    admPageHeader();
    if (is_null($art_id)) {
        ?>
<h2>Create Article</h2>
<?php 
    } else {
        ?>
<h2>Edit Article</h2>
go to <a href="<?php 
        echo article_url($art_id);
        ?>
">public page</a>, <a href="<?php 
        echo article_adm_url($art_id);
        ?>
">admin page</a>
<?php 
    }
    ?>
<form action="/adm/editarticle" method="POST">
<table>
<?php 
    echo $form->as_table();
    ?>
</table>
<input type="submit" name="submit" value="Submit" />
</form>
<?php 
    admPageFooter();
}