Commit Graph

49 Commits

Author SHA1 Message Date
Douwe Maan b202b42cfe Link to outdated diff in older MR version from outdated diff discussion 2017-04-08 14:37:46 -05:00
Douwe Maan fe26b8af94
Correctly display multiple separate discussions on the same diff line 2017-04-05 17:44:14 +01:00
mhasbini 985af1a670 take nonewline context into account in diff parser 2017-03-13 22:09:43 +02:00
Phil Hughes 789bae241c Fixed bugs with diff comment avatars
The comment button on commit view was way out to the left side because
the element that renders the diff avatars was rendering when it shouldnt
be

When commenting on a discussion on the discussions tab it would try to
render the avatar & in some cases work correctly even though it shouldnt
be possible for this to happen. Changed the if statement to take this
into account

Closes #29237, #29238, #29243
2017-03-09 08:53:47 +00:00
Phil Hughes 1466b7eecc Added discussion comments avatars to diff 2017-03-08 16:07:26 +00:00
Mike Greiling 2d0c0308d5 prevent diff unfolding link from appearing for deleted files 2017-02-16 15:41:04 -06:00
Mike Greiling c89d9e741c only show diff unfolding link if there are more lines to show 2017-02-16 15:40:50 -06:00
Jacob Schatz aa9e77b7ce Merge branch '26300-line-numbers-are-off-in-dynamically-loaded-diff-chunks' into 'master'
Resolve "Line numbers are off in dynamically loaded diff chunks"

Closes #26300

See merge request !8428
2017-02-03 23:03:05 +00:00
Jacob Schatz d5a9e93481 Merge branch '26829-diff-unfolding-links-erroneously-present-on-no-newline-lines' into 'master'
Prevent "nonewline" type diff lines from showing a diff unfolding link

Closes #26829

See merge request !8632
2017-02-03 19:30:53 +00:00
samrose3 3cff2cc713 Prevent copying of line numbers in parallel diff view 2017-01-22 19:07:41 -05:00
Mike Greiling 7c583293cd prevent nonewline type diff lines from containing unfolding link 2017-01-18 16:40:34 -06:00
Mike Greiling ece2e80bf8 ensure linenumber data attribute is correct for the last line in a diff chunk 2017-01-18 15:13:27 -06:00
Mike Greiling bc0a82334a ensure last line in diff block is contained within a table row element 2017-01-18 15:13:22 -06:00
Kushal Pandya fb3e365412 HAMLLint: Fix `SpaceInsideHashAttributes` offences 2016-12-31 11:58:36 +05:30
Kushal Pandya dd5ffd9ca6 HAMLLint: Fix `ImplicitDiv` offences 2016-12-31 11:43:08 +05:30
Luke Bennett 18bf882cab Fix horizontal padding for highlight blocks 2016-10-25 16:06:10 -05:00
Tim Masliuchenko b6d545df51 Add unfold links for Side-by-Side view 2016-08-04 09:09:59 +03:00
Douwe Maan 79214be727 Add Discussion model to represent MR/diff discussion 2016-07-20 16:18:18 -06:00
Luke "Jared" Bennett 1f73afd045
Registered FilesCommentButton as a jQuery plugin and made review changes 2016-07-08 00:41:38 +01:00
Douwe Maan 5a8f727fd5 Merge branch 'master' into faster-diffs
# Conflicts:
#	app/helpers/notes_helper.rb
#	app/views/projects/diffs/_line.html.haml
#	app/views/projects/diffs/_parallel_view.html.haml
#	app/views/projects/diffs/_text_file.html.haml
#	features/steps/shared/diff_note.rb
2016-07-07 18:05:34 -04:00
Douwe Maan 14c2b9683a Use HAML class syntax in diff line partials 2016-07-07 16:14:18 -04:00
Douwe Maan 29d574868a Display new diff notes and allow creation through the web interface 2016-07-06 18:51:00 -04:00
Paco Guzman 39b6e678da Simplify HAML code using unless condition and nesting
Extract diff line data attributes to helper methods
2016-07-06 09:02:53 +02:00
Paco Guzman 914bb05d28 Moving up common html data attributes 2016-07-06 08:29:57 +02:00
Jacob Schatz e065f4848b Diffs will create button/diff form on demand no on server side 2016-07-06 08:29:57 +02:00
Douwe Maan 9a3ed265e9 Use `@diff_notes_disabled` instead of `@comments_allowed` 2016-05-13 17:31:58 -05:00
Douwe Maan 99d3e21f19 Extract LegacyDiffNote out of Note 2016-05-13 17:31:43 -05:00
Phil Hughes 8a8d4c9bf2 Diff viewer links to correct part of the file
Added highlight colours to diff rows

