From 837fe88545219cccaaa8b1026d6e1b96a0ecddb2 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Sat, 11 Apr 2015 14:19:52 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=98=E5=8E=9F=E5=86=B2=E7=AA=81=EF=BC=8C?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=A1=B9=E7=9B=AE=E9=85=8D=E7=BD=AE=E5=88=87?= =?UTF-8?q?=E6=8D=A2js?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/news/_project_show.html.erb | 204 ++++++++------------------ public/javascripts/project.js | 8 +- 2 files changed, 65 insertions(+), 147 deletions(-) diff --git a/app/views/news/_project_show.html.erb b/app/views/news/_project_show.html.erb index bde061f31..e2b58e683 100644 --- a/app/views/news/_project_show.html.erb +++ b/app/views/news/_project_show.html.erb @@ -1,157 +1,69 @@ +<% + btn_tips = l(:label_news_new) + label_tips = l(:label_news) +%>
-

<%= l(:label_news) %>

+

<%= label_tips %>

- -
- <%= watcher_link(@news, User.current) %> - <%= link_to(l(:button_edit), - edit_news_path(@news), - :class => 'icon icon-edit', - :accesskey => accesskey(:edit), - :onclick => '$("#edit-news").show(); return false;') if User.current.allowed_to?(:manage_news, @project) %> - <%= delete_link news_path(@news) if User.current.allowed_to?(:manage_news, @project) %> + <% end %> +
-

<%=h @news.title %>

+
+ <% if @newss.empty? %> +

+ <%= l(:label_no_data) %> +

+ <% else %> + <% @newss.each do |news| %> +
+ <%= link_to image_tag(url_to_avatar(news.author),:width => 42,:height => 42), user_path(news.author), :class => "problem_pic fl" %> +
+ <%= link_to_user_header(news.author,false,{:class=> 'problem_name c_orange fl'}) if news.respond_to?(:author) %> + <%= l(:label_release_news) %>:<%= link_to h(news.title), news_path(news),:class => 'problem_tit fl fb c_dblue' %>
+
+

<%= news.description %>
<%= l(:label_create_time) %> :<%= format_time(news.created_on) %>

+ +
+
+
-<% if authorize_for('news', 'edit') %> - -<% end %> - -
+ <% end %> +
+ + -
- - <%= textilizable(@news, :description) %> - -
- <%= link_to_attachments @news %> -
- - <% if @news.commentable? %> -

- <%= toggle_link l(:label_comment_add), "add_comment_form", :focus => "comment_comments" %> -

- <%= form_tag({:controller => 'comments', :action => 'create', :id => @news}, :id => "add_comment_form", :style => "display:none;") do %> -
- <%= text_area 'comment', 'comments', :cols => 80, :rows => 15, :class => 'wiki-edit' %> - <%= wikitoolbar_for 'comment_comments' %> -
-

- <%= submit_tag l(:button_add) %> -

- <% end %> - <% end %> +<% other_formats_links do |f| %> + <%= f.link_to 'Atom', :url => {:project_id => @project, :key => User.current.rss_key} %> +<% end %> - <% html_title @news.title -%> +<% content_for :header_tags do %> + <%= auto_discovery_link_tag(:atom, params.merge({:format => 'atom', :page => nil, :key => User.current.rss_key})) %> + <%= stylesheet_link_tag 'scm' %> +<% end %> - <% content_for :header_tags do %> - <%= stylesheet_link_tag 'scm' %> - <% end %> +<% html_title(l(:label_news_plural)) -%> - -
-
-

<%= l(:label_comment_plural) %>

- <% comments = @comments.reverse %> - <% comments.each do |comment| %> - <% next if comment.new_record? %> - - - - - -
- <%= image_tag(url_to_avatar(comment.author), :class => "avatar")%> - - - - - - - - - - - - -
- <%= link_to_user(comment.author) if comment.respond_to?(:author) %> - <%= l(:label_project_newadd) %> - <%= l(:label_comment_plural) %> -
- - <%= textilizable(comment.comments) %> - -
- <%= format_time(comment.created_on) %> - - <%= link_to_if_authorized image_tag('delete.png'), {:controller => 'comments', :action => 'destroy', :id => @news, :comment_id => comment}, - :data => {:confirm => l(:text_are_you_sure)}, - :method => :delete, - :title => l(:button_delete) %> -
- <% end if @comments.any? %> -
+ diff --git a/public/javascripts/project.js b/public/javascripts/project.js index 52d96f2d7..20ef731d7 100644 --- a/public/javascripts/project.js +++ b/public/javascripts/project.js @@ -159,4 +159,10 @@ function close_window(type){ $("#" + type).attr("checked","checked"); } -//弹框l \ No newline at end of file +//弹框l + +///////////////////////////////////////////// +function g(o){return document.getElementById(o);} +function HoverLi(n){ + for(var i=1;i<=8;i++){g('pro_st_tb_'+i).className='pro_st_normaltab';g('pro_st_tbc_0'+i).className='pro_st_undis';}g('pro_st_tbc_0'+n).className='pro_st_dis';g('pro_st_tb_'+n).className='pro_st_hovertab'; +} \ No newline at end of file