Commit Graph
100 Commits
Author SHA1 Message Date
Yorick Peterse de7c9c7ab1 Use Atom update times of the first event
By simply loading the first event from the already sorted set we save
ourselves extra (slow) queries just to get the latest update timestamp.
This removes the need for Event.latest_update_time and significantly
reduces the time needed to build an Atom feed.

Fixes gitlab-org/gitlab-ce#12415
2016-01-27 10:33:33 +01:00
Josh Frye 2d3655cd14 sanitize user supplied input. 2016-01-16 10:49:51 -05:00
Josh Frye c70ed7f2cd Autofill abuse message text with user url. Closes #2838 2016-01-16 10:47:12 -05:00
Dmitriy Zaporozhets 49c310e45c Fix missing padding for user/group pages
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-01-14 16:42:25 +01:00
Dmitriy Zaporozhets 0673fad893 Apply new layout to user page
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-01-13 16:26:40 +01:00
Dmitriy Zaporozhets 03090a88d8 Replace all navigation menu with nav-links class
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-01-13 15:58:04 +01:00
Robert Speicher 4408dc0bd1 Use xmlschema where even more appropriate! 2016-01-07 20:01:08 -05:00
Robert Speicher 6344493655 Use to_s(:iso8601) where appropriate 2016-01-07 20:01:08 -05:00
Robert Speicher fa36749bce Add two custom Date/Time conversion formats 2016-01-07 20:01:08 -05:00
Robert Speicher 59305715e9 Remove stamp gem
Closes #5908
2016-01-07 16:28:33 -05:00
Robert Speicher b26eb782f5 Add page descriptions and images
A limited number of pages have defined their own descriptions, but
otherwise we default to the Project's description (if `@project` is
set), or the old `brand_title` fallback.

The image will either be the uploaded project icon (never a generated
one), the user's uploaded icon or Gravatar, or, finally, the GitLab
logo.
2015-12-23 16:56:27 -05:00
Dmitriy Zaporozhets 51c8d037d3 Make profile navigation full wide
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-12-11 20:39:26 +01:00
Douwe Maan 1a94211165 Remove pointless explanation for user tabs 2015-12-07 13:55:30 +01:00
Douwe Maan 03277af65d Use standard style for tabs in profile view 2015-12-02 14:57:11 +01:00
Yorick Peterse 054f2f98ed Faster way of obtaining latest event update time
Instead of using MAX(events.updated_at) we can simply sort the events in
descending order by the "id" column and grab the first row. In other
words, instead of this:

    SELECT max(events.updated_at) AS max_id
    FROM events
    LEFT OUTER JOIN projects   ON projects.id   = events.project_id
    LEFT OUTER JOIN namespaces ON namespaces.id = projects.namespace_id
    WHERE events.author_id IS NOT NULL
    AND events.project_id IN (13083);

we can use this:

    SELECT events.updated_at AS max_id
    FROM events
    LEFT OUTER JOIN projects   ON projects.id   = events.project_id
    LEFT OUTER JOIN namespaces ON namespaces.id = projects.namespace_id
    WHERE events.author_id IS NOT NULL
    AND events.project_id IN (13083)
    ORDER BY events.id DESC
    LIMIT 1;

This has the benefit that on PostgreSQL a backwards index scan can be
used, which due to the "LIMIT 1" will at most process only a single row.
This in turn greatly speeds up the process of grabbing the latest update
time. This can be confirmed by looking at the query plans. The first
query produces the following plan:

    Aggregate  (cost=43779.84..43779.85 rows=1 width=12) (actual time=2142.462..2142.462 rows=1 loops=1)
      ->  Index Scan using index_events_on_project_id on events  (cost=0.43..43704.69 rows=30060 width=12) (actual time=0.033..2138.086 rows=32769 loops=1)
            Index Cond: (project_id = 13083)
            Filter: (author_id IS NOT NULL)
    Planning time: 1.248 ms
    Execution time: 2142.548 ms

The second query in turn produces the following plan:

    Limit  (cost=0.43..41.65 rows=1 width=16) (actual time=1.394..1.394 rows=1 loops=1)
      ->  Index Scan Backward using events_pkey on events  (cost=0.43..1238907.96 rows=30060 width=16) (actual time=1.394..1.394 rows=1 loops=1)
            Filter: ((author_id IS NOT NULL) AND (project_id = 13083))
            Rows Removed by Filter: 2104
    Planning time: 0.166 ms
    Execution time: 1.408 ms

According to the above plans the 2nd query is around 1500 times faster.
However, re-running the first query produces timings of around 80 ms,
making the 2nd query "only" around 55 times faster.
2015-11-18 13:02:43 +01:00
Alex Jordan 3300db70ff Rewrite HTTP links to force TLS, where possible 2015-11-16 16:50:05 -08:00
Jason Lee 18cb430f79 Replace CoffeeScript block into JavaScript in Views.
For example view: shared/issuable/_context

