2014-09-15 10:58:14 +08:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8" />
|
|
|
|
<title><%= h html_title %></title>
|
|
|
|
<meta name="description" content="<%= Redmine::Info.app_name %>" />
|
|
|
|
<meta name="keywords" content="issue,bug,tracker" />
|
|
|
|
<%= csrf_meta_tag %>
|
|
|
|
<%= favicon %>
|
2015-09-18 17:44:16 +08:00
|
|
|
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','application','prettify', 'nyan','leftside', :media => 'all' %>
|
2014-09-15 10:58:14 +08:00
|
|
|
<%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
|
|
|
|
<%= javascript_heads %>
|
2015-09-10 16:38:45 +08:00
|
|
|
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' ,'prettify' %>
|
2014-09-15 10:58:14 +08:00
|
|
|
<%= heads_for_theme %>
|
2015-03-26 15:44:39 +08:00
|
|
|
|
2014-09-15 10:58:14 +08:00
|
|
|
<%= call_hook :view_layouts_base_html_head %>
|
|
|
|
<%= yield :header_tags -%>
|
2015-09-18 17:44:16 +08:00
|
|
|
<%= stylesheet_link_tag 'base','header','new_user', :media => 'all'%>
|
|
|
|
<script>
|
|
|
|
var desc;
|
|
|
|
function edit_desc(){
|
2015-09-19 10:25:02 +08:00
|
|
|
if(<%=@forum.creator.id == User.current.id%>) {
|
|
|
|
desc = $("#forum_desc_span").html();
|
|
|
|
$("#forum_desc_span").html("<textarea id='forum_desc_input' onblur='change_forum_desc();' class='homepageSignatureTextarea'>" + desc + "</textarea>");
|
|
|
|
$("#forum_desc_input").focus();
|
|
|
|
}
|
2015-09-18 17:44:16 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
function change_forum_desc(){
|
|
|
|
$.ajax({
|
|
|
|
url: '<%= forums_path + '/'+@forum.id.to_s+".js" %>',
|
|
|
|
type: 'PUT',
|
|
|
|
dataType: 'json',
|
|
|
|
data:{"forum[description]":$("#forum_desc_input").val().trim()},
|
|
|
|
success:function(data){
|
|
|
|
if(data == true){
|
|
|
|
$("#forum_desc_span").html($("#forum_desc_input").val().trim());
|
|
|
|
}else{
|
|
|
|
$("#forum_desc_span").html(desc);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
function delete_forum_tag(doc){
|
|
|
|
tag_name = doc.parent().children().eq(0).html().trim();
|
|
|
|
$.ajax(
|
|
|
|
"<%= delete_forum_tag_forum_path(@forum)+ '.js?tag_name='%>"+tag_name,
|
|
|
|
{},
|
|
|
|
function(data){
|
|
|
|
alert(data == true)
|
|
|
|
if(data == true){
|
|
|
|
doc.parent().remove();
|
|
|
|
}else{
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
function addTag(){
|
2015-09-19 10:28:30 +08:00
|
|
|
if(<%=@forum.creator.id == User.current.id%>) {
|
2015-09-21 16:01:32 +08:00
|
|
|
if ($("input[name='addTag']").val().trim() != "" ) {
|
2015-09-21 16:08:05 +08:00
|
|
|
if($("input[name='addTag']").val().trim().length <= 14) {
|
2015-09-21 16:01:32 +08:00
|
|
|
$.get(
|
|
|
|
'<%= add_forum_tag_forum_path(@forum)%>' + "?tag_str=" + $("input[name='addTag']").val(),
|
|
|
|
{}
|
|
|
|
);
|
|
|
|
}else{
|
2015-09-21 16:08:05 +08:00
|
|
|
alert("标签名字长度不能超过14个字符");
|
2015-09-21 16:01:32 +08:00
|
|
|
}
|
2015-09-19 10:28:30 +08:00
|
|
|
}
|
2015-09-18 17:44:16 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
2015-08-25 15:09:02 +08:00
|
|
|
</head>
|
2014-09-15 10:58:14 +08:00
|
|
|
<body class="<%= h body_css_classes %>">
|
2015-08-25 15:09:02 +08:00
|
|
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
<div class="navContainer mb10">
|
|
|
|
<% if User.current.logged? %>
|
|
|
|
<%= render :partial => 'layouts/logined_header' %>
|
|
|
|
<% else%>
|
|
|
|
<%= render :partial => 'layouts/unlogin_header' %>
|
|
|
|
<% end%>
|
|
|
|
</div>
|
|
|
|
<div class="cl"></div>
|
2015-09-18 17:44:16 +08:00
|
|
|
<div class="homepageContentContainer">
|
|
|
|
<div class="homepageContent">
|
|
|
|
<div class="homepageLeft">
|
|
|
|
<div class="postDetailContainer">
|
|
|
|
<div class="fl mr10 pr"> <%= link_to image_tag(url_to_avatar(@forum.creator),:width=>75,:height => 75,:alt=>'贴吧图像' ),user_path( @forum.creator) %>
|
|
|
|
<!--<div class="homepageEditProfile"><a href="javascript:void(0);" class="homepageEditProfileIcon"></a></div>-->
|
|
|
|
</div>
|
|
|
|
<div class="fl">
|
|
|
|
<div class="f16 fontBlue mb10"><a href="<%= forums_path+"/"+@forum.id.to_s%>"><%= @forum.name%></a></div>
|
|
|
|
<div class="fontGrey2 mb8">吧主:<a href="<%= user_path(@forum.creator)%>" class="linkBlue"><%= @forum.creator.name%></a></div>
|
|
|
|
<div class="fontGrey3">回答:<a href="javascript:void(0);" class="linkOrange mr5"><%= @forum.topic_count%></a> 帖子:<a href="javascript:void(0);" class="linkOrange"><%= @forum.memo_count%></a></div>
|
|
|
|
</div>
|
|
|
|
<div class="cl"></div>
|
2015-09-21 10:31:15 +08:00
|
|
|
<div class="fontGrey2 mt10"><span id="forum_desc_span"><%= @forum.description%></span>
|
|
|
|
<%if @forum.creator.id == User.current.id%>
|
|
|
|
<a href="javascript:void(0);" onclick="edit_desc();">
|
|
|
|
<!--<img src="<%#= Rails.root%>/images/signature_edit.png" width="12" height="12" />-->
|
|
|
|
<%= image_tag('signature_edit.png',{:width=>12,:height=>12})%>
|
|
|
|
</a>
|
|
|
|
<%end%>
|
2015-09-18 17:44:16 +08:00
|
|
|
</div>
|
|
|
|
<div class="mt15">
|
|
|
|
<div id="forum_tag_list">
|
|
|
|
<%= render :partial=>'forums/forum_tag_list',:locals=>{:forum=>@forum}%>
|
|
|
|
</div>
|
2015-09-19 10:27:39 +08:00
|
|
|
<% if(@forum.creator.id == User.current.id)%>
|
2015-09-18 17:44:16 +08:00
|
|
|
<a href="javascript:void(0)" class="yellowBtn f_l" onclick="$('#add_tag01').slideToggle();">+ 添加标签</a>
|
2015-09-19 10:27:39 +08:00
|
|
|
<% end %>
|
2015-09-18 17:44:16 +08:00
|
|
|
<span id="add_tag01" style="display:none; vertical-align: middle;" class="ml10 f_l">
|
|
|
|
<input type="text" name="addTag" size="20" class="isTxt w90 f_l" maxlength="100" />
|
|
|
|
<input type="button" class="submit f_l" onclick="addTag();" />
|
|
|
|
</span></div>
|
|
|
|
<div class="cl"></div>
|
|
|
|
</div>
|
|
|
|
<div class="postDetailContainer mt10">
|
|
|
|
<div class="fl mr10"><%= link_to image_tag(url_to_avatar(User.current),:width=>50,:height => 50,:alt=>'贴吧图像' ),user_path( User.current) %></div>
|
|
|
|
<div class="fl f16 fontGrey2">我在贴吧</div>
|
|
|
|
<div class="cl"></div>
|
|
|
|
<div class="mt8">
|
|
|
|
<div class="homepageImageBlock" style="width: 68px !important;">
|
|
|
|
<div><a href="javascript:void(0);" class="homepageImageNumber"><%= @my_replies_count%></a></div>
|
|
|
|
<div class="homepageImageText">回答</div>
|
|
|
|
</div>
|
|
|
|
<div class="homepageVerDiv"></div>
|
|
|
|
<div class="homepageImageBlock" style="width: 68px !important;">
|
|
|
|
<div><a href="javascript:void(0);" class="homepageImageNumber"><%= @my_topic_count%></a></div>
|
|
|
|
<div class="homepageImageText">发帖</div>
|
|
|
|
</div>
|
2015-08-25 15:09:02 +08:00
|
|
|
|
2015-09-18 17:44:16 +08:00
|
|
|
<div class="cl"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!--<%#= render_flash_messages %>-->
|
|
|
|
<%= yield %>
|
|
|
|
<%#= call_hook :view_layouts_base_content %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2014-09-15 10:58:14 +08:00
|
|
|
|
2015-08-25 15:09:02 +08:00
|
|
|
<div class="cl"></div>
|
|
|
|
<%= render :partial => 'layouts/footer' %>
|
|
|
|
<div class="cl"></div>
|
2015-09-18 17:44:16 +08:00
|
|
|
<%#= call_hook :view_layouts_base_body_bottom %>
|
2014-09-15 10:58:14 +08:00
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
|