Commit Graph

26 Commits

Author SHA1 Message Date
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
Douwe Maan afbcdd8e7f Move diff line to separate partial 2016-03-19 20:04:23 +01:00
Jacob Vosmaer 1764e1b7cb Use Gitlab::Git::DiffCollections 2016-03-03 18:38:44 +01:00
Zeger-Jan van de Weg 11ed1cbbb7 Emoji reponses on diffs aren't award emoji 2016-02-19 10:04:38 +01:00
Robert Speicher 2fed8bf390 Merge branch 'fix-diff-comments' into 'master'
More highlighted diff fixes

See merge request !2545
2016-01-22 07:37:47 +00:00
Douwe Maan 16d17b78ca Restore diff comments 2016-01-22 02:10:58 +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
Rubén Dávila 80a4c808b1 Make diff_line_content helper return a safe String. #3945 2016-01-12 11:02:16 -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 7de90f4b53 Fix broken spec and small refactor. #3945 2015-12-30 18:42:11 -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
Robert Speicher cad0e848b0 Fix and style the "Changes suppressed" link. 2015-07-23 16:07:45 -04: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
Alex Connor 3c892f3554 Disabled expansion of top/bottom blobs for new file diffs 2015-05-21 09:25:07 +02:00
Dominik Sander d4fec49abc Fix merge request comments on files with multiple commits
Having a merge request with a comments on a line which is then changed
in a later commit prevented new comments from properly showing up in the
merge request show page.

 * `Note#set_diff` do not use stored the diff when creating a new note
   in merge requests (we can not be sure the diff did not changed since
   the last comment on that line)
 * Do not rely just on `outdated?` of the first note when displaying
   comments of a MR in the discussion tab, but partition the
   active/outdated notes and display them all
 * In the inline changes tab just select the active notes, so an
   outdated note does not prevent an active one from being rendered
 * Just show active comments in the side-by-side changes tab
2015-04-15 18:23:57 +02:00
Douwe Maan a30645c68f Don't show commit comment button when user is not signed in. 2015-03-23 16:17:10 +01:00
Dmitriy Zaporozhets 93dc885530
Fix usage of diff file mode change
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-09-08 22:25:20 +03:00
Dmitriy Zaporozhets 218219abbd
Refactoring inside refactoring. We need to go deeper
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-09-08 21:54:52 +03:00
Dmitriy Zaporozhets e0eb48031d
Refactor diff views
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-09-08 16:26:49 +03:00