X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/3d7eb387a7c3573f1a1d17df00adcaa1fb9b9fa5..7f83692317119cd97e0d4f4adc4095daef5de4ca:/app/helpers/application_helper.rb diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 7aae6b777..3771acf37 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -20,12 +20,12 @@ module ApplicationHelper def style_rules css = "" - css << ".hidden { display: none }"; - css << ".hide_unless_logged_in { display: none }" unless @user; - css << ".hide_if_logged_in { display: none }" if @user; - css << ".hide_if_user_#{@user.id} { display: none }" if @user; - css << ".show_if_user_#{@user.id} { display: inline }" if @user; - css << ".hide_unless_administrator { display: none }" unless @user and @user.administrator?; + css << ".hidden { display: none !important }"; + css << ".hide_unless_logged_in { display: none !important }" unless @user; + css << ".hide_if_logged_in { display: none !important }" if @user; + css << ".hide_if_user_#{@user.id} { display: none !important }" if @user; + css << ".show_if_user_#{@user.id} { display: inline !important }" if @user; + css << ".hide_unless_administrator { display: none !important }" unless @user and @user.administrator?; return content_tag(:style, css, :type => "text/css") end @@ -77,7 +77,7 @@ module ApplicationHelper content_tag(:div, :id => "#{id}_container", :class => "richtext_container") do output_buffer << content_tag(:div, :id => "#{id}_content", :class => "richtext_content") do output_buffer << text_area(object_name, method, options.merge("data-preview-url" => preview_url(:format => format))) - output_buffer << content_tag(:div, "", :id => "#{id}_preview", :class => "richtext_preview") + output_buffer << content_tag(:div, "", :id => "#{id}_preview", :class => "richtext_preview richtext") end output_buffer << content_tag(:div, :id => "#{id}_help", :class => "richtext_help") do @@ -99,12 +99,4 @@ module ApplicationHelper def friendly_date(date) content_tag(:span, time_ago_in_words(date), :title => l(date, :format => :friendly)) end - - def note_author(object, link_options = {}) - if object.author.nil? - "" - else - link_to h(object.author.display_name), link_options.merge({:controller => "user", :action => "view", :display_name => object.author.display_name}) - end - end end