Commit Graph
137 Commits
Author SHA1 Message Date
Grzegorz BizonandGrzegorz Bizon 6fb120d1b0 Assign notes object to a variable 2015-12-15 14:19:35 +01:00
Douwe Maan d611a38798 Merge branch 'master' into reference-pipeline-and-caching 2015-12-07 14:48:53 +01:00
Douwe Maan 9bad736fb3 Remove unnecesary wrapper elements 2015-12-02 14:41:56 +01:00
Douwe Maan 2955ca613b Merge branch 'master' into reference-pipeline-and-caching 2015-12-02 11:20:51 +01:00
Douwe Maan f5a630111f Merge branch 'master' into reference-pipeline-and-caching 2015-11-19 15:46:04 +01:00
Valery Sizov fd2c0fe446 award emoji 2015-11-19 01:25:27 +02:00
Robert Speicher b7b49dab92 Merge branch 'param-view' into 'master'
See merge request !1816
2015-11-17 11:43:47 -05:00
Douwe Maan e49190cad9 Don't use params[:view] directly. 2015-11-17 16:33:38 +01:00
Jason Lee 3ae1dee475 Avoid render edit_form when visitor can't edit them.
Reverted #9820, github/task_list need a form, textarea for update.
2015-11-17 23:21:03 +08:00
Robert Speicher c8e53d4467 Revert "Merge pull request #9820 from huacnlee/avoid-render-form-in-notes-list"
This reverts commit 63144cd062, reversing
changes made to 8ab5df9d87.
2015-11-16 13:08:08 -05:00
Dmitriy Zaporozhets 329a5555e5 Merge branch 'fix-avatar-not-showing' of https://gitlab.com/stanhu/gitlab-ce 2015-11-12 13:25:22 +01:00
Jason Lee 1974087114 Avoid render edit_form in each notes.
Use RJS to render edit note feature.

Before:

```
Rendered projects/notes/_note.html.haml (27.9ms)
Rendered projects/_zen.html.haml (0.3ms)
Rendered projects/notes/_hints.html.haml (0.7ms)
Rendered projects/_md_preview.html.haml (3.9ms)
Rendered projects/notes/_edit_form.html.haml (6.9ms)
Rendered projects/notes/_note.html.haml (17.7ms)
Rendered projects/_zen.html.haml (0.3ms)
Rendered projects/notes/_hints.html.haml (0.6ms)
Rendered projects/_md_preview.html.haml (3.4ms)
Rendered projects/notes/_edit_form.html.haml (7.0ms)
```

After:

```
Rendered projects/notes/_note.html.haml (13.8ms)
Rendered projects/notes/_note.html.haml (7.1ms)
Rendered projects/notes/_note.html.haml (9.5ms)
Rendered projects/notes/_note.html.haml (8.5ms)
```

This change reduce at least 6ms * N ('N' - number of notes).
2015-11-12 13:16:35 +08:00
Stan Hu 9738097722 Fix avatars not showing in Atom feeds and project issues when Gravatar disabled
Fix for https://github.com/gitlabhq/gitlabhq/pull/9783
2015-11-10 10:52:18 -08:00
Douwe Maan de0acf3cf7 Merge branch 'master' into reference-pipeline-and-caching 2015-10-21 11:36:41 +02:00
Yorick Peterse f3980e230f Don't use link_to/image_tag where not needed
In these particular instances we can just use HAML tags directly. This
can shave off some time spent loading issue pages, though this depends
on the amount of comments being displayed.

When viewing https://gitlab.com/gitlab-org/gitlab-ce/issues/2164 locally
these changes reduce loading time by about 400 ms in total.
2015-10-15 12:05:01 +02:00
Yorick Peterse 39fcd445fa Use note.author for issue comment avatars
This removes the need for running a query to find the User object again
based on the supplied Email address.
2015-10-15 12:05:01 +02:00
Douwe Maan 925dc5925b Cache rendered contents of issues, MRs and notes 2015-10-14 21:29:35 +02:00
Robert Speicher de3ff174e7 Quick Submit all the things!
Adds quick submit behavior to the forms for:

