<style>
  #boardheader h1{
    background-color: black;
    width:800px;
    height:40px;
    margin-top: 30px;
    padding-left: 120px;
    padding-top: 24px;
    color: white;
    font-size: 28px;
    /* 背景透明 */
    filter:alpha(opacity=60);
    -moz-opacity:0.6;
    opacity:0.6;
  }
  #notice{
    margin-left: 160px;
    margin-right: 70px;
    color:white;
    font-size: 16px;
    line-height: 1.5em;
  }
  #notice a{
    color: gold;
  }
  #boardstats strong{
    /*color: gold;*/
  }
  #moderators{
    position: absolute;
    font-size: 16px;
    color: white;
    left: 60px;
    bottom: 30px;
  }
  #moderators a{
    color: white;
  }
  #boardstats{
    font-size: 16px;
    color: white;
    position: absolute;
    right: 60px;
    bottom: 30px;
  }
</style>
<div id="wrap" class="wrap s_clear">
  <article class="main content">
    <header id="boardheader" class="s_clear" style="position:relative">
      <div style="position: absolute; height: 100%">
        <h1><%= @board.name %></h1>
        <div id="notice"><%= @board.notice.bbcode_to_html.html_safe %></div>
        <p id="moderators">版主: <%=render @board.moderators %></p>
        <p id="boardstats">[ <strong><%= @board.topics.size %></strong> 主题 / <strong><%= @board.posts.size %></strong> 帖子]</p>
      </div>
      <%= image_tag @board.banner %>
    </header>

    <div id="threadlist" class="threadlist datalist" style="position: relative;">
      <form method="post" name="moderate" id="moderate" action="topicadmin.php?action=moderate&amp;fid=68&amp;infloat=yes&amp;nopost=yes">
        <input type="hidden" name="formhash" value="eed723b8" />
        <input type="hidden" name="listextra" value="page%3D1" />
        <table summary="board_68"  cellspacing="0" cellpadding="0" class="datatable">
          <thead class="colplural">
            <tr>
              <td colspan="2"></td>
              <th>
          <ul class="itemfilter s_clear">


          </ul>
          </th>

          <td class="author"><a href="boarddisplay.php?fid=68&amp;filter=&amp;orderby=dateline" class="order "><%= t 'topic.user_name' %> 

              <%= link_to(t('topic.created_at'), :order => 'created_at%20DESC'.html_safe) %></a></td>

          <td class="nums"><a href="boarddisplay.php?fid=68&amp;filter=&amp;orderby=replies" class="order "><%= t 'topic.reply_num' %></a>&nbsp;
            <a href="boarddisplay.php?fid=68&amp;filter=&amp;orderby=views" class="order "><%= t 'topic.view_num' %></a></td>
          <td class="lastpost"><cite><a href="boarddisplay.php?fid=68&amp;filter=&amp;orderby=lastpost" class="order order_active"><%= t 'topic.post_last' %></a></cite></td>
          </tr>
          </thead>
          <% @topics.each do |topic| %>

            <tbody id="normalthread_<%= topic.id %>">
              <tr>
                <td class="folder">
                  <%= link_to image_tag(case
                    when topic.locked
                      "topic/locked.gif"
                    when topic.displayorder != 0
                      "topic/displayorder_#{topic.displayorder}.gif"
                    else
                      "topic/new.gif"
                    end), topic, :target => :_blank %>

                </td>
                <td class="icon">
                  &nbsp;</td>
                <th class="subject common">

                  <label>&nbsp;</label>
                  <span id="thread_<%= topic.id %>"><%= topic %></span>
                  <%= link_to(t('topic.control.delete'), control_topics_path(topic, :deleted => 1)) if @current_user.role.topic_delete %>
                  <%= link_to(t('topic.control.digest'), control_topics_path(topic, :digest => 1)) if @current_user.role.topic_digest > 0 %>
                  <%= link_to(t('topic.control.displayorder'), control_topics_path(topic, :displayorder => 1)) if @current_user.role.topic_displayorder > 0 %>
                  <%= link_to(t('topic.control.lock'), control_topics_path(topic, :locked => 1)) if @current_user.role.topic_lock %>
                  <%= link_to(t('topic.control.highlight'), control_topics_path(topic, :highlight => 0xFF0000)) if @current_user.role.topic_highlight %>

                </th>
                <td class="author">
                  <cite>
                    <%= topic.user %>
                  </cite>
                  <em><%=l topic.created_at, :format => :short %></em>
                </td>
                <td class="nums"><strong><%= topic.posts.size - 1 %></strong>/<em><%= topic.viewnum %></em></td>

                <td class="lastpost">
                  <cite><%= topic.posts.last.user %></cite>
                  <em><span title="<%= topic.posts.last.updated_at %>"><%= link_to (l topic.posts.last.updated_at, :format => :short), topic.posts.last %></span></a></em>
                </td>
              </tr>
            </tbody>
          <% end %>
        </table>

      </form>
    </div>
    <div class="pages_btns s_clear">
      <span id="visitedboards" onmouseover="$('visitedboards').id = 'visitedboardstmp';this.id = 'visitedboards';showMenu({'ctrlid':this.id})" class="pageback"><a href="index.php">返回首页</a></span>
      <span class="postbtn" id="newspecialtmp" ><%= link_to t('topic.new'), new_topic_path(:board_id => @board.id) %></span>
      <%= paginate @topics %>
    </div>
    <p id="notice"><%= notice %></p>

    <!--快速发帖-->
    <%= form_for(@topic, :html => { :multipart => true, :id => :topic }) do |f| %>
      <div class="field" id="topic_name_field">
        <%= f.label "name" %>
        <%= f.text_field :name %>
      </div>
      <div class="field">
        <%= f.fields_for :posts do |post_fields| %>
          <%= post_fields.text_area :content, :id => :fastpostmessage %>
          <div class="field">
            <%= post_fields.label :attachments %>
            <%= post_fields.fields_for :attachments do |attachment_form| %>
              <div class="field" style="display:inline">
                <%= attachment_form.file_field :data %>
              </div>
            <% end %>
          </div>
        <% end %>
      </div>
      <% if logged? %>
        <div class="ajax-fc-container">You must enable javascript to see captcha here!</div>
        <%= f.hidden_field :category_id %>
        <%= f.hidden_field :category_type %>
        <div class="actions">
          <%= f.submit %>
        </div>
      <% else %>
        <div class="actions">
          要发帖，请先 <%= link_to "注册", register_path %> 或 <%= link_to "登录", login_path %>
        </div>
      <% end %>
    <% end %>
    <script type="text/javascript">
      $(document).ready(function()	{
        $('#fastpostmessage').markItUp(mySettings);
      });
    </script>
    <script type="text/javascript" charset="utf-8">
      $(function() {
        $(".ajax-fc-container").captcha({
          borderColor: "silver",
          text: "验证码：请把<span>scissors</span>拖进圆圈"
        });
      });
    </script>
  </article>
</div>