gitlabhq/gitlabhq — pull request #7646 by bushong1 (2014-08-29 20:54:22+00:00)
Title: Adding in snippet search functionality

This is a resubmit of the closed PR#7612. While fixing some things, a refactor of search was pushed to master. This PR is updating snippet-search for the refactor.

In reference to this merge request:

http://feedback.gitlab.com/forums/176466-general/suggestions/5529795-search-though-snippets

##### What does this MR do?
Adds the capability to search snippets. This can be accessed whenever viewing a snippet related page, such as personal snippets, snippet discovery, and search snippets. There is a tab for searching just filenames and titles, and there is a tab for searching just the code of the snippet. It searches all public snippets, as well as the private snippets of the user.

##### Are there points in the code the reviewer needs to double check?
The largest change outside of haml files is lib/gitlab/snippet_search_results.rb.

##### Why was this MR needed?
This is something my users have been asking for, and it should add a great amount of collaborative capability and global discovery to the snippets feature. In addition, there is a merge request already created with over 20 points.

##### What are the relevant issue numbers / Feature requests?
http://feedback.gitlab.com/forums/176466-general/suggestions/5529795-search-though-snippets

##### Screenshots (If appropiate)

![selection_014](https://cloud.githubusercontent.com/assets/236700/4096176/dbcb1d0e-2fbd-11e4-91bb-16835ba93e6b.png)
![selection_015](https://cloud.githubusercontent.com/assets/236700/4096178/dbce326e-2fbd-11e4-830f-f86f158491df.png)
![selection_016](https://cloud.githubusercontent.com/assets/236700/4096180/dbd1689e-2fbd-11e4-9ff9-3be0614ba718.png)
![selection_017](https://cloud.githubusercontent.com/assets/236700/4096177/dbcde70a-2fbd-11e4-91c0-108b0fab6aa5.png)
![selection_018](https://cloud.githubusercontent.com/assets/236700/4096179/dbcef47e-2fbd-11e4-986f-0d9f3bcb9c29.png)
![selection_019](https://cloud.githubusercontent.com/assets/236700/4096181/dbd8a17c-2fbd-11e4-8d02-fdcda553f1d9.png)