socialforge/app/views/welcome/index.html.erb

180 lines
6.9 KiB
Plaintext
Raw Normal View History

<!--add by huang-->
<div style="height:280px; padding-top: 10px">
2013-08-12 10:25:23 +08:00
<div class="welcone_left">
2013-08-27 22:19:07 +08:00
<table width="388px">
2013-11-27 10:31:12 +08:00
<tr><td><span class="font_welcome_trustie"><%= l(:label_welcome_trustie) %> </span><span class="font_welcome_tdescription">, <%= l(:label_welcome_trustie_description) %></span></td></tr>
2013-08-12 10:25:23 +08:00
</table>
</div>
<table>
<tr>
2013-08-12 10:25:23 +08:00
<td> <%= call_hook :view_account_login_top %>
<div id="login-form_new">
<%= form_tag(signin_path) do %>
2013-11-21 17:11:55 +08:00
<%= 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)%> &#187;" tabindex="5"/>
</td>
</tr>
</table>
<% else %>
<div>
2013-11-27 10:31:12 +08:00
<!--info: modified by huang-->
2013-11-21 17:11:55 +08:00
<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>
2013-11-27 10:31:12 +08:00
<td rowspan="2" style="padding-left: 35px"><%= image_tag(url_to_avatar(User.current), :class => 'avatar') %></td>
2013-11-21 17:11:55 +08:00
<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>&nbsp
<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>
</div>
2013-08-12 10:25:23 +08:00
<% end %>
<% end %>
2013-11-21 17:11:55 +08:00
</div>
<%= call_hook :view_account_login_bottom %>
2013-08-12 10:25:23 +08:00
<% if params[:username].present? %>
<%= javascript_tag "$('#password').focus();" %>
<% else %>
<%= javascript_tag "$('#username').focus();" %>
<% end %> </td>
</tr>
</table>
2013-08-04 10:56:56 +08:00
</div>
2013-08-12 10:25:23 +08:00
<!--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>
2013-11-22 14:34:05 +08:00
<!-- info display block -->
2013-11-21 17:11:55 +08:00
<%= stylesheet_link_tag 'welcome' %>
<div class="body_resize">
<div class="right">
2013-11-22 08:19:40 +08:00
<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">
2013-11-22 14:34:05 +08:00
<%=link_to( project.name, project_path(project.project_id), :class => "nowrap" )%>
2013-11-22 08:19:40 +08:00
<p><%= project.description %></p>
<!-- span class="grey"><strong><em> </em></strong></span -->
</div>
<% end %>
</div>
2013-11-21 17:11:55 +08:00
<!-- p class="grey">Fusce vehicula dignissim ligula. Vestibulum sit amet neque eu neque suscipit consequat quis vel risus. </p>
<p><strong>Vestibulum vehicula purus nec dui accumsan fermentum.</strong> Suspendisse potenti. Ut dapibus est id odio pretium blandit in eget leo. Aliquam erat volutpat. Curabitur blandit </p>
<p class="grey">&nbsp;</p -->
</div>
<div class="left">
2013-11-22 08:19:40 +08:00
<div class="home" ><%= l :label_newbie_faq %><!-- 新手指引 &amp; 问答 --></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 class="project"> <a href="#" ><span >新手入门指引帖 && FAQ bala...</span></a> <span class="grey"><strong><em>[ Trustie ]</em></strong></span></div -->
2013-11-21 17:11:55 +08:00
</div>
<div class="clr"></div>
</div>
<!-- end -->
2013-11-21 17:11:55 +08:00
<br/><br/><br/><br/><br/><br/><br/>
<!-- end -->
2013-08-12 10:25:23 +08:00
<div>
2013-08-22 23:39:21 +08:00
<table width="700" border="0" align="center" style="padding-top: 0px">
2013-11-21 17:11:55 +08:00
<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>
2013-09-29 19:46:59 +08:00
</tr>
2013-11-21 17:11:55 +08:00
<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>
2013-08-12 10:25:23 +08:00
</tr>
2013-11-21 17:11:55 +08:00
</table>
2013-08-01 10:33:49 +08:00
</div>
2013-08-09 11:14:53 +08:00