forked from saurabh/orbit4-5
95 lines
3.9 KiB
Plaintext
95 lines
3.9 KiB
Plaintext
<% content_for :page_specific_css do -%>
|
|
<%= stylesheet_link_tag "lib/group/group-main" %>
|
|
<%= stylesheet_link_tag "//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" %>
|
|
<%= stylesheet_link_tag "//cdnjs.cloudflare.com/ajax/libs/animate.css/3.2.6/animate.min.css" %>
|
|
<% end -%>
|
|
<% content_for :page_specific_javascript do -%>
|
|
<%= javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/wow/1.1.2/wow.min.js" %>
|
|
<%= javascript_include_tag "group.js" %>
|
|
<% end -%>
|
|
<div class="group-post">
|
|
<div class="group-post-banner-wrap">
|
|
<div class="group-post-banner-image-wrap">
|
|
<img class="group-post-banner-image" src="<%= @group.image.url %>" alt="<%= @group.title %>">
|
|
<ul class="group-post-view-switch button-group">
|
|
<li class="group-post-feed-view button button-group-common button-default active tool-tip-parent">
|
|
<span class="tool-tip bottom nowrap">List view</span>
|
|
<a class="group-post-switch-btn" href="#" title="Feed"><i class="icon-list-ul"></i></a>
|
|
</li>
|
|
<li class="group-post-grid-view button button-group-common button-default tool-tip-parent">
|
|
<span class="tool-tip bottom nowrap">Grid view</span>
|
|
<a class="group-post-switch-btn" href="#" title="Grid"><i class="icon-th"></i></a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="group-post-bar">
|
|
<h2 class="group-post-page-title"><%= @group.title %></h2>
|
|
<% if user_can_write? %>
|
|
<a class="group-post-new-post button button-primary" href="<%= admin_group_newpost_path(@group) %>"><i class="icon-plus"></i> New Post</a>
|
|
<% end %>
|
|
<ul class="group-post-view-switch-in-bar button-group">
|
|
<li class="group-post-feed-view button button-group-common button-default active">
|
|
<a class="group-post-switch-btn" href="#" title="Feed"><i class="icon-list-ul"></i></a>
|
|
</li>
|
|
<li class="group-post-grid-view button button-group-common button-default">
|
|
<a class="group-post-switch-btn" href="#" title="Grid"><i class="icon-th"></i></a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="group-post-section wrapper">
|
|
<div class="group-post-detail">
|
|
<ul class="group-post-pagenation breadcrumb">
|
|
<li><a href="<%= admin_groups_path %>">My Groups</a> <span class="divider">/</span></li>
|
|
<li class="active"><%= @group.title %></li>
|
|
</ul>
|
|
<span class="gorup-page-info-wrap button button-default" id="group_info_button">
|
|
<i class="group-post-info-icon icon-info-sign"></i> <span>Info</span>
|
|
</span>
|
|
<div class="group-post-description-wrap" id="group_info_area" style="display:none;">
|
|
<% if @group.privacy == "closed" %>
|
|
<span class="group-post-status-wrap close-eye button button-activated">
|
|
<i class="group-post-status icon-eye-open"></i> Closed
|
|
</span>
|
|
<% else %>
|
|
<span class="group-post-status-wrap open-eye button button-activated">
|
|
<i class="group-post-status icon-eye-open"></i> Open
|
|
</span>
|
|
<% end %>
|
|
<h4 class="muted">Group Description</h4>
|
|
<p class="group-post-description"><%= @group.description %></p>
|
|
</div>
|
|
</div>
|
|
<%= render :partial => "post", :collection => @group.group_posts.desc(:created_at) %>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
(function($) {
|
|
|
|
var group_info_area = $("#group_info_area"),
|
|
orbit_bar = $("#orbit-bar");
|
|
$("#group_info_button").on("click",function(){
|
|
if(!group_info_area.hasClass("expanded")){
|
|
group_info_area.slideDown();
|
|
group_info_area.addClass("expanded");
|
|
}else{
|
|
group_info_area.slideUp();
|
|
group_info_area.removeClass("expanded");
|
|
}
|
|
})
|
|
|
|
$(document).on("scroll",function(){
|
|
|
|
orbit_bar.slideUp();
|
|
|
|
if ( window.pageYOffset === 0 ) {
|
|
orbit_bar.slideDown( 100 );
|
|
}
|
|
|
|
})
|
|
|
|
}(jQuery));
|
|
</script>
|