Commit ac8f7163a133f8076f41ca2aec0711cc5167c846
1 parent
f8a595c3
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
Limit pending tasks
Showing
2 changed files
with
70 additions
and
1 deletions
Show diff stats
| ... | ... | @@ -0,0 +1,69 @@ |
| 1 | +<div<%= user && " class='logged-in'" %>> | |
| 2 | + <div id="article-actions"> | |
| 3 | +<<<<<<< HEAD | |
| 4 | + <%= fullscreen_buttons('#article') %> | |
| 5 | +======= | |
| 6 | + | |
| 7 | + <%= fullscreen_buttons('#article') %> | |
| 8 | + | |
| 9 | +>>>>>>> master | |
| 10 | + <% if @page.allow_edit?(user) && !remove_content_button(:edit, @page) %> | |
| 11 | + <% content = content_tag('span', label_for_edit_article(@page)) %> | |
| 12 | + <% url = profile.admin_url.merge({ :controller => 'cms', :action => 'edit', :id => @page.id }) %> | |
| 13 | + <%= expirable_button @page, :edit, content, url %> | |
| 14 | + <% end %> | |
| 15 | + | |
| 16 | + <% if @page != profile.home_page && !@page.has_posts? && @page.allow_delete?(user) && !remove_content_button(:delete, @page)%> | |
| 17 | + <% content = content_tag( 'span', _('Delete') ) %> | |
| 18 | + <% url = profile.admin_url.merge({ :controller => 'cms', :action => 'destroy', :id => @page.id}) %> | |
| 19 | + <% options = {:method => :post, :confirm => delete_article_message(@page)} %> | |
| 20 | + <%= expirable_button @page, :delete, content, url, options %> | |
| 21 | + <% end %> | |
| 22 | + | |
| 23 | + <% if @page.allow_spread?(user) && !remove_content_button(:spread, @page) %> | |
| 24 | + <% url = profile.admin_url.merge({ :controller => 'cms', :action => 'publish', :id => @page.id }) %> | |
| 25 | + <%= expirable_button @page, :spread, content_tag( 'span', _('Spread this') ), url, {:class => 'colorbox'} if url %> | |
| 26 | + <% end %> | |
| 27 | + | |
| 28 | + <% if !@page.gallery? && (@page.allow_create?(user) || (@page.parent && @page.parent.allow_create?(user))) %> | |
| 29 | + <% if @page.translatable? && !@page.native_translation.language.blank? && !remove_content_button(:locale, @page) %> | |
| 30 | + <% content = _('Add translation') %> | |
| 31 | + <% parent_id = (@page.folder? ? @page : (@page.parent.nil? ? nil : @page.parent)) %> | |
| 32 | + <% url = profile.admin_url.merge(:controller => 'cms', :action => 'new', :parent_id => parent_id, :type => @page.type, :article => { :translation_of_id => @page.native_translation.id })%> | |
| 33 | + <%= expirable_button @page, :locale, content, url %> | |
| 34 | + <% end %> | |
| 35 | + | |
| 36 | + <%= modal_button(:new, label_for_new_article(@page), profile.admin_url.merge(:controller => 'cms', :action => 'new', :parent_id => (@page.folder? ? @page : (@page.parent.nil? ? nil : @page.parent)))) unless remove_content_button(:new, @page) %> | |
| 37 | + <% end %> | |
| 38 | + | |
| 39 | + <% if @page.accept_uploads? && @page.allow_create?(user) %> | |
| 40 | + <%= button('upload-file', _('Upload files'), profile.admin_url.merge(:controller => 'cms', :action => 'upload_files', :parent_id => (@page.folder? ? @page : @page.parent))) unless remove_content_button(:upload, @page)%> | |
| 41 | + <% end %> | |
| 42 | + | |
| 43 | + <% if !@page.allow_create?(user) && profile.organization? && (@page.blog? || @page.parent && @page.parent.blog?) && !remove_content_button(:suggest, @page) %> | |
| 44 | + <% content = content_tag( 'span', _('Suggest an article') ) %> | |
| 45 | + <% url = profile.admin_url.merge({ :controller => 'cms', :action => 'suggest_an_article'}) %> | |
| 46 | + <% options = {:id => 'suggest-article-link'} %> | |
| 47 | + <%= expirable_button @page, :suggest, content, url, options %> | |
| 48 | + <% end %> | |
| 49 | + | |
| 50 | + <% if @page.display_versions? %> | |
| 51 | + <%= button(:clock, _('All versions'), {:controller => 'content_viewer', :profile => profile.identifier, :action => 'article_versions'}, :id => 'article-versions-link') %> | |
| 52 | + <% end %> | |
| 53 | + | |
| 54 | + <% plugins_toolbar_actions_for_article(@page).each do |plugin_button| %> | |
| 55 | + <%= button plugin_button[:icon], plugin_button[:title], plugin_button[:url], plugin_button[:html_options] %> | |
| 56 | + <% end %> | |
| 57 | + | |
| 58 | + <%= report_abuse(profile, :link, @page) %> | |
| 59 | + </div> | |
| 60 | + <div id="article-header"> | |
| 61 | + <% if @page.blog? and !@page.image.nil? %> | |
| 62 | + <div class="blog-cover"><%= image_tag(@page.image.public_filename())%></div> | |
| 63 | + <% end %> | |
| 64 | + <%= link_to(image_tag('icons-mime/rss-feed.png'), @page.feed.url, :class => 'blog-feed-link') if @page.has_posts? && @page.feed %> | |
| 65 | + <%= @plugins.dispatch(:article_header_extra_contents, @page).collect { |content| instance_exec(&content) }.join("") %> | |
| 66 | + <%= article_title(@page, :no_link => true) %> | |
| 67 | + <%= article_translations(@page) %> | |
| 68 | + </div> | |
| 69 | +</div> | ... | ... |
app/views/profile_editor/_pending_tasks.html.erb
| ... | ... | @@ -4,7 +4,7 @@ |
| 4 | 4 | <div class='pending-tasks'> |
| 5 | 5 | <h2><%= _('You have pending requests') %></h2> |
| 6 | 6 | <ul> |
| 7 | - <%= @pending_tasks.map {|task| content_tag('li', task_information(task))}.join %> | |
| 7 | + <%= @pending_tasks.take(10).map {|task| content_tag('li', task_information(task))}.join %> | |
| 8 | 8 | </ul> |
| 9 | 9 | <%= button(:todo, _('Process requests'), :controller => 'tasks', :action => 'index') %> |
| 10 | 10 | </div> | ... | ... |