Merge branch 'develop' of https://git.trustie.net/jacknudt/trustieforge into develop
This commit is contained in:
commit
df5458675e
|
@ -17,7 +17,7 @@
|
|||
:owner_id => @article.nil? ? 0: @article.id,
|
||||
:owner_type => OwnerTypeHelper::ArticleHomepage,
|
||||
:width => '100%',
|
||||
:height => 500,
|
||||
:height => 418,
|
||||
:minHeight=>500,
|
||||
:class => 'talk_text fl',
|
||||
:input_html => { :id => 'message_content',
|
||||
|
|
|
@ -1,52 +1,67 @@
|
|||
<div class="homepageContentContainer" style="margin-top: 25px;">
|
||||
<div class="homepageContent">
|
||||
<div class="postContainer mb10 pr">
|
||||
<div class="homepageMainContent">
|
||||
<div class="postRightContainer pr" style="padding: 25px 40px;">
|
||||
<% if User.current && User.current == @article.user %>
|
||||
<div class="homepagePostSetting" id="message_setting_<%= @article.id%>" style="top: -25px;">
|
||||
<ul>
|
||||
<li class="homepagePostSettingIcon">
|
||||
<ul class="homepagePostSettiongText">
|
||||
<li>
|
||||
<% if @article.id == @article.homepage.article_id %>
|
||||
<%= link_to(
|
||||
<%= link_to(l(:button_conf_base_homepage), user_homepages_path(:user_id=>@article.user_id), :class => 'postOptionLink' )%>
|
||||
<%# if @article.id == @article.homepage.article_id %>
|
||||
<%#= link_to(
|
||||
l(:button_cancel_base_homepage),
|
||||
{:controller => 'homepages',:action => 'cancel_homepage',:user_id=>@article.user_id,:id=>@article.homepage_id, :article_id => @article.id, :show => 1},
|
||||
:method => :post,
|
||||
:class => 'postOptionLink'
|
||||
)%>
|
||||
<% else %>
|
||||
<%= link_to(
|
||||
<%# else %>
|
||||
<%#= link_to(
|
||||
l(:button_set_base_homepage),
|
||||
{:controller => 'homepages',:action => 'set_homepage',:user_id=>@article.user_id,:id=>@article.homepage_id, :article_id => @article.id, :show => 1},
|
||||
:method => :post,
|
||||
:class => 'postOptionLink'
|
||||
) %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to(
|
||||
l(:button_edit),
|
||||
{:controller => 'article_homepages',:action => 'edit', :id => @article.id},
|
||||
:class => 'postOptionLink'
|
||||
) %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to(
|
||||
l(:button_delete),
|
||||
{:controller => 'article_homepages',:action => 'destroy', :id => @article.id},
|
||||
:method => :delete,
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:class => 'postOptionLink'
|
||||
) %>
|
||||
<%# end %>
|
||||
</li>
|
||||
<!--<li>-->
|
||||
<!--<%#= link_to(-->
|
||||
<!--l(:button_edit),-->
|
||||
<!--{:controller => 'article_homepages',:action => 'edit', :id => @article.id},-->
|
||||
<!--:class => 'postOptionLink'-->
|
||||
<!--) %>-->
|
||||
<!--</li>-->
|
||||
<!--<li>-->
|
||||
<!--<%#= link_to(-->
|
||||
<!--l(:button_delete),-->
|
||||
<!--{:controller => 'article_homepages',:action => 'destroy', :id => @article.id},-->
|
||||
<!--:method => :delete,-->
|
||||
<!--:data => {:confirm => l(:text_are_you_sure)},-->
|
||||
<!--:class => 'postOptionLink'-->
|
||||
<!--) %>-->
|
||||
<!--</li>-->
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
<div class="postThemeContainer">
|
||||
<div class="postDetailPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(@article.user),:width=>50,:height => 50,:alt=>'图像' ),user_path(@article.user) %>
|
||||
</div>
|
||||
<div class="postThemeWrap">
|
||||
<div class="postDetailTitle fl mt5">
|
||||
<a href="javascript:void(0);" class="f14 linkGrey4 fb" style="overflow:hidden;"><%= @article.title%></a>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
||||
<div class="break_word" style="padding: 5px 5px 0 0" id="intro_content">
|
||||
<div class="postDetailDate"><%= format_time( @article.created_at)%></div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="break_word mt10" style="padding: 5px 5px 0 0" id="intro_content">
|
||||
<%=@article.content.html_safe %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<div class="homepageContentContainer">
|
||||
<div class="homepageContent">
|
||||
<div class="postContainer mb10">
|
||||
<div class="homepageMainContent">
|
||||
<div class="homepagePostContainer mb10">
|
||||
<%= labelled_form_for @article, :url =>{:controller=>'article_homepages',:action => 'update'},
|
||||
:html => {:nhname=>'form',:multipart => true, :id => 'message-form'} do |f| %>
|
||||
<%= render :partial => 'article_form', :locals => {:is_edit => true, :f => f} %>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<div class="homepageContentContainer">
|
||||
<div class="homepageContent">
|
||||
<div class="postContainer mb10">
|
||||
<div class="homepageMainContent">
|
||||
<div class="homepagePostContainer mb10">
|
||||
<%= labelled_form_for @article, :url =>{:controller=>'article_homepages',:action => 'create'},
|
||||
:html => {:nhname=>'form',:multipart => true, :id => 'message-form'} do |f| %>
|
||||
<%= render :partial => 'article_form', :locals => {:is_edit => false, :f => f} %>
|
||||
|
|
|
@ -1,15 +1,13 @@
|
|||
<div class="cl"> </div>
|
||||
<div id="blog-list">
|
||||
<div class="listbox mt10">
|
||||
<div class="list-h2 fl" style="font-weight: normal">个人主页列表</div>
|
||||
<div class="fr">
|
||||
<%=link_to '新 建', new_article_homepage_path(), :target => "_blank", :class => 'BlueCirBtn' %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="category">
|
||||
<div class="category" style="padding: 5px 0;">
|
||||
<span class="grayTxt">排序:</span>
|
||||
<%= link_to "时间", {:controller => 'homepages', :action => 'index', :user_id =>@user.id, :sort => @b_sort}, :class => "sortTxt", :remote => true %>
|
||||
<%= link_to "", {:controller => 'homepages', :action => 'index', :user_id =>@user.id, :sort => @b_sort}, :class => "#{@b_sort.to_i == 1 ? 'sortupbtn' : 'sortdownbtn'} ", :remote => true %>
|
||||
<div class="fr">
|
||||
<%=link_to '新 建', new_article_homepage_path(), :target => "_blank", :class => 'BlueCirBtnMiddle', :style => 'margin-right: 0;' %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="bloglistbox">
|
||||
|
@ -17,57 +15,33 @@
|
|||
<% @articles.each do |activity| %>
|
||||
<ul class="list-file pr" onmouseover='$("#message_setting_<%= activity.id%>").show();' onmouseout='$("#message_setting_<%= activity.id%>").hide();'>
|
||||
<li><span class="item_list fl"></span>
|
||||
<%= link_to activity.title.to_s.html_safe, user_homepage_article_homepage_path(:user_id=>activity.user_id, :homepage_id=>activity.homepage_id,:id=>activity), :class=> "list-title fl", :target => '_blank' %>
|
||||
<% if activity.homepage.article_id and activity.id == activity.homepage.article_id %>
|
||||
<%= link_to activity.title.to_s.html_safe, homepage_user_path(activity.user_id), :class=> "list-title fl", :target => '_blank' %>
|
||||
<span class="red_homework_btn_cir ml5">主页</span>
|
||||
<% else %>
|
||||
<%= link_to activity.title.to_s.html_safe, user_homepage_show_path(:user_id=>activity.user_id,:id=>activity), :class=> "list-title fl", :target => '_blank' %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li class="ml15">
|
||||
<span class="grayTxt">更新:<%= format_time(activity.updated_at) %></span>
|
||||
<span class="grayTxt fl">更新:<%= format_time(activity.updated_at) %></span>
|
||||
<div>
|
||||
<%= link_to(
|
||||
l(:button_delete),
|
||||
{:controller => 'article_homepages',:action => 'destroy', :id => activity.id},
|
||||
:method => :delete,
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:class => 'fr'
|
||||
) if User.current.admin? || User.current.id == activity.user_id %>
|
||||
<%= link_to(
|
||||
l(:button_edit),
|
||||
{:controller => 'article_homepages',:action => 'edit', :id => activity.id},
|
||||
:class => 'fr mr10'
|
||||
) if User.current.admin? || User.current.id == activity.user_id %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<div class="homepagePostSetting" id="message_setting_<%= activity.id%>" style="display: none">
|
||||
<ul>
|
||||
<li class="homepagePostSettingIcon">
|
||||
<ul class="homepagePostSettiongText">
|
||||
<li>
|
||||
<% if activity.id == activity.homepage.article_id %>
|
||||
<%= link_to(
|
||||
l(:button_cancel_base_homepage),
|
||||
{:controller => 'homepages',:action => 'cancel_homepage',:user_id=>activity.user_id,:id=>activity.homepage_id, :article_id => activity.id},
|
||||
:method => :post,
|
||||
:class => 'postOptionLink'
|
||||
) if User.current && User.current.id == activity.homepage.user_id %>
|
||||
<% else %>
|
||||
<%= link_to(
|
||||
l(:button_set_base_homepage),
|
||||
{:controller => 'homepages',:action => 'set_homepage',:user_id=>activity.user_id,:id=>activity.homepage_id, :article_id => activity.id},
|
||||
:method => :post,
|
||||
:class => 'postOptionLink'
|
||||
) if User.current && User.current.id == activity.homepage.user_id %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to(
|
||||
l(:button_edit),
|
||||
{:controller => 'article_homepages',:action => 'edit', :id => activity.id},
|
||||
:class => 'postOptionLink'
|
||||
) if User.current.admin? || User.current.id == activity.user_id %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to(
|
||||
l(:button_delete),
|
||||
{:controller => 'article_homepages',:action => 'destroy', :id => activity.id},
|
||||
:method => :delete,
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:class => 'postOptionLink'
|
||||
) if User.current.admin? || User.current.id == activity.user_id %>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</ul>
|
||||
<% end %>
|
||||
<div>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<div class="homepageRight mt0">
|
||||
<div class="homepageRightBanner">
|
||||
<div class="f16 fl fontGrey3">
|
||||
个人主页
|
||||
设置个人主页
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<% if User.current.logged?%>
|
||||
<% if User.current == target%>
|
||||
<li style="width: 119px; float: left; border-right: 1px solid #ddd;"><%= link_to("编辑基本资料", my_account_path, :class => "user_editinfo") %></li>
|
||||
<li style="width: 118px; float: left;"><%= link_to '个人主页', user_homepages_path(:user_id => @user.id) , :class => "user_editinfo" %></li>
|
||||
<li style="width: 118px; float: left;"><%= link_to '个人主页', homepage_user_path(@user), :class => "user_editinfo" %></li>
|
||||
<li class="cl"></li>
|
||||
<% else%>
|
||||
<li style="width: 119px; float: left; border-right: 1px solid #ddd;">
|
||||
|
|
|
@ -911,6 +911,7 @@ zh:
|
|||
button_edit: 编辑
|
||||
button_delete: 删除
|
||||
button_approve: 批准
|
||||
button_conf_base_homepage: 配置主页
|
||||
button_set_base_homepage: 设为主页
|
||||
button_cancel_base_homepage: 取消主页
|
||||
button_set_homepage: 设为首页
|
||||
|
|
|
@ -555,6 +555,7 @@ RedmineApp::Application.routes.draw do
|
|||
get '/boards/:id/boards_topic', :to =>'boards#show', :as => 'boards_topic'
|
||||
match 'courses/:course_id/news/index', :to => 'news#index', :via => [:get, :post], :as => 'new_course_news'
|
||||
match 'courses/:course_id/news/new', :to => 'news#new', :via => [:get, :post]
|
||||
match 'users/:user_id/homepage/articles/:id', :to => 'article_homepages#show', :as => "user_homepage_show"
|
||||
|
||||
scope ":username" do
|
||||
resources :posts
|
||||
|
|
|
@ -531,7 +531,8 @@ a.BlueCirBtn{ display:block;width:75px; height:28px; background-color:#fff; line
|
|||
a:hover.BlueCirBtn{ background:#3598db; color:#fff;}
|
||||
a.BlueCirBtnMini{ display:block;width:40px; height:24px; background-color:#ffffff; line-height:24px; vertical-align:middle; text-align:center; border:1px solid #3598db; color:#3598db; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;}
|
||||
a:hover.BlueCirBtnMini{ background:#3598db; color:#fff;}
|
||||
|
||||
a.BlueCirBtnMiddle{ display:block;width:50px; height:24px; background-color:#ffffff; line-height:24px; vertical-align:middle; text-align:center; border:1px solid #3598db; color:#3598db; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;}
|
||||
a:hover.BlueCirBtnMiddle{ background:#3598db; color:#fff;}
|
||||
/* 按钮*/
|
||||
a.btn_orange_big{
|
||||
display:inline-block;
|
||||
|
|
|
@ -1515,3 +1515,6 @@ a.syllabusbox_a_blue{
|
|||
|
||||
/*历史版本删除功能*/
|
||||
.popup_ziyuan_title{ display: block; margin-left: 10px; text-align: left; max-width:360px; overflow:hidden;white-space: nowrap; text-overflow:ellipsis;}
|
||||
|
||||
.homepagePostContainer {width:718px; border:1px solid #dddddd; padding:15px; background-color:#ffffff;}
|
||||
.homepageMainContent {margin: 10px auto; width: 750px;}
|
||||
|
|
Loading…
Reference in New Issue