主页调整
This commit is contained in:
parent
b45332bab0
commit
c26cb56193
|
@ -0,0 +1,8 @@
|
|||
<div >
|
||||
<%= form_tag( search_stores_path, method: 'post') do %>
|
||||
<%= text_field_tag 'name', params[:name], placeholder:'请输入要搜索的关键字', name: "name", :class => 'blueinputbar', :style => 'width:300px;'%>
|
||||
|
||||
<%= submit_tag l(:label_search), :class => "enterprise"%>
|
||||
<% end %>
|
||||
<div class='font_lighter' style="margin: 0; padding: 0; margin-top: 4px;">全站文件搜索。不会搜索私有项目中的内容和学生已经提交的作业。</div>
|
||||
</div>
|
|
@ -1,76 +1,4 @@
|
|||
<div class='top_bar' style="">
|
||||
<div style="float: left;">
|
||||
<%= image_tag '/images/qrweixin.jpg', size: '200x200', alt: 'trustie', class: "weixin" %>
|
||||
<div style="margin: -15px 0px 0px 0px;"><h3 style="color: #000000; font-size: 15px; text-align:center ">微信扫码</h3></div>
|
||||
</div>
|
||||
<div class="welcome_left" style="">
|
||||
<span class="font_welcome_trustie"><%= l(:label_welcome_trustie) %> </span><span class="font_welcome_tdescription">, <%= l(:label_welcome_trustie_description) %></span>
|
||||
</div>
|
||||
<div class='loginForm' style="">
|
||||
<%= call_hook :view_account_login_top %>
|
||||
<div id="login-form_new" style="">
|
||||
<%= form_tag(signin_path) do %>
|
||||
<%= back_url_hidden_field_tag if is_logout? %>
|
||||
<% unless User.current.logged? %>
|
||||
<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>
|
||||
<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"/>
|
||||
<!-- Kyrie -->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<% else %>
|
||||
<div>
|
||||
<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: 20px"><%= 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>
|
||||
</div>
|
||||
<% 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>
|
||||
|
||||
<div style="clear:both"></div>
|
||||
<script type="text/javascript" language="javascript">
|
||||
<script type="text/javascript" language="javascript">
|
||||
function clearInfo(id, content) {
|
||||
var text = $('#' + id);
|
||||
if (text.val() == content) {
|
||||
|
@ -96,6 +24,91 @@
|
|||
|
||||
</style>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function (){
|
||||
window.onload = function(){
|
||||
function fixedBar(id, options){
|
||||
var ele = document.getElementById(id);
|
||||
if(!ele) return;
|
||||
if(/msie (\d+\.\d+)/i.test(navigator.userAgent)){
|
||||
var pageHeight=window.innerHeight;
|
||||
var d=document;
|
||||
if(typeof pageHeight!="number"){
|
||||
if(document.compatMode=="CSS1Compat"){
|
||||
pageHeight=document.documentElement.clientHeight;
|
||||
}else{
|
||||
pageHeight=document.body.clientHeight;
|
||||
}
|
||||
}
|
||||
var ieScrollTop=window.pageYOffset || d.documentElement.scrollTop || d.body.scrollTop;
|
||||
if(options.addclass) ele.className = options.addclass;
|
||||
ele.style.position= 'absolute';
|
||||
|
||||
if(options.show){
|
||||
ele.style.top = ieScrollTop+pageHeight-options.top + "px";
|
||||
ele.style.display= 'block';
|
||||
}
|
||||
|
||||
window.attachEvent('onscroll' , function (){
|
||||
|
||||
var ieScrollTop=window.pageYOffset || d.documentElement.scrollTop || d.body.scrollTop;
|
||||
|
||||
ele.style.top = ieScrollTop+pageHeight - options.top + "px";
|
||||
if(options.autoHidden){
|
||||
if(ieScrollTop==0){
|
||||
ele.style.display="none";
|
||||
}else{
|
||||
ele.style.display="block";
|
||||
}
|
||||
}
|
||||
});
|
||||
}else{
|
||||
var ele = document.getElementById(id);
|
||||
if(typeof pageHeight!="number"){
|
||||
if(document.compatMode=="CSS1Compat"){
|
||||
pageHeight=document.documentElement.clientHeight;
|
||||
}else{
|
||||
pageHeight=document.body.clientHeight;
|
||||
}
|
||||
}
|
||||
if(options.show) ele.style.display= 'block';
|
||||
ele.style.top = pageHeight-options.top+'px';
|
||||
window.addEventListener('scroll',function (){
|
||||
if(options.autoHidden){
|
||||
if(baidu.page.getScrollTop()==0){
|
||||
ele.style.display="none";
|
||||
}else{
|
||||
ele.style.display="block";
|
||||
}
|
||||
}
|
||||
},false);
|
||||
}
|
||||
}
|
||||
|
||||
fixedBar('backTopBtn' , {autoHidden: true, top : 186});
|
||||
fixedBar('identifier-pannel' , {autoHidden: false , top : 956 , show : true});
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
<div class='top_bar'>
|
||||
<div id="identifier-pannel" style="display:none">
|
||||
<%= image_tag '/images/qrweixin.jpg', size: '150x150', alt: 'trustie', class: "weixin" %>
|
||||
<div class="weixin-content">微信扫码</div>
|
||||
</div>
|
||||
<div class="main-content-bar">
|
||||
<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="search-bar">
|
||||
<%= render :partial => "search_bar"%>
|
||||
</div>
|
||||
<div style="clear: both;"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="clear:both"></div>
|
||||
|
||||
|
||||
<%= stylesheet_link_tag 'welcome' %>
|
||||
|
||||
|
||||
|
|
|
@ -258,7 +258,7 @@ span.forums-avatar-right{
|
|||
text-overflow: ellipsis;
|
||||
}
|
||||
.contextual-borad{
|
||||
/*float:right;*/
|
||||
float:right;
|
||||
white-space: nowrap;
|
||||
line-height:1.4em;
|
||||
margin-top:0px;
|
||||
|
@ -752,9 +752,12 @@ ul.tool li{list-style-type:none;
|
|||
.welcome_left{
|
||||
float:left;
|
||||
display:inline-block;
|
||||
margin-top: 50px;
|
||||
/*margin-top: 50px;*/
|
||||
padding-left: 20px;
|
||||
max-width: 380px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
margin-left: 60px;
|
||||
}
|
||||
|
||||
.welcome_right{
|
||||
|
@ -1371,7 +1374,7 @@ table.attributes { width: 100% }
|
|||
table.attributes th { vertical-align: top; text-align: left; }
|
||||
table.attributes td { vertical-align: top; }
|
||||
|
||||
table.boards a.board, h3.comments { /*background: url(../images/comment.png) no-repeat 0% 50%; */padding-left: 5px; }
|
||||
table.boards a.board, h3.comments { background: url(../images/comment.png) no-repeat 0% 50%; padding-left: 20px; }
|
||||
table.boards td.topic-count, table.boards td.message-count {text-align:center;}
|
||||
table.boards td.last-message {font-size:80%;}
|
||||
|
||||
|
@ -2458,7 +2461,7 @@ a.close-icon:hover {background-image:url('../images/close_hl.png');}
|
|||
.icon-edit { background-image: url(../images/edit.png); }
|
||||
.icon-copy { background-image: url(../images/copy.png); }
|
||||
.icon-duplicate { background-image: url(../images/duplicate.png); }
|
||||
.icon-del { /*background-image: url(../images/delete.png); */}
|
||||
.icon-del { background-image: url(../images/delete.png); }
|
||||
.icon-move { background-image: url(../images/move.png); }
|
||||
.icon-save { background-image: url(../images/save.png); }
|
||||
.icon-cancel { background-image: url(../images/cancel.png); }
|
||||
|
@ -2483,7 +2486,7 @@ a.close-icon:hover {background-image:url('../images/close_hl.png');}
|
|||
.icon-checked { background-image: url(../images/true.png); }
|
||||
.icon-details { background-image: url(../images/zoom_in.png); }
|
||||
.icon-report { background-image: url(../images/report.png); }
|
||||
.icon-comment { /*background-image: url(../images/comment.png); */}
|
||||
.icon-comment { background-image: url(../images/comment.png); }
|
||||
.icon-summary { background-image: url(../images/lightning.png); }
|
||||
.icon-server-authentication { background-image: url(../images/server_key.png); }
|
||||
.icon-issue { background-image: url(../images/ticket.png); }
|
||||
|
|
|
@ -320,3 +320,53 @@ div#tooltip::after {
|
|||
a.attachments_list_color {
|
||||
color: grey;
|
||||
}
|
||||
.search-bar {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
float: right;
|
||||
margin-top: 10px;
|
||||
margin-right: 60px;
|
||||
}
|
||||
.main-content-bar{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
margin-bottom: 30px;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.weixin-content{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#identifier-pannel{
|
||||
position:fixed;
|
||||
left: 50%;
|
||||
bottom:0;
|
||||
z-index:9999;
|
||||
width:150px;
|
||||
margin-left:500px;
|
||||
}
|
||||
#identifier-pannel a:link,#identifier-pannel a:visited{
|
||||
display:block;
|
||||
padding:10px;
|
||||
line-height:18px;
|
||||
font-size:12px;
|
||||
color:#333;
|
||||
text-decoration:none;
|
||||
white-space:nowrap;
|
||||
text-align:center;
|
||||
background:#f9f9f9;
|
||||
}
|
||||
#identifier-pannel a:hover{
|
||||
background:#ccd8db;
|
||||
color:#000;
|
||||
}
|
||||
#identifier-pannel img{
|
||||
display:block;
|
||||
margin:5px auto;
|
||||
border:none;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue