diff --git a/vendor/built_in_modules/dictionary/app/controllers/panel/dictionary/front_end/dictionary_vocabs_controller.rb b/vendor/built_in_modules/dictionary/app/controllers/panel/dictionary/front_end/dictionary_vocabs_controller.rb index 030316b87..b7aa6b11f 100644 --- a/vendor/built_in_modules/dictionary/app/controllers/panel/dictionary/front_end/dictionary_vocabs_controller.rb +++ b/vendor/built_in_modules/dictionary/app/controllers/panel/dictionary/front_end/dictionary_vocabs_controller.rb @@ -28,7 +28,7 @@ class Panel::Dictionary::FrontEnd::DictionaryVocabsController < OrbitWidgetContr end if params[:search_query].empty? - @vocabs = DictionaryVocab.page(params[:page_main]).per(@page_num) + @vocabs = DictionaryVocab.desc(:created_at).page(params[:page_main]).per(@page_num) else @vocabs = DictionaryVocab.solr_search do fulltext params[:search_query] diff --git a/vendor/built_in_modules/dictionary/app/views/panel/dictionary/front_end/dictionary_vocabs/index.html.erb b/vendor/built_in_modules/dictionary/app/views/panel/dictionary/front_end/dictionary_vocabs/index.html.erb index f9cbd9a1c..0331dc01c 100644 --- a/vendor/built_in_modules/dictionary/app/views/panel/dictionary/front_end/dictionary_vocabs/index.html.erb +++ b/vendor/built_in_modules/dictionary/app/views/panel/dictionary/front_end/dictionary_vocabs/index.html.erb @@ -15,18 +15,19 @@ <%= vocab.dictionary_vocab_category.title %> <%= link_to truncate(vocab.word,length: 25), panel_dictionary_front_end_dictionary_vocab_path(vocab) %> - <% if vocab.created_at > Time.now.beginning_of_day %> - <%="#{time_ago_in_words(vocab.created_at)}"%> - <%=t :ago,:scope => :dictionary%> - <% else %> - <%= vocab.created_at.strftime("%Y/%m/%d") %> - <% end %> + + <% if vocab.created_at > Time.now.beginning_of_day %> + <%="#{time_ago_in_words(vocab.created_at)}"%> + <%=t :ago,:scope => :dictionary%> + <% else %> + <%= vocab.created_at.strftime("%Y/%m/%d") %> + <% end %> + <% end %> - -<%= paginate( @vocabs, :param_name => :page_main, :params => {:inner => 'false'} ) rescue nil %> \ No newline at end of file +<%= paginate(@vocabs, :param_name => :page_main, :params => {:inner => 'false'} ) rescue nil %> \ No newline at end of file