345 lines
13 KiB
Plaintext
345 lines
13 KiB
Plaintext
<!--add by huang-->
|
||
<div style="height:280px; padding-top: 10px">
|
||
<div class="welcome_left">
|
||
<span class="font_welcome_trustie"><%= l(:label_welcome_trustie) %> </span>
|
||
<span class="font_welcome_tdescription">, <%= l(:label_welcome_trustie_description) %></span>
|
||
</div>
|
||
<div class="welcome_right">
|
||
<%= call_hook :view_account_login_top %>
|
||
<div id="login-form_new">
|
||
<%= form_tag(signin_path) do %>
|
||
<%= back_url_hidden_field_tag if is_logout? %>
|
||
<% unless User.current.logged? %> <!--modified by young-->
|
||
<table >
|
||
<tr>
|
||
<td align="right"><label for="username"><%= l(:label_username) %></label></td>
|
||
<td align="left"><%= text_field_tag 'username', params[:username], :tabindex => '1' %></td>
|
||
</tr>
|
||
<tr>
|
||
<td align="right"><label for="password"><%= l(:label_password) %></label></td>
|
||
<td align="left"><%= password_field_tag 'password', nil, :tabindex => '2' %></td>
|
||
</tr>
|
||
<% if Setting.openid? %>
|
||
<tr>
|
||
<td align="right"><label for="openid_url"><%= l(:field_identity_url)%></label></td>
|
||
<td align="left"><%= text_field_tag "openid_url", nil, :tabindex => '3' %></td>
|
||
</tr>
|
||
<% end %>
|
||
<tr>
|
||
<td></td>
|
||
<td align="left">
|
||
<% if Setting.autologin? %> <label for="autologin"><%= check_box_tag 'autologin', 1, false, :tabindex => 4 %> <%= l(:label_stay_logged_in) %></label>
|
||
<% end %>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td align="left">
|
||
<% if Setting.lost_password? %>
|
||
<%= link_to l(:label_password_lost), lost_password_path %>
|
||
<% end %>
|
||
</td>
|
||
<td align="right">
|
||
<input type="submit" name="login" value="<%= l(:button_login)%> »" tabindex="5"/>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
<% else %>
|
||
<!--info: modified by huang-->
|
||
<table width="200" border="0">
|
||
<tr>
|
||
<td colspan="2" align="center" class="font_welcome_Cdescription" ><%= l(:label_welcome) %> <strong class="font_small_watch" style=" word-wrap: break-word; word-break: break-all"><%=link_to User.current.lastname<<User.current.firstname, user_path(User.current) %></strong> <%= l(:label_join) %></td>
|
||
</tr>
|
||
<tr>
|
||
|
||
<td rowspan="2" style="padding-left: 35px"><%= image_tag(url_to_avatar(User.current), :class => 'avatar') %></td>
|
||
<td><strong class="font_small_watch"><%= link_to l(:label_user_watcher)+"("+User.watched_by(User.current).count.to_s+")", user_path(User.current) %></strong> 
|
||
<strong class="font_small_watch"><%=link_to l(:label_x_user_fans, :count => User.current.watcher_users(User.current.id).count)+"("+User.current.watcher_users(User.current.id).count.to_s+")", user_path(User.current) %></strong></td>
|
||
</tr>
|
||
<tr>
|
||
<td align="left"><% unless User.current.memberships.empty? %>
|
||
<%= l(:label_x_welcome_participate, :count => User.current.memberships.count) %> <strong class="font_small_watch"><%= link_to User.current.memberships.count, {:controller => 'users', :action => 'user_projects', :id => User.current} %></strong> <%= l(:label_welcome_participate_project)%>
|
||
<% end %>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
<% end %>
|
||
<% end %>
|
||
</div>
|
||
<%= call_hook :view_account_login_bottom %>
|
||
|
||
<% if params[:username].present? %>
|
||
<%= javascript_tag "$('#password').focus();" %>
|
||
<% else %>
|
||
<%= javascript_tag "$('#username').focus();" %>
|
||
<% end %>
|
||
</div>
|
||
</div>
|
||
<!--model-->
|
||
|
||
<!-- fq -->
|
||
|
||
<script type="text/javascript" language="javascript">
|
||
function clearInfo(id, content) {
|
||
var text = $('#' + id);
|
||
if (text.val() == content) {
|
||
$('#' + id).val('');
|
||
}
|
||
}
|
||
|
||
function showInfo(id, content) {
|
||
var text = $('#' + id);
|
||
if (text.val() == '') {
|
||
$('#' + id).val(content);
|
||
}
|
||
}
|
||
</script>
|
||
<!-- info display block -->
|
||
<%= stylesheet_link_tag 'welcome' %>
|
||
<div class="body_resize">
|
||
|
||
<!-- <div class="right">
|
||
<div class="home"><%= l :label_hot_project%></div>
|
||
<% find_all_hot_project.map do |project| break if(project == find_all_hot_project[5]) %>
|
||
<div class="project">
|
||
<%=link_to( project.name, project_path(project.project_id), :class => "nowrap" )%>
|
||
<p><%= project.description %></p>
|
||
</div>
|
||
<% end %>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="left">
|
||
<div class="home" ><%= l :label_newbie_faq %></div>
|
||
<% newbieTopicStickyList.each do |topic| break if(topic == newbieTopicStickyList[6])%>
|
||
<div class="project">
|
||
<%=link_to( topic.subject, board_message_path(find_board_by_topic(topic),topic), :class => "nowrap" )%>
|
||
<span class="grey"><strong><em>[ <%=find_project_by_topic(topic) %> ]</em></strong></span>
|
||
</div>
|
||
<% end %>
|
||
</div> -->
|
||
|
||
|
||
<div class="left" style="float: left; height: 445px;">
|
||
<ul class="welcome-message-list" style="width: 90%;">
|
||
<h3 style="">论坛热帖</h3>
|
||
<div class="welcome-box-list">
|
||
<% find_hot_forum_topics.each do |topic|%>
|
||
<li class="message-brief-intro">
|
||
<span style="color:gray"><%= topic.subject %></span>
|
||
<span style="margin-left: 10px; color: green">
|
||
<%= link_to topic.author, user_path(topic.author) %>
|
||
</span>
|
||
<span style="margin-left:10px; color:blue"><%= time_tag topic.created_at %></span>
|
||
</li>
|
||
<% end %>
|
||
<li class="message-brief-intro">
|
||
<span style="color:gray">热烈祝贺论坛新版本上线,欢迎大家提交bug</span><span style="margin-left: 10px; color: green">yanpc</span><span style="margin-left:10px; color:blue">5分钟前</span>
|
||
</li>
|
||
<li class="message-brief-intro">
|
||
<span style="color:gray">论坛全新改版,增加许多功能啦,欢迎大家提交bug</span><span style="margin-left: 10px; color: green">yanpc</span><span style="margin-left:10px; color:blue">半小时前</span>
|
||
</li>
|
||
<li class="message-brief-intro">
|
||
<span style="color:gray">网站主页改版,欢迎大家提交意见和建议</span><span style="margin-left: 10px; color: green">yanpc</span><span style="margin-left:10px; color:blue">2013-11-12</span>
|
||
</li>
|
||
<li class="message-brief-intro">
|
||
<span style="color:gray">网站持续更新中,以期给大家带来更好的用户体验</span><span style="margin-left: 10px; color: green">yanpc</span><span style="margin-left:10px; color:blue">2013-11-9</span>
|
||
</li>
|
||
<li class="message-brief-intro">
|
||
<span style="color:gray">网站上线第一次发帖,欢迎大家来盖楼</span><span style="margin-left: 10px; color: green">yanpc</span><span style="margin-left:10px; color:blue">2013-11-9</span>
|
||
</li>
|
||
</div>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="right" style="float: right; margin-right: -80px; height: 445px;">
|
||
<ul class="user-welcome-message-list" style="width: 80%; margin-top: 80px;">
|
||
<h3 style="margin-left: -5px;">用户动态</h3>
|
||
<div class="user-message-box-list">
|
||
<% find_all_activities.each do |event| %>
|
||
<li style="display: block;height:60px;">
|
||
<div class="inner-right" style="float: left; height: 100%;">
|
||
<img class="avatar-3" style="width: 40px; height: 40px; margin-top:10px;" src="/images/avatars/User/4861?1385345302"></img>
|
||
<%= image_tag url_to_avatar(event.event_author), :class => "avatar-3" %>
|
||
</div>
|
||
<div class="inner-right" style="float: right; width:88%; height: 100%;">
|
||
<span style="color: green;"><%= event.event_author %></span> 发表了评论:<span style="color: blue;"><%= truncate(event.event_description, length: 15, omission:'...') %>
|
||
</span>
|
||
<p><span><%= time_tag event.event_datetime %></span> <span>评论(4)</span></p>
|
||
</div>
|
||
</li>
|
||
<% end %>
|
||
</div>
|
||
</ul>
|
||
</div>
|
||
|
||
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject">
|
||
<h2>热门项目</h2>
|
||
<!-- <ul class="d-p-index-hdright d-p-project-bytime ks-switchable-nav">
|
||
<li class="current">
|
||
<a class="" href="javascript:void(0);">今日</a>
|
||
</li>
|
||
<li>
|
||
<a class="" href="javascript:void(0);">本周</a>
|
||
</li>
|
||
<li>
|
||
<a class="" href="javascript:void(0);">本月</a>
|
||
</li>
|
||
</ul> -->
|
||
<div class="d-p-projectlist-box">
|
||
<ul class="d-p-projectlist">
|
||
<% find_all_hot_project.map do |project| break if(project == find_all_hot_project[5]) %>
|
||
<li style="background-image:none;">
|
||
<p class="layout">
|
||
<%= link_to( project.name, project_path(project.project_id), :class => "d-g-blue d-p-project-name", :target => "_blank", :title => "#{project.name}")%>
|
||
</p>
|
||
<p class="layout-1" >
|
||
<span class="d-p-project-intro"><%= project.description.truncate(50, omission: '... (continued)') %></span>
|
||
</p>
|
||
<!-- <p class="layout">
|
||
<span><%= project.members.count%></span>
|
||
</p> -->
|
||
</li>
|
||
<% end %>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
|
||
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject" style="float: right;">
|
||
<h2>热门竞赛</h2>
|
||
<!-- <ul class="d-p-index-hdright d-p-project-bytime ks-switchable-nav">
|
||
<li class="current">
|
||
<a class="" href="javascript:void(0);">今日</a>
|
||
</li>
|
||
<li>
|
||
<a class="" href="javascript:void(0);">本周</a>
|
||
</li>
|
||
<li>
|
||
<a class="" href="javascript:void(0);">本月</a>
|
||
</li>
|
||
</ul> -->
|
||
<div class="d-p-projectlist-box">
|
||
<ul class="d-p-projectlist">
|
||
<% find_all_hot_contest.map do |contest| break if(contest == find_all_hot_contest[5]) %>
|
||
<li style="background-image:none;">
|
||
<p class="layout">
|
||
<%= link_to( contest.name, respond_path(contest.id), :class => "d-g-blue d-p-project-name", :target => "_blank", :title => "#{contest.name}")%>
|
||
</p>
|
||
<p class="layout-1" >
|
||
<span class="d-p-project-intro"><%= contest.description.truncate(50, omission: '... (continued)') %></span>
|
||
</p>
|
||
<!-- <p style="margin-top: -10px;">
|
||
<span><%= contest.created_on %></span>
|
||
</p> -->
|
||
</li>
|
||
<% end %>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
|
||
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject" >
|
||
<h2>最新众包</h2>
|
||
<!-- <ul class="d-p-index-hdright d-p-project-bytime ks-switchable-nav">
|
||
<li class="current">
|
||
<a class="" href="javascript:void(0);">今日</a>
|
||
</li>
|
||
<li>
|
||
<a class="" href="javascript:void(0);">本周</a>
|
||
</li>
|
||
<li>
|
||
<a class="" href="javascript:void(0);">本月</a>
|
||
</li>
|
||
</ul> -->
|
||
<div class="d-p-projectlist-box">
|
||
<ul class="d-p-projectlist">
|
||
<% find_all_hot_bid.map do |bid| break if(bid == find_all_hot_bid[5]) %>
|
||
<li style="background-image:none;">
|
||
<p class="layout">
|
||
<%= link_to( bid.name, respond_path(bid.id), :class => "d-g-blue d-p-project-name", :target => "_blank", :title => "#{bid.name}")%>
|
||
</p>
|
||
<p class="layout-1" >
|
||
<span class="d-p-project-intro"><%= bid.description.truncate(50, omission: '... (continued)') %></span>
|
||
</p>
|
||
</li>
|
||
<% end %>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
|
||
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject" style="float: right;">
|
||
<h2>热门课程</h2>
|
||
<!-- <ul class="d-p-index-hdright d-p-project-bytime ks-switchable-nav">
|
||
<li class="current">
|
||
<a class="" href="javascript:void(0);">今日</a>
|
||
</li>
|
||
<li>
|
||
<a class="" href="javascript:void(0);">本周</a>
|
||
</li>
|
||
<li>
|
||
<a class="" href="javascript:void(0);">本月</a>
|
||
</li>
|
||
</ul> -->
|
||
<div class="d-p-projectlist-box">
|
||
<ul class="d-p-projectlist">
|
||
<% find_all_hot_course.map do |project| break if(project == find_all_hot_course[5]) %>
|
||
<li style="background-image:none;">
|
||
<p class="layout">
|
||
<%= link_to( project.name, project_path(project.project_id), :class => "d-g-blue d-p-project-name", :target => "_blank", :title => "#{project.name}")%>
|
||
</p>
|
||
<p class="layout-1" >
|
||
<span class="d-p-project-intro"><%= project.description.truncate(50, omission: '... (continued)') %></span>
|
||
</p>
|
||
</li>
|
||
<% end %>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="clr"></div>
|
||
</div>
|
||
|
||
|
||
<br/><br/><br/><br/><br/><br/><br/>
|
||
|
||
|
||
|
||
<!-- <div>
|
||
<table width="700" border="0" align="center" style="padding-top: 0px">
|
||
<tr>
|
||
<td colspan="5" align="center" style="padding-bottom: 10px; font-size: 18px; font-color: #5c5c5c ; font-family: 微软雅黑"><%= l(:label_welcome_leave_message) %> <strong><%= toggle_link l(:label_welcome_click_me), 'put-bid-form', {:focus => 'new_form_project_message'} %></strong>
|
||
</td>
|
||
</tr>
|
||
<tr><td colspan="5" align="center" ><div class="homepage_underline"></div></td></tr>
|
||
<tr>
|
||
<td colspan="5" align="center">
|
||
<div id="put-bid-form" style="display: none">
|
||
<%= form_for('new_form', :method => :post, :url => {:controller => 'words', :action => 'add_project_respond'}) do |f|%>
|
||
<table border="0" width="525px" align="center" >
|
||
<tr>
|
||
<td>
|
||
<%= f.text_area 'project_message',
|
||
:rows => 3,
|
||
:cols => 65,
|
||
:value => "#{l(:label_welcome_my_respond)}",
|
||
:onfocus => "clearInfo('new_form_project_message','#{l(:label_welcome_my_respond)}')",
|
||
:onblur => "showInfo('new_form_project_message','#{l(:label_welcome_my_respond)}')",
|
||
:style => "resize: none;",
|
||
:class => 'noline'%>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
<table border="0" width="525px" align="center">
|
||
<tr>
|
||
<td align="right"> <%= submit_tag l(:button_submit), :name => nil , :class => "bid_btn" %></td>
|
||
</tr>
|
||
</table>
|
||
<% end %>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div> -->
|
||
|
||
|
||
|
||
|