<h3><%= l(:label_mobile_version) %></h3> <a href="javascript:void(0)" onclick="$('#new_version').slideToggle(400); ">发布新版本</a> <div> <%= form_tag({:controller => 'admin', :action => 'create_version'},{:id => 'new_version',:style=>'display:none'}) do %> <p style="margin-left:60px;padding-right: 20px;"> <label for='version'><%= l(:label_version_number) %>:</label> <%= text_field_tag 'version', params[:version],:value => @new_version.version, :size => 30,:style => "font-size:small;width:490px;margin-left:10px;" %> </p> <p style="margin-left:60px;padding-right: 20px;"> <label for='description'><%= l(:label_version_description)%>:</label> <%= text_field_tag 'description', params[:description],:value => @new_version.description,:size => 30,:style => "font-size:small;width:490px;margin-left:10px;" %> </p> <p style="margin-left:60px;padding-right: 20px;"> <%= render :partial => 'attachments/form', :locals => {:container => @new_version} %> </p> <%= submit_tag l(:button_save), :class => "small", :name => nil %> <% end %> </div> <br/> <div>当前版本:</div> <table class="list"> <thead> <tr> <th><%=l(:label_version_number)%></th> <th><%=l(:label_version_description)%></th> </tr> </thead> <tbody> <% if @versions.count > 0 %> <tr class="<%= cycle("odd", "even") %>"> <td><%= @versions.first.version %></td> <td align="center" style="width: 70%"> <%= @versions.first.description %> </td> </tr> <% end %> </tbody> </table> <% if @versions.first.attachments.any?%> <% options = {:author => true, :deletable => true } %> <%= render :partial => 'attachments/links', :locals => {:attachments => @versions.first.attachments, :options => options, :is_float => true} %> <% end %> <br/> <div>历史版本:</div> <table class="list"> <thead> <tr> <th><%=l(:label_version_number)%></th> <th><%=l(:label_version_description)%></th> </tr> </thead> <tbody> <% if @versions.count > 0 %> <% for version in @versions %> <tr class="<%= cycle("odd", "even") %>"> <td><%= version.version %></td> <td align="center" style="width: 70%"> <%= version.description %> </td> </tr> <% end %> <% end %> </tbody> </table> <!-- <div class="pagination"><#%= pagination_links_full @role_pages %></div> --> <% html_title(l(:label_mobile_version)) -%>