course首页布局上的小调整

This commit is contained in:
Wen 2014-04-29 09:49:51 +08:00
parent 7cc4a9f3a6
commit 50745d5d21
4 changed files with 27 additions and 29 deletions

View File

@ -39,17 +39,18 @@ class WelcomeController < ApplicationController
@courseCount = Project.course_entities.count @courseCount = Project.course_entities.count
@teacherCount = User.teacher.count @teacherCount = User.teacher.count
@studentCount = User.student.count @studentCount = User.student.count
@logoLink = logolink(params[:school_id]) @logoLink = logolink()
end end
def logolink(id) def logolink()
id = params[:school_id]
logo_link = "" logo_link = ""
if id.nil? and User.current.user_extensions.school.nil? if id.nil? and User.current.user_extensions.school.nil?
logo_link = '/images/transparent.png' logo_link = '/images/transparent.png'
else else
if id.to_i == 0 if id == "0"
logo_link = '/images/transparent.png' logo_link = '/images/transparent.png'
else else
if id.nil? if id.nil?

View File

@ -20,40 +20,37 @@
</div> </div>
<div class="main-content-bar"> <div class="main-content-bar">
<div style="float: left"> <div style="float: left">
<%= image_tag(@logoLink, size:'75x75') %> <%= image_tag(@logoLink, size:'75x75') %>
</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 %> </div>
<br /> <div class="welcome_left" >
<br />
<span class="font_welcome_school"> <% if params[:school_id].nil? and User.current.user_extensions.school.nil? %>
<% else%>
<% if params[:school_id] == "0" %>
<% else %> <% else %>
<%= School.find(params[:school_id]).name %> <% if params[:school_id].nil? %>
<br /> <%= School.find(User.current.user_extensions.school.id).name %>
<br />
<% else %>
<%= School.find(params[:school_id]).name %>
<br />
<% end %>
<% end %> <% end %>
<% end %> <% end %> </span>
<% end %>
</span>
<span class="font_welcome_trustie"><%= l(:label_welcome_trustie) %><%= l(:label_welcome_trustie_course) %> </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? %> <% if params[:school_id].nil? and User.current.user_extensions.school.nil? %>
<span class="font_welcome_tdescription">, <%= l(:label_welcome_trustie_course_description) %></span> <span class="font_welcome_tdescription">, <%= l(:label_welcome_trustie_course_description) %></span>
<% else %> <% else %>
<% if params[:school_id] == "0" %> <% if params[:school_id] == "0" %>
<span class="font_welcome_tdescription">, <%= l(:label_welcome_trustie_course_description) %></span> <span class="font_welcome_tdescription">, <%= l(:label_welcome_trustie_course_description) %></span>
<% end %> <% end %>
<% 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}%>
</div> </div>
<div style="clear: both;"></div> <div style="clear: both;"></div>
</div> </div>
</div> </div>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

View File

@ -624,7 +624,7 @@ ul.tool li{list-style-type:none;
font-family: Tahoma,"Microsoft YaHei"; font-family: Tahoma,"Microsoft YaHei";
font-weight: bold; font-weight: bold;
font-size: 20px; font-size: 20px;
color:#FF9900; color:#e8770d;
} }
.font_welcome_Cdescription{ .font_welcome_Cdescription{