class Panel::PersonalJournal::FrontEnd::WritingJournalsController < OrbitWidgetController

  def initialize
    super
    @app_title = 'personal_journal'
  end
  

  def index
	
	@writing_journals = WritingJournal.where(:is_hidden => false).desc(:year, :publication_date).page(params[:page]).per(10)
	
  end

  # GET /writing_journals/1
  # GET /writing_journals/1.xml
  def show
    @writing_journal = WritingJournal.find(params[:id])
	
	@journal_level_types = ( !@writing_journal.journal_level_types.blank? ? @writing_journal.journal_level_types.collect{|x| x.title}.join(', ') : nil)
	@journal_author_types = ( !@writing_journal.journal_author_types.blank? ? @writing_journal.journal_author_types.collect{|x| x.title}.join(', ') : nil)
  
  end
  
  
end
