Flatten the directory hierarchy while there is only one directory descendant
In some languages, especially java, the directory structure reflects the package structure.This means that using the file tree browser to reach the directories that matter you have to click a lot of directories containing only another subdirectory.
This merge request tries to enhance this by showing and providing the link to the first directory that doesn't contain only one directory.
See also [this feature request](http://feedback.gitlab.com/forums/176466-general/suggestions/6236769-jump-forward-to-the-first-folder-that-has-more-tha)
This is very similar to what [GitHub does](https://github.com/blog/1877-folder-jumping), but I don't think graying out the empty directories is really necessary.
Screenshots: [Before](https://gitlab.com/uploads/marmis85/gitlab-ce/b683a0000f/before.png) - [After](https://gitlab.com/uploads/marmis85/gitlab-ce/a23725a1c1/after.png)
I'm actually very new at ruby, rails, haml, and almost everything involved in Gitlab's development...
From what I could understand, when we render each directory item in the list we only have the data structure representing the item but not his descendants.
To iterate through the hierarchy I call Gitlab::Git:Tree.where() but I'm not sure if this is the most efficient way.
I also considered making every directory a clickable link, but I tried that and in the end it wasn't very useful and reduced the click target for the most useful directory.
See merge request !275
This was default before but now it fixed with providing assignee_id
parameter making url shareble and dont reset when other filters users.
Also this commit removes old methods that are not used any more.
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* return edit/close buttons to old position (right of title)
* make 'Issue #1' header smaller
* move mr commits to separate tab
* change inline/side diff switcher to buttons from tabs
* make issue sidebar start with dicsussion block
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Reactivate highlight.js language autodetection
### What does this MR do?
This commit partly reverts commit 0d13abb1 to reactivate highlight.js language autodetection.
It does NOT revert the part that adds the `nohighlight` CSS-class for a predefined set of filenames (which was indeed the intended purpose of commit 0d13abb1).
### Are there points in the code the reviewer needs to double check?
Not particularly, the only effect of this blob_helper is to add a CSS class to the `<pre>` container of the blob, to control the way highlight.js performs its syntax highlighting. (see where this helper is called at https://gitlab.com/gitlab-org/gitlab-ce/blob/master/app/views/shared/_file_hljs.html.haml#L12).
However this merge request DOES change the way the syntax highlighting is done (by bringing it back to the situation before commit 0d13abb1 where highlight.js autodetected the language itself). So we can expect some new kind of syntax highlighting problems. However in this case, the issues should be forwarded to the upstream project (https://github.com/isagalaev/highlight.js).
### Why was this MR needed?
The main motivation behind this partial revert is that there is no point (IMHO) in using an "intelligent" syntax highlighter which is specifically designed to autodetect languages if it is to dictate (via the CSS class) the language to use solely based on the filename extension.
### What are the relevant issue numbers / Feature requests?
Issue #665 "HLJS language autodetection / syntax highlighting fails "
### Screenshots (If appropriate)
See screenshots in issue #665
See merge request !232
Fork to group
Fixes#1592
* project can be forked into group
* fork link always lead to fork page where you select namespace where to fork
See merge request !1253
* Show namespace thumbnail differently if project was already forked
* Show loading spinner when click on fork
* Fork link navigates to personal namespace only if no manageable groups exists
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>