Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
commit
03e8c3802d
@ -1,95 +1,95 @@
|
|||||||
<div class="navHomepage">
|
<div class="navHomepage">
|
||||||
<div class="navHomepageLogo fl">
|
<div class="navHomepageLogo fl">
|
||||||
<%=link_to image_tag("../images/nav_logo.png",width:"51px", height: "45px",class: "mt3"), signin_path%>
|
<%=link_to image_tag("../images/nav_logo.png",width:"51px", height: "45px",class: "mt3"), signin_path%>
|
||||||
</div>
|
</div>
|
||||||
<div class="fl">
|
<div class="fl">
|
||||||
<ul>
|
<ul>
|
||||||
<li class="navHomepageMenu fl mr40">
|
<li class="navHomepageMenu fl mr40">
|
||||||
<a href="http://forge.trustie.net/forums/1/memos/1168" class="c_white f16">帮助中心</a>
|
<a href="http://forge.trustie.net/forums/1/memos/1168" class="c_white f16 p10">帮助中心</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
function search(doc){
|
function search(doc){
|
||||||
//alert(1)
|
//alert(1)
|
||||||
// val = $('input:radio[name="search_type"]:checked').val();
|
// val = $('input:radio[name="search_type"]:checked').val();
|
||||||
// alert(2)
|
// alert(2)
|
||||||
// $("#search_type").val(val);
|
// $("#search_type").val(val);
|
||||||
// alert(3)
|
// alert(3)
|
||||||
$(doc).parent().submit();
|
$(doc).parent().submit();
|
||||||
}
|
}
|
||||||
<% type = type%>
|
<% type = type%>
|
||||||
$(function (){
|
$(function (){
|
||||||
if('<%= type %>' != null && '<%= type %>' == 'courses' ){
|
if('<%= type %>' != null && '<%= type %>' == 'courses' ){
|
||||||
$('input:radio[value="courses"]').attr('checked','checked');
|
$('input:radio[value="courses"]').attr('checked','checked');
|
||||||
}
|
}
|
||||||
if('<%= type %>' != null && '<%= type %>' == 'projects' ){
|
if('<%= type %>' != null && '<%= type %>' == 'projects' ){
|
||||||
$('input:radio[value="projects"]').attr('checked','checked');
|
$('input:radio[value="projects"]').attr('checked','checked');
|
||||||
}
|
}
|
||||||
if('<%= type %>' != null && '<%= type %>' == 'users' ){
|
if('<%= type %>' != null && '<%= type %>' == 'users' ){
|
||||||
$('input:radio[value="users"]').attr('checked','checked');
|
$('input:radio[value="users"]').attr('checked','checked');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
function search_in_header(obj){
|
function search_in_header(obj){
|
||||||
var name = $.trim($('#navHomepageSearchInput').val());
|
var name = $.trim($('#navHomepageSearchInput').val());
|
||||||
if (name != "" && name.length != 0) {
|
if (name != "" && name.length != 0) {
|
||||||
$('#type').val($('input[type=radio]:checked').val());
|
$('#type').val($('input[type=radio]:checked').val());
|
||||||
obj.parent().submit();
|
obj.parent().submit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function search_in_header_I(e,obj){
|
function search_in_header_I(e,obj){
|
||||||
var name = $.trim($('#navHomepageSearchInput').val());
|
var name = $.trim($('#navHomepageSearchInput').val());
|
||||||
if (e.keyCode == '13' && name != "" && name.length != 0) {
|
if (e.keyCode == '13' && name != "" && name.length != 0) {
|
||||||
$('#type').val($('input[type=radio]:checked').val());
|
$('#type').val($('input[type=radio]:checked').val());
|
||||||
obj.parent().submit();
|
obj.parent().submit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<div class="fl" id="navHomepageSearch">
|
<div class="fl" id="navHomepageSearch">
|
||||||
<!--<form class="navHomepageSearchBox">-->
|
<!--<form class="navHomepageSearchBox">-->
|
||||||
<% name = name%>
|
<% name = name%>
|
||||||
|
|
||||||
<%= form_tag({controller: :welcome, action: :search },:class=>'navHomepageSearchBox', method: :get) do %>
|
<%= form_tag({controller: :welcome, action: :search },:class=>'navHomepageSearchBox', method: :get) do %>
|
||||||
<input type="text" name="q" value="<%= name.nil? ? "" : name%>" id="navHomepageSearchInput" class="navHomepageSearchInput" placeholder="请输入关键词进行搜索" onkeypress="search_in_header_I(event,$(this));"/>
|
<input type="text" name="q" value="<%= name.nil? ? "" : name%>" id="navHomepageSearchInput" class="navHomepageSearchInput" placeholder="请输入关键词进行搜索" onkeypress="search_in_header_I(event,$(this));"/>
|
||||||
<input type="hidden" name="search_type" id="type" value=""/>
|
<input type="hidden" name="search_type" id="type" value=""/>
|
||||||
<input type="text" style="display: none;"/>
|
<input type="text" style="display: none;"/>
|
||||||
<a href="javascript:void(0);" class="homepageSearchIcon" onclick="search_in_header($(this));"></a>
|
<a href="javascript:void(0);" class="homepageSearchIcon" onclick="search_in_header($(this));"></a>
|
||||||
<% end %>
|
<% end %>
|
||||||
<div class="navSearchTypeBox" id="navHomepageSearchType">
|
<div class="navSearchTypeBox" id="navHomepageSearchType">
|
||||||
<div class="fl mr15 mt8">
|
<div class="fl mr15 mt8">
|
||||||
<input type="radio" value="courses" name="search_type" checked/>
|
<input type="radio" value="courses" name="search_type" checked/>
|
||||||
课程
|
课程
|
||||||
</div>
|
</div>
|
||||||
<div class="fl mr15 mt8">
|
<div class="fl mr15 mt8">
|
||||||
<input type="radio" value="projects" name="search_type" />
|
<input type="radio" value="projects" name="search_type" />
|
||||||
项目
|
项目
|
||||||
</div>
|
</div>
|
||||||
<div class="fl mr15 mt8">
|
<div class="fl mr15 mt8">
|
||||||
<input type="radio" value="users" name="search_type" />
|
<input type="radio" value="users" name="search_type" />
|
||||||
用户
|
用户
|
||||||
</div>
|
</div>
|
||||||
<div id="navSearchAlert" class="fr mr10">
|
<div id="navSearchAlert" class="fr mr10">
|
||||||
<span class="c_red">请选择搜索类型</span>
|
<span class="c_red">请选择搜索类型</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div id="loginInButton" class="fr ml20">
|
<div id="loginInButton" class="fr ml20">
|
||||||
<a href="<%= signin_path(:login=>true) %>" class="c_white db">登录</a>
|
<a href="<%= signin_path(:login=>true) %>" class="c_white db">登录</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="loginSignButton" class="fr">
|
<div id="loginSignButton" class="fr">
|
||||||
<a href="<%= signin_path(:login=>false) %>" class="c_white db">注册</a>
|
<a href="<%= signin_path(:login=>false) %>" class="c_white db">注册</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
//搜索相关
|
//搜索相关
|
||||||
$("#navHomepageSearch").mouseover(function(){
|
$("#navHomepageSearch").mouseover(function(){
|
||||||
$("#navHomepageSearchType").show();
|
$("#navHomepageSearchType").show();
|
||||||
}).mouseout(function(){
|
}).mouseout(function(){
|
||||||
$("#navHomepageSearchType").hide();
|
$("#navHomepageSearchType").hide();
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
@ -0,0 +1,25 @@
|
|||||||
|
|
||||||
|
<% if attachments.nil? || attachments.empty? %>
|
||||||
|
<!--<p class="nodata">-->
|
||||||
|
<!--<%#= l(:label_no_data) %>-->
|
||||||
|
<!--</p>-->
|
||||||
|
<% else %>
|
||||||
|
<% attachments.each do |attach| %>
|
||||||
|
<ul class="resourcesList">
|
||||||
|
<li class="resourcesListCheckbox fl">
|
||||||
|
<input name="checkbox1[]" type="checkbox" onclick="store_seleted_resource($(this));" <%=seleted_resources.include?(attach.id.to_s) ? 'checked':'' %> value="<%= attach.id%>" class="resourcesCheckbox" />
|
||||||
|
</li>
|
||||||
|
<li class="resourcesListName fl">
|
||||||
|
<!--<a href="javascript:void(0);" class="resourcesBlack"><%#=truncate(attach.filename,:length=>18)%></a>-->
|
||||||
|
<%= link_to truncate(attach.filename,:length=>30), download_named_attachment_path(attach.id, attach.filename),
|
||||||
|
:title => attach.filename,:class=>'resourcesBlack'%>
|
||||||
|
</li>
|
||||||
|
<li class="resourcesListSize fl"><%= number_to_human_size(attach.filesize) %></li>
|
||||||
|
<li class="resourcesListType fl"><%= get_resource_type(attach.container_type)%></li>
|
||||||
|
<li class="resourcesListUploader fl"><%=User.find(attach.author_id).realname.blank? ? User.find(attach.author_id).nickname : User.find(attach.author_id).realname %></li>
|
||||||
|
<li style="display: none"><%= attach.author_id %></li>
|
||||||
|
<li class="resourcesListTime fl"><%= format_date(attach.created_on) %></li>
|
||||||
|
<li style="display: none"><%= attach.id %></li>
|
||||||
|
</ul>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
@ -0,0 +1,41 @@
|
|||||||
|
<div class="homepageRightBanner">
|
||||||
|
<div class="NewsBannerName"><%= title_for_message(params[:type]) %></div>
|
||||||
|
<ul class="resourcesSelect">
|
||||||
|
<li class="resourcesSelected"><a href="javascript:void(0);" class="resourcesIcon"></a>
|
||||||
|
<ul class="homepagePostType">
|
||||||
|
<li>
|
||||||
|
<ul class="homepagePostTypeHomework fl">
|
||||||
|
<li class="f14"><strong>课程消息</strong></li>
|
||||||
|
<li><%= link_to "作业消息", user_message_path(User.current, :type => 'homework'), :class => "homepagePostTypeAssignment postTypeGrey" %></li>
|
||||||
|
<li><%= link_to "课程讨论",user_message_path(User.current, :type => 'course_message'), :class => "homepagePostTypeForum postTypeGrey" %></li>
|
||||||
|
<li><%= link_to "课程通知",user_message_path(User.current, :type => 'course_news'), :class => "homepagePostTypeNotice postTypeGrey" %></li>
|
||||||
|
<li><%= link_to "课程问卷", user_message_path(User.current, :type => 'poll'), :class => "homepagePostTypeQuiz postTypeGrey" %></a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<ul class="homepagePostTypeProject fl">
|
||||||
|
<li class="f14"><strong>项目消息</strong></li>
|
||||||
|
<li><%= link_to "项目任务", user_message_path(User.current, :type => 'issue'), :class => "homepageTypePTask postTypeGrey" %></li>
|
||||||
|
<li><%= link_to "项目讨论", user_message_path(User.current, :type => 'forge_message'), :class => "homepagePostTypeForum postTypeGrey" %></li>
|
||||||
|
<li><%= link_to "项目新闻", user_message_path(User.current, :type => 'forge_news'), :class => "homepageTypePNews postTypeGrey" %></li>
|
||||||
|
<li><%= link_to "用户申请", user_message_path(User.current, :type => 'apply'), :class => "homepageTypeUApply postTypeGrey" %></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<div class="cl"></div>
|
||||||
|
<li>
|
||||||
|
<ul class="homepagePostTypeMore">
|
||||||
|
<li class="f14"><strong>更多</strong></li>
|
||||||
|
<li class="fl w100"><%= link_to "全部",user_message_path(User.current), :class => "resourcesTypeAll postTypeGrey" %></li>
|
||||||
|
<li class="fl"><%= link_to "未读消息", user_message_path(User.current, :type => 'unviewed'), :class => "homepageTypeUnread postTypeGrey" %></li>
|
||||||
|
<li class="fl w100"><%= link_to "系统消息", user_system_messages_path(User.current), :class => "homepageTypeSystem postTypeGrey" %></li>
|
||||||
|
<li class="fl"><%= link_to "贴吧帖子", user_message_path(User.current, :type => 'forum'), :class => "homepageTypePost postTypeGrey" %></li>
|
||||||
|
<li class="fl w100"><%= link_to "用户留言",user_message_path(User.current, :type => 'user_feedback'), :class => "homepageTypeUMessage postTypeGrey" %></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
@ -1,2 +1,2 @@
|
|||||||
$("#user_ref_resources").html('<%= escape_javascript(render :partial => 'resources_list',:locals=>{:attachments => @attachments})%>');
|
$("#user_ref_resources").html('<%= escape_javascript(render :partial => 'homework_ref_resources_list',:locals=>{:attachments => @attachments,:seleted_resources=>@seleted_resources})%>');
|
||||||
$("#resource_ref_pages").html('<%= pagination_links_full @atta_pages, @atta_count, :per_page_links => false, :remote => @is_remote, :flag => true %>');
|
$("#resource_ref_pages").html('<%= pagination_links_full @atta_pages, @atta_count, :per_page_links => false, :remote => @is_remote, :flag => true %>');
|
@ -1,2 +1,2 @@
|
|||||||
$("#user_ref_resources").html('<%= escape_javascript(render :partial => 'resources_list',:locals=>{:attachments => @attachments})%>');
|
$("#user_ref_resources").html('<%= escape_javascript(render :partial => 'homework_ref_resources_list',:locals=>{:attachments => @attachments,:seleted_resources=>@seleted_resources})%>');
|
||||||
$("#resource_ref_pages").html('<%= pagination_links_full @atta_pages, @atta_count, :per_page_links => false, :remote => @is_remote, :flag => true %>');
|
$("#resource_ref_pages").html('<%= pagination_links_full @atta_pages, @atta_count, :per_page_links => false, :remote => @is_remote, :flag => true %>');
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 16 KiB |
Loading…
Reference in new issue