diff --git a/app/views/wiki/_content.html.erb b/app/views/wiki/_content.html.erb index 2554f5f2a..1f32f58d2 100644 --- a/app/views/wiki/_content.html.erb +++ b/app/views/wiki/_content.html.erb @@ -1,5 +1,5 @@ -
- <%= textAreailizable content, :text, :attachments => content.page.attachments, +<%= textAreailizable content, :text, :attachments => content.page.attachments, :edit_section_links => (@sections_editable && {:controller => 'wiki', :action => 'edit', :project_id => @page.project, :id => @page.title}) %> + <%#= content.text.html_safe %> -
+ diff --git a/app/views/wiki/edit.html.erb b/app/views/wiki/edit.html.erb index ed9ac8891..0fc854a2d 100644 --- a/app/views/wiki/edit.html.erb +++ b/app/views/wiki/edit.html.erb @@ -31,6 +31,7 @@
+ <% if @page.safe_attribute_names.include?('parent_id') && @wiki.pages.any? %> <%= fields_for @page do |fp| %>

@@ -48,11 +49,11 @@

  • <%= render :partial => 'attachments/form',:locals => {:container => @page} %> - +
  • - + <%= l(:button_save) %>
    diff --git a/app/views/wiki/show.html.erb b/app/views/wiki/show.html.erb index c8b592cd1..1d585a571 100644 --- a/app/views/wiki/show.html.erb +++ b/app/views/wiki/show.html.erb @@ -1,20 +1,23 @@ -
    +

    Wiki

    -
    - <% if @editable %> - <% if @content.current_version? %> - <%= link_to_if_authorized(l(:button_edit), {:action => 'edit', :id => @page.title}, :class => 'icon icon-edit', :accesskey => accesskey(:edit)) %> - <%= watcher_link(@page, User.current) %> +
    +
    +
    + <% if @editable %> + <% if @content.current_version? %> + + <%#= watcher_link(@page, User.current) %> <%#= link_to_if_authorized(l(:button_lock), {:action => 'protect', :id => @page.title, :protected => 1}, :method => :post, :class => 'icon icon-lock') if !@page.protected? %> <%#= link_to_if_authorized(l(:button_unlock), {:action => 'protect', :id => @page.title, :protected => 0}, :method => :post, :class => 'icon icon-unlock') if @page.protected? %> <%#= link_to_if_authorized(l(:button_rename), {:action => 'rename', :id => @page.title}, :class => 'icon icon-move') %> - <%= link_to_if_authorized(l(:button_delete), {:action => 'destroy', :id => @page.title}, :method => :delete, :data => {:confirm => l(:text_are_you_sure)}, :class => 'icon icon-del') %> + <%= link_to_if_authorized("", {:action => 'destroy', :id => @page.title}, :method => :delete, :data => {:confirm => l(:text_are_you_sure)}, :class => 'pic_del fr') %> + <%= link_to_if_authorized("", {:action => 'edit', :id => @page.title}, :class => 'pic_edit fr', :accesskey => accesskey(:edit)) %> <% else %> <%= link_to_if_authorized(l(:button_rollback), {:action => 'edit', :id => @page.title, :version => @content.version }, :class => 'icon icon-cancel') %> <% end %> <% end %> - <%= link_to_if_authorized(l(:label_history), {:action => 'history', :id => @page.title}, :class => 'icon icon-history') %> + <%#= link_to_if_authorized(l(:label_history), {:action => 'history', :id => @page.title}, :class => 'icon icon-history') %>
    <%= wiki_page_breadcrumb(@page) %> <% unless @content.current_version? %> @@ -40,28 +43,37 @@


    <% end %> +
    <%= render(:partial => "wiki/content", :locals => {:content => @content}) %> -<%= link_to_attachments @page %> +<%= link_to_attachment_project @page, :author => false %> + +
    + <% if @editable && authorize_for('wiki', 'add_attachment') %> -
    -

    - <%= link_to l(:label_attachment_new), {}, :onclick => "$('#add_attachment_form').show(); return false;", - :id => 'attach_files_link' %>

    + +
    + <%= link_to l(:label_upload_files), {}, :onclick => "$('#add_attachment_form').show(); return false;", + :id => 'attach_files_link', + :class => "blue_u_btn fl mr10" %> <%= form_tag({:controller => 'wiki', :action => 'add_attachment', :project_id => @project, :id => @page.title}, :multipart => true, :id => "add_attachment_form", :style => "display:none;") do %> -
    -

    - <%= render :partial => 'attachments/form' %> + +

    +



    + <%= render :partial => 'attachments/form_project' %>

    - <%= submit_tag l(:button_add) %> - <%= link_to l(:button_cancel), {}, :onclick => "$('#add_attachment_form').hide(); return false;" %> + + <%= l(:button_add) %> + + <%= link_to l(:button_cancel), {}, :onclick => "$('#add_attachment_form').hide(); return false;", :class => "grey_btn ml10 fl" %> <% end %>
    -<% end %> +<% end %> +
    <% other_formats_links do |f| %> <%= f.link_to 'PDF', :url => {:id => @page.title, :version => params[:version]} %> <%= f.link_to 'HTML', :url => {:id => @page.title, :version => params[:version]} %> @@ -83,3 +95,4 @@ }); }; +
    \ No newline at end of file diff --git a/public/images/public_icon.png b/public/images/public_icon.png index a815691f8..68be31f5d 100644 Binary files a/public/images/public_icon.png and b/public/images/public_icon.png differ diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css index 6630a01d6..e78141f11 100644 --- a/public/stylesheets/public.css +++ b/public/stylesheets/public.css @@ -134,6 +134,20 @@ a.blue_btn{background:#64bdd9;color:#fff;font-size:14px; font-weight:normal; pad a:hover.blue_btn{ background:#329cbd;} a.orange_btn{ background:#ff5722;color:#fff;font-size:14px; font-weight:normal; padding:2px 10px; text-align:center; } a:hover.orange_btn{ background:#d63502;} + +.green_u_btn{border:1px solid #3cb761; padding:2px 10px; color:#3cb761;} +a.green_u_btn{border:1px solid #3cb761; padding:2px 10px; color:#3cb761;} +a:hover.green_u_btn{ background:#3cb761; color:#fff;} +.orange_u_btn{border:1px solid #ff5d31; padding:2px 10px; color:#ff5d31;} +a.orange_u_btn{border:1px solid #ff5d31; padding:2px 10px; color:#ff5d31;} +a:hover.orange_u_btn{background:#ff5d31; color:#fff;} +.bgreen_u_btn{border:1px solid #1abc9c; padding:2px 10px; color:#1abc9c;} +a.bgreen_u_btn{border:1px solid #1abc9c1; padding:2px 10px; color:#1abc9c;} +a:hover.bgreen_u_btn{background:#1abc9c; color:#fff;} +.blue_u_btn{border:1px solid #15bccf; padding:2px 10px; color:#15bccf;} +a.blue_u_btn{border:1px solid #15bccf; padding:2px 10px; color:#15bccf;} +a:hover.blue_u_btn{background:#15bccf; color:#fff;} + .nolink_btn{ background:#BCBCBC; color: #fff; padding:2px 5px;} .more_btn{-moz-border-radius:3px; -webkit-border-radius:3px; border:1px solid #9DCEFF; color:#9DCEFF; border-radius:3px; padding:0px 3px;} .upbtn{ margin:42px 0 0 10px; border:none;} @@ -148,7 +162,12 @@ a:hover.orange_btn{ background:#d63502;} .pic_mes{ display:block; background:url(../images/public_icon.png) 0px -376px no-repeat; width:20px; height:15px; padding-left:18px;} .pic_img{ display:block; background:url(../images/public_icon.png) -31px -419px no-repeat; width:20px; height:15px; } .pic_del{ display:block; background:url(../images/public_icon.png) 0px -235px no-repeat; width:20px; height:15px; } - +.pic_stats{display:block; background:url(../images/public_icon.png) 0px -548px no-repeat; width:20px; height:15px;} +.pic_files{display:block; background:url(../images/public_icon.png) 0px -578px no-repeat; width:20px; height:15px;} +.pic_text{display:block; background:url(../images/public_icon.png) 0px -609px no-repeat; width:20px; height:18px;} +.pic_text02{display:block; background:url(../images/public_icon.png) 0px -642px no-repeat; width:20px; height:19px;} +.pic_edit{display:block; background:url(../images/public_icon.png) 0px -32px no-repeat; width:20px; height:15px;} +.pic_edit:hover{display:block; background:url(../images/public_icon.png) -32px -32px no-repeat; width:20px; height:15px;}