给严总调试用

exceptionHandle
Wen 11 years ago
parent cc738edf2f
commit 02295e5ca9

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

@ -19,7 +19,7 @@
<script type="text/javascript"> <script type="text/javascript">
function test(id){ 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>
<script type="text/javascript"> <script type="text/javascript">
@ -44,7 +44,8 @@
<div> <div>
<p> <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> </p>
<ul> <ul>
<li style="width: 40%; float: left">请选择省份:<%= select_tag "province", <li style="width: 40%; float: left">请选择省份:<%= select_tag "province",

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

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

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

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

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

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

Loading…
Cancel
Save