<?php
namespace admin\view;

class Newsletter
{
  public static function emails_list()
  {
    $tpl = new \Tpl;
    return $tpl -> render( 'newsletter/emails-list' );
  }
  
  public static function preview( $articles, $settings, $template, $dates = '' )
  {
    $tpl = new \Tpl;
    $tpl -> articles  = $articles;
    $tpl -> settings  = $settings;
    $tpl -> template  = $template;
    $tpl -> dates     = $dates;
    return $tpl -> render( 'newsletter/preview' );
  }
  
  public static function prepare( $templates )
  {
    $tpl = new \Tpl;
    $tpl -> templates = $templates;
    return $tpl -> render( 'newsletter/prepare' );
  }
  
  public static function settings( $settings )
  {
    $tpl = new \Tpl;
    $tpl -> settings = $settings;
    return $tpl -> render( 'newsletter/settings' );
  }
  
  public static function email_templates_user()
  {
    $tpl = new \Tpl;
    return $tpl -> render( 'newsletter/email-templates-user' );
  }
  
  public static function email_templates_admin()
  {
    $tpl = new \Tpl;
    return $tpl -> render( 'newsletter/email-templates-admin' );
  }
  
  public static function email_template_edit($template)
  {
   $tpl = new \Tpl;
   $tpl -> email_template = $template;
   return $tpl -> render( 'newsletter/email-template-edit' );
  }
}
 