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 %>
-
+
<%= 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;') %>
-
- <% if @project.project_type == 1 %>
-
<%= l(:bale_news_notice)%>
- <% else %>
-
<%= l(:label_news_new)%>
- <% end %>
+
<%= labelled_form_for @news, :url => project_news_index_path(@project),
:html => { :id => 'news-form', :multipart => true } do |f| %>
<%= render :partial => 'news/form', :locals => { :f => f } %>
- <%= submit_tag l(:button_create), :class => 'button-submit', :name => nil %>
- <%= preview_link preview_news_path(:project_id => @project), 'news-form' %> |
- <%= link_to l(:button_cancel), "#", :onclick => '$("#add-news").hide()' %>
+ <%= submit_tag l(:button_create), :class => 'whiteButton m3p10 h30', :name => nil %> |
+ <%= preview_link preview_news_path(:project_id => @project), 'news-form' ,target='preview',{:class => 'whiteButton m3p10'}%> |
+ <%= link_to l(:button_cancel), "#", :onclick => '$("#add-news").hide()' ,:class => 'whiteButton m3p10' %>
<% end if @project %>
+<% end %>
+
<%=label_tips%>
<% if @newss.empty? %>
@@ -50,7 +50,7 @@
<% else %>
<%= link_to_user(news.author)if news.respond_to?(:author) %><%= l(:label_project_newshare)%> <%= link_to h(news.title), news_path(news) %>
- <%= delete_link news_path(news) if User.current.allowed_to?(:manage_news, @project) %> |
+ <%= delete_link news_path(news) if User.current.allowed_to?(:manage_news, @project) %>
<% end %>
@@ -85,3 +85,16 @@
<% html_title(l(:label_news_plural)) -%>
+
diff --git a/app/views/news/new.html.erb b/app/views/news/new.html.erb
index 42dbcae85..feaf7540b 100644
--- a/app/views/news/new.html.erb
+++ b/app/views/news/new.html.erb
@@ -1,9 +1,9 @@
-<%=l(:label_news_new)%>
+
<%= labelled_form_for @news, :url => project_news_index_path(@project),
:html => { :id => 'news-form', :multipart => true } do |f| %>
<%= render :partial => 'news/form', :locals => { :f => f } %>
- <%= submit_tag l(:button_create), :class => "enterprise" %>
- <%= preview_link preview_news_path(:project_id => @project), 'news-form' %>
+ <%= submit_tag l(:button_create), :class => "whiteButton m3p10 h30" %>
+ <%= preview_link preview_news_path(:project_id => @project), 'news-form' ,target='preview',{:class => 'whiteButton m3p10'}%>
<% end %>
diff --git a/app/views/news/show.html.erb b/app/views/news/show.html.erb
index 3c7d0adad..970e228e9 100644
--- a/app/views/news/show.html.erb
+++ b/app/views/news/show.html.erb
@@ -16,7 +16,7 @@
:html => { :id => 'news-form', :multipart => true, :method => :put } do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %>
<%= submit_tag l(:button_save) %>
- <%= preview_link preview_news_path(:project_id => @project, :id => @news), 'news-form' %> |
+ <%= preview_link preview_news_path(:project_id => @project, :id => @news), 'news-form',target='preview',{:class => ''} %> |
<%= link_to l(:button_cancel), "#", :onclick => '$("#edit-news").hide(); return false;' %>
<% end %>
diff --git a/public/stylesheets/nyan.css b/public/stylesheets/nyan.css
index a99eb1429..fcc58bd3e 100644
--- a/public/stylesheets/nyan.css
+++ b/public/stylesheets/nyan.css
@@ -3,19 +3,17 @@
.text_center{
text-align: center;
}
-
* {
font-family: Helvetica, Tahoma, Arial, "Microsoft YaHei", "微软雅黑", SimSun, "宋体", STXihei, "华文细黑", Heiti, "黑体", sans-serif;
}
+
/* 按钮
*******************************************************************************/
-input[class='whiteButton'], .whiteButton {
-
+input[class~='whiteButton'], .whiteButton {
-moz-box-shadow:inset 0px 1px 0px 0px #ffffff;
-webkit-box-shadow:inset 0px 1px 0px 0px #ffffff;
box-shadow:inset 0px 1px 0px 0px #ffffff;
-
background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #ffffff), color-stop(1, #f6f6f6));
background:-moz-linear-gradient(top, #ffffff 5%, #f6f6f6 100%);
background:-webkit-linear-gradient(top, #ffffff 5%, #f6f6f6 100%);
@@ -23,28 +21,24 @@ input[class='whiteButton'], .whiteButton {
background:-ms-linear-gradient(top, #ffffff 5%, #f6f6f6 100%);
background:linear-gradient(to bottom, #ffffff 5%, #f6f6f6 100%);
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f6f6f6',GradientType=0);
-
background-color:#ffffff;
-
-moz-border-radius:6px;
-webkit-border-radius:6px;
border-radius:6px;
-
border:1px solid #dcdcdc;
-
display:inline-block;
color:#666666;
+ color: #116699;
font-family:arial;
font-size:15px;
font-weight:bold;
padding:6px 24px;
+ /*padding:3px 10px;*/
text-decoration:none;
-
text-shadow:0px 1px 0px #ffffff;
-
}
-input[class='whiteButton']:hover, .whiteButton:hover {
-
+input[class~='whiteButton']:hover, .whiteButton:hover {
+ color: #c61a1a;
background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #f6f6f6), color-stop(1, #ffffff));
background:-moz-linear-gradient(top, #f6f6f6 5%, #ffffff 100%);
background:-webkit-linear-gradient(top, #f6f6f6 5%, #ffffff 100%);
@@ -52,14 +46,22 @@ input[class='whiteButton']:hover, .whiteButton:hover {
background:-ms-linear-gradient(top, #f6f6f6 5%, #ffffff 100%);
background:linear-gradient(to bottom, #f6f6f6 5%, #ffffff 100%);
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f6f6f6', endColorstr='#ffffff',GradientType=0);
-
+ text-decoration: none;
background-color:#f6f6f6;
}
-
-
-input[class='whiteButton']:active, .whiteButton:active {
+input[class~='whiteButton']:active, .whiteButton:active {
position:relative;
top:1px;
+ text-decoration: none;
+}
+input[class~='m3p10'], .m3p10 {
+ margin: 0;
+ padding: 3px 10px;
+ height: 20px;
+ display: inline-block;
+}
+input[class~='h30'], .h30{
+ height: 30px;
}
/* minimal
*******************************************************************************/
@@ -313,3 +315,25 @@ table.content-text-list tbody tr td.locked, div.memo-section .locked{
border-bottom-left-radius : 10px;
border-bottom-right-radius: 10px;
}
+/* 项目新闻栏
+*******************************************************************************/
+.add_frame {
+ position:relative;
+ margin: 5px 10px 2px 0px;
+ padding: 10px 10px;
+ border-radius: 5px;
+ /*box-shadow: 1px 1px 6px rgb(241,241,241);*/
+ /*border: 1px solid #F1F1F1;*/
+}
+.add_frame_header{
+ background: linear-gradient(#fbfbfb, #f8f8f8) repeat scroll 0% 0% transparent;
+ border-bottom: 1px solid rgb(226,226,226);
+ box-shadow: 0px 1px 0px white, 0px, -1px 0px rgb(245,245,245);
+ height: 39px;
+ font-size: 15px;
+
+ line-height: 26px;
+ height: 30px;
+ font-size: 1.5em;
+ padding-left: 4%;
+}