Add alternate comparison types to versions
- The types are: -- Previous: The default and the previously used type -- Subsequent: Compares against the next version -- Current: Compares against the current version - Allow switching between comparison types in index and diff views -- Have links vary depending upon current comparison type
This commit is contained in:
10
app/helpers/artist_commentary_versions_helper.rb
Normal file
10
app/helpers/artist_commentary_versions_helper.rb
Normal file
@@ -0,0 +1,10 @@
|
||||
module ArtistCommentaryVersionsHelper
|
||||
def commentary_version_field_diff(commentary_version, type, field)
|
||||
other = commentary_version.send(params[:type])
|
||||
if type == "previous"
|
||||
diff_body_html(commentary_version, other, field)
|
||||
else
|
||||
diff_body_html(other, commentary_version, field)
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user