修改学校链接

This commit is contained in:
sw 2014-07-04 11:51:26 +08:00
parent a1920ca54c
commit b492ead0c0
2 changed files with 3 additions and 2 deletions

View File

@ -274,6 +274,7 @@ class Course < ActiveRecord::Base
end end
end end
#项目与课程分离后,很多课程的名称等信息为空,这些数据信息存储在项目表中!!就是数据兼容的问题
def name def name
read_attribute('name') || Project.find_by_identifier(self.extra).try(:name) read_attribute('name') || Project.find_by_identifier(self.extra).try(:name)
end end

View File

@ -43,7 +43,7 @@
<script type="text/javascript"> <script type="text/javascript">
function test(id){ function test(id){
location.href = encodeURI('/course/'+id); location.href = encodeURI('http://course.trustie.net/?school_id='+id);
} }
</script> </script>
@ -71,7 +71,7 @@
<p> <p>
<%= link_to "全部学校",school_index_path %>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <%= link_to "全部学校",school_index_path %>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<%= link_to '我的学校',school_course_list_path(User.current.user_extensions.school) if User.current.logged? %> <a href="http://course.trustie.net">我的学校</a>
</p> </p>
<ul> <ul>
<li style="width: 40%; float: left">请选择省份: <li style="width: 40%; float: left">请选择省份: