diff --git a/app/controllers/news_controller.rb b/app/controllers/news_controller.rb index a434fcc5a..ee3db741d 100644 --- a/app/controllers/news_controller.rb +++ b/app/controllers/news_controller.rb @@ -74,7 +74,7 @@ class NewsController < ApplicationController def new @news = News.new(:project => @project, :author => User.current) - @course_tag = @project.project_type + @course_tag = @project.project_type if @course_tag render :layout => 'base_courses' end @@ -89,7 +89,8 @@ class NewsController < ApplicationController flash[:notice] = l(:notice_successful_create) redirect_to project_news_index_path(@project) else - render :action => 'new' + layout_file = (@project.project_type == 1) ? 'base_courses' : 'base_projects' + render :action => 'new', :layout => layout_file end end diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb index 9bd47d416..7166f306f 100644 --- a/app/views/issues/show.html.erb +++ b/app/views/issues/show.html.erb @@ -101,7 +101,7 @@ end %> <%= call_hook(:view_issues_show_description_bottom, :issue => @issue) %> -<% if !@issue.leaf? || User.current.allowed_to?(:manage_subtasks, @project) %> +<% if false # !@issue.leaf? || User.current.allowed_to?(:manage_subtasks, @project) %>
diff --git a/app/views/layouts/base_courses.html.erb b/app/views/layouts/base_courses.html.erb index 00adabffc..3602a8f93 100644 --- a/app/views/layouts/base_courses.html.erb +++ b/app/views/layouts/base_courses.html.erb @@ -7,7 +7,7 @@ <%= csrf_meta_tag %> <%= favicon %> - <%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'application', :media => 'all' %> + <%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'application', 'nyan', :media => 'all' %> <%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %> <%= javascript_heads %> <%= heads_for_theme %> diff --git a/app/views/news/_form.html.erb b/app/views/news/_form.html.erb index df80a7483..bfdfeaa37 100644 --- a/app/views/news/_form.html.erb +++ b/app/views/news/_form.html.erb @@ -1,9 +1,12 @@ <%= error_messages_for @news %> - +
+ <% str = (@project.project_type == 1) ? l(:bale_news_notice) : l(:label_news_new) %> + <%= str %> +

<%= f.text_field :title, :required => true, :size => 60, :style => "width:488px;" %>

-

<%= f.text_area :description, :required => true, :cols => 60, :rows => 15, :class => 'wiki-edit', :style => "width:490px;" %>

+

<%= f.text_area :description, :required => true, :cols => 60, :rows => 11, :class => 'wiki-edit', :style => "width:490px;" %>

<%= render :partial => 'attachments/form', :locals => {:container => @news} %>

diff --git a/app/views/news/index.html.erb b/app/views/news/index.html.erb index 80576e434..de734ef94 100644 --- a/app/views/news/index.html.erb +++ b/app/views/news/index.html.erb @@ -1,34 +1,34 @@ +<% + if @project.project_type == 1 + btn_tips = l(:label_news_notice) + label_tips = l(:label_course_news) + else + btn_tips = l(:label_news_new) + label_tips = l(:label_news) + end +%> +<% if @project && User.current.allowed_to?(:manage_news, @project) %>
- <% if @project.project_type == 1%> - <%= link_to(l(:label_news_notice), + <%= link_to(btn_tips, new_project_news_path(@project), :class => 'icon icon-add', - :onclick => 'showAndScrollTo("add-news", "news_title"); return false;') if @project && User.current.allowed_to?(:manage_news, @project) %> - <% else %> - <%= link_to(l(:label_news_new), - new_project_news_path(@project), - :class => 'icon icon-add', - :onclick => 'showAndScrollTo("add-news", "news_title"); return false;') if @project && User.current.allowed_to?(:manage_news, @project) %> - <% end %> + :onclick => 'showAndScrollTo("add-news", "news_title"); return false;') %>
-