CoffeeScript: 190ms
JavaScript: 19.7ms
2015-11-10 19:17:37 +08:00
Dmitriy Zaporozhets c5d637b2ca Improvements to profile page UI
* add separator between tabs
* show project avatars
* fix tooltip offset on user calendar
* remove gray hover for tabs

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-04 14:13:25 +01:00
Dmitriy Zaporozhets 4d7f00fdea Apply new design for user profile page
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-03 15:32:40 +01:00
Dmitriy Zaporozhets ab129f7b23 Improve profile page UI
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-03 14:00:41 +01:00
Dmitriy Zaporozhets 7c85ebf6dc Partly implement new UI for user page
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-10-16 13:24:28 +02:00
Yorick Peterse 9496356367 Re-use User objects for avatar_icon where possible
This removes the need for running an extra SQL query in these cases.
2015-10-15 12:05:01 +02:00
Rémy Coutable ea72d53ec0 Streamline the "Report button"
This simplifies the "Report button" to not use open a dropdown and
adds a tooltip on this button.
This also removes an extra spec and adds missing specs.
2015-09-29 21:47:01 +02:00
Rémy Coutable 5f95a5e070 Disable the "Report abuse" button if a user has already been reported 2015-09-29 21:11:51 +02:00
Dmitriy Zaporozhets 558084f403 Improve project settings button on profile
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-09-15 09:54:42 +02:00
Dmitriy Zaporozhets b54358b457 Refactor project list rendering
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-08-26 22:44:02 +02:00
Dmitriy Zaporozhets 735978388f Increase width of sidebar for several pages
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-08-26 10:36:08 +02:00
Dmitriy Zaporozhets cba7f20dc8 Allow users to send abuse reports
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-08-06 14:03:27 +02:00
Dmitriy Zaporozhets f9261e6596 Open big avatar when click on user image
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-30 15:23:32 +02:00
Dmitriy Zaporozhets 7bee9ce10e Merge branch 'see-full-size-avatar' into 'master'
Link an users avatar to the fullsize version

When we want to see the fullsize avatar of a user we can click the avatar on the profile page and the fullsize version will be opened in a new window/tab.

See merge request !415
2015-06-22 13:21:17 +00:00
Dmitriy Zaporozhets d46d6fc17b Improve UI for phones
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-08 16:54:39 +02:00
Douwe Maan a2eee3181c Fix title on user page. 2015-05-01 11:33:54 +02:00
Sullivan SENECHAL f28f5e49f6 Fix wrong placement of show-aside link 2015-04-27 00:43:02 +02:00
Douwe Maan 9c60354a6a Make links and titles of atom feeds consistent. 2015-04-23 17:11:39 +02:00
Douwe Maan 8917ae39e3 Add atom link tag to every page that has one. 2015-04-23 17:11:38 +02:00
Senorsen 7b28218f96 Allow user to choose which email to be public
This commit allows user to show one of their emails in profile page,
or don't show email in this page.
2015-04-14 19:42:48 +08:00
Dmitriy Zaporozhets 0622b87537 Merge branch 'admin-user-projects' into 'master'
Fix admin user projects lists.

The admin user personal projects lists wasn't being rendered anymore.

cc @marin

See merge request !442
2015-04-01 00:44:09 +00:00
Douwe Maan 2d5f4458a0 Fix admin user projects lists. 2015-03-31 09:19:08 +02:00
Dmitriy Zaporozhets 7842a81569 Merge branch 'capitalize-js-class' into 'master'
Capitalize js class name

See merge request !457
2015-03-26 15:40:34 +00:00
Dmitriy Zaporozhets 80fd8f2de1 Capitalize js class name 2015-03-25 22:22:10 -07:00
Dmitriy Zaporozhets a1d09190e3 Prevent unnecessary doubling of js events on import pages and user calendar 2015-03-25 21:45:01 -07:00
Dmitriy Zaporozhets c5d65ed62f Merge branch 'userpage-activity-scroll'
Conflicts:
	app/controllers/users_controller.rb
2015-03-23 09:45:40 -07:00
Dmitriy Zaporozhets 9968250211 Add inifinite scroll to user activity on user page 2015-03-22 15:40:26 -07:00
Dmitriy Zaporozhets 8494170550 Improve contribution calendar per day info 2015-03-22 14:52:44 -07:00
Dmitriy Zaporozhets 54aca18cf8 Contribution calendar will use events instead of commits to count contributions 2015-03-22 14:35:27 -07:00
Dmitriy Zaporozhets 43afe46bbd Refactor contributions events and write tests for calendar 2015-03-22 13:55:00 -07:00
Dmitriy Zaporozhets 64891c6c40 Replace commits calendar with contributions calendar
* count opening of issues and merge requests
* dont trigger git repository - use events from database
* much-much faster since does not affected by repository size
2015-03-21 23:48:08 -07:00
Sander Boom 8ec075f97b When we want to see the fullsize avatar of a user we can click the avatar on the profile page and the fullsize version will be opened in a new window/tab. 2015-03-21 16:15:14 +01:00
Dmitriy Zaporozhets beece83af1 Improve header with avatar for group and user pages 2015-03-20 20:15:13 -07:00
Dmitriy Zaporozhets d85f396fe5 Add location to user page 2015-03-20 16:55:20 -07:00