From 942d5a669e0e28edde1d2070f5176b964d35f997 Mon Sep 17 00:00:00 2001 From: Alexander Machehin Date: Mon, 13 May 2013 22:23:49 +0600 Subject: [PATCH] [#98] add top menu for activity & tracker/pull requests --- app/assets/images/menu-delimiter.png | Bin 2823 -> 0 bytes app/assets/stylesheets/design/custom.scss | 10 +++++++++- app/views/activity_feeds/_feed_tabs.html.haml | 9 +++++---- app/views/activity_feeds/_top_menu.html.haml | 7 +++++++ app/views/activity_feeds/index.html.haml | 3 ++- app/views/users/users/issues_index.html.haml | 2 +- config/locales/menu.en.yml | 4 ++++ config/locales/menu.ru.yml | 4 ++++ 8 files changed, 32 insertions(+), 7 deletions(-) delete mode 100644 app/assets/images/menu-delimiter.png create mode 100644 app/views/activity_feeds/_top_menu.html.haml diff --git a/app/assets/images/menu-delimiter.png b/app/assets/images/menu-delimiter.png deleted file mode 100644 index 642e391cb213a33e98b5970a6176ee671c1df1b5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2823 zcmV+i3;6VjP)Oz@Z0f2-7z;ux~O9+4z06=<WDR*FRcSTFz- zW=q650N5=6FiBTtNC2?60Km==3$g$R3;-}uh=nNt1bYBr$Ri_o0EC$U6h`t_Jn<{8 z5a%iY0C<_QJh>z}MS)ugEpZ1|S1ukX&Pf+56gFW3VVXcL!g-k)GJ!M?;PcD?0HBc- z5#WRK{dmp}uFlRjj{U%*%WZ25jX z{P*?XzTzZ-GF^d31o+^>%=Ap99M6&ogks$0k4OBs3;+Bb(;~!4V!2o<6ys46agIcq zjPo+3B8fthDa9qy|77CdEc*jK-!%ZRYCZvbku9iQV*~a}ClFY4z~c7+0P?$U!PF=S z1Au6Q;m>#f??3%Vpd|o+W=WE9003S@Bra6Svp>fO002awfhw>;8}z{#EWidF!3EsG z3;bXU&9EIRU@z1_9W=mEXoiz;4lcq~xDGvV5BgyU zp1~-*fe8db$Osc*A=-!mVv1NJjtCc-h4>-CNCXm#Bp}I%6j35eku^v$Qi@a{RY)E3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kCy1<%NCg+}G`0PgpNm-?d@-hMgNe6^V+j6x$b<6@S<$+<4_1hi}Ti zncS4LsjI}fWY1>OX6feMEuLErma3QLmkw?X+1j)X-&VBk_4Y;EFPF_I+q;9dL%E~B zJh;4Nr^(LEJ3myURP{Rblsw%57T)g973R8o)DE9*xN#~;4_o$q%o z4K@u`jhx2fBXC4{U8Qn{*%*B$Ge=nny$HAYq{=vy|sI0 z_vss+H_qMky?OB#|JK!>IX&II^LlUh#rO5!7TtbwC;iULyV-Xq?ybB}ykGP{?LpZ? z-G|jbTmIbG@7#ZCz;~eY(cDM(28Dyq{*m>M4?_iynUBkc4TkHUI6gT!;y-fz>HMcd z&t%Ugo)`Y2{>!cx7B7DI)$7;J(U{Spm-3gBzioV_{p!H$8L!*M!p0uH$#^p{Ui4P` z?ZJ24cOCDe-w#jZd?0@)|7iKK^;6KN`;!@ylm7$*nDhK&GcDTy000JJOGiWi{{a60 z|De66lK=n!32;bRa{vGf6951U69E94oEQKA00(qQO+^RY1Q7}qAbuTiVE_OCIY~r8 zR0!9F&AAN#APfY-MWX-y+=nxNWCTV)Hrfkrh)4lURRv&1M1#BEU}oR)n9hq`GP9wo Z09ehZJM@PX4wnD`002ovPDHLkV1k%8K0E*b diff --git a/app/assets/stylesheets/design/custom.scss b/app/assets/stylesheets/design/custom.scss index 075500d6f..d3ff261d7 100644 --- a/app/assets/stylesheets/design/custom.scss +++ b/app/assets/stylesheets/design/custom.scss @@ -2025,4 +2025,12 @@ article .activity .top { width: auto; } th { text-align: center; } -} \ No newline at end of file +} + +.activity-tabs { + margin: 10px 0 0 0; + background: none; + -webkit-box-shadow: 0; + -moz-box-shadow: 0; + box-shadow: 0; +} diff --git a/app/views/activity_feeds/_feed_tabs.html.haml b/app/views/activity_feeds/_feed_tabs.html.haml index 606900a84..eb2dc3abc 100644 --- a/app/views/activity_feeds/_feed_tabs.html.haml +++ b/app/views/activity_feeds/_feed_tabs.html.haml @@ -1,8 +1,9 @@ -.sub-menu +.sub-menu.activity-tabs %nav %ul - (collection = t 'feed_menu').each do |base, title| %li= link_to title, root_path(:filter => base), :class => controller_name == 'activity_feeds' && @filter == base ? 'active' : '' - %li - = image_tag 'menu-delimiter.png', :style => 'margin-bottom: -7px;' - %li=link_to t('users.users.issues_index.title'), issues_path, :class => controller_name== 'users' && action_name == 'issues' ? 'active' : '' + -# + %li + = image_tag 'menu-delimiter.png', :style => 'margin-bottom: -7px;' + %li=link_to t('users.users.issues_index.title'), issues_path, :class => controller_name== 'users' && action_name == 'issues' ? 'active' : '' diff --git a/app/views/activity_feeds/_top_menu.html.haml b/app/views/activity_feeds/_top_menu.html.haml new file mode 100644 index 000000000..2df5dacd7 --- /dev/null +++ b/app/views/activity_feeds/_top_menu.html.haml @@ -0,0 +1,7 @@ +- content_for :feed_tabs do + .sub-menu + %nav + %ul + %li= link_to t('activity_menu.activity_feed'), root_path, :class => controller_name == 'activity_feeds' ? 'active' : '' + %li= link_to t('activity_menu.tracker'), issues_path, :class => controller_name == 'users' && action_name == 'issues' ? 'active' : '' + %li= link_to t('activity_menu.pull_requests'), root_path, :class => controller_name == 'users' && action_name == 'pull_requests' ? 'active' : '' \ No newline at end of file diff --git a/app/views/activity_feeds/index.html.haml b/app/views/activity_feeds/index.html.haml index a8bdf4758..5e84c4279 100644 --- a/app/views/activity_feeds/index.html.haml +++ b/app/views/activity_feeds/index.html.haml @@ -2,7 +2,8 @@ %h3.fix = t("layout.activity_feed.header") = link_to image_tag("rss.ico", :width => '15px', :height => '15px', :class => 'atom_icon'), atom_activity_feeds_path(:format => 'atom', :token => current_user.authentication_token) + =render('feed_tabs') =render 'list' - content_for :sidebar, render('sidebar') -- content_for :feed_tabs, render('feed_tabs') +-render 'top_menu' diff --git a/app/views/users/users/issues_index.html.haml b/app/views/users/users/issues_index.html.haml index 0f15c918d..d5e14d473 100644 --- a/app/views/users/users/issues_index.html.haml +++ b/app/views/users/users/issues_index.html.haml @@ -1,5 +1,5 @@ -set_meta_tags :title => t('.title') --content_for :feed_tabs, render('activity_feeds/feed_tabs') +-render('activity_feeds/top_menu') -content_for :sidebar do =form_tag issues_path, :id => 'filter_issues', :method => :get do .bordered diff --git a/config/locales/menu.en.yml b/config/locales/menu.en.yml index a2b0ccdec..ebd4d1c86 100644 --- a/config/locales/menu.en.yml +++ b/config/locales/menu.en.yml @@ -35,6 +35,10 @@ en: readme: Readme settings: Settings pull_requests: Pull Requests (%{count}) + activity_menu: + activity_feed: Activity Feed + tracker: Tracker + pull_requests: Pull Requests feed_menu: all: All code: Code diff --git a/config/locales/menu.ru.yml b/config/locales/menu.ru.yml index dcd696821..9bf4f1f16 100644 --- a/config/locales/menu.ru.yml +++ b/config/locales/menu.ru.yml @@ -35,6 +35,10 @@ ru: readme: Readme settings: Настройки pull_requests: Пул реквесты (%{count}) + activity_menu: + activity_feed: Лента активности + tracker: Трекер + pull_requests: Пул реквесты feed_menu: all: Все code: Код