diff options
author | re4k <re4k@re4k.info> | 2013-04-30 23:09:54 +0900 |
---|---|---|
committer | re4k <re4k@re4k.info> | 2013-04-30 23:09:54 +0900 |
commit | 10c7c723c16d757b5a5692542911a08715966b6f (patch) | |
tree | 995d9b184bc5f9dc9d3d5819c723d62478e29784 /app/views/shared/sidebar | |
parent | 617c786764e4c10d85c87945a6c281061e65dcc8 (diff) | |
download | aclog-10c7c723c16d757b5a5692542911a08715966b6f.tar.gz |
refactor (not tested, no compatibility)
Diffstat (limited to 'app/views/shared/sidebar')
-rw-r--r-- | app/views/shared/sidebar/_i.html.haml | 10 | ||||
-rw-r--r-- | app/views/shared/sidebar/_search.html.haml | 13 | ||||
-rw-r--r-- | app/views/shared/sidebar/_tweets.html.haml | 1 | ||||
-rw-r--r-- | app/views/shared/sidebar/_users.html.haml | 18 |
4 files changed, 14 insertions, 28 deletions
diff --git a/app/views/shared/sidebar/_i.html.haml b/app/views/shared/sidebar/_i.html.haml index fe298ac..406fcaa 100644 --- a/app/views/shared/sidebar/_i.html.haml +++ b/app/views/shared/sidebar/_i.html.haml @@ -1,12 +1,12 @@ %ul.nav.nav-tabs.nav-stacked %li - = link_to "about", controller: "main", action: "about" + = link_to "about", about_path %li - = link_to "api", controller: "main", action: "api" + = link_to "api", about_api_path %ul.nav.nav-tabs.nav-stacked %li - = link_to "best", controller: "i", action: "best" + = link_to "best", best_path %li - = link_to "recent", controller: "i", action: "recent" + = link_to "recent", recent_path %li - = link_to "timeline", controller: "i", action: "timeline" + = link_to "timeline", timeline_path diff --git a/app/views/shared/sidebar/_search.html.haml b/app/views/shared/sidebar/_search.html.haml index fe298ac..774d930 100644 --- a/app/views/shared/sidebar/_search.html.haml +++ b/app/views/shared/sidebar/_search.html.haml @@ -1,12 +1 @@ -%ul.nav.nav-tabs.nav-stacked - %li - = link_to "about", controller: "main", action: "about" - %li - = link_to "api", controller: "main", action: "api" -%ul.nav.nav-tabs.nav-stacked - %li - = link_to "best", controller: "i", action: "best" - %li - = link_to "recent", controller: "i", action: "recent" - %li - = link_to "timeline", controller: "i", action: "timeline" += render "shared/sidebar/i" diff --git a/app/views/shared/sidebar/_tweets.html.haml b/app/views/shared/sidebar/_tweets.html.haml new file mode 100644 index 0000000..774d930 --- /dev/null +++ b/app/views/shared/sidebar/_tweets.html.haml @@ -0,0 +1 @@ += render "shared/sidebar/i" diff --git a/app/views/shared/sidebar/_users.html.haml b/app/views/shared/sidebar/_users.html.haml index 216ae44..8ef51f4 100644 --- a/app/views/shared/sidebar/_users.html.haml +++ b/app/views/shared/sidebar/_users.html.haml @@ -1,6 +1,6 @@ .sidebar .avatar - = link_to user_path(@user.screen_name) do + = link_to user_best_path(@user.screen_name) do = image_tag @user.profile_image_url_original, alt: @user.screen_name, width: 64, height: 64, class: "icon img-rounded" .screen_name= link_to @user.screen_name, twitter_user_url(@user.screen_name) - if @user.registered? @@ -24,18 +24,14 @@ %ul.nav.nav-tabs.nav-stacked - if @user.registered? %li - = link_to "info", info_path(@user.screen_name) + = link_to "info", user_info_path(@user.screen_name) %li - = link_to "best", user_path(@user.screen_name) + = link_to "best", user_best_path(@user.screen_name) %li - = link_to "timeline", timeline_path(@user.screen_name) + = link_to "timeline", user_timeline_path(@user.screen_name) %li - = link_to "discovered", discovered_path(@user.screen_name) + = link_to "discoveries", user_discoveries_path(@user.screen_name) %li - = link_to "favorited by", favorited_by_path(@user.screen_name) + = link_to "discovered by", user_discovered_by_path(@user.screen_name) %li - = link_to "retweeted by", retweeted_by_path(@user.screen_name) - %li - = link_to "given favorites", given_favorites_to_path(@user.screen_name) - %li - = link_to "given retweets", given_retweets_to_path(@user.screen_name) + = link_to "discovered of", user_discovered_of_path(@user.screen_name) |