给严总调试用

This commit is contained in:
Wen 2014-04-25 09:29:18 +08:00
parent cc738edf2f
commit 02295e5ca9
9 changed files with 72 additions and 18 deletions

View File

@ -1,5 +1,11 @@
class SchoolController < ApplicationController
before_filter :require_admin, :only => :upload_logo
def upload_logo
end
def index

View File

@ -19,7 +19,7 @@
<script type="text/javascript">
function test(id){
location.href = "welcome/index?course.trustie.net&school_id="+id;
location.href = encodeURI('http://course.trustie.net&school_id=')+id;
}
</script>
<script type="text/javascript">
@ -44,7 +44,8 @@
<div>
<p>
<a href="welcome/index?course.trustie.net&school_id=0">全部学校</a>
<a href="http://course.trustie.net&school_id=0">全部学校</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="http://course.trustie.net">我的学校</a>
</p>
<ul>
<li style="width: 40%; float: left">请选择省份:<%= select_tag "province",

View File

@ -0,0 +1 @@
<input type="file" />

View File

@ -97,22 +97,55 @@
<div class="weixin-content">微信扫码</div>
</div>
<div class="main-content-bar">
<div class="welcome_left" >
<span class="font_welcome_trustie">
<% if params[:school_id].nil? and User.current.user_extensions.school.nil? %>
<% else%>
<% if params[:school_id] == "0" %>
<% else %>
<% if params[:school_id].nil? %>
<%= School.find(User.current.user_extensions.school.id).name %>
<br />
<div style="float: left">
<% if params[:school_id].nil? and User.current.user_extensions.school.nil? %>
<%= image_tag '/images/transparent.png', size: "75x75" %>
<% else%>
<% if params[:school_id] == "0" %>
<%= image_tag '/images/transparent.png', size: "75x75" %>
<% else %>
<% if params[:school_id].nil? %>
<% if School.find(User.current.user_extensions.school.id).logo_link.nil? %>
<%= image_tag '/images/transparent.png', size: "75x75" %>
<% else %>
<%= School.find(params[:school_id]).name %>
<br />
<%= image_tag School.find(User.current.user_extensions.school.id).logo_link, size: "75x75" %>
<% end %>
<br />
<% else %>
<%= image_tag School.find(params[:school_id]).logo_link, "75x75" %>
<br />
<% end %>
<% end %>
<%= l(:label_welcome_trustie) %><%= l(:label_welcome_trustie_course) %> </span><span class="font_welcome_tdescription">, <%= l(:label_welcome_trustie_course_description) %></span>
<% end %>
</div>
<div class="welcome_left" >
<span class="font_welcome_school">
<% if params[:school_id].nil? and User.current.user_extensions.school.nil? %>
<% else%>
<% if params[:school_id] == "0" %>
<% else %>
<% if params[:school_id].nil? %>
<%= School.find(User.current.user_extensions.school.id).name %>
<br />
<% else %>
<%= School.find(params[:school_id]).name %>
<br />
<% end %>
<% end %>
<% end %>
</span>
<span class="font_welcome_trustie"><%= l(:label_welcome_trustie) %><%= l(:label_welcome_trustie_course) %> </span>
<% if params[:school_id].nil? and User.current.user_extensions.school.nil? %>
<span class="font_welcome_tdescription">, <%= l(:label_welcome_trustie_course_description) %></span>
<% else %>
<% if params[:school_id] == "0" %>
<span class="font_welcome_tdescription">, <%= l(:label_welcome_trustie_course_description) %></span>
<% end %>
<% end %>
</div>
<div class="search-bar">
<%= render :partial => "search_project", :locals => {:project_type => Project::ProjectType_course}%>
@ -145,7 +178,7 @@
<div class='desc_item' >
<span class=''>
<% course = Course.find_by_extra(project.identifier) %>
<%= course.teacher.user_extensions.occupation.try(:gsub, /(.+)$/, '\1:') %>
<%= course.school.name.try(:gsub, /(.+)$/, '\1:') %>
</span>
<span class='font_bolder'>
<%= link_to(course.try(:teacher).try(:name), user_path(course.teacher)) %>

View File

@ -1766,7 +1766,7 @@ zh:
label_course_userd_by: 个课程引用
label_school_all: 学校列表
label_school_all: 中国高校
role_of_course: 课程角色

View File

@ -0,0 +1,5 @@
class AddLogolinkToSchools < ActiveRecord::Migration
def change
add_column :schools, :logo_link, :string
end
end

View File

@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20140421091020) do
ActiveRecord::Schema.define(:version => 20140424072458) do
create_table "activities", :force => true do |t|
t.integer "act_id", :null => false
@ -642,6 +642,7 @@ ActiveRecord::Schema.define(:version => 20140421091020) do
t.string "province"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.string "logo_link"
end
create_table "seems_rateable_cached_ratings", :force => true do |t|

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@ -620,6 +620,13 @@ ul.tool li{list-style-type:none;
color:#15bccf;
}
.font_welcome_school{
font-family: Tahoma,"Microsoft YaHei";
font-weight: bold;
font-size: 20px;
color:#FF9900;
}
.font_welcome_Cdescription{
font-family: 微软雅黑;
font-size: 16px;
@ -765,7 +772,7 @@ ul.tool li{list-style-type:none;
max-width: 315px;
margin: 0;
padding: 0;
margin-left: 75px;
margin-left: 15px;
}
.welcome_right{