Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
CIMI: changed CEP hrefs to use client's paths
Browse files Browse the repository at this point in the history
  • Loading branch information
Dies Koper committed Jul 5, 2013
1 parent 58d1f36 commit 3306c61
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions clients/cimi/lib/cimi_frontend_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ def href_to_id(href)
href.split('/').last.strip
end

def id_to_href(id)
return '' unless id
id.gsub(/([A-Z])/, '_\1').sub('Configs', 'Configurations').downcase
end

def collection_name(obj)
obj.class.name.split('::').last
end
Expand Down
2 changes: 1 addition & 1 deletion clients/cimi/views/cloud_entry_point/index.haml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
%ul
- entry_point.select { |k, v| !v.kind_of?(String) and v.first['href'] }.each do |k, v|
%li
%a{ :href => '/cimi/'+href_to_id(v.first['href']) }=k
%a{ :href => '/cimi/'+id_to_href(k) }=k

0 comments on commit 3306c61

Please sign in to comment.