Ejemplo n.º 1
0
 private function showPattern($prefix, $view)
 {
     try {
         $journal = JournalDao::findByPrefix($prefix);
     } catch (NoElementException $e) {
         App::abort(404, 'Journal not found');
     }
     $issueYears = EditionDao::listYears($journal->journal_id);
     return view($view)->with(array('journal' => $journal, 'issueYears' => $issueYears));
 }
Ejemplo n.º 2
0
 public function raw($prefix, $selectedYear, $number)
 {
     try {
         $journal = JournalDao::findByPrefix($prefix);
         $edition = EditionDao::findByJournalIdAndYearNumber($journal->journal_id, $selectedYear, $number);
     } catch (NoElementException $e) {
         App::abort(404, 'Edition not found');
     }
     $articles = ArticleDao::findByEdition($edition->journal_edition_id);
     foreach ($articles as $article) {
         $fileName = ArticleService::getArticleFileName($prefix, $selectedYear, $number, $article->sort_order);
         $article->fileName = $fileName;
     }
     return Response::view('edition.raw', compact('articles'))->header('Content-Type', 'text/plain');
 }