<?php
namespace front\view;
class GlobelusFirms
{  
  public static function firms_list( $firms_list, $firms_count, $letter = '', $current_page = 1 )
  {
    $tpl = new \Tpl;
    $tpl -> firms_list    = $firms_list;
    $tpl -> firms_count   = $firms_count;
    $tpl -> current_page  = $current_page;
    $tpl -> letter        = $letter;
    return $tpl -> render( 'globelus/firms/firms-list' );
  }
  
  public static function profile_edit( $g_user )
  {
    $tpl = new \Tpl;
    $tpl -> g_user = $g_user;
    return $tpl -> render( 'globelus/firms/profile-edit' );
  }
  
  public static function profile_settings( $g_user )
  {
    $tpl = new \Tpl;
    $tpl -> g_user = $g_user;
    return $tpl -> render( 'globelus/firms/profile-settings' );
  }
  
  public static function advert_answers( $g_user, $advert, $answers )
  {
    $tpl = new \Tpl;
    $tpl -> advert  = $advert;
    $tpl -> g_user  = $g_user;
    $tpl -> answers = $answers;
    return $tpl -> render( 'globelus/firms/advert-answers' );
  }
  
  public static function advert_add( $g_user, $advert = '' )
  {
    $tpl = new \Tpl;
    $tpl -> g_user        = $g_user;
    if ( $advert['user_id'] == $g_user['id'] )
      $tpl -> advert = $advert;
    return $tpl -> render( 'globelus/firms/advert-add' );
  }
}
