Merge branch 'master' of gitlab.tp.rulingcom.com:saurabh/orbit4-5 into gravity

This commit is contained in:
Harry Bomrah 2015-06-02 19:56:54 +08:00
commit 427cb03ecf
29 changed files with 485 additions and 170 deletions

View File

@ -138,7 +138,7 @@ var StoreManager = function(section){
"url" : "/admin/store/check_credentials"
}).done(function(status){
if(status.success == true){
resendEmail();
authorizeAllModules();
}else if(status.success == false){
waitForStoreResponseCount++;
if(waitForStoreResponseCount > 5){
@ -152,6 +152,22 @@ var StoreManager = function(section){
}).fail(showError);
}
var authorizeAllModules = function(){
loadingAreaStatus.text("Authorizing default modules.");
$.ajax({
"type" : "post",
"dataType" : "json",
"url" : "/admin/store/authorize_default_modules"
}).done(function(status){
if(status.success == true){
resendEmail();
}else if(status.success == false){
loadingArea.find("img").hide();
loadingAreaStatus.text(data.message);
}
}).fail(showError);
}
var resendEmail = function(){
loadingArea.find("img").show();
loadingAreaStatus.text("Sending verification email.");

View File

@ -291,6 +291,7 @@ if($.support.touch) {
$el.find('a').removeAttr('href');
};
$el.on(mouseenterEvent, function(e) {
$sidebar.addClass('on')
$block.siblings().removeClass('show').end().eq($(this).index()).addClass('show');
$arrow.stop(true, false).animate({
top: ($(this).position().top+$(this).height()/2)-$arrowHeightFormat+$('.scroller').position().top,
@ -346,6 +347,7 @@ if($.support.touch) {
$el.eq($blockIndex).hasClass('active') ? '':$el.eq($blockIndex).children('span').addClass('hover');
},
mouseleave: function() {
$sidebar.removeClass('on');
$block.removeClass('show');
if(!$sidebarState || !$el.hasClass('active')) {
$blockList.css({'width': 0});

View File

@ -49,7 +49,7 @@ input:focus::-webkit-input-placeholder {
color: transparent;
}
body {
background-color: #F3F3F3;
background-color: #f3f3f3;
font-family: 'Chivo';
}
body.modalBlur > nav,
@ -319,6 +319,18 @@ legend {
background-color: rgba(0, 136, 204, .6);
}
/* sidebar on */
#sidebar.on ~ #main-wrap .fc-border-separate {
table-layout: fixed;
}
#sidebar.on ~ #main-wrap .fc-view-month .fc-day-header {
width: auto !important;
}
#sidebar.on ~ #main-wrap .fc-view-agendaWeek .fc-widget-header.fc-last {
width: 15px !important;
}
/* Main Wrap */
#main-wrap {

View File

@ -41,6 +41,15 @@
color: $white;
background-color: $blue;
}
&.gray {
color: $dark-gray;
border: 2px solid $dark-gray;
&:hover {
color: $white;
background-color: $dark-gray;
}
}
}
.button-activated {
@ -241,10 +250,44 @@
}
}
// responsive grid
.square {
float: left;
position: relative;
width: 20%;
padding-bottom: 20%;
margin: 1%;
background-color: $white;
overflow: hidden;
.content {
position: absolute;
height: 90%;
width: 90%;
padding: 5%;
.rs {
width: auto;
height: auto;
max-height: 90%;
max-width: 100%;
}
}
.table {
display: table;
width: 100%;
height: 100%;
}
.table-cell {
display: table-cell;
vertical-align: middle;
}
}
// avatar
.admin-avatar {
width: 60px;
height: 60px;
max-width: none;
border-radius: $round;
}

View File

@ -32,6 +32,12 @@
width: auto;
max-width: 100%;
height: auto;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
margin: auto;
}
.group-post-bar {
@ -121,7 +127,8 @@
text-align: justify;
}
.group-post-member-count {
.group-post-member-count,
.group-post-no-member {
background: $blue;
color: $white;
padding: 6px 0.625rem;

View File

@ -58,6 +58,7 @@
.group-show-post-image-wrap {
position: relative;
background: $black;
overflow: hidden;
&:hover {
.cycle-nav {
opacity: 1;

View File

@ -119,6 +119,21 @@ body {
// members page
.existing-phone-avatar {
vertical-align: top;
margin: 0 0.5rem 0.5rem 0;
}
.existing-member-count {
width: 60px;
height: 60px;
display: inline-block;
box-sizing: border-box;
line-height: 40px;
text-align: center;
white-space: nowrap;
padding: 8px 0.45rem;
font-size: 0.8125rem;
}
.group-edit-button {
box-sizing: border-box;
vertical-align: top;
@ -128,4 +143,87 @@ body {
display: inline-block;
text-align: center;
font-size: 0.8125rem;
}
.group-edit-avatar {
width: 60;
}
.group-member-edit-table {
width: 100%;
tr {
border-bottom: 1px solid $gray;
}
td {
padding: 8px 0.75rem;
&:first-child {
width: 60px;
}
}
.make-admin-checkbox {
display: inline-block;
vertical-align: top;
margin-right: 0.3125rem;
}
.group-member-permission {
display: inline-block;
vertical-align: text-top;
}
}
.group-admin-edit-image-wrap {
margin: 0 24px 1rem 0;
}
.group-admin-edit-image-item {
margin-bottom: 16px;
padding: 16px 0.5rem;
}
.group-admin-edit-image-container {
float: left;
width: 15%;
min-width: 150px;
margin: 0 1rem 16px 0;
}
.group-admin-edit-checkbox-wrap {
color: $white;
font-size: 0.8125rem;
background: $blue;
padding: 2px 0.625rem;
border-radius: $general;
float: left;
}
.group-admin-edit-image-checkbox {
display: inline-block;
vertical-align: top;
}
.group-admin-edit-image-label {
display: inline-block;
vertical-align: text-top;
font-size: 0.75rem;
}
.group-admin-edit-image-item-inner {
padding: 16px 0.625rem;
background: $white;
border-radius: $general;
}
.group-admin-edit-file-wrap {
margin-bottom: 10px;
}
.group-admin-edit-file-item {
padding: 10px 16px;
float: left;
margin: 0 8px 0.5rem 0;
font-size: 0.8125rem;
.group-admin-edit-file-checkbox {
margin: 0;
}
}
.group-admin-edit-filename {
margin-right: 0.3125rem;
}
.group-admin-edit-file-delete {
padding-bottom: 4px;
border-bottom: 1px dotted $red;
vertical-align: top;
}

View File

@ -76,6 +76,20 @@ class Admin::GroupsController < OrbitGroupController
def members
render_401 and return if !user_can_read?
@group_members = []
@group.users.each do |user|
mp = user.member_profile rescue nil
if !mp.nil?
avatar = (mp.avatar.thumb.url == "thumb_person.png" ? "/assets/thumb_person.png" : mp.avatar.thumb.url rescue "/assets/thumb_person.png")
@group_members << {
"id" => user.id.to_s,
"user_name" => (user.user_name rescue ""),
"avatar" => avatar,
"name" => (mp.name_translations rescue {"en" => "","zh_tw" => ""}),
"admin" => @group.admins.include?(user.id.to_s)
}
end
end
end
def create_category

View File

@ -37,6 +37,33 @@ class Admin::StoreController < OrbitAdminController
render :json => data.to_json
end
def authorize_default_modules
modules = ModuleApp.all
ids = modules.collect{|ma| ma.key}
store_token = Site.first.store_token rescue nil
if !store_token.nil?
module_apps = ModuleApp.all
params_to_send = {'store_token' => store_token, "apps" => ids}
uri = URI.parse(OrbitStore::URL)
http = Net::HTTP.new(uri.host,uri.port)
request = Net::HTTP::Post.new("/store/register_old_sites_modules")
request.body = params_to_send.to_query
response = http.request(request) rescue nil
if response.nil?
render :json => {"success" => false, "message" => "Could not connect to the store."}.to_json
else
data = JSON.parse(response.body)
if data["success"]
render :json => {"success" => true}.to_json
elsif !data["success"]
render :json => {"success" => false, "message" => data["message"]}.to_json
end
end
else
render :json => {"success" => false, "message" => "Cannot register modules, site is not registered with store."}.to_json
end
end
def check_permissions
params_to_send = {'store_token' => current_site.store_token}
uri = URI.parse(@store_url)

View File

@ -2,6 +2,7 @@
// Base Color
$theme-gray: #495054;
$theme-gray-subtle: #ddd;
$theme-gray-light: #cecece;
$theme-gray-lighter: #f3f3f3;
$theme-gray-dark: #363636;

View File

@ -0,0 +1,66 @@
@charset "utf-8";
.w-calendar {
width: 100%;
position: relative;
.widget-title {
text-align: center;
border: 1px solid $theme-gray-subtle;
margin: 0;
padding: 8px 0;
}
th {
background: $theme-color-main;
color: $theme-white;
text-align: center;
font-size: 0.8125rem;
}
td {
border: 1px solid $theme-gray-subtle;
text-align: center;
font-size: 0.8125rem;
}
.loading {
&:after {
content: '\f1ce';
font-family: FontAwesome;
animation: 2s linear 0s normal none infinite running fa-spin;
}
}
}
.w-calendar-table {
margin-bottom: 0;
.w-calendar-today {
background: $theme-color-main;
color: $theme-white;
}
.w-calendar-event {
background: $theme-color-third;
color: $theme-white;
}
}
.w-calendar-nav {
a {
position: absolute;
top: 8px;
left: 10px;
color: $theme-color-main;
}
.w-calendar-nav-next {
left: auto;
right: 10px;
}
}
@keyframes fa-spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(359deg);
}
}

View File

@ -12,15 +12,7 @@
@import "layout/footer";
// Modules
@import "modules/menu";
@import "modules/ad_banner";
@import "modules/announcement";
@import "modules/faq";
@import "modules/web_resource";
@import "modules/gallery";
@import "modules/archives";
@import "modules/member";
@import "modules/personal_plugin";
@import "modules/*";
// Widget
@import "widget/breadcrumb";

View File

@ -0,0 +1,58 @@
<div class="w-calendar widget-calendar-1" data-module="calendar">
<div class='month_template'>
<h4 class="widget-title ">
<span class="text"></span>
<i class="fa fa-circle-o-notch fa-spin fa-fw loading hide"></i>
</h4>
<div class="w-calendar-nav">
<a href="#" class="w-calendar-nav-prev">
<i class="fa fa-chevron-left"></i>
<span class="w-calendar-nav-prev-text hide">Prev</span>
</a>
<a href="#" class="w-calendar-nav-next">
<i class="fa fa-chevron-right"></i>
<span class="w-calendar-nav-next-text hide">Next</span>
</a>
</div>
<table class="table table-condensed w-calendar-table">
<thead>
<tr>
<th>Sun</th>
<th>Mon</th>
<th>Tue</th>
<th>Wed</th>
<th>Thu</th>
<th>Fri</th>
<th>Sat</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
</div>
<script>
if(document.getElementById("calendar-widget_module") == null){
var tag = document.createElement('script');
tag.setAttribute("id", "calendar-widget_module");
tag.src = "/assets/calendar_widget.js";
tag.onload = function(){
$("div[data-module=calendar]").each(function(index){
var calendar = $(this),
cmi = new CalendarModuleMonth(new Date(), calendar,calendar.data("subpart-id"));
cmi.currentMonth();
calendar.find("div.w-calendar-nav a").on("click",function(){
var el = $(this);
if(el.hasClass("w-calendar-nav-prev")){
cmi.prevMonth();
}else if(el.hasClass("w-calendar-nav-next")){
cmi.nextMonth();
}
return false;
})
})
}
var head = document.getElementsByTagName("head");
head[0].appendChild(tag);
}
</script>

View File

@ -0,0 +1,22 @@
{
"frontend": [
{
"filename" : "index",
"name" : {
"zh_tw" : "1. 行事曆",
"en" : "1. Calendar"
},
"thumbnail" : "thumb.png"
}
],
"widgets" : [
{
"filename" : "calendar_widget1",
"name" : {
"zh_tw" : "1. 行事曆",
"en" : "1. Calendar"
},
"thumbnail" : "thumb.png"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@ -13,7 +13,7 @@
data-cycle-log="false"
data-cycle-carousel-fluid="true">
<a class="widget-pic" href="{{link_to_show}}" target="_blank">
<img src="{{thumb-src}}" alt="">
<img src="{{thumb-src}}" alt="{{alt_title}}">
</a>
</div>
</div>

View File

@ -4,7 +4,7 @@
</h3>
<div class="row widget-content" data-level="0" data-list="images">
<a class="widget-pic col-xs-4" href="{{link_to_show}}" target="_blank">
<img src="{{thumb-src}}" alt="">
<img src="{{thumb-src}}" alt="{{alt_title}}">
</a>
</div>
</div>

View File

@ -6,7 +6,7 @@
<div class="index-content col-xs-4 col-sm-3">
<div class="index-content-inner">
<div class="index-pic">
<img class="img-thumbnail" src="{{thumb-src}}" alt="">
<img class="img-thumbnail" src="{{thumb-src}}" alt="{{alt_title}}">
</div>
<section class="index-part">
<h4 class="index-content-title">

View File

@ -7,7 +7,7 @@
<div class="show-content-inner">
<div class="show-pic">
<a href="{{link_to_show}}">
<img class="img" src="{{thumb-src}}" alt="">
<img class="img" src="{{thumb-src}}" alt="{{alt_title}}">
</a>
</div>
</div>

View File

@ -7,7 +7,7 @@
<img data-member-id="<%= em["id"] %>" class="existing-phone-avatar admin-avatar" src="<%= em["avatar"] %>" />
<% end %>
<% if i == existing_members_limit %>
<span class="existing-member-count"> &hellip; <%= (@existing_members.count - existing_members_limit).to_s %> more.</span>
<span class="existing-member-count button button-default gray"><%= (@existing_members.count - existing_members_limit).to_s %> more</span>
<% break
end %>
<% end %>

View File

@ -95,7 +95,7 @@
name = member["name"][I18n.locale.to_s] == "" ? member["name"]["zh_tw"] : member["name"][I18n.locale.to_s]
name = "" if name.nil?
user_name = "(#{member["user_name"]})"
text = "#{name} #{user_name}"
text = " #{name} #{user_name}"
%>
<option value="<%= member["id"] %>" data-member="<%= member.to_json %>"><%= text %></option>
<% end %>

View File

@ -1,15 +1,14 @@
<div class="group-post-item card clearfix wow bounceInUp" data-post-id="<%= post.id.to_s %>">
<a href="/admin/posts/<%= post.to_param %>" class="group-post-link"></a>
<div class="group-post-actions tool-tip-parent">
<button class="group-post-dropdown-toggle">
<div class="group-post-actions tool-tip-parent action">
<button class="group-post-dropdown-toggle toggle">
<span class="caret"></span>
</button>
<ul class="group-post-dropdown">
<ul class="group-post-dropdown action-dropdown">
<% if post.author.to_s != current_user.id.to_s %>
<li class="group-post-dropdown-item">
<a href="#">
<i class="fa fa-flag-o"></i>
Flag inappropriate</a>
<i class="fa fa-flag-o"></i>
Flag inappropriate
</a>
</li>
<% else %>
@ -31,40 +30,15 @@
</ul>
</div>
<div class="group-post-image-wrap">
<a href="/admin/posts/<%= post.to_param %>" class="group-post-link">
<% if !post.group_post_images.blank? %>
<img class="group-post-image" src="<%= post.group_post_images.first.image.thumb.url %>" alt="<%= post.title %>">
<% else %>
<img class="group-post-image" src="/assets/no-image.jpg" alt="Post image">
<% end %>
</a>
</div>
<div class="group-post-content-wrap">
<<<<<<< Updated upstream
<h3 class="group-post-title">
<%= post.title %>
</h3>
<div class="group-post-content">
<% content = strip_tags post.content %>
<%= content[0..250] %>
<%= "..." if content.length > 350 %>
</div>
<div class="group-post-meta-wrap">
<span class="group-post-author">
<%
user = User.find(post.author) rescue nil
if !user.nil?
author = (user.member_profile.name == nil ? user.user_name : user.member_profile.name rescue "")
%>
<i class="group-post-author-icon icon-user"></i> <%= author %>
<% end %>
</span>
<div class="group-post-sub-wrap">
<span class="group-post-postdate">
<% date = DateTime.parse(post.created_at.to_s).strftime("%d %B %H:%M") %>
<i class="group-post-postdate-icon icon-time"></i> <%= date %>
</span>
</div>
</div>
=======
<h3 class="group-post-title">
<a href="/admin/posts/<%= post.to_param %>" class="group-post-link">
<%= post.title %>
@ -92,6 +66,5 @@
</span>
</div>
</div>
>>>>>>> Stashed changes
</div>
</div>

View File

@ -34,12 +34,19 @@
<label class="control-label muted"><%= t(:images) %></label>
<div class="controls">
<% if params[:action] == "editpost" %>
<div>
<div class="group-admin-edit-image-wrap clearfix">
<% @grouppost.group_post_images.each do |gpi| %>
<span>
<img src="<%= gpi.image.thumb.url %>" style="width:120px;" />
<input type="checkbox" name="images_to_destroy[]" value="<%= gpi.id.to_s %>" /> Delete Image
</span>
<div class="group-admin-edit-image-item card clearfix">
<div class="group-admin-edit-image-item-inner">
<div class="group-admin-edit-image-container">
<img src="<%= gpi.image.thumb.url %>">
</div>
<div class="group-admin-edit-checkbox-wrap">
<input class="group-admin-edit-image-checkbox" type="checkbox" name="images_to_destroy[]" value="<%= gpi.id.to_s %>" />
<label class="group-admin-edit-image-label">Delete Image</label>
</div>
</div>
</div>
<% end %>
</div>
<% end %>
@ -82,12 +89,17 @@
<label class="control-label muted"><%= t(:files) %></label>
<div class="controls">
<% if params[:action] == "editpost" %>
<div>
<div class="group-admin-edit-file-wrap clearfix">
<% @grouppost.group_post_files.each do |gpf| %>
<span>
<span><%= File.basename(gpf.file.path) %></span>
<input type="checkbox" name="files_to_destroy[]" value="<%= gpf.id.to_s %>" /> Delete File
</span>
<div class="group-admin-edit-file-item card">
<i class="fa fa-file-text"></i>
<span class="group-admin-edit-filename"><%= File.basename(gpf.file.path) %></span>
<span class="group-admin-edit-file-delete">
<input class="group-admin-edit-file-checkbox" type="checkbox" name="files_to_destroy[]" value="<%= gpf.id.to_s %>" />
Delete File
</span>
</div>
<% end %>
</div>
<% end %>
@ -100,7 +112,6 @@
</button>
</div>
<div id="file_ids">
</div>
</div>

View File

@ -1,5 +1,6 @@
<% content_for :page_specific_css do -%>
<%= stylesheet_link_tag "//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" %>
<%= stylesheet_link_tag "lib/group/group-admin" %>
<% end -%>
<%= form_for @group, :url => admin_group_path(@group.id), :html => { :multipart => true , :class=>"form-horizontal main-forms"} do |f| %>
@ -16,14 +17,17 @@
<h4 class="modal-title">Modify members</h4>
</div>
<div class="modal-body">
<table>
<table class="group-member-edit-table">
<% @existing_members.each do |em| %>
<tr>
<td><img class="group-edit-avatar" src="<%= em["avatar"] %>" /></td>
<td width="70%" <%= em["id"] != current_user.id.to_s ? "" : "colspan='3'" %>><h5><%= em["name"][I18n.locale.to_s] %></h5></td>
<td><img class="group-edit-avatar admin-avatar" src="<%= em["avatar"] %>" /></td>
<td <%= em["id"] != current_user.id.to_s ? "" : "colspan='3'" %>><h5><%= em["name"][I18n.locale.to_s] %></h5></td>
<% if em["id"] != current_user.id.to_s %>
<td><input type="checkbox" class="make-admin-checkbox" value="<%= em["id"] %>" <%= em["admin"] ? "checked='checked'" : ""%> /> Admin</td>
<td><a href="#" class="member-delete-btn" data-member="<%= em.to_json %>"><i class="icon-trash"></i></a></td>
<td>
<input type="checkbox" class="make-admin-checkbox" value="<%= em["id"] %>" <%= em["admin"] ? "checked='checked'" : ""%> />
<label class="group-member-permission">Admin</label>
</td>
<td><a href="#" class="member-delete-btn button button-default" data-member="<%= em.to_json %>"><i class="icon-trash"></i></a></td>
<% end %>
</tr>
<% end %>

View File

@ -25,107 +25,73 @@
</ul>
</div>
<div class="group-member-dropdown btn-group">
<button class="btn">All members <span class="badge">20</span></button>
<button class="btn" id="currennt-selected-option">All members <span class="badge"><%= @group_members.count.to_s %></span></button>
<button class="btn dropdown-toggle" data-toggle="dropdown">
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li><a href="#">All members <span class="badge">20</span></a></li>
<li><a href="#">Admins <span class="badge">8</span></a></li>
<li><a href="#">members <span class="badge">12</span></a></li>
<ul class="dropdown-menu" id="member-type-selection">
<li><a href="#" data-member-type="all">All members <span class="badge"><%= @group_members.count.to_s %></span></a></li>
<li><a href="#" data-member-type="admin">Admins <span class="badge"><%= @group.admins.count.to_s %></span></a></li>
<li><a href="#" data-member-type="members">Members <span class="badge"><%= (@group_members.count - @group.admins.count).to_s %></span></a></li>
</ul>
</div>
<ul class="group-member-list clearfix">
<li class="group-member-item card">
<div class="group-member-photo-wrap">
<img class="group-member-photo" src="http://lorempixel.com/100/100" alt="Member Photo">
</div>
<div class="group-member-meta-wrap">
<div class="group-member-name">
<a href="#">Joshua Lin</a>
<ul class="group-member-list clearfix" id="group-member-list">
<% @group_members.each do |gm| %>
<li class="group-member-item card" data-admin="<%= gm["admin"] %>">
<div class="group-member-photo-wrap">
<img class="group-member-photo" src="<%= gm["avatar"] %>" alt="Member Photo">
</div>
</div>
</li>
<li class="group-member-item card">
<div class="group-member-photo-wrap">
<img class="group-member-photo" src="http://lorempixel.com/100/100" alt="Member Photo">
</div>
<div class="group-member-meta-wrap">
<div class="group-member-name">
<a href="#">Joshua Lin</a>
<div class="group-member-meta-wrap">
<div class="group-member-name">
<a href="#"><%= gm["name"][I18n.locale.to_s] %></a><br />
<%= gm["user_name"] %><br />
<% if gm["admin"] %>
<span class="label label-danger">Admin</span>
<% end %>
</div>
</div>
</div>
</li>
<li class="group-member-item card">
<div class="group-member-photo-wrap">
<img class="group-member-photo" src="http://lorempixel.com/100/100" alt="Member Photo">
</div>
<div class="group-member-meta-wrap">
<div class="group-member-name">
<a href="#">Joshua Lin</a>
</div>
</div>
</li>
<li class="group-member-item card">
<div class="group-member-photo-wrap">
<img class="group-member-photo" src="http://lorempixel.com/100/100" alt="Member Photo">
</div>
<div class="group-member-meta-wrap">
<div class="group-member-name">
<a href="#">Joshua Lin</a>
</div>
</div>
</li>
<li class="group-member-item card">
<div class="group-member-photo-wrap">
<img class="group-member-photo" src="http://lorempixel.com/100/100" alt="Member Photo">
</div>
<div class="group-member-meta-wrap">
<div class="group-member-name">
<a href="#">Joshua Lin</a>
</div>
</div>
</li>
<li class="group-member-item card">
<div class="group-member-photo-wrap">
<img class="group-member-photo" src="http://lorempixel.com/100/100" alt="Member Photo">
</div>
<div class="group-member-meta-wrap">
<div class="group-member-name">
<a href="#">Joshua Lin</a>
</div>
</div>
</li>
<li class="group-member-item card">
<div class="group-member-photo-wrap">
<img class="group-member-photo" src="http://lorempixel.com/100/100" alt="Member Photo">
</div>
<div class="group-member-meta-wrap">
<div class="group-member-name">
<a href="#">Joshua Lin</a>
</div>
</div>
</li>
<li class="group-member-item card">
<div class="group-member-photo-wrap">
<img class="group-member-photo" src="http://lorempixel.com/100/100" alt="Member Photo">
</div>
<div class="group-member-meta-wrap">
<div class="group-member-name">
<a href="#">Joshua Lin</a>
</div>
</div>
</li>
<li class="group-member-item card">
<div class="group-member-photo-wrap">
<img class="group-member-photo" src="http://lorempixel.com/100/100" alt="Member Photo">
</div>
<div class="group-member-meta-wrap">
<div class="group-member-name">
<a href="#">Joshua Lin</a>
</div>
</div>
</li>
</li>
<% end %>
</ul>
</div>
</div>
<script type="text/javascript">
$("#member-type-selection li a").on("click",function(){
var el = $(this),
members = $("#group-member-list li");
$("#currennt-selected-option").html(el.html());
switch(el.data("member-type")){
case "all":
members.show();
break;
case "admin":
members.filter("[data-admin=false]").hide();
members.filter("[data-admin=true]").show();
break;
case "members":
members.filter("[data-admin=true]").hide();
members.filter("[data-admin=false]").show();
break;
}
})
</script>

View File

@ -24,10 +24,10 @@
</div>
<div class="group-post-bar">
<h2 class="group-post-page-title"><%= @group.title %></h2>
<a class="group-post-join button button-primary" href="#">
<!-- <a class="group-post-join button button-primary" href="#"> -->
<i class="fa fa-user-plus"></i>
Join this group
</a>
<!-- </a> -->
<% 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 %>
@ -68,7 +68,7 @@
<p>
<% number_of_members = @group.users.count %>
<% if number_of_members > 0 %>
<a class="group-post-member-count"> href="<%= admin_group_members_path(@group) %>">
<a class="group-post-member-count" href="<%= admin_group_members_path(@group) %>">
<i class="fa fa-user"></i>
<%= number_of_members.to_s %> member<%= number_of_members > 1 ? "s" : "" %>
</a>

View File

@ -51,10 +51,11 @@
data-cycle-log="false"
data-cycle-center-horz=true
data-cycle-center-vert=true
data-cycle-auto-height="calc"
>
<% @post.group_post_images.each do |gpi| %>
<li class="group-show-post-image-item">
<img class="group-show-post-banner-image" src="<%= gpi.image.url %>" alt="<%= @post.title %>">
<img class="group-show-post-banner-image" src="<%= gpi.image.mobile.url %>" alt="<%= @post.title %>">
</li>
<% end %>
</ul>
@ -114,7 +115,7 @@
<div class="group-show-post-respond-wrap clearfix">
<label for="comment" class="screen-reader">Comment</label>
<div class="group-show-post-avatar">
<img src="http://lorempixel.com/60/60" alt="User Avatar">
<img src="<%= avatar %>" alt="User Avatar">
</div>
<input type="text" name="group_post_comment[comment]" id="group_post_comment" class="group-show-post-respond-comment" placeholder="Your comment here.">
<input type="hidden" name="group_post_comment[group_post_id]" value="<%= @post.id.to_s %>" />

View File

@ -65,10 +65,10 @@
<div class="control-group">
<label class="control-label muted"><%= @widget_settings['override_category_with'].classify %> List :</label>
<div class="controls">
<% @custom.each do |c| %>
<% @custom.each do |cust| %>
<label class="checkbox">
<input type="checkbox" <%= @subpart.custom_array_field.include?(c.id.to_s) ? "checked='checked'" : "" rescue nil %> value="<%= c.id.to_s %>" name="page_part[sub_parts_attributes][<%= @select_number %>][custom_array_field][]">
<%= c["#{@display_field}"] %>
<input type="checkbox" <%= @subpart.custom_array_field.include?(cust.id.to_s) ? "checked='checked'" : "" rescue nil %> value="<%= cust.id.to_s %>" name="page_part[sub_parts_attributes][<%= @select_number %>][custom_array_field][]">
<%= cust.send(@display_field) rescue "" %>
</label>
<% end %>
</div>

View File

@ -262,6 +262,7 @@ Orbit::Application.routes.draw do
get "/store/check_credentials" => "store#check_credentials"
get "/store/register_form" => "store#register_form"
post "/store/register_site" => "store#register_site"
post "/store/authorize_default_modules" => "store#authorize_default_modules"
get "/store/check_permissions" => "store#check_permissions"
get "/store/template_store" => "store#template_store"
get "/store/app_store" => "store#app_store"