完成组织模块的开发

This commit is contained in:
huang 2016-04-07 17:05:22 +08:00
parent 8d40950491
commit 3501d6f1d6
7 changed files with 136 additions and 98 deletions

View File

@ -88,86 +88,75 @@
<div class="header">
<div class="header-con">
<% if User.current.admin_of_org?(@organization) %>
<a href="javascript:void(0);" class="fl logo" onclick="orge_new_files_upload();">
<!--"/files/uploads/image#{iamge_path}"-->
<% if @org_logo_attchment.blank? %>
<img src="/images/org_new_style/logo.jpg" height="52" alt=""/>
<% else %>
<img src="/attachments/<%= @org_logo_attchment.id %>/<%= @org_logo_attchment.filename %>" height="52">
<% end %>
</a>
<div class="logo fl">
<a class="logo-img"><img src="/images/org_new_style/logo.jpg" alt=""/></a>
<a href="" class="logo-add" title="点击替换LOGO" onclick="orge_new_files_upload();"></a>
</div>
<% else %>
<a class="fl logo">
<!--"/files/uploads/image#{iamge_path}"-->
<% if @org_logo_attchment.blank? %>
<img src="/images/org_new_style/logo.jpg" height="52" alt=""/>
<% else %>
<img src="/attachments/<%= @org_logo_attchment.id %>/<%= @org_logo_attchment.filename %>" height="52">
<% end %>
</a>
<div class="logo fl">
<a class="logo-img"><img src="/images/org_new_style/logo.jpg" alt=""/></a>
</div>
<% end %>
<%# 登录 %>
<%= render :partial => 'organizations/org_logined_header' %>
</div>
<div class="cl"></div>
</div><!--header end-->
<div class="nav-box">
<div class="nav fl">
<% @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="#course_<%= field.id %>" class="fl"> 课程动态</a>
<% when 'project' %>
<a href="#project_<%= field.id %>" class="fl">项目动态</a>
<% end %>
<% else %>
<% if field.field_type == "Post" && field.hide == 0 %>
<a href="#message_<%= field.id %>" class="fl"><%= field.name %></a>
<% elsif field.field_type == "Resource" && field.hide == 0 %>
<a href="#resource_<%= field.id %>" class="fl"><%= field.name %></a>
<% end %>
<% end %>
<% end %>
<% if User.current.admin_of_org?(@organization) %>
<a href="<%= setting_organization_path(@organization) %>" class="fl">配置</a>
<% end %>
<div class="nav-con">
<div class="nav fl">
<% @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="#course_<%= field.id %>" class="fl"> 课程动态</a>
<% when 'project' %>
<a href="#project_<%= field.id %>" class="fl">项目动态</a>
<% end %>
<% else %>
<% if field.field_type == "Post" && field.hide == 0 %>
<a href="#message_<%= field.id %>" class="fl"><%= field.name %></a>
<% elsif field.field_type == "Resource" && field.hide == 0 %>
<a href="#resource_<%= field.id %>" class="fl"><%= field.name %></a>
<% end %>
<% end %>
<% end %>
<% if User.current.admin_of_org?(@organization) %>
<a href="<%= setting_organization_path(@organization) %>" class="fl">配置</a>
<% end %>
</div>
<div class="cl"></div>
</div>
</div><!--nav end-->
</div>
<!--nav end-->
<div class="banner">
<div class="banner-inner">
<% if User.current.admin_of_org?(@organization) %>
<a href="javascript:void(0);" onclick="orge_new_files_banner_upload();">
<!--"/files/uploads/image#{iamge_path}"-->
<% if @org_banner_attchment.blank? %>
<img class="banner-img" src="/images/org_new_style/banner.jpg" alt=""/>
<% else %>
<img src="/attachments/<%= @org_banner_attchment.id %>/<%= @org_banner_attchment.filename %>" class="banner-img">
<% end %>
</a>
<% if @org_banner_attchment.blank? %>
<img class="banner-img" src="/images/org_new_style/banner.jpg" alt=""/>
<% else %>
<img src="/attachments/<%= @org_banner_attchment.id %>/<%= @org_banner_attchment.filename %>" class="banner-img">
<% end %>
<a href="#" class="banner-add" title="点击替换图片" onclick="orge_new_files_banner_upload();"></a>
<div class="banner-txt">
<p ><%= @organization.name %></p>
</div>
<% else %>
<a>
<!--"/files/uploads/image#{iamge_path}"-->
<% if @org_banner_attchment.blank? %>
<img class="banner-img" src="/images/org_new_style/banner.jpg" alt=""/>
<% else %>
<img src="/attachments/<%= @org_banner_attchment.id %>/<%= @org_banner_attchment.filename %>" class="banner-img">
<% end %>
</a>
<% if @org_banner_attchment.blank? %>
<img class="banner-img" src="/images/org_new_style/banner.jpg" alt=""/>
<% else %>
<img src="/attachments/<%= @org_banner_attchment.id %>/<%= @org_banner_attchment.filename %>" class="banner-img">
<% end %>
<div class="banner-txt">
<p ><%= @organization.name %></p>
</div>
<% end %>
<div class="banner-txt">
<h1><%= @organization.name %></h1>
</div>
</div>
</div>
<div class="cl"></div>
<!--模块-->
<% @subfield_content.each do |field| %>
<% if is_default_field?(field) %>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 171 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 28 KiB