- Blobs ("new file")
- Commit messages
- Issuables
- Notes
- Labels
- Milestones
- Wikis
2015-10-07 15:23:42 -04:00
AndreyandDmitriy Zaporozhets 7ad4521f66 Fixes to dropdown, font colors for new project and merge request 2015-10-07 16:47:44 +02:00
Valery Sizov 97e6c9b42c Wrong access level badge on MR comments 2015-10-02 15:11:17 +03:00
Robert Speicher 9ade9a6451 Don't render the edit_form view for system notes 2015-09-30 16:58:34 -04:00
Stan Hu ef2fb20135 More tweaks to make note edit/preview CSS consistent
Closes #2585
2015-09-21 10:11:58 -07:00
Dmitriy Zaporozhets c9d78a00c5 Fix UI bugs with discussions
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-09-09 11:36:55 +02:00
Dmitriy Zaporozhets 4651155881 Make system note different from regular comments
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-09-08 16:11:41 +02:00
Dmitriy Zaporozhets 4bea030c88 Style system notes
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-09-08 10:12:14 +02:00
Douwe Maan ad55f0d6f9 Merge branch 'master' into comment-updated-by 2015-08-07 15:05:17 +02:00
Gert Goet 7d2259b36f Diff colors on MR Discussion like on Changes-tab
Fixes #2216
2015-08-06 21:39:22 +02:00
Douwe Maan 36bd6c8494 Show who last edited a comment if it wasn't the original author 2015-07-30 14:45:54 +02:00
Robert Speicher 7679a7ea55 Render Note field hints consistently for "new" and "edit" forms
- The "Edit" form didn't have Markdown hints.
- The "New" form had a paperclip icon for attachments, the "edit" form
  didn't.

Closes #2010

Closes internal https://dev.gitlab.org/gitlab/gitlabhq/issues/2525
2015-07-26 16:55:43 -04:00
Hannes Rosenögger bf3b318ec5 revert caching of note text 2015-07-21 13:59:14 +02:00
Stan Hu 875d8e7f31 Fix bug where notes were being rendered with wrong color preferences due to caching
Closes #2008
2015-07-18 07:32:18 -07:00
Dmitriy Zaporozhets fdbaffdc08 Merge branch 'comment-box-changes' of gitlab.com:gitlab-org/gitlab-ce 2015-07-10 13:13:02 +02:00
Darby 360ee25ddb Fixed the issues 2015-07-09 13:38:33 -07:00
Darby c611b6f623 Comment box/Placeholder text redo 2015-07-01 15:49:31 -07:00
Dmitriy Zaporozhets 4d80360bed Cache markdown of comments
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-30 15:54:20 +02: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
Robert Speicher 8c8cd8be43 Update time_ago_with_tooltip helper
Minor refactoring, add specs, changes arguments to use keywords.
2015-06-17 16:37:10 -04: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
Douwe Maan 4ae67fcaef Show warning when a comment will add 10 or more people to the discussion. 2015-06-05 12:07:13 +02:00
Douwe Maan 74770137f6 Always show note action icons. 2015-05-14 12:18:19 +02:00
Douwe Maan b0af379a22 Show user roles by comments. 2015-05-12 12:16:34 +02:00
Robert Speicher 725ff58bc8 Don't add js-task-list-container to things the user can't edit 2015-05-06 13:00:13 -04:00
Robert Speicher 5c7b91e29b Single quotes/icon helper in views 2015-05-06 13:00:11 -04:00
Robert Speicher 922497560e Update task list behavior for Notes 2015-05-06 12:58:27 -04: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
Sven Strickroth 57c2a9f03d Explicitly set image alt to prevent graphical glitches
Rails image_tag sets the alt-attribute to the filename which causes graphical glitches if the file could not be loaded.

Fixes https://github.com/gitlabhq/gitlabhq/issues/6036.

Signed-off-by: Sven Strickroth <email@cs-ware.de>
2015-04-13 21:07:42 +02:00
Stan Hu dfd256f29e Support configurable attachment size via Application Settings
Fix bug where error messages from Dropzone would not be displayed on the issues page

Closes #1258
2015-04-02 00:04:08 -07:00
Dmitriy Zaporozhets 2993e2801a Merge branch 'note-avatar-link' into 'master'
Link note avatar to user.

See merge request !446
2015-03-24 23:40:19 +00:00
Dmitriy Zaporozhets 0d50a65b32 Fix diff header in discussion blocks 2015-03-24 16:27:40 -07:00
Douwe Maan 1651c0bc44 Link note avatar to user. 2015-03-24 18:16:40 +01:00