docbrown/app/views/organizations/show.html.erb
Julien Maury aba55f2a77
stories list script as separate js file - defer attribute (#13993)
* stories list script as separate js file - defer attribute

* change name storiesListScript for storiesList

* remove legacy function hasClass()

* add description to js pack

* remove case that triggers nothing

* Revert "remove case that triggers nothing"

 the if statement is on the element not its parents

This reverts commit f4402f5456e15da122f9820917f5965a1ebc50a4.

* remove deprecated code from storiesList pack

* remove unused code
2021-06-21 10:59:30 +07:00

27 lines
1.1 KiB
Text

<% title sanitize(@organization.name) %>
<%= content_for :page_meta do %>
<%= render "users/meta" %>
<% end %>
<%= render "organizations/header" %>
<div class="home sub-home" id="index-container"
data-params="<%= params.merge(sort_by: "published_at", sort_direction: "desc", organization_id: @organization.id).to_json(only: %i[tag organization_id username q sort_by sort_direction]) %>" data-which="<%= @list_of %>"
data-feed="<%= params[:timeframe] || "base-feed" %>"
data-articles-since="<%= Timeframe.datetime_iso8601(params[:timeframe]) %>">
<%= render "organizations/sidebar" %>
<div class="articles-list" id="articles-list">
<div class="substories" id="substories">
<%# organizations/main_feed will iterate on stories with .each_with_index,
thus by using .present? here we preload the items %>
<% if @stories.present? %>
<%= render "organizations/main_feed" %>
<% end %>
</div>
<div class="loading-articles" id="loading-articles">
loading...
</div>
</div>
<%= render "organizations/sidebar_additional" %>
</div>
<%= javascript_packs_with_chunks_tag "storiesList", defer: true %>