Refactor search table result linking

I have reimplemented the linking for the result table when doing the
free-text search on the metadata records. Once again I am using the
Bootstrap plugin. I did not work because the stylesheet was not part
of the asset pipeline.

Also I did a lot of JavaScript code refactoring, making the code more
general and modular to realize this feature.

Signed-off-by: Konrad Reiche <konrad.reiche@gmail.com>
Fix bugs in the record retrieval

There were some small problems with the record retrieval after selecting
a result from the table. This was especially due to the generic access
of the record variables, as the parameter is written like record2, but
to access the instance variable it is @record2.

Signed-off-by: Konrad Reiche <konrad.reiche@gmail.com>
Fix parameter setup when choosing all repositories

I am giving the opportunity to call the metric report on all
repositories. For this I had to adjust the code a bit further.
Especially in the repository concern controller I have to check
for this case. For now I am handling this by creating a repository
instance with the name *.

Signed-off-by: Konrad Reiche <konrad.reiche@gmail.com>
Comment and refactor metric report JavaScript

Just added some comments restructured the initializer calls into a
separate function.

Signed-off-by: Konrad Reiche <konrad.reiche@gmail.com>