This commit is contained in:
parent
74a4e80795
commit
b8463fcca5
|
@ -29,7 +29,7 @@ class OrganizationsController < ApplicationController
|
|||
helper :issues
|
||||
include UsersHelper
|
||||
before_filter :find_organization, :only => [:show, :members, :apply_subdomain, :select_org_layout]
|
||||
layout 'base_org_newstyle'
|
||||
layout :select_org_layout
|
||||
def index
|
||||
|
||||
end
|
||||
|
@ -37,7 +37,7 @@ class OrganizationsController < ApplicationController
|
|||
# 组织风格判定
|
||||
# style:为0的时候为老式风格,1 为新式风格
|
||||
def select_org_layout
|
||||
@org.style == 0 ? 'base_org' : 'base_org_newstyle'
|
||||
(@organization.show_mode == 1 && params[:action] == "show")? 'base_org_newstyle' : 'base_org'
|
||||
end
|
||||
|
||||
def new
|
||||
|
@ -75,6 +75,7 @@ class OrganizationsController < ApplicationController
|
|||
end
|
||||
|
||||
def show
|
||||
@subfield_content = @organization.org_subfields.order("priority") if @organization.show_mode == 1
|
||||
if @organization.is_public? || User.current.admin? || User.current.member_of_org?(@organization)
|
||||
@organization = Organization.find(params[:id])
|
||||
# 统计访问量
|
||||
|
|
|
@ -28,4 +28,12 @@ module OrganizationsHelper
|
|||
end
|
||||
end
|
||||
|
||||
def get_project_activities_org org
|
||||
|
||||
end
|
||||
|
||||
def get_course_activity_org org
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -119,11 +119,24 @@
|
|||
|
||||
<div class="nav-box">
|
||||
<div class="nav fl">
|
||||
<%= link_to "首页", organization_path(@organization), :class => "fl navact" %>
|
||||
<a href="#" class="fl">新闻动态</a>
|
||||
<a href="#" class="fl">项目开发</a>
|
||||
<a href="#" class="fl">资源共享</a>
|
||||
<a href="#" class="fl">社区规则</a>
|
||||
<% @subfield_content.each do |field| %>
|
||||
<% if is_default_field?(field) %>
|
||||
<% case field.name %>
|
||||
<% when 'activity' %>
|
||||
<%= link_to "首页", organization_path(@organization), :class => "fl navact" %>
|
||||
<% when 'course' %>
|
||||
<a href="#" class="fl"> 课程动态</a>
|
||||
<% when 'project' %>
|
||||
<a href="#" class="fl">项目动态</a>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<% if field.field_type == "Post" %>
|
||||
<%= link_to field.name, organization_path(@organization), :class => "fl" %>
|
||||
<% else %>
|
||||
<%= link_to field.name, organization_path(@organization), :class => "fl" %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="fr">
|
||||
<form class="searchbox">
|
||||
|
@ -140,8 +153,8 @@
|
|||
<div class="slider-sections sandbox">
|
||||
<section class="first">
|
||||
<div class="text">
|
||||
<h2>中国北斗开源社区<br />GNSS</h2>
|
||||
<p class="copy">open laboratory of simulation and testing</p>
|
||||
<h2>课程动态<br />GNSS</h2>
|
||||
<p class="copy">course activities</p>
|
||||
<p class="button">
|
||||
<a class="dimmed" href="#"> More</a>
|
||||
</p>
|
||||
|
@ -175,7 +188,7 @@
|
|||
|
||||
<div class="box1">
|
||||
<div class="content">
|
||||
<div class="box-top"><h2 class="box-title">北斗开放实验室</h2><p class="box-title-p">open laboratory</p></div>
|
||||
<div class="box-top"><h2 class="box-title">课程动态</h2><p class="box-title-p">open laboratory</p></div>
|
||||
<div class="row ">
|
||||
<div class="row-box1 mr40 fl">
|
||||
<a href="#" target="_blank" class="row-img"><img src="/images/org_new_style/img1.jpg"></a>
|
||||
|
@ -233,7 +246,7 @@
|
|||
|
||||
<div class="box2">
|
||||
<div class="content">
|
||||
<div class="box-top"><h2 class="box-title">北斗项目动态</h2><p class="box-title-p">project activities</p></div>
|
||||
<div class="box-top"><h2 class="box-title">项目动态</h2><p class="box-title-p">project activities</p></div>
|
||||
<!--start-slider2-->
|
||||
<div class="slider2-bg">
|
||||
<div class="container">
|
||||
|
@ -287,7 +300,7 @@
|
|||
|
||||
<div class="box1">
|
||||
<div class="content">
|
||||
<div class="box-top"><h2 class="box-title">北斗开源</h2><p class="box-title-p">open source</p></div>
|
||||
<div class="box-top"><h2 class="box-title">社区规则</h2><p class="box-title-p">open source</p></div>
|
||||
<div class="row">
|
||||
<div class="row-box3 mr30 fl">
|
||||
<a href="#" target="_blank" class="row-img2"><img src="/images/org_new_style/pic1.jpg"></a>
|
||||
|
@ -402,7 +415,7 @@
|
|||
|
||||
<div class="box1">
|
||||
<div class="content">
|
||||
<div class="box-top"><h2 class="box-title">北斗活动专区</h2><p class="box-title-p">activity zone</p></div>
|
||||
<div class="box-top"><h2 class="box-title">资源共享</h2><p class="box-title-p">activity zone</p></div>
|
||||
<div class="row">
|
||||
<div class="con-left fl">
|
||||
<a href="#" target="_blank" class="con-left-box ">
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20160325030423) do
|
||||
ActiveRecord::Schema.define(:version => 20160328022623) do
|
||||
|
||||
create_table "activities", :force => true do |t|
|
||||
t.integer "act_id", :null => false
|
||||
|
@ -1301,6 +1301,7 @@ ActiveRecord::Schema.define(:version => 20160325030423) do
|
|||
t.datetime "updated_at", :null => false
|
||||
t.boolean "allow_guest_download", :default => true
|
||||
t.integer "visits", :default => 0
|
||||
t.integer "show_mode", :default => 0
|
||||
end
|
||||
|
||||
create_table "phone_app_versions", :force => true do |t|
|
||||
|
|
Loading…
Reference in New Issue