Closes #13852
2016-04-14 11:29:19 +01:00
Douwe Maan 21facf5353 Use consistent markup and styling for highlighting across blobs, diffs, blame and snippets 2016-01-21 14:23:53 +01:00
Douwe Maan 0e992a3b4e Properly highlight lines around '\ No newline at end of file' 2016-01-20 19:20:13 +01:00
Douwe Maan 701513dcc7 Move parallel diff logic to separate class 2016-01-20 14:53:20 +01:00
Douwe Maan 8dfad143d4 Add inline diff markers in highlighted diffs. 2016-01-14 22:28:07 +01:00
Douwe Maan c881627d11 Refactor parallel_diff generation a bit. 2016-01-14 14:52:08 +01:00
Rubén Dávila 0f0af19139 Little refactor for usage of html_safe. #3945 2016-01-13 11:39:15 -05:00
Rubén Dávila 48c45ba9a8 Use html_safe instead of raw. #3945 2016-01-13 10:58:19 -05:00
Rubén Dávila 78d7c0e0d8 Fix broken specs. #3945 2016-01-08 19:05:55 -05:00
Rubén Dávila 21958a3939 Add some styling for syntax highlighting themes. #3945 2016-01-07 13:45:19 -05:00
Rubén Dávila 1494bb3f25 Force white theme when viewing diffs. #3945 2016-01-06 21:01:44 -05:00
Rubén Dávila 776d70d11b Use #html_safe instead of #raw in some diff views. #3945 2016-01-06 19:54:36 -05:00
Rubén Dávila bb96d63153 New implementation for highlighting diff files. #3945
* It is more performant given now we process all the diff file instead
  of processing line by line.
* Multiline comments are highlighted correctly.
2015-12-30 00:52:50 -05:00
Rubén Dávila 34657b821a Add syntax highlighting to diff view. #3945 2015-12-28 18:31:27 -05:00
Dmitriy Zaporozhets 342d553709
Rename abilities to correspond contoller/model action names
write_ was renamed to create_
modify_  was renamed to update_

So now in update action we have next code

def create
  can?(current_user, :create_issue, @issue)
end

def update
  can?(current_user, :update_issue, @issue)
end

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-26 15:55:56 +02:00
Stan Hu a7932fe2fd Support commenting on a diff in side-by-side view
Closes https://github.com/gitlabhq/gitlabhq/issues/9283
2015-06-16 06:11:59 -07:00
Marin Jankovski 9945e8c424 Move organizing of comments to helper. 2014-09-12 19:51:44 +02:00
Marin Jankovski e84861d510 Remove unecesarry array operations. 2014-09-12 19:41:32 +02:00
Marin Jankovski 5564fe3149 Add comments on the side-by-side diff. 2014-09-12 18:44:53 +02:00
Marin Jankovski 11eec88d97 Wrap should always be enabled for parallel diff. 2014-09-10 16:46:10 +02:00
Marin Jankovski ac6a107ac7 Add line code to parallel diff for linking. 2014-09-09 11:36:29 +02:00
Dmitriy Zaporozhets e0eb48031d
Refactor diff views
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-09-08 16:26:49 +03:00