Move more logic to the helper modules
- Diff view changes -- Only show pool description changes in diff view -- Conditionally render diff link when applicable values are changed -- Conditionally show diff view sections when values are changed - Show renames on index view -- There is plenty of space -- This wasn't shown at all for wikis -- Having to navigate to an alternate page is unwieldy for pools - Show "posts" as a status on pools -- This is so all changes among versions are quantified as a status - Standardize diff/index titles
This commit is contained in:
@@ -10,6 +10,11 @@ module ApplicationHelper
|
||||
render "diff_list", diff: diff, ul_class: ul_class, li_class: li_class
|
||||
end
|
||||
|
||||
def diff_name_html(this_name, prev_name)
|
||||
pattern = Regexp.new('.')
|
||||
DiffBuilder.new(this_name, prev_name, pattern).build
|
||||
end
|
||||
|
||||
def diff_body_html(record, previous, field)
|
||||
return h(record[field]).gsub(/\r?\n/, '<span class="paragraph-mark">¶</span><br>').html_safe if previous.blank?
|
||||
|
||||
|
||||
Reference in New Issue
Block a user