Changeset 44 for trunk


Ignore:
Timestamp:
Sep 17, 2020, 10:12:29 AM (4 years ago)
Author:
chronos
Message:
  • Added: Allow to show runners in more narrower groups as all, men, women and kids.
Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Locale/cs.php

    r43 r44  
    3030        'Women' => 'Ženy',
    3131        'Kids' => 'Děti',
     32        'All' => 'Všichni',
    3233        'Category' => 'Kategorie',
    3334        'Last change' => 'Poslední změna',
     
    8788        'families' => 'rodiny',
    8889        'sync' => 'sync',
     90        'men' => 'muzi',
     91        'women' => 'zeny',
     92        'kids' => 'deti',
    8993      ),
    9094    );
  • trunk/Locale/en.php

    r43 r44  
    3030        'Women' => '',
    3131        'Kids' => '',
     32        'All' => '',
    3233        'Category' => '',
    3334        'Last change' => '',
     
    5960        'families' => '',
    6061        'sync' => '',
     62        'men' => '',
     63        'women' => '',
     64        'kids' => '',
    6165      )
    6266    );
  • trunk/index.php

    r43 r44  
    713713  }
    714714
    715   function ShowRunners()
     715  function ShowRunnersAll()
     716  {
     717    return $this->ShowRunners();
     718  }
     719
     720  function ShowRunnersMen()
     721  {
     722    return $this->ShowRunners('(Gender=1)');
     723  }
     724
     725  function ShowRunnersWomen()
     726  {
     727    return $this->ShowRunners('(Gender=2)');
     728  }
     729
     730  function ShowRunnersKids()
     731  {
     732    return $this->ShowRunners('(Gender=3)');
     733  }
     734
     735  function ShowRunners($Where = '1')
    716736  {
    717737    $this->Title = T('Runners').' - '.$this->Title;
    718738    $Output = '<div class="page-title">'.T('Runners').'</div>';
     739    $Output .= '<div class="section-title">'.
     740      '<a href="'.$this->Link('/runners/').'">'.T('All').'</a> '.
     741      '<a href="'.$this->Link('/men/').'">'.T('Men').'</a> '.
     742      '<a href="'.$this->Link('/women/').'">'.T('Women').'</a> '.
     743      '<a href="'.$this->Link('/kids/').'">'.T('Kids').'</a>'.
     744      '</div>';
    719745    $Year = $this->GetYear();
    720746
    721747    $Output .= '<div class="section-title">'.$this->YearList('/runners/', $Year, 'Runner').' '.T('Name').': '.$this->ShowSearch().'</div>';
    722     $Where = '(Year='.$Year.')';
     748    $Where .= ' AND (Year='.$Year.')';
    723749    if (array_key_exists('query', $_GET) and ($_GET['query'] != ''))
    724750    {
     
    11141140      //else if ($this->PathItems[0] == 'empty') $Output .= $this->ShowEmpty();
    11151141      else if ($Item == 'runner') $Output .= $this->ShowRunner();
    1116       else if ($Item == 'runners') $Output .= $this->ShowRunners();
     1142      else if ($Item == 'runners') $Output .= $this->ShowRunnersAll();
     1143      else if ($Item == 'men') $Output .= $this->ShowRunnersMen();
     1144      else if ($Item == 'women') $Output .= $this->ShowRunnersWomen();
     1145      else if ($Item == 'kids') $Output .= $this->ShowRunnersKids();
    11171146      else if ($Item == 'team') $Output .= $this->ShowTeam();
    11181147      else if ($Item == 'teams') $Output .= $this->ShowTeams();
Note: See TracChangeset for help on using the changeset viewer.