View File

@ -18,45 +18,69 @@ a:hover{color:#29156f;}
.bg-grey{ background:#f2f2f2;}
/** header **/
.header{ width:100%; height:60px; background:#29146f; padding:5px 0 0px; }
.header-con{ width:1200px; margin:0 auto;}
.logo,.logo img{ display:block; height:52px; }
a.login{ background:url(../images/org_new_style/icons.png) -7px -11px no-repeat; width:146px; height:55px; margin-right:40px; margin-top:11px;}
a:hover.login{ background:url(../images/org_new_style/icons.png) -7px -88px no-repeat; }
a.register{ background:url(../images/org_new_style/icons.png) -190px -11px no-repeat; width:158px; height:55px; ;margin-top:11px;}
a:hover.register{ background:url(../images/org_new_style/icons.png) -190px -88px no-repeat; }
.header{ width:100%; height:60px; padding:5px 0 0px; }
.header-con{ width:1200px; margin:0 auto; }
.logo{ position:relative; }
.logo-img{ height:52px; }
.login{ margin-top:15px;}
.login a{ color:#fff; font-size:14px; margin-top:10px; }
.login a{ color:#000; font-size:14px; margin-top:10px; }
.logo-add{ display:block; top:3px; left:0px; position:absolute; width:20px; height:20px;background:url(../images/org_new_style/icons.png) -7px -573px no-repeat;}
/*.header{ width:100%; height:60px; background:#29146f; padding:5px 0 0px; }*/
/*.header-con{ width:1200px; margin:0 auto;}*/
/*.logo,.logo img{ display:block; height:52px; }*/
/*a.login{ background:url(../images/org_new_style/icons.png) -7px -11px no-repeat; width:146px; height:55px; margin-right:40px; margin-top:11px;}*/
/*a:hover.login{ background:url(../images/org_new_style/icons.png) -7px -88px no-repeat; }*/
/*a.register{ background:url(../images/org_new_style/icons.png) -190px -11px no-repeat; width:158px; height:55px; ;margin-top:11px;}*/
/*a:hover.register{ background:url(../images/org_new_style/icons.png) -190px -88px no-repeat; }*/
/*.login{ margin-top:15px;}*/
/*.login a{ color:#fff; font-size:14px; margin-top:10px; }*/
/** nav **/
.nav-box{ width:1200px; height:60px; margin:0 auto;}
.nav a{ display:block; padding:15px 10px; font-size:18px; color:#000; margin-right:20px; }
.navact{border-bottom:3px solid #ffbd18;}
.nav a:hover{border-bottom:3px solid #ffbd18;}
.searchbox{ width:338px; height:57px; border:1px solid #ccc; -webkit-border-radius: 3px;border-radius: 3px; margin:10px 0px 0 0;}
.search-input{width:270px; height:40px; color:#bebebe; font-size:18px; border:1px solid #ccc; -webkit-border-radius: 3px;border-radius: 3px;border:0px; background:none; margin:10px 0 0 20px;}
.search-input:hover{ border:none;color:#fff; }
a.search-icon{ background:url(../images/org_new_style/icons.png) -387px -11px no-repeat; width:40px; height:40px; margin-top:8px;}
a:hover.search-icon{ background:url(../images/org_new_style/icons.png) -387px -89px no-repeat;}
.searchbox:hover{ background:#999999; color:#fff;}
.nav-box{ width:100%; padding:0px 0 5px; background:#eeeeee;}
.nav-con{width:1200px; margin:0 auto; background:#eee;}
.nav{ }
.nav a{ display:block; padding:15px 10px; font-size:18px; color:#666666; background:#eee; border-top:3px solid #eee; margin-right:20px; }
a.navact{border-top:3px solid #ffbd18;}
.nav a:hover{border-top:3px solid #ffbd18;}
/*.nav-box{ width:1200px; height:60px; margin:0 auto;}*/
/*.nav a{ display:block; padding:15px 10px; font-size:18px; color:#000; margin-right:20px; }*/
/*.navact{border-bottom:3px solid #ffbd18;}*/
/*.nav a:hover{border-bottom:3px solid #ffbd18;}*/
/*.searchbox{ width:338px; height:57px; border:1px solid #ccc; -webkit-border-radius: 3px;border-radius: 3px; margin:10px 0px 0 0;}*/
/*.search-input{width:270px; height:40px; color:#bebebe; font-size:18px; border:1px solid #ccc; -webkit-border-radius: 3px;border-radius: 3px;border:0px; background:none; margin:10px 0 0 20px;}*/
/*.search-input:hover{ border:none;color:#fff; }*/
/*a.search-icon{ background:url(../images/org_new_style/icons.png) -387px -11px no-repeat; width:40px; height:40px; margin-top:8px;}*/
/*a:hover.search-icon{ background:url(../images/org_new_style/icons.png) -387px -89px no-repeat;}*/
/*.searchbox:hover{ background:#999999; color:#fff;}*/
/* banner */
.banner{ width:100%; height:304px; background:#070317; color:#fff; text-align:center; line-height:2.4;}
.banner-inner{ width:1500px; margin:0 auto; position:relative; text-align:center;}
.banner-img{ height:304px;}
.banner-txt{position:absolute; top:30%; left:0%; width:1500px; margin:0 auto;}
.banner{ width:100%; height:304px; color:#fff; text-align:center; line-height:2.4;position:relative;}
.banner-inner{ width:100%; margin:0 auto; text-align:center;}
.banner-img{ height:313px;}
.banner-txt{position:absolute; top:25%; left:35%; width:500px; padding:30px 0; margin:0 auto; background-color:rgba(255,255,255,.3); }
.banner-add{ display:block; position:absolute; top:10%; left:20%;width:27px; height:27px; background:url(../images/org_new_style/icons.png) -39px -570px no-repeat;}
.banner h1{ font-size:42px;}
.banner a{font-size:28px; color:#fff;}
.banner a:hover{ text-decoration:underline;}
.banner p{ font-size:18px;}
.banner span{ font-size:16px;}
.banner p{font-size:40px; color:#fff;}
/*.banner{ width:100%; height:304px; background:#070317; color:#fff; text-align:center; line-height:2.4;}*/
/*.banner-inner{ width:1500px; margin:0 auto; position:relative; text-align:center;}*/
/*.banner-img{ height:304px;}*/
/*.banner-txt{position:absolute; top:30%; left:0%; width:1500px; margin:0 auto;}*/
/*.banner h1{ font-size:42px;}*/
/*.banner a{font-size:28px; color:#fff;}*/
/*.banner a:hover{ text-decoration:underline;}*/
/*.banner p{ font-size:18px;}*/
/*.banner span{ font-size:16px;}*/
/** box1 **/
.box1{ width:100%; padding:60px 0;}
.content{ width:1200px; margin:0 auto;}
.box-top{ margin:0 auto; text-align:center; margin-bottom:45px; }
.box-title{ width:355px; height:67px; margin:0 auto; background:#29156f; color:#fff; text-align:center; font-size:40px; font-weight: lighter; margin-bottom:2px;}
.box-title{ width:355px; height:67px; margin:0 auto; border-top:1px solid #ccc; border-bottom:1px solid #ccc; color:#000; text-align:center; font-size:40px; font-weight: lighter; margin-bottom:2px;}
.box-title-p{ font-size:20px; color:#999999;}
.row{ width:1200px; margin: 0 auto; }
.row{ width:1200px; margin: 0 auto; }
.row-box1{ width:365px;}
.row-img{ margin-bottom:10px; width:365px; height:230px; display:block;}
.row-time{ color:#ffbd18; font-size:14px; font-weight:bold; line-height:1.9;}
@ -66,8 +90,6 @@ a:hover.search-icon{ background:url(../images/org_new_style/icons.png) -387px -8
.row-txt{line-height:2.4; padding-bottom:10px; margin-bottom:10px; color:#888;}
.row-txt:hover{color:#29156f;}
.row-txt-line{border-bottom:1px solid #cccccc; width:365px;}
a.btn-more{ display:block; font-size:14px; width:110px; height:40px; -webkit-border-radius: 3px;border-radius: 3px;background:#ffbd18; color:#fff; text-align:center; line-height:3.0;}
a:hover.btn-more{ background:#29156f;}
.row-box2{ width:388px; border:1px solid #ccc; border-bottom:none;}
.row-con2 a{ display:block;padding:20px 10px; border-bottom:1px solid #ccc;}
.row-con2 a:hover{ background:#29156f; color:#fff;}
@ -75,6 +97,30 @@ a:hover.btn-more{ background:#29156f;}
.row-txt2{line-height:2.4; color:#888;}
.row-txt2:hover{ color:#fff; }
/*.box1{ width:100%; padding:60px 0;}*/
/*.content{ width:1200px; margin:0 auto;}*/
/*.box-top{ margin:0 auto; text-align:center; margin-bottom:45px; }*/
/*.box-title{ width:355px; height:67px; margin:0 auto; background:#29156f; color:#fff; text-align:center; font-size:40px; font-weight: lighter; margin-bottom:2px;}*/
/*.box-title-p{ font-size:20px; color:#999999;}*/
/*.row{ width:1200px; margin: 0 auto; }*/
/*.row-box1{ width:365px;}*/
/*.row-img{ margin-bottom:10px; width:365px; height:230px; display:block;}*/
/*.row-time{ color:#ffbd18; font-size:14px; font-weight:bold; line-height:1.9;}*/
/*.row-title{ font-size:16px; font-weight:bold; line-height:1.9;display:block;white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}*/
/*.row-con { display:block; }*/
/*.row-con:hover{ color:#29156f; }*/
/*.row-txt{line-height:2.4; padding-bottom:10px; margin-bottom:10px; color:#888;}*/
/*.row-txt:hover{color:#29156f;}*/
/*.row-txt-line{border-bottom:1px solid #cccccc; width:365px;}*/
/*a.btn-more{ display:block; font-size:14px; width:110px; height:40px; -webkit-border-radius: 3px;border-radius: 3px;background:#ffbd18; color:#fff; text-align:center; line-height:3.0;}*/
/*a:hover.btn-more{ background:#29156f;}*/
/*.row-box2{ width:388px; border:1px solid #ccc; border-bottom:none;}*/
/*.row-con2 a{ display:block;padding:20px 10px; border-bottom:1px solid #ccc;}*/
/*.row-con2 a:hover{ background:#29156f; color:#fff;}*/
/*.row-con2 a:hover{ color:#fff;}*/
/*.row-txt2{line-height:2.4; color:#888;}*/
/*.row-txt2:hover{ color:#fff; }*/
/** 活动专区 **/
.con-left{ width:618px;}
.con-left-box{ margin-bottom:20px; height:96px; display:block;}
@ -95,7 +141,7 @@ a.con-arrow-btn{ display: block;width:25px;height:25px;background:url(../images/
a.pre-arrow,a.pre-back{ display:block; width:25px; height:10px; background:#29156f; margin-left:5px;}
a.pre-back{ background:#888;}
/** footer **/
.footer{ height:150px; background:#29156f; width:100%;}
.footer{ height:150px; background:#bbb; width:100%;}
.footer-con{ width:1200px; padding:30px 0 0 60px; margin:0 auto; text-align:center; font-size:14px; color:#fff;}
.footer-con ul{ display:block; width:430px; height:50px; margin:0 auto; }
.footer-con ul li a{font-size:18px; color:#fff; margin-right:35px; font-weight:bold;}
@ -180,14 +226,17 @@ a:hover.read-more{ text-decoration:underline;}
opacity: 1;
}
a.more-btn{ display:block; background:#ccc; color:#fff; margin-top:10px; width:100px; height:38px;font-size:14px; -webkit-border-radius: 5px;border-radius:5px;text-align:center; line-height:38px;}
a.more-btn{ display:block; border:1px solid #ccc; color:#000; margin-top:10px; width:120px; height:38px;font-size:14px; -webkit-border-radius: 25px;border-radius:25px;text-align:center; line-height:38px; margin:0 auto; margin-top:30px;}
a.more-btn-center{ display:block; border:1px solid #ccc; color:#000; margin-top:10px; width:120px; height:38px;font-size:14px; -webkit-border-radius: 25px;border-radius:25px;text-align:center; line-height:38px; margin:0 auto; margin-top:30px;}
a:hover.more-btn{ background:#29146f; color:#fff;}
a:hover.more-btn-center{ background:#29146f; color:#fff;}
a:hover.more-btn-center{ background:#aaa; color:#fff;}
.mt30{ margin-top:30px;}
/*a.more-btn{ display:block; background:#ccc; color:#fff; margin-top:10px; width:100px; height:38px;font-size:14px; -webkit-border-radius: 5px;border-radius:5px;text-align:center; line-height:38px;}*/
/*a.more-btn{ display:block; border:1px solid #ccc; color:#000; margin-top:10px; width:120px; height:38px;font-size:14px; -webkit-border-radius: 25px;border-radius:25px;text-align:center; line-height:38px; margin:0 auto; margin-top:30px;}*/
/*a.more-btn-center{ display:block; border:1px solid #ccc; color:#000; margin-top:10px; width:120px; height:38px;font-size:14px; -webkit-border-radius: 25px;border-radius:25px;text-align:center; line-height:38px; margin:0 auto; margin-top:30px;}*/
/*a:hover.more-btn{ background:#29146f; color:#fff;}*/
/*a:hover.more-btn-center{ background:#29146f; color:#fff;}*/
/*.mt30{ margin-top:30px;}*/
.nocontent{ font-size:30px; color:#888; margin:150px auto; text-align:center;}
/** 帖子列表模式 **/