Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
Conflicts: public/stylesheets/header.css public/stylesheets/new_user.css public/stylesheets/public_new.cssguange_homework
commit
15b45e6706
@ -0,0 +1,79 @@
|
||||
<style type="text/css">
|
||||
input.is_public,input.is_public_checkbox{height:12px;}
|
||||
input.is_public_checkbox{margin-left:4px;margin-right:4px;}
|
||||
</style>
|
||||
<div class="fl">
|
||||
<span id="attachments_fields" xmlns="http://www.w3.org/1999/html">
|
||||
<% if defined?(container) && container && container.saved_attachments %>
|
||||
<% container.attachments.each_with_index do |attachment, i| %>
|
||||
<span id="attachments_p<%= i %>" class="attachment">
|
||||
<%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'filename readonly', :readonly => 'readonly') %><%= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 254, :placeholder => l(:label_optional_description), :class => 'description', :style => "display: inline-block;") %><span class="ispublic-label"><%= l(:field_is_public) %>:</span>
|
||||
<%= check_box_tag("attachments[p#{i}][is_public_checkbox]", attachment.is_public, attachment.is_public == 1 ? true : false, :class => 'is_public') %>
|
||||
<%= if attachment.id.nil?
|
||||
#待补充代码
|
||||
else
|
||||
link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload')
|
||||
end
|
||||
%>
|
||||
<%#= render :partial => 'tags/tag', :locals => {:obj => attachment, :object_flag => "6"} %>
|
||||
|
||||
<%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %>
|
||||
</span>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
<% container.saved_attachments.each_with_index do |attachment, i| %>
|
||||
<span id="attachments_p<%= i %>" class="attachment">
|
||||
<%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'filename readonly', :readonly => 'readonly') %>
|
||||
<%= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 254, :placeholder => l(:label_optional_description), :class => 'description', :style => "display: inline-block;") %>
|
||||
<span class="ispublic-label"><%= l(:field_is_public) %>:</span>
|
||||
<%= check_box_tag("attachments[p#{i}][is_public_checkbox]", attachment.is_public, attachment.is_public == 1 ? true : false, :class => 'is_public') %>
|
||||
<%= if attachment.id.nil?
|
||||
#待补充代码
|
||||
else
|
||||
link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload')
|
||||
end
|
||||
%>
|
||||
<%#= render :partial => 'tags/tag', :locals => {:obj => attachment, :object_flag => "6"} %>
|
||||
|
||||
<%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %>
|
||||
</span>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</span>
|
||||
<% project = project %>
|
||||
<div class="cl"></div>
|
||||
<!--<span class="add_attachment" style="font-weight:normal;">-->
|
||||
<%#= button_tag "浏览", :type=>"button", :onclick=>"CompatibleSend();" %>
|
||||
<!--%= link_to image_tag(),"javascript:void(0)", :onclick => "_file.click()"%-->
|
||||
<%#= button_tag "文件浏览", :type=>"button", :onclick=>"$('#_file').click();",:onmouseover => 'this.focus()',:class => 'AnnexBtn fl mt3' %>
|
||||
<a href="javascript:void(0);" onclick="$('#_file').click();" class="AnnexBtn fl mr15">上传附件</a>
|
||||
<%= file_field_tag 'attachments[dummy][file]',
|
||||
:id => '_file',
|
||||
:class => 'file_selector',
|
||||
:multiple => true,
|
||||
:onchange => 'addInputFiles(this);',
|
||||
:style => ie8? ? '' : 'display:none',
|
||||
:data => {
|
||||
:max_file_size => Setting.attachment_max_size.to_i.kilobytes,
|
||||
:max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)),
|
||||
:max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i,
|
||||
:upload_path => uploads_path(:format => 'js', :project => project),
|
||||
:description_placeholder => l(:label_optional_description),
|
||||
:field_is_public => l(:field_is_public),
|
||||
:are_you_sure => l(:text_are_you_sure),
|
||||
:file_count => l(:label_file_count),
|
||||
:delete_all_files => l(:text_are_you_sure_all)
|
||||
} %>
|
||||
<!--<span id="upload_file_count">-->
|
||||
<!--<%#= l(:label_no_file_uploaded) %>-->
|
||||
<!--</span>-->
|
||||
<!--(<%#= l(:label_max_size) %>:-->
|
||||
<%#= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>
|
||||
<!--)-->
|
||||
<!--</span>-->
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= javascript_include_tag 'attachments' %>
|
||||
<% end %>
|
||||
</div>
|
@ -1,49 +1,26 @@
|
||||
<!-- added by fq -->
|
||||
<!-- %= form_for(@forum) do |f| % -->
|
||||
|
||||
<div id="share_new" style = "width: 500px; margin:0 auto; " >
|
||||
<%= labelled_form_for(@forum) do |f| %>
|
||||
<% if @forum.errors.any? %>
|
||||
<!--<div id="error_explanation">
|
||||
<h2><#%= pluralize(@forum.errors.count, "error") %> prohibited this forum from being saved:</h2>
|
||||
<div class="homepageContentContainer mb10">
|
||||
<div class="homepageContent">
|
||||
<div class="pageBanner mt15"><div class="NewsBannerName">编辑贴吧</div></div>
|
||||
<div class="cl"></div>
|
||||
|
||||
<ul>
|
||||
<#% @forum.errors.full_messages.each do |msg| %>
|
||||
<li><#%= msg %></li>
|
||||
<#% end %>
|
||||
</ul>
|
||||
</div> -->
|
||||
<% end %>
|
||||
<div style="width: 120%;">
|
||||
<div class="field">
|
||||
<%= f.text_field :name, :required => true, :style => 'width: 100%;', :class => 'create-share', :maxlength => 50%>
|
||||
</div>
|
||||
<div>
|
||||
<% if User.current.logged? && User.current.admin? %>
|
||||
<% if @forum.safe_attribute? 'sticky' %>
|
||||
<%= f.check_box :sticky %>
|
||||
<%= label_tag 'message_sticky', l(:label_board_sticky) %>
|
||||
<% end %>
|
||||
<% if @forum.safe_attribute? 'locked' %>
|
||||
<%= f.check_box :locked %>
|
||||
<%= label_tag 'message_locked', l(:label_board_locked) %>
|
||||
<% end %>
|
||||
<div class="postContainer">
|
||||
<%= labelled_form_for(@forum) do |f| %>
|
||||
<div id="error" style="display: none;color: red;">
|
||||
</div>
|
||||
<div>
|
||||
<textarea type="text" id="forum_name" name="forum[name]" class="postCreateInput" placeholder="对应贴吧名称" ><%= @forum.name.html_safe%></textarea>
|
||||
</div>
|
||||
<div class="mt15">
|
||||
<textarea type="text" id="forum_desc" name="forum[description]" class="postCreateInput" placeholder="对应贴吧描述" ><%= @forum.description.html_safe%></textarea>
|
||||
</div>
|
||||
<div class="mt10">
|
||||
<div class="fr"><a href="javascript:void(0);" class="submit_btn" onclick="check_and_submit($(this));">确定</a></div>
|
||||
<div class="fr"><a href="<%= forum_path(@forum)%>" class="linkGrey2 mr10" >取消</a><span class="mr10 fontGrey">或</span></div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div>
|
||||
<p style="max-width:680px">
|
||||
<%= f.kindeditor :description, :required => true,:owner_id => @forum.id,:owner_type => 2 %>
|
||||
</p>
|
||||
<!-- <script type="text/javascript">var ckeditor=CKEDITOR.replace('editor01');</script> -->
|
||||
|
||||
<p style="color: #ff0000">
|
||||
(<%= l(:label_forums_max_length) %>)
|
||||
</p>
|
||||
</div>
|
||||
<div class="actions" style=" padding-top: 10px; float:right">
|
||||
<%= submit_tag l(:button_submit) %>
|
||||
<%= link_to l(:button_back), forums_path ,:style => 'font-size: 14px; padding: 0px 3px;' %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,15 @@
|
||||
<div><img src="images/post_portrait.jpg" width="75" height="75" alt="贴吧图片" id="forum_image" class="mr10 fl" />
|
||||
<a href="javascript:void(0)" class="upImg linkGrey2 fl" onclick="open_upload_diaglog();">上传图片</a>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="mt15">
|
||||
<input type="text" name="postName" class="postCreateInput" placeholder="输入贴吧名称" />
|
||||
</div>
|
||||
<div class="mt15">
|
||||
<input type="text" name="postName" class="postCreateInput" placeholder="输入贴吧描述" />
|
||||
</div>
|
||||
<div class="mt10">
|
||||
<div class="fr"><a href="javascript:void(0);" class="submit_btn">确定</a></div>
|
||||
<div class="fr"><a href="javascript:void(0);" class="linkGrey2 mr10" onclick="$('#new_forum_div').slideToggle();$('#create_btn').parent().slideToggle();">取消</a><span class="mr10 fontGrey">或</span></div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
@ -1,57 +1,38 @@
|
||||
<!-- added by fq -->
|
||||
<div class="forums-list">
|
||||
|
||||
<% if forums.any? %>
|
||||
<% forums.each do |forum| %>
|
||||
<div class="forums-index">
|
||||
<div class="forums-inex-avatar">
|
||||
<%= forum.creator.nil? ? (link_to image_tag(url_to_avatar(forum.creator), :class => "avatar")) : (link_to image_tag(url_to_avatar(forum.creator), :class => "avatar"), user_path(forum.creator)) %>
|
||||
</div>
|
||||
<div class="forums-index-content">
|
||||
<table class="content-text-list" style="table-layout: fixed;">
|
||||
<tr>
|
||||
<td valign="top" width="500px" class=" <%= forum.sticky? ? 'sticky' : '' %><%= forum.locked? ? 'locked' : '' %>" style="word-break: break-all;word-wrap: break-word;">
|
||||
<p >
|
||||
<%= link_to h(forum.name), forum_path(forum) %>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="word-break: break-all;word-wrap: break-word;" class="upload_img">
|
||||
<p>
|
||||
<%= textAreailizable forum.description%>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="word-break: break-all;word-wrap: break-word;">
|
||||
<p >
|
||||
<%= authoring forum.created_at, forum.creator %>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="forums-index-count">
|
||||
<table class="forums-count-color">
|
||||
<tr class="forums-count-color" align="center">
|
||||
<td>
|
||||
<%= link_to (forum.memo_count), forum_path(forum) %>
|
||||
</td>
|
||||
<td>
|
||||
<%= link_to (forum.topic_count), forum_path(forum) %>
|
||||
</td>
|
||||
</tr>
|
||||
<tr align="center">
|
||||
<td>回答</td>
|
||||
<td>帖子</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="postRow">
|
||||
<div class="postPortrait"><a href="javascript:void(0);" class="linkGrey2">
|
||||
<%= link_to image_tag(url_to_avatar(forum.creator),:width=>75,:height => 75 ),user_path( forum.creator) %>
|
||||
</div>
|
||||
<div class="postWrap">
|
||||
<div class="postTitle">
|
||||
<!--<a href="javascript:void(0);" class="f16 linkBlue">新手讨论吧</a>-->
|
||||
<%= link_to forum.name, forum_path(forum),:class=>"f16 linkBlue" %>
|
||||
</div>
|
||||
<div class="postDes"><%= textAreailizable forum.description%></div>
|
||||
<div class="postCreater">创建者:<a href="<%= user_path( forum.creator)%>" class="linkGrey2" target="_blank"><%= forum.creator.name %></a></div>
|
||||
<div class="postDate">创建时间:<%= format_date(forum.created_at) %></div>
|
||||
</div>
|
||||
<div class="postStatics">
|
||||
<div>
|
||||
<!--<a href="javascript:void(0);" class="linkGrey5 fb">280</a>-->
|
||||
<%= link_to ( forum.topic_count), forum_path(forum),:class=>"linkGrey5 fb" %>
|
||||
</div>
|
||||
<div>帖子</div>
|
||||
</div>
|
||||
<div class="slice"></div>
|
||||
<div class="postStatics mr20">
|
||||
<div>
|
||||
<!--<a href="javascript:void(0);" class="linkGrey5 fb">335</a>-->
|
||||
<%= link_to (forum.memo_count), forum_path(forum),:class=>"linkGrey5 fb" %>
|
||||
</div>
|
||||
<div>回答</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="pagination" style="margin-top: 10px;">
|
||||
<%= pagination_links_full @forums_pages, @forums_count %>
|
||||
</div>
|
||||
|
||||
<% else %>
|
||||
<% end %>
|
||||
</div>
|
||||
<%= render :partial => "layouts/no_content" %>
|
||||
<% end %>
|
@ -0,0 +1,33 @@
|
||||
|
||||
|
||||
<div class="postSort" id="complex"><a href="javascript:void(0);" class="linkGrey2 fl">综合</a>
|
||||
<% if order_type=='reorder_complex' && order_str == 'desc' %>
|
||||
<a href="javascript:void(0);" id="reorder_complex" class="sortArrowActiveD"></a>
|
||||
<% elsif order_type=='reorder_complex' && order_str == 'asc' %>
|
||||
<a href="javascript:void(0);" id="reorder_complex" class="sortArrowActiveU"></a>
|
||||
<% else %>
|
||||
<a href="javascript:void(0);" id="reorder_complex" ></a>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="postSort" id="popu"><a href="javascript:void(0);" class="linkGrey2 fl">人气</a>
|
||||
<% if order_type=='reorder_popu' && order_str == 'desc' %>
|
||||
<a href="javascript:void(0);" id="reorder_popu" class="sortArrowActiveD"></a>
|
||||
<% elsif order_type=='reorder_popu' && order_str == 'asc' %>
|
||||
<a href="javascript:void(0);" id="reorder_popu" class="sortArrowActiveU"></a>
|
||||
<% else %>
|
||||
<a href="javascript:void(0);" id="reorder_popu" ></a>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="postSort" id="time"><a href="javascript:void(0);" class="linkGrey2 fl">时间</a>
|
||||
<% if order_type=='reorder_time' && order_str == 'desc' %>
|
||||
<a href="javascript:void(0);" id="reorder_time" class="sortArrowActiveD"></a>
|
||||
<% elsif order_type=='reorder_time' && order_str == 'asc' %>
|
||||
<a href="javascript:void(0);" id="reorder_time" class="sortArrowActiveU"></a>
|
||||
<% else %>
|
||||
<a href="javascript:void(0);" id="reorder_time" ></a>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="creatPost">
|
||||
<a href="javascript:void(0);" id="create_btn" class="c_white db creatPostIcon bBlue"
|
||||
onclick="$('#error').hide();clear_form();$('#new_forum_div').slideToggle();$(this).parent().slideToggle();">新建贴吧</a></div>
|
||||
<div class="cl"></div>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue