From df5832368e50f063a186fe4d6b64b97d45e64698 Mon Sep 17 00:00:00 2001 From: Priya Rani Date: Wed, 11 Jun 2025 13:36:53 +0530 Subject: [PATCH 01/12] Make global web layout to landscape format --- app/assets/stylesheets/footer.sass | 22 +++++++++---------- app/assets/stylesheets/home.sass | 10 +++++---- app/assets/stylesheets/page.sass | 2 +- app/views/home/_whats_new.html.haml | 2 +- app/views/home/index.html.haml | 4 ++-- app/views/layouts/application.html.haml | 2 +- .../layouts/partials/_fluid_footer.html.haml | 4 ++-- app/views/layouts/partials/_footer.html.haml | 9 ++++---- 8 files changed, 28 insertions(+), 27 deletions(-) diff --git a/app/assets/stylesheets/footer.sass b/app/assets/stylesheets/footer.sass index dccca4602..043e64bd4 100644 --- a/app/assets/stylesheets/footer.sass +++ b/app/assets/stylesheets/footer.sass @@ -4,7 +4,7 @@ footer margin: 20px 0 0 0 min-height: 250px padding-top: 10px - width: 960px + width: 100% @media (min-width: 320px) and (max-width: 480px) width: auto @@ -34,19 +34,17 @@ footer float: left margin-top: 20px margin-left: 30px - width: 15% + width: 25% a .logo_img - width: 100% + width: 40% height: 100% .footer-mid float: left margin-top: 20px - margin-left: 120px - margin-right: 40px - width: 20% - font-size: 12px + width: 25% + font-size: 14px a @include footer-colors padding: 4px 4px @@ -54,15 +52,15 @@ footer .footer-right float: left margin-top: 20px - margin-bottom: 20px - width: 30% - font-size: 12px - padding-right: 60px - text-align: left + width: 25% + font-size: 14px a @include footer-colors padding: 4px 6px + .footer-rightmost + float: left + margin-top: 20px .footer-bottom @include footer-copyright-colors diff --git a/app/assets/stylesheets/home.sass b/app/assets/stylesheets/home.sass index 4c18ddd8c..c7a5f6114 100644 --- a/app/assets/stylesheets/home.sass +++ b/app/assets/stylesheets/home.sass @@ -1,10 +1,7 @@ .showcase padding-top: 20px padding-bottom: 30px - width: 980px - margin-left: -15px - padding-left: 5px - padding-right: 5px + width: 100% @media only all and (min-width: 320px) and (max-width: 480px) .showcase width: auto @@ -64,6 +61,8 @@ .join_now_home padding-top: 10px font-size: 1.4em + display: flex + align-items: center p font-size: 14px !important .join_now_color @@ -72,6 +71,9 @@ font-size: 0.5em !important height: 30px width: 30px + ul + width: 40% + margin-left: 25px .home_page_row .whats_new margin-right: -27px !important diff --git a/app/assets/stylesheets/page.sass b/app/assets/stylesheets/page.sass index cc813f4f1..b376df592 100644 --- a/app/assets/stylesheets/page.sass +++ b/app/assets/stylesheets/page.sass @@ -8,7 +8,7 @@ body color: #000 #page - width: 980px + width: 100% background-color: white margin: 0 auto padding: 10px 10px 0 10px diff --git a/app/views/home/_whats_new.html.haml b/app/views/home/_whats_new.html.haml index 130643baf..ddc15984f 100644 --- a/app/views/home/_whats_new.html.haml +++ b/app/views/home/_whats_new.html.haml @@ -1,2 +1,2 @@ %a{ href: 'https://www.blackduck.com/resources/analyst-reports/open-source-security-risk-analysis.html', target: '_blank' } - %img{src: image_path('home/OSSRA-OH-banner.png'), style: 'margin-left: 25px; margin-top: 15px'} + %img{src: image_path('home/OSSRA-OH-banner.png'), style: 'margin: 15px 0 0 5em;'} diff --git a/app/views/home/index.html.haml b/app/views/home/index.html.haml index c47b3002b..0fb0cae4b 100644 --- a/app/views/home/index.html.haml +++ b/app/views/home/index.html.haml @@ -21,10 +21,10 @@ %p.hide#content-2= t('.connecting', count: number_with_delimiter(@home.person_count)) %p.hide#content-3= t('.tracking', count: number_with_delimiter(@home.repository_count)) .home_page_row - .col-md-4.col-xs-7.col-sm-6 + .col-md-6.col-xs-7.col-sm-6 %h2.join_now= t('.join_now') = render partial: '/home/join_now_home' - .col-md-8.col-xs-5.col-sm-6 + .col-md-6.col-xs-5.col-sm-6 %h2.wh_new= t('.whats_new') = render partial: '/home/whats_new' .landing.col-md-12.col-sm-12.col-xs-12.last_section diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 7c5f3dbe8..ac2d7d290 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -22,7 +22,7 @@ %header= render partial: 'layouts/partials/header' = render partial: 'layouts/partials/page', locals: { responsive_layout: true } .clear - %footer= render partial: 'layouts/partials/footer' + %footer.footer-container= render partial: 'layouts/partials/footer' = render partial: 'cookies/consent_banner' unless cookies[:cookie_consented] = render partial: 'layouts/partials/js_scripts' diff --git a/app/views/layouts/partials/_fluid_footer.html.haml b/app/views/layouts/partials/_fluid_footer.html.haml index 64b7d1502..e33188f59 100644 --- a/app/views/layouts/partials/_fluid_footer.html.haml +++ b/app/views/layouts/partials/_fluid_footer.html.haml @@ -7,7 +7,7 @@ %img.logo_img{ itemprop: 'image', src: image_path('logo/BlackDuckLogo.svg'), alt: 'Open Hub' } .footer-mid - = "ABOUT BLACK DUCK" + %b = "ABOUT BLACK DUCK" %p %p %a{ href: 'https://www.blackduck.com/solutions/application-security-testing.html' }= 'Application Security Testing' @@ -19,7 +19,7 @@ %a{ href: 'https://www.blackduck.com/training.html', target: '_blank' }= 'Training' .footer-right - = "ABOUT OPEN HUB" + %b= "ABOUT OPEN HUB" %p %p %a{ href: 'https://community.blackduck.com/s/black-duck-open-hub' }= t :forum diff --git a/app/views/layouts/partials/_footer.html.haml b/app/views/layouts/partials/_footer.html.haml index 53b3e40d7..56e70e092 100644 --- a/app/views/layouts/partials/_footer.html.haml +++ b/app/views/layouts/partials/_footer.html.haml @@ -5,7 +5,7 @@ %img.logo_img{ itemprop: 'image', src: image_path('logo/BlackDuckLogo.svg'), alt: 'Open Hub' } .footer-mid - = "ABOUT BLACK DUCK" + %b= "ABOUT BLACK DUCK" %p %p %a{ href: 'https://www.blackduck.com/solutions/application-security-testing.html' }= 'Application Security Testing' @@ -17,7 +17,7 @@ %a{ href: 'https://www.blackduck.com/training.html', target: '_blank' }= 'Training' .footer-right - = "ABOUT OPEN HUB" + %b= "ABOUT OPEN HUB" %p %p %a{ href: 'https://community.blackduck.com/s/black-duck-open-hub' }= t :forum @@ -29,8 +29,9 @@ %a{ href: 'https://github.com/blackducksoftware/ohloh-ui', target: '_blank' }= t('copyright.source_code') %p %a{ href: "mailto:#{raw_email}".html_safe }= t :contact_us - - +.footer-rightmost + .twitter_follow1 + %b follow .footer-bottom %sup © = Time.current.year From a26bf4ea125b58455844ea2abae24269f580f167 Mon Sep 17 00:00:00 2001 From: Priya Rani Date: Wed, 11 Jun 2025 17:10:22 +0530 Subject: [PATCH 02/12] OTWO-7435 Fix UI for home page --- app/assets/stylesheets/footer.sass | 133 +++++++----------- app/assets/stylesheets/home.sass | 13 +- app/assets/stylesheets/page.sass | 45 +----- app/views/home/_whats_new.html.haml | 4 +- app/views/home/index.html.haml | 4 +- .../layouts/partials/_fluid_footer.html.haml | 42 ------ app/views/layouts/partials/_footer.html.haml | 69 +++++---- app/views/layouts/partials/_mast.html.haml | 11 +- .../responsive_project_layout.html.haml | 2 +- 9 files changed, 105 insertions(+), 218 deletions(-) delete mode 100644 app/views/layouts/partials/_fluid_footer.html.haml diff --git a/app/assets/stylesheets/footer.sass b/app/assets/stylesheets/footer.sass index 043e64bd4..534136ad0 100644 --- a/app/assets/stylesheets/footer.sass +++ b/app/assets/stylesheets/footer.sass @@ -1,96 +1,59 @@ -footer +.footer-container @include footer-colors - - margin: 20px 0 0 0 + display: flex + flex-direction: column min-height: 250px - padding-top: 10px - width: 100% + padding: 2em 2em 1em 2em + margin-bottom: 1em + margin-top: 1em + + .footer-row + display: flex + flex-direction: row + width: 100% + gap: 1em + + .footer-left, .footer-mid, .footer-right, .footer-rightmost + flex: 1 1 0 + min-width: 0 + font-size: 14px + vertical-align: top - @media (min-width: 320px) and (max-width: 480px) - width: auto - min-height: 194px !important - padding-top: 0px !important - margin: 0px 0 0 0 !important .footer-left - margin-left: 5px !important - margin-top: 20px !important - min-height: 150px !important - .footer-mid - line-height: 15px - margin-left: 30px !important - font-size: 8px !important - width: 32% !important - .footer-right - font-size: 8px !important - padding-right: 2px !important - width: 31% !important - .footer-bottom - margin-left: 0px !important - margin-top: 0px !important - @media (min-width: 540px) and (max-width: 1024px) - width: auto + a + .logo_img + width: 45% - .footer-left - float: left - margin-top: 20px - margin-left: 30px - width: 25% - a - .logo_img - width: 40% - height: 100% + .footer-mid, .footer-right, .footer-rightmost + a + @include footer-colors - .footer-mid - float: left - margin-top: 20px - width: 25% - font-size: 14px - a - @include footer-colors - padding: 4px 4px - - .footer-right - float: left - margin-top: 20px - width: 25% - font-size: 14px - a - @include footer-colors - padding: 4px 6px - - .footer-rightmost - float: left - margin-top: 20px - .footer-bottom + > .footer-bottom @include footer-copyright-colors - - float: left - margin-top: 10px - margin-left: 30px - margin-bottom: 2em - bottom: 0 + margin-top: auto + width: 100% + text-align: center a @include footer-copyright-colors -footer.fluid_footer - width: auto - .footer-left - width: 12% - ul - li + @media (max-width: 768px) + .footer-row + flex-direction: column + gap: 0.5em + .footer-left, .footer-mid, .footer-right, .footer-rightmost + width: 100% + font-size: 12px !important + line-height: 16px + b + font-size: 11px + .footer-left + a + .logo_img + width: 80% + .footer-mid, .footer-right + width: 100% + @media (min-width: 768px) and (max-width: 991.98px) + .footer-left a - padding: 1rem 2rem - font-weight: bold - .footer-mid - width: 25% - text-align: left - font-weight: bold - font-size: 13px - .footer-right - width: 40% - float: left - font-weight: bold - font-size: 13px - .footer-bottom - float: left - margin-botton: 2em !important + .logo_img + width: 60% !important \ No newline at end of file diff --git a/app/assets/stylesheets/home.sass b/app/assets/stylesheets/home.sass index c7a5f6114..1da26e808 100644 --- a/app/assets/stylesheets/home.sass +++ b/app/assets/stylesheets/home.sass @@ -47,7 +47,10 @@ color: #646E81 margin-left: -27px cursor: pointer - +.ossra_banner + img + margin: 1em 0 0 3em + width: 85% #global_statistics padding-top: 1px p @@ -72,8 +75,8 @@ height: 30px width: 30px ul - width: 40% margin-left: 25px + margin-right: 25px .home_page_row .whats_new margin-right: -27px !important @@ -149,7 +152,6 @@ input:focus::-ms-input-placeholder .landing margin-top: 20px - margin-left: -14px .top_ten_main padding-left: 40px !important padding-bottom: 6px !important @@ -171,9 +173,6 @@ input:focus::-ms-input-placeholder font-size: 16px !important .top_ten.middle @include site-well-color -.top_ten.last - h2 - margin-right: -25px !important .top_ten_icon img background-color: #EEE @@ -240,5 +239,3 @@ button float: right #no-background background-color: white !important - - diff --git a/app/assets/stylesheets/page.sass b/app/assets/stylesheets/page.sass index b376df592..62133479a 100644 --- a/app/assets/stylesheets/page.sass +++ b/app/assets/stylesheets/page.sass @@ -117,17 +117,20 @@ header margin-left: 15px padding: 0 0 5px 0 min-height: 30px + .header-logo + display: flex + align-items: center .logo-div height: 35px - float: left + width: 18em .logo_link text-decoration: none margin-top: 3px .logo_img height: 100% + width: 100% .company-div @include top-navigation-colors - float: left .navbar_small_text font-size: 10px !important .navbar_large_text @@ -136,25 +139,18 @@ header @include top-navigation-colors text-decoration: none .spacing-div - float: left width: 2px height: 30px background-color: white - margin: 0 auto .separator-div @include site-separator-color @include site-separator-background-color - float: left width: 1px height: 30px margin: 0 2px 0 2px .actions-div - float: right - .twitter-text - @include twitter-background-color - color: white - font-weight: bold - font-size: 0.80em + margin-left: auto + margin-right: 0 .btn border: 0 display: inline-block @@ -162,28 +158,6 @@ header line-height: 25px margin: 0 padding: 1px 6px 0 7px - .follow_btn - @include follow-button-colors - display: inline-block - padding: 0 0 0 4px - height: 24px - i, p, img - color: white - display: inline-block - vertical-align: top - i - color: #555 - vertical-align: middle - &:before - padding-right: 0 - p - font-weight: normal - line-height: 24px - text-transform: none - margin: 0 - border-radius: 0 4px 4px 0 - img - margin-right: -1px ul list-style: none margin: 3px 0 0 0 @@ -279,11 +253,6 @@ header h2 font-size: 12px !important margin-top: 5px !important - .navbar - .follow_btn - height: 20px !important - p - line-height: 20px !important .busy, a.busy background: transparent asset_url('ui/spinner.gif') no-repeat center diff --git a/app/views/home/_whats_new.html.haml b/app/views/home/_whats_new.html.haml index ddc15984f..818ba825e 100644 --- a/app/views/home/_whats_new.html.haml +++ b/app/views/home/_whats_new.html.haml @@ -1,2 +1,2 @@ -%a{ href: 'https://www.blackduck.com/resources/analyst-reports/open-source-security-risk-analysis.html', target: '_blank' } - %img{src: image_path('home/OSSRA-OH-banner.png'), style: 'margin: 15px 0 0 5em;'} +%a.ossra_banner{ href: 'https://www.blackduck.com/resources/analyst-reports/open-source-security-risk-analysis.html', target: '_blank' } + %img{src: image_path('home/OSSRA-OH-banner.png')} diff --git a/app/views/home/index.html.haml b/app/views/home/index.html.haml index 0fb0cae4b..075db6c20 100644 --- a/app/views/home/index.html.haml +++ b/app/views/home/index.html.haml @@ -21,10 +21,10 @@ %p.hide#content-2= t('.connecting', count: number_with_delimiter(@home.person_count)) %p.hide#content-3= t('.tracking', count: number_with_delimiter(@home.repository_count)) .home_page_row - .col-md-6.col-xs-7.col-sm-6 + .col-md-6.col-xs-12.col-sm-6 %h2.join_now= t('.join_now') = render partial: '/home/join_now_home' - .col-md-6.col-xs-5.col-sm-6 + .col-md-6.col-xs-12.col-sm-6 %h2.wh_new= t('.whats_new') = render partial: '/home/whats_new' .landing.col-md-12.col-sm-12.col-xs-12.last_section diff --git a/app/views/layouts/partials/_fluid_footer.html.haml b/app/views/layouts/partials/_fluid_footer.html.haml deleted file mode 100644 index e33188f59..000000000 --- a/app/views/layouts/partials/_fluid_footer.html.haml +++ /dev/null @@ -1,42 +0,0 @@ -- raw_email = raw('info@openhub.net') - -.col-md-12.text-center - .footer_content{style: 'margin-left: 27%'} - .footer-left - %a.logo_link{ href: root_path } - %img.logo_img{ itemprop: 'image', src: image_path('logo/BlackDuckLogo.svg'), alt: 'Open Hub' } - - .footer-mid - %b = "ABOUT BLACK DUCK" - %p - %p - %a{ href: 'https://www.blackduck.com/solutions/application-security-testing.html' }= 'Application Security Testing' - %p - %a{ href: 'https://www.blackduck.com/services.html' }= 'Application Security Services' - %p - %a{ href: 'https://www.blackduck.com/services/security-program/strategy-planning.html' }= 'AppSec Program Development' - %p - %a{ href: 'https://www.blackduck.com/training.html', target: '_blank' }= 'Training' - - .footer-right - %b= "ABOUT OPEN HUB" - %p - %p - %a{ href: 'https://community.blackduck.com/s/black-duck-open-hub' }= t :forum - %p - %a{ href: 'https://community.blackduck.com/s/article/Black-Duck-Open-Hub-Terms-of-Use' }= t :terms - %p - %a{ href: 'https://community.blackduck.com/s/article/Black-Duck-Open-Hub-Open-Hub-Privacy-Policy' }= t :privacy_blog - %p - %a{ href: 'https://github.com/blackducksoftware/ohloh-ui', target: '_blank' }= t('copyright.source_code') - %p - %a{ href: "mailto:#{raw_email}".html_safe }= t :contact_us - - - .footer-bottom - %sup © - = Time.current.year - %span{ itemscope: '', itemtype: 'http://schema.org/CreativeWork' } - %span{ itemprop: 'publisher' } - %a{ href: 'http://www.blackduck.com', target: '_blank' }= "Black Duck Software, Inc." - = t('copyright.rights_text') diff --git a/app/views/layouts/partials/_footer.html.haml b/app/views/layouts/partials/_footer.html.haml index 56e70e092..10ca2d711 100644 --- a/app/views/layouts/partials/_footer.html.haml +++ b/app/views/layouts/partials/_footer.html.haml @@ -1,37 +1,46 @@ - raw_email = '%69%6Efo%40O%70en%48u%62.%6E%65t' +.footer-row + .footer-left + %a.logo_link{ href: 'https://www.blackduck.com' } + %img.logo_img{ itemprop: 'image', src: image_path('logo/BlackDuckLogo.svg'), alt: 'Open Hub' } -.footer-left - %a.logo_link{ href: 'https://www.blackduck.com' } - %img.logo_img{ itemprop: 'image', src: image_path('logo/BlackDuckLogo.svg'), alt: 'Open Hub' } + .footer-mid + %b= "ABOUT BLACK DUCK" + %p + %p + %a{ href: 'https://www.blackduck.com/solutions/application-security-testing.html' }= 'Application Security Testing' + %p + %a{ href: 'https://www.blackduck.com/services.html' }= 'Application Security Services' + %p + %a{ href: 'https://www.blackduck.com/services/security-program/strategy-planning.html' }= 'AppSec Program Development' + %p + %a{ href: 'https://www.blackduck.com/training.html', target: '_blank' }= 'Training' -.footer-mid - %b= "ABOUT BLACK DUCK" - %p - %p - %a{ href: 'https://www.blackduck.com/solutions/application-security-testing.html' }= 'Application Security Testing' - %p - %a{ href: 'https://www.blackduck.com/services.html' }= 'Application Security Services' - %p - %a{ href: 'https://www.blackduck.com/services/security-program/strategy-planning.html' }= 'AppSec Program Development' - %p - %a{ href: 'https://www.blackduck.com/training.html', target: '_blank' }= 'Training' + .footer-right + %b= "ABOUT OPEN HUB" + %p + %p + %a{ href: 'https://community.blackduck.com/s/black-duck-open-hub' }= t :forum + %p + %a{ href: 'https://community.blackduck.com/s/article/Black-Duck-Open-Hub-Terms-of-Use' }= t :terms + %p + %a{ href: 'https://community.blackduck.com/s/article/Black-Duck-Open-Hub-Open-Hub-Privacy-Policy' }= t :privacy_blog + %p + %a{ href: 'https://github.com/blackducksoftware/ohloh-ui', target: '_blank' }= t('copyright.source_code') + %p + %a{ href: "mailto:#{raw_email}".html_safe }= t :contact_us + .footer-rightmost + :ruby + twitter_url = 'https://twitter.com/intent/follow?original_referer=' + twitter_url += CGI.escape request.url + twitter_url += '®ion=follow_link&screen_name=bdopenhub&source=followbutton&variant=2.0' + %b Stay Connected + %p + %p + %a{ href: twitter_url, target: '_blank' } + %i.icon-twitter + %span Follow @ Black Duck Open Hub -.footer-right - %b= "ABOUT OPEN HUB" - %p - %p - %a{ href: 'https://community.blackduck.com/s/black-duck-open-hub' }= t :forum - %p - %a{ href: 'https://community.blackduck.com/s/article/Black-Duck-Open-Hub-Terms-of-Use' }= t :terms - %p - %a{ href: 'https://community.blackduck.com/s/article/Black-Duck-Open-Hub-Open-Hub-Privacy-Policy' }= t :privacy_blog - %p - %a{ href: 'https://github.com/blackducksoftware/ohloh-ui', target: '_blank' }= t('copyright.source_code') - %p - %a{ href: "mailto:#{raw_email}".html_safe }= t :contact_us -.footer-rightmost - .twitter_follow1 - %b follow .footer-bottom %sup © = Time.current.year diff --git a/app/views/layouts/partials/_mast.html.haml b/app/views/layouts/partials/_mast.html.haml index f28f75c58..c2c48f6fd 100644 --- a/app/views/layouts/partials/_mast.html.haml +++ b/app/views/layouts/partials/_mast.html.haml @@ -2,7 +2,7 @@ %span{ itemscope: '', itemtype: 'http://schema.org/CreativeWork' } %span.hidden{ itemprop: 'author' } openhub.net %span.hidden{ itemprop: 'publisher' } Black Duck Software, Inc. - %span + %span.header-logo %div.logo-div %a.logo_link{ href: 'https://www.blackduck.com' } %img.logo_img{ itemprop: 'image', src: image_path('logo/BlackDuckLogo.svg'), alt: 'Open Hub' } @@ -15,15 +15,6 @@ Open Hub %div.actions-div %ul#top_nav_actions - %li.twitter_follow - :ruby - twitter_url = 'https://twitter.com/intent/follow?original_referer=' - twitter_url += CGI.escape request.url - twitter_url += '®ion=follow_link&screen_name=bdopenhub&source=followbutton&variant=2.0' - %a.btn.follow_btn{ href: twitter_url, target: '_blank' } - %i.icon-twitter - %p.follow! #{t(:follow)} @ - %p.twitter-text  OH  - if logged_in? %li .dropdown#logged_user_menu diff --git a/app/views/layouts/responsive_project_layout.html.haml b/app/views/layouts/responsive_project_layout.html.haml index 63f832a98..ccc7b00b6 100644 --- a/app/views/layouts/responsive_project_layout.html.haml +++ b/app/views/layouts/responsive_project_layout.html.haml @@ -20,6 +20,6 @@ %header= render partial: 'layouts/partials/header' = render partial: 'layouts/partials/page', locals: { responsive_layout: true } .clear - %footer.fluid_footer= render partial: 'layouts/partials/fluid_footer' + %footer.footer-container= render partial: 'layouts/partials/footer' = render 'cookies/consent_banner' unless cookies[:cookie_consented] = render partial: 'layouts/partials/js_scripts' From 6aff1ee743238fed140eb51490680c1464015770 Mon Sep 17 00:00:00 2001 From: Priya Rani Date: Mon, 16 Jun 2025 14:51:38 +0530 Subject: [PATCH 03/12] Fix UI for tools page --- app/assets/stylesheets/tools.sass | 6 ++++++ app/views/abouts/tools.html.haml | 7 +++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/app/assets/stylesheets/tools.sass b/app/assets/stylesheets/tools.sass index 5dc7a88b6..6632321d8 100644 --- a/app/assets/stylesheets/tools.sass +++ b/app/assets/stylesheets/tools.sass @@ -1,2 +1,8 @@ .language-list-lineheight line-height: 55px +.tools-link + display: block + width: 100% + text-align: center + img + display: inline-block \ No newline at end of file diff --git a/app/views/abouts/tools.html.haml b/app/views/abouts/tools.html.haml index 1200ebfc1..3f453e836 100644 --- a/app/views/abouts/tools.html.haml +++ b/app/views/abouts/tools.html.haml @@ -3,25 +3,24 @@ .col-md-12 %h1= t('.tools') - %br .row .col-md-4 %h3= link_to t('.compare_projects'), compare_projects_path %p= t('.compare_stats') = link_to((image_tag 'tools/compare_projects_preview_graph.png', alt: t('.compare_projects')), - compare_projects_path) + compare_projects_path, class: 'tools-link') .col-md-4 %h3= link_to t('.compare_languages'), compare_languages_path %p= t('.compare_languages_stats') = link_to((image_tag 'tools/compare_languages_preview_graph.png', alt: t('.compare_languages')), - compare_languages_path) + compare_languages_path, class: 'tools-link') .col-md-4 %h3= link_to t('.compare_repositories'), compare_repositories_path %p= t('.compare_repositories_stats') = link_to((image_tag 'tools/compare_repositories_preview_graph.png', alt: t('.compare_repositories')), - compare_repositories_path) + compare_repositories_path, class: 'tools-link') .row %p   From 2613363407fe10a55f1c8bba74be1f3632caa581 Mon Sep 17 00:00:00 2001 From: Priya Rani Date: Mon, 16 Jun 2025 17:13:05 +0530 Subject: [PATCH 04/12] Fix UI of language show page --- app/views/languages/_language.html.haml | 78 ++++++++++++------------- app/views/languages/show.html.haml | 2 +- 2 files changed, 39 insertions(+), 41 deletions(-) diff --git a/app/views/languages/_language.html.haml b/app/views/languages/_language.html.haml index 8e5345417..b9bb5cbd8 100644 --- a/app/views/languages/_language.html.haml +++ b/app/views/languages/_language.html.haml @@ -1,51 +1,49 @@ - show_lang_usage ||= false .well - %h4.pull-left + %h4 = link_to language.nice_name, language_path(language) - if show_lang_usage - %p.pull-right + %p = t('.earliest_usage') - if @language_facts.present? = @language_facts.first.month.strftime('%B %Y') - else = t('.unknown') - - %table.table.no_margin_bottom - %tbody - %tr - %td.col-md-2 - %strong= t('.total_lines') - %p - = number_with_delimiter(language.code.to_i + language.comments.to_i + language.blanks.to_i) - - .clearfix - %strong= t('.code') - %p= number_with_delimiter(language.code) - - .clearfix - %strong= t('.comments') - %p - = number_with_delimiter(language.comments) - = t('.precision_percentage', - precision: number_with_precision((language.avg_percent_comments || 0) * 100.0, - precision: 1)) - - %td - %strong= t('.projects') - %span.badge.badge-success.link-disabled.projects= number_with_delimiter(language.projects) - .margin_top_15 - = render 'mini_chart', language: language, measure: 'projects' - - %td - %strong= t('.contributors') - %span.badge.badge-info.link-disabled.contributors= number_with_delimiter(language.contributors) - .margin_top_15 - = render 'mini_chart', language: language, measure: 'contributors' - - %td - %strong= t('.commits') - %span.badge.badge-inf.link-disabled.commits= number_with_delimiter(language.commits) - .margin_top_15 - = render 'mini_chart', language: language, measure: 'commits' + .table-responsive + %table.table + %tbody + %tr.row + %td.col-12.col-md-3 + %strong= t('.total_lines') + %p + = number_with_delimiter(language.code.to_i + language.comments.to_i + language.blanks.to_i) + + %strong= t('.code') + %p= number_with_delimiter(language.code) + + %strong= t('.comments') + %p + = number_with_delimiter(language.comments) + = t('.precision_percentage', + precision: number_with_precision((language.avg_percent_comments || 0) * 100.0, + precision: 1)) + + %td.col-12.col-md-3 + %strong= t('.projects') + %span.badge.badge-success.link-disabled.projects= number_with_delimiter(language.projects) + .margin_top_15 + = render 'mini_chart', language: language, measure: 'projects' + + %td.col-12.col-md-3 + %strong= t('.contributors') + %span.badge.badge-info.link-disabled.contributors= number_with_delimiter(language.contributors) + .margin_top_15 + = render 'mini_chart', language: language, measure: 'contributors' + + %td.col-12.col-md-3 + %strong= t('.commits') + %span.badge.badge-inf.link-disabled.commits= number_with_delimiter(language.commits) + .margin_top_15 + = render 'mini_chart', language: language, measure: 'commits' diff --git a/app/views/languages/show.html.haml b/app/views/languages/show.html.haml index 78dac898e..f8861b344 100644 --- a/app/views/languages/show.html.haml +++ b/app/views/languages/show.html.haml @@ -2,7 +2,7 @@ - page_context[:select_side_bar] = @language.name %h3= t('.heading') -.col-md-12 +.col-12 = render 'language', language: @language, show_lang_usage: true .col-md-6 From 414a8d49ff727974f796852a2882197b9f7e9605 Mon Sep 17 00:00:00 2001 From: Priya Rani Date: Mon, 30 Jun 2025 19:36:15 +0530 Subject: [PATCH 05/12] OTWO-7436 Fix explore projects page UI --- app/assets/stylesheets/explore.sass | 96 +++++++++++++++---- app/assets/stylesheets/oh-styles.sass | 2 +- app/assets/stylesheets/page.sass | 15 +-- app/assets/stylesheets/search-dingus.sass | 11 ++- app/models/analysis.rb | 2 +- app/models/concerns/project_scopes.rb | 6 +- app/views/explore/_hot_projects.html.haml | 40 ++++---- .../explore/_hot_projects_list.html.haml | 6 +- .../explore/_project_demographics.html.haml | 2 +- app/views/explore/_projects_sidebar.html.haml | 43 ++++----- app/views/layouts/application.html.haml | 2 +- app/views/layouts/partials/_menubar.html.haml | 2 +- .../responsive_project_layout.html.haml | 2 +- app/views/layouts/vulnerability.html.haml | 2 +- config/charting/demographic.yml | 6 +- 15 files changed, 146 insertions(+), 91 deletions(-) diff --git a/app/assets/stylesheets/explore.sass b/app/assets/stylesheets/explore.sass index 9b90ecc23..4bddcdea3 100644 --- a/app/assets/stylesheets/explore.sass +++ b/app/assets/stylesheets/explore.sass @@ -1,7 +1,7 @@ #explore_projects_page #explore_sidebar + padding: 1px 10px 10px 10px box-shadow: none - width: 28% min-height: 650px border-radius: 0px border: none @@ -26,23 +26,25 @@ &::-webkit-input-placeholder @include explore-sidebar-placeholder-color font-style: italic + h2.hot-projects-header + margin-top: 0px .explore_search - width: 173px + width: 16em margin-top: 7px &.tag_autocomplete - width: 194px + width: 16em .explore_compare - width: 194px + width: 16em + #compare_btn + height: 34px + display: block #hot_projects td :padding 5px &.pai position: relative a[class^="twentyfive_project_activity_level_"] - margin-left: 12px - margin-top: -12px - position: absolute - top: 24px + margin-left: 0 #project_demographics margin-top: 30px @@ -59,7 +61,7 @@ margin-left: 10px #tagcloud - :margin 5px + :margin 5px 10px 5px 5px span.tag.container background: none @@ -71,16 +73,72 @@ #value_selector_selected_tags width: 400px +.d-flex + display: flex !important - .add_new_project_btn_bottom - margin-top: 25px - margin-left: -10px +.align-items-center + align-items: center !important - .add_new_project_btn_top - float: right - top: -9px - left: 9px - height: 30px - &.btn-mini - padding: 3px 5px !important +.justify-content-between + justify-content: space-between +.mb-3 + margin-bottom: 1rem !important /* 16px by default */ + +.table-responsive + display: block + width: 100% + overflow-x: auto + -webkit-overflow-scrolling: touch + +.mb-2 + margin-bottom: 0.5rem !important /* 8px by default */ + +.mb-0 + margin-bottom: 0 !important + +.me-2 + margin-right: 0.5rem !important + +/* In RTL mode, Bootstrap would flip this to: */ +[dir="rtl"] .me-2 + margin-left: 0.5rem !important + margin-right: 0 !important + +.flex-column + flex-direction: column !important + +#hot_projects thead, #hot_projects tr + width: 100% + display: table + table-layout: fixed + +@media (max-width: 768px) + .table-responsive + overflow-x: auto + + #hot_projects + min-width: 450px /* Minimum width to prevent squashing */ + + #hot_projects th, #hot_projects td + white-space: normal + overflow: visible + text-overflow: clip + word-wrap: break-word + hyphens: auto + +@media (max-width: 480px) + #explore_projects_page + .explore_search + width: 18em + &.tag_autocomplete + width: 18em + .explore_compare + width: 18em + #demographics_chart + min-height: 120px + +@media (min-width: 768px) + .flex-md-row + flex-direction: row !important + \ No newline at end of file diff --git a/app/assets/stylesheets/oh-styles.sass b/app/assets/stylesheets/oh-styles.sass index bda95eea6..ca6ecd302 100644 --- a/app/assets/stylesheets/oh-styles.sass +++ b/app/assets/stylesheets/oh-styles.sass @@ -102,7 +102,7 @@ @mixin search-dropdown-link-hover-colors background-color: color-gradient($SECONDARY_MARINE_BLUE, 100) - color: white + color: color-gradient($SECONDARY_SLATE_BLUE, 120) //////////////////////////////////////////////////////////////////// // diff --git a/app/assets/stylesheets/page.sass b/app/assets/stylesheets/page.sass index 62133479a..8db7ac64e 100644 --- a/app/assets/stylesheets/page.sass +++ b/app/assets/stylesheets/page.sass @@ -54,18 +54,26 @@ header height: 42px @media (min-width: 320px) and (max-width: 340px) + #navbar-inner + height: 55px !important #nav-top-bar margin: 11px 4px 0 0px !important .new_main_menu + width: 60% !important + line-height: 20px !important li margin-right: 2px !important a font-size: 10px !important @media (min-width: 341px) and (max-width: 480px) + #navbar-inner + height: 55px !important #nav-top-bar margin: 11px 10px 0 11px !important .new_main_menu + width: 60% !important + line-height: 20px !important li margin-right: 6px !important a @@ -122,7 +130,7 @@ header align-items: center .logo-div height: 35px - width: 18em + width: 16em .logo_link text-decoration: none margin-top: 3px @@ -249,11 +257,6 @@ header .col-md-12 @extend .no_padding -@media (min-width: 320px) and (max-width: 480px) - h2 - font-size: 12px !important - margin-top: 5px !important - .busy, a.busy background: transparent asset_url('ui/spinner.gif') no-repeat center diff --git a/app/assets/stylesheets/search-dingus.sass b/app/assets/stylesheets/search-dingus.sass index f75db9c1d..6b0bf5eb6 100644 --- a/app/assets/stylesheets/search-dingus.sass +++ b/app/assets/stylesheets/search-dingus.sass @@ -41,8 +41,10 @@ input width: 14px -#nav-top-bar .new_main_menu form#quicksearch - margin-top: -4px +#nav-top-bar form#quicksearch + .caret + border-top: 4px solid + margin-top: -25px button.submit background: none border: 0 @@ -55,6 +57,7 @@ @include search-dropdown-link-color font-size: 14px text-transform: none + cursor: pointer &:hover @include search-dropdown-link-hover-colors .btn-small @@ -69,13 +72,13 @@ @media (min-width: 320px) and (max-width: 360px) form#quicksearch - margin-top: -20px !important + margin-top: -35px !important margin-right: -61px !important .btn-small font-size: 8px !important @media (min-width: 361px) and (max-width: 480px) form#quicksearch - margin-top: -6px !important + margin-top: -35px !important margin-right: -61px !important .btn-small font-size: 8px !important diff --git a/app/models/analysis.rb b/app/models/analysis.rb index 65d20109f..be2ab02b0 100644 --- a/app/models/analysis.rb +++ b/app/models/analysis.rb @@ -25,7 +25,7 @@ class Analysis < ApplicationRecord belongs_to :project, optional: true belongs_to :main_language, class_name: 'Language', optional: true - scope :fresh, -> { where(Analysis.arel_table[:created_at].gt(2.days.ago)) } + scope :fresh, -> { where(created_at: (2.days.ago)..Time.current) } scope :hot, -> { where.not(hotness_score: nil).order(hotness_score: :desc) } scope :for_lang, ->(lang_id) { where(main_language_id: lang_id) } diff --git a/app/models/concerns/project_scopes.rb b/app/models/concerns/project_scopes.rb index c36983910..881096dc3 100644 --- a/app/models/concerns/project_scopes.rb +++ b/app/models/concerns/project_scopes.rb @@ -13,8 +13,8 @@ module ProjectScopes scope :by_vanity_url_or_id, ->(param) { where('lower(vanity_url) = ? OR id = ?', param.to_s.downcase, param.to_i) } scope :been_analyzed, -> { where.not(best_analysis_id: nil) } scope :recently_analyzed, -> { not_deleted.been_analyzed.order(created_at: :desc) } - scope :hot, lambda { |l_id = nil| - not_deleted.joins(:best_analysis).merge(Analysis.fresh_and_hot(l_id)) + scope :hot, lambda { |language_id = nil| + not_deleted.joins(:best_analysis).merge(Analysis.fresh_and_hot(language_id)) } scope :by_popularity, -> { where.not(user_count: 0).order(user_count: :desc) } scope :by_activity, -> { joins(:analyses).joins(:analysis_summaries).by_popularity.thirty_day_summaries } @@ -41,7 +41,7 @@ module ProjectScopes COALESCE(analysis_summaries.outside_commits_count, 0) DESC ')) .limit(10) } - scope :with_pai_available, -> { active.where(arel_table[:activity_level_index].gt(0)).size } + scope :with_pai_available, -> { active.where('activity_level_index > 0').count } scope :tagged_with, lambda { |tags| not_deleted.joins(:tags) .where(tags: { name: tags }) diff --git a/app/views/explore/_hot_projects.html.haml b/app/views/explore/_hot_projects.html.haml index 07e4c341e..0975883cd 100644 --- a/app/views/explore/_hot_projects.html.haml +++ b/app/views/explore/_hot_projects.html.haml @@ -1,20 +1,20 @@ -.pull-right.col-md-8.margin_top_20 - %h2.pull-left= t('.title') - %form{ action: '', rel: 'sort_filter' } - .pull-right.nav-select-container#sort_by - %label.pull-left{ style: 'line-height: 28px' } - = t('.filter') -   - = select_tag :lang, options_for_select(@languages, params[:lang]), class: 'chzn-select col-md-2 pull-right' - .clearfix - %table.table.table-striped.center-block#hot_projects - %tr - %th{ width: '5%' }= t('.rank') - %th{ width: '5%' } - %th{ width: '35%' }= t('.name') - %th{ width: '15%' }= t('.claimed') - %th.center{ width: '8%' }= t('.pai') - %th.center{ width: '12%' } - = link_to t('.hotness_score'), blog_url_for(:hotness_score), class: 'meta', target: '_blank' - = render 'hot_projects_list' - .clearfix +.col-md-10.margin_top_10 + .d-flex.flex-column.flex-md-row.justify-content-between.mb-3 + %h2.hot-projects-header= t('.title') + %form{ action: '', rel: 'sort_filter' } + .d-flex.align-items-center#sort_by + %label.me-2.mb-0 + = t('.filter') + = select_tag :lang, options_for_select(@languages, params[:lang]), class: 'chzn-select col-md-5' + .table-responsive + %table.table.table-striped.center-block#hot_projects + %thead + %tr + %th{ width: '12%' }= t('.rank') + %th{ width: '10%' } + %th= t('.name') + %th= t('.claimed') + %th{ width: '8%' }= t('.pai') + %th.center + = link_to t('.hotness_score'), blog_url_for(:hotness_score), class: 'meta', target: '_blank' + = render 'hot_projects_list' diff --git a/app/views/explore/_hot_projects_list.html.haml b/app/views/explore/_hot_projects_list.html.haml index 1286f3438..f6f969e0d 100644 --- a/app/views/explore/_hot_projects_list.html.haml +++ b/app/views/explore/_hot_projects_list.html.haml @@ -8,15 +8,15 @@ org = project.organization org_name = truncate(org.name, length: 30) if org %tr - %td.center + %td{ width: '12%' } = (index + 1) - %td + %td{ width: '10%' } = project.decorate.icon(:small) %td = link_to h(project_name), project_path(project) %td.center = link_to h(org_name), organization_path(org), class: 'claimed-by-org', title: org.name if org - %td.pai + %td.pai{ width: '8%' } - project_activity_level_class(project, :twentyfive) %td.center = number_with_precision(project.best_analysis.angle, precision: 1) diff --git a/app/views/explore/_project_demographics.html.haml b/app/views/explore/_project_demographics.html.haml index 6a01fbb8e..6e030ca9e 100644 --- a/app/views/explore/_project_demographics.html.haml +++ b/app/views/explore/_project_demographics.html.haml @@ -1,4 +1,4 @@ -.pull-right.col-md-8#project_demographics +.col-md-9#project_demographics %h2 = t('.demographics_by') = link_to 'PAI', blog_url_for(:pai_about), target: '_blank' diff --git a/app/views/explore/_projects_sidebar.html.haml b/app/views/explore/_projects_sidebar.html.haml index 21accd7b7..005ab4ace 100644 --- a/app/views/explore/_projects_sidebar.html.haml +++ b/app/views/explore/_projects_sidebar.html.haml @@ -1,15 +1,12 @@ -.well.col-md-3.margin_left_10.margin_top_20#explore_sidebar - = link_to t('.add_new_project'), new_project_path, class: 'btn btn-primary btn-mini add_new_project_btn_top' +.well.col-md-2.margin_top_10#explore_sidebar %div - %h3= t('.search') - .margin_left_10 - %form.search#explore_search_form{ action: projects_path } - %input{ type: :hidden, name: 'ref', value: 'explore_project' } - %input.explore_search.margin_top_10{ type: :text, name: 'query', placeholder: t('.enter_string') } - .icon-search.search.submit - - %h3= t('.tags') - .margin_left_10{ style: 'min-height: 100px; padding-left: 15px' } + %h3.margin_left_10= t('.search') + %form.margin_left_10.search#explore_search_form{ action: projects_path } + %input{ type: :hidden, name: 'ref', value: 'explore_project' } + %input.explore_search.margin_top_10{ type: :text, name: 'query', placeholder: t('.enter_string'), title: 'Search Projects' } + .icon-search.search.submit + %h3.margin_left_10= t('.tags') + .margin_left_10{ style: 'min-height: 100px; padding-left: 10px' } .row #tagcloud - @tags.each do |tag| @@ -17,28 +14,24 @@ .margin_left_10 %form.autocomplete-submit{ rel: 'tag_jump' } %input.explore_search.tag_autocomplete.autocompletable#input_tag{ type: :text, placeholder: t('.enter_tag'), - data: { source: '/autocompletes/tags', select: 'submitForm' } } + data: { source: '/autocompletes/tags', select: 'submitForm' }, title: 'Search Tag' } - %p   - %h3= t('.compare') - %form.projects_compare.margin_left_15{ action: '/p/_compare' } + %h3.margin_left_10= t('.compare') + %form.margin_left_10.projects_compare.margin_left_15{ action: '/p/_compare' } - compare_project_inputs.each do |options| - %input.proj.explore_compare{ options } - %input.pull-right.btn.btn-primary.btn-small#compare_btn{ type: 'submit', value: 'Compare' } + %input.proj.explore_compare{ options.merge({title: 'Compare Project'}) } + %input.btn.btn-primary.btn-small#compare_btn{ type: 'submit', value: 'Compare' } - %p   - %p   - %h3= t('.similar') + %h3.margin_left_10= t('.similar') %form.autocomplete-submit.similar_projects.margin_left_10{ rel: 'similar_project_jump' } %input.autocompletable.explore_search#project{ type: 'text', placeholder: t('.enter_project'), - autocomplete: 'off', data: { source: '/autocompletes/project', select: 'submitFormWithId' } } + autocomplete: 'off', data: { source: '/autocompletes/project', select: 'submitFormWithId' }, title: 'Similar Projects' } .icon-search.search.submit %span.error.hidden= t('.invalid_select') - %p   - %h3= t('.add') - %p.justify.margin_left_10.margin_top_20{ style: 'line-height: 20px' } + %h3.margin_left_10= t('.add') + %p.justify.margin_left_10{ style: 'line-height: 20px' } = t('.community') = t('.dont_see_a_project') - .text-center.add_new_project_btn_bottom + .margin_left_10 = link_to t('.add_new_project'), new_project_path, class: 'btn btn-primary btn-small' diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index ac2d7d290..bdf48744a 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -1,5 +1,5 @@ !!! -%html +%html{lang: "en"} %head - if Rails.env.production? = render partial: 'layouts/tracking_scripts/google_analytics' diff --git a/app/views/layouts/partials/_menubar.html.haml b/app/views/layouts/partials/_menubar.html.haml index da4d58e94..db3f55631 100644 --- a/app/views/layouts/partials/_menubar.html.haml +++ b/app/views/layouts/partials/_menubar.html.haml @@ -18,4 +18,4 @@ %a{ href: 'https://community.blackduck.com/s/black-duck-open-hub?tabset-c30ff=d9d77', target: '_blank' }= t :blog %li.menu_item.bdsa %a{ href: bdsa_vulnerabilities_path, target: '_blank' }= t :bdsa - = render 'shared/search.html.haml' + = render 'shared/search.html.haml' diff --git a/app/views/layouts/responsive_project_layout.html.haml b/app/views/layouts/responsive_project_layout.html.haml index ccc7b00b6..398652c27 100644 --- a/app/views/layouts/responsive_project_layout.html.haml +++ b/app/views/layouts/responsive_project_layout.html.haml @@ -1,5 +1,5 @@ !!!5 -%html +%html{lang: "en"} %head - page_title = content_for?(:html_title) ? yield(:html_title).to_s : t('layouts.application.openhub') %title= sanitize(page_title) diff --git a/app/views/layouts/vulnerability.html.haml b/app/views/layouts/vulnerability.html.haml index ae55d9037..6fe346456 100644 --- a/app/views/layouts/vulnerability.html.haml +++ b/app/views/layouts/vulnerability.html.haml @@ -1,5 +1,5 @@ !!! -%html +%html{lang: "en"} %head %meta{ content: 'text/html; charset=UTF-8', 'http-equiv': 'Content-Type' } %meta{ charset: 'utf-8' } diff --git a/config/charting/demographic.yml b/config/charting/demographic.yml index 93f389597..de1a5ea16 100644 --- a/config/charting/demographic.yml +++ b/config/charting/demographic.yml @@ -2,11 +2,10 @@ chart: type: 'pie' renderTo: 'demographics_chart' plotShadow: false - styledMode: true + backgroundColor: 'white' title: text: align: 'right' - y: 60 floating: 'true' style: color: '#000' @@ -15,12 +14,11 @@ tooltip: formatter: '' style: fontSize: '11pt' - padding: '8px' plotOptions: pie: allowPointSelect: true cursor: 'pointer' - innerSize: 80 + innerSize: '40%' slicedOffset: 10 borderColor: '#fff' borderWidth: 0 From d9ac8ab0248d4259cce564bd659f68426854049c Mon Sep 17 00:00:00 2001 From: Priya Rani Date: Tue, 1 Jul 2025 16:10:23 +0530 Subject: [PATCH 06/12] Increase font-size of hot projects table --- app/assets/stylesheets/explore.sass | 24 ++++++++++++++++++- app/views/explore/_hot_projects.html.haml | 2 +- .../explore/_project_demographics.html.haml | 2 +- app/views/explore/_projects_sidebar.html.haml | 2 +- 4 files changed, 26 insertions(+), 4 deletions(-) diff --git a/app/assets/stylesheets/explore.sass b/app/assets/stylesheets/explore.sass index 4bddcdea3..70f51970c 100644 --- a/app/assets/stylesheets/explore.sass +++ b/app/assets/stylesheets/explore.sass @@ -141,4 +141,26 @@ @media (min-width: 768px) .flex-md-row flex-direction: row !important - \ No newline at end of file + +@media (min-width: 1180px) and (max-width: 1366px) + #explore_projects_page + .explore_search + width: 11em + &.tag_autocomplete + width: 11em + .explore_compare + width: 11em + +@media (min-width: 900px) and (max-width: 1180px) + #explore_projects_page + .explore_search + width: 14em + &.tag_autocomplete + width: 14em + .explore_compare + width: 14em + +@media (min-width: 1080px) + #explore_projects_page + #hot_projects thead, #hot_projects tr, #hot_projects td + font-size: 14px \ No newline at end of file diff --git a/app/views/explore/_hot_projects.html.haml b/app/views/explore/_hot_projects.html.haml index 0975883cd..4dcc2211a 100644 --- a/app/views/explore/_hot_projects.html.haml +++ b/app/views/explore/_hot_projects.html.haml @@ -1,4 +1,4 @@ -.col-md-10.margin_top_10 +.col-md-9.col-lg-10.margin_top_10 .d-flex.flex-column.flex-md-row.justify-content-between.mb-3 %h2.hot-projects-header= t('.title') %form{ action: '', rel: 'sort_filter' } diff --git a/app/views/explore/_project_demographics.html.haml b/app/views/explore/_project_demographics.html.haml index 6e030ca9e..d10a96e94 100644 --- a/app/views/explore/_project_demographics.html.haml +++ b/app/views/explore/_project_demographics.html.haml @@ -1,4 +1,4 @@ -.col-md-9#project_demographics +.col-md-9.col-lg-10#project_demographics %h2 = t('.demographics_by') = link_to 'PAI', blog_url_for(:pai_about), target: '_blank' diff --git a/app/views/explore/_projects_sidebar.html.haml b/app/views/explore/_projects_sidebar.html.haml index 005ab4ace..ee07728d5 100644 --- a/app/views/explore/_projects_sidebar.html.haml +++ b/app/views/explore/_projects_sidebar.html.haml @@ -1,4 +1,4 @@ -.well.col-md-2.margin_top_10#explore_sidebar +.well.col-md-3.col-lg-2.margin_top_10#explore_sidebar %div %h3.margin_left_10= t('.search') %form.margin_left_10.search#explore_search_form{ action: projects_path } From 33caba850cf30db2c3aac0da4bf24dd7e74ce587 Mon Sep 17 00:00:00 2001 From: Priya Rani Date: Mon, 7 Jul 2025 16:52:03 +0530 Subject: [PATCH 07/12] OTWO-7439 Fix people page for full width layout --- app/assets/stylesheets/account.sass | 46 +++++++++----- app/assets/stylesheets/badges.sass | 2 +- app/assets/stylesheets/people.sass | 73 ---------------------- app/controllers/people_controller.rb | 2 +- app/views/people/_claimed_person.html.haml | 13 +--- app/views/people/_kudo_rank.html.haml | 4 ++ 6 files changed, 41 insertions(+), 99 deletions(-) delete mode 100644 app/assets/stylesheets/people.sass create mode 100644 app/views/people/_kudo_rank.html.haml diff --git a/app/assets/stylesheets/account.sass b/app/assets/stylesheets/account.sass index cbdaa6d07..7929db4bd 100644 --- a/app/assets/stylesheets/account.sass +++ b/app/assets/stylesheets/account.sass @@ -1,6 +1,6 @@ #accounts_index_page, #people_index_page .account_details - width: 220px + width: 215px margin-left: 15px position: relative height: 128px @@ -62,13 +62,19 @@ bottom: 0px left: 0px .kudo_rank - margin-top: 0px - font-size: 30px + display: flex + flex-direction: column + justify-content: center + align-items: center text-align: center - padding: 42px 5px 0px 5px + font-size: 30px + padding-top: 8px font-weight: 100 - width: 35px color: #183867 + > :first-child + font-size: 24px + font-weight: bold + margin-bottom: 5px .commits_count font-size: 27px line-height: 30px @@ -143,7 +149,7 @@ .grecaptcha-badge display: none @media only all and (min-width: 768px) and (max-width: 1024px) - #accounts_index_page + #accounts_index_page, #people_index_page h1 font-size: 24px margin-bottom: 0 @@ -170,10 +176,8 @@ width: 85px !important .kudo_rank font-size: 18px - padding: 0 + padding-top: 10px font-weight: 500 - margin-top: 30px !important - width: auto .kudo_badge margin-top: 28px !important padding: 0 @@ -184,7 +188,7 @@ #search-dingus button.btn font-size: 10px @media only all and (min-width: 320px) and (max-width: 480px) - #accounts_index_page + #accounts_index_page, #people_index_page h1 font-size: 18px margin-bottom: 0 @@ -194,9 +198,9 @@ margin-bottom: 0 margin-top: 10px .account_details - width: auto + width: 40% .commits_summary - width: auto + width: 100% .commits_count width: auto font-size: 15px @@ -205,9 +209,9 @@ .kudo_rank font-size: 24px padding: 0 - margin-top: 35px + margin-top: 10px .kudo_badge - margin-top: 28px !important + margin-top: 5px !important padding: 0 .language_name width: 90px !important @@ -215,6 +219,7 @@ font-size: 12px .well min-height: 142px + width: 100% .unclaimed_committers_box .header_row .btn-mini font-size: 8px .language_summary @@ -233,3 +238,16 @@ width: auto #search-dingus select width: auto +@media only all and (min-width: 768px) + #accounts_index_page, #people_index_page + .person-card + width: 49% + .well.no_padding.pull-left:nth-of-type(odd) + margin-right: 10px + +@media (min-width: 800px) and (max-width: 1366px) + #accounts_index_page, #people_index_page + .account_details + width: 50%; + .commits_summary + width: 100% \ No newline at end of file diff --git a/app/assets/stylesheets/badges.sass b/app/assets/stylesheets/badges.sass index 0eeafc679..e0b3d433b 100644 --- a/app/assets/stylesheets/badges.sass +++ b/app/assets/stylesheets/badges.sass @@ -68,7 +68,7 @@ .kudo_badge position: inherit !important margin: 0 !important - padding: 40px 13px + padding: 5px 15px height: 0px !important #mini_account_header diff --git a/app/assets/stylesheets/people.sass b/app/assets/stylesheets/people.sass deleted file mode 100644 index c1414651b..000000000 --- a/app/assets/stylesheets/people.sass +++ /dev/null @@ -1,73 +0,0 @@ -@media only all and (min-width: 320px) and (max-width: 480px) - #people_index_page - h1 - font-size: 18px - margin-bottom: 0 - margin-top: 10px - h3 - font-size: 12px - margin-bottom: 0 - margin-top: 10px - .account_details - width: auto - .commits_summary - width: auto - .commits_count - width: auto - font-size: 15px - padding: 31px 0px 12px - line-height: 20px - .kudo_rank - font-size: 24px - padding: 0 - margin-top: 35px - .kudo_badge - margin-top: 28px !important - padding: 0 - .language_name - width: 90px !important - .unclaimed_committers_box .header_row h4 - font-size: 12px - .unclaimed_committers_box .header_row .btn-mini - font-size: 8px - .language_summary - width: 100px !important - #more_account - font-size: 10px - #more_unclaimed - font-size: 10px -@media only all and (min-width: 768px) and (max-width: 1024px) - #people_index_page - h1 - font-size: 24px - margin-bottom: 0 - margin-top: 10px - h3 - font-size: 18px - margin-bottom: 0 - margin-top: 10px - .account_details - width: 142px - margin-left: 5px - .commits_summary - width: 379px - .project_summary - padding: 0 - .commits_count - width: auto - font-size: 15px - padding: 31px 0px 12px - line-height: 20px - .language_summary - width: 100px !important - .language_name - width: 85px !important - .kudo_rank - font-size: 18px - padding: 0 - font-weight: 500 - margin-top: 30px !important - width: auto - .kudo_badge - margin-top: 28px !important - padding: 0 diff --git a/app/controllers/people_controller.rb b/app/controllers/people_controller.rb index a32f49912..f0abd43f5 100644 --- a/app/controllers/people_controller.rb +++ b/app/controllers/people_controller.rb @@ -18,7 +18,7 @@ def query_or_cache_exist def find_index_people @claimed_people = Person.find_claimed(params[:query], 'relevance') .preload(account: :markup) - .paginate(page: 1, per_page: 3) + .paginate(page: 1, per_page: 4) @unclaimed_people = unclaimed_people(params[:query], 'relevance', 3) @unclaimed_people_count = Person::Count.unclaimed_by(params[:query], 'relevance') end diff --git a/app/views/people/_claimed_person.html.haml b/app/views/people/_claimed_person.html.haml index c3d6aed8c..8a4889a0a 100644 --- a/app/views/people/_claimed_person.html.haml +++ b/app/views/people/_claimed_person.html.haml @@ -10,7 +10,7 @@ res end sorted_cbl = cbl.sort_by { |_, v| v[:commits] }.reverse -.well.no_padding +.well.no_padding.pull-left.person-card .pull-left.avatar_new = avatar_for account, size: 128 .pull-left.account_details @@ -25,10 +25,7 @@ %a{ href: account_projects_path(account) }= t('.manages', what: what) %p= t('.open_hub_member_since', when: account.created_at.strftime('%B %Y')) -if only_device? - .pull-left.kudo_rank - = claimed_person.kudo_rank || '1' - .mini-badges-section.pull-left.kudo_badge - = render 'accounts/badges_row', badges: [BadgeDecorator.new(Badge::KudoRankBadge.new(account))] + = render partial: 'kudo_rank', locals: { claimed_person: claimed_person } .pull-left.commits_summary - if vf && vf.commits > 0 && @positions_map.any? .commits_count.pull-left @@ -72,8 +69,4 @@ - else %p.no_commits No commit data to display - unless only_device? - .pull-left.kudo_rank - = claimed_person.kudo_rank || '1' - .mini-badges-section.pull-left.kudo_badge - = render 'accounts/badges_row', badges: [BadgeDecorator.new(Badge::KudoRankBadge.new(account))] - .clear_both + = render partial: 'kudo_rank', locals: { claimed_person: claimed_person } diff --git a/app/views/people/_kudo_rank.html.haml b/app/views/people/_kudo_rank.html.haml new file mode 100644 index 000000000..e20174f82 --- /dev/null +++ b/app/views/people/_kudo_rank.html.haml @@ -0,0 +1,4 @@ +.kudo_rank + = claimed_person.kudo_rank || '1' + .mini-badges-section.pull-left.kudo_badge + = render 'accounts/badges_row', badges: [BadgeDecorator.new(Badge::KudoRankBadge.new(account))] From 440175d133bb68db2f37a784f5ec65edf4b2afac Mon Sep 17 00:00:00 2001 From: Priya Rani Date: Wed, 9 Jul 2025 16:53:09 +0530 Subject: [PATCH 08/12] Fix people page UI for safari --- app/assets/stylesheets/account.sass | 16 +++++++++++----- app/assets/stylesheets/footer.sass | 19 +++++++++---------- app/assets/stylesheets/page.sass | 7 +++++++ app/views/layouts/application.html.haml | 1 + app/views/layouts/partials/_footer.html.haml | 8 -------- .../layouts/partials/_footer_bottom.html.haml | 7 +++++++ app/views/people/_claimed_person.html.haml | 12 ++++++------ 7 files changed, 41 insertions(+), 29 deletions(-) create mode 100644 app/views/layouts/partials/_footer_bottom.html.haml diff --git a/app/assets/stylesheets/account.sass b/app/assets/stylesheets/account.sass index 7929db4bd..4ca4b700f 100644 --- a/app/assets/stylesheets/account.sass +++ b/app/assets/stylesheets/account.sass @@ -162,9 +162,9 @@ width: 142px margin-left: 5px .commits_summary - width: 379px + width: 100% .commits_count - width: auto + width: 16% font-size: 15px padding: 31px 0px 12px line-height: 20px @@ -202,7 +202,7 @@ .commits_summary width: 100% .commits_count - width: auto + width: 16% font-size: 15px padding: 31px 0px 12px line-height: 20px @@ -245,9 +245,15 @@ .well.no_padding.pull-left:nth-of-type(odd) margin-right: 10px -@media (min-width: 800px) and (max-width: 1366px) +@media (min-width: 800px) and (max-width: 1720px) #accounts_index_page, #people_index_page .account_details width: 50%; .commits_summary - width: 100% \ No newline at end of file + width: 100% +@media (min-width: 1720px) and (max-width: 1820px) + #accounts_index_page, #people_index_page + .account_details + width: 190px + .commits_summary + width: 455px diff --git a/app/assets/stylesheets/footer.sass b/app/assets/stylesheets/footer.sass index 534136ad0..1433a52b1 100644 --- a/app/assets/stylesheets/footer.sass +++ b/app/assets/stylesheets/footer.sass @@ -2,7 +2,7 @@ @include footer-colors display: flex flex-direction: column - min-height: 250px + min-height: 220px padding: 2em 2em 1em 2em margin-bottom: 1em margin-top: 1em @@ -28,14 +28,6 @@ a @include footer-colors - > .footer-bottom - @include footer-copyright-colors - margin-top: auto - width: 100% - text-align: center - a - @include footer-copyright-colors - @media (max-width: 768px) .footer-row flex-direction: column @@ -56,4 +48,11 @@ .footer-left a .logo_img - width: 60% !important \ No newline at end of file + width: 60% !important +.footer-bottom + @include footer-copyright-colors + width: 100% + text-align: center + margin-bottom: 10px + a + @include footer-copyright-colors \ No newline at end of file diff --git a/app/assets/stylesheets/page.sass b/app/assets/stylesheets/page.sass index 8db7ac64e..3f87210ca 100644 --- a/app/assets/stylesheets/page.sass +++ b/app/assets/stylesheets/page.sass @@ -25,6 +25,13 @@ header #page width: inherit !important overflow-x: hidden !important +@media only all and (min-width: 320px) and (max-width: 700px) + .actions-div + width: 8em + ul#top_nav_actions + li + a.btn-header + width: 70px @media (min-width: 540px) and (max-width: 1024px) #page diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index bdf48744a..d1f9ca659 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -23,6 +23,7 @@ = render partial: 'layouts/partials/page', locals: { responsive_layout: true } .clear %footer.footer-container= render partial: 'layouts/partials/footer' + = render partial: 'layouts/partials/footer_bottom' = render partial: 'cookies/consent_banner' unless cookies[:cookie_consented] = render partial: 'layouts/partials/js_scripts' diff --git a/app/views/layouts/partials/_footer.html.haml b/app/views/layouts/partials/_footer.html.haml index 10ca2d711..0017eb673 100644 --- a/app/views/layouts/partials/_footer.html.haml +++ b/app/views/layouts/partials/_footer.html.haml @@ -40,11 +40,3 @@ %a{ href: twitter_url, target: '_blank' } %i.icon-twitter %span Follow @ Black Duck Open Hub - -.footer-bottom - %sup © - = Time.current.year - %span{ itemscope: '', itemtype: 'http://schema.org/CreativeWork' } - %span{ itemprop: 'publisher' } - %a{ href: 'http://www.blackduck.com', target: '_blank' }= "Black Duck Software, Inc." - = t('copyright.rights_text') diff --git a/app/views/layouts/partials/_footer_bottom.html.haml b/app/views/layouts/partials/_footer_bottom.html.haml new file mode 100644 index 000000000..00f1a631e --- /dev/null +++ b/app/views/layouts/partials/_footer_bottom.html.haml @@ -0,0 +1,7 @@ +.footer-bottom + %sup © + = Time.current.year + %span{ itemscope: '', itemtype: 'http://schema.org/CreativeWork' } + %span{ itemprop: 'publisher' } + %a{ href: 'http://www.blackduck.com', target: '_blank' }= "Black Duck Software, Inc." + = t('copyright.rights_text') diff --git a/app/views/people/_claimed_person.html.haml b/app/views/people/_claimed_person.html.haml index 8a4889a0a..5d790b7e2 100644 --- a/app/views/people/_claimed_person.html.haml +++ b/app/views/people/_claimed_person.html.haml @@ -60,12 +60,12 @@ %a{ href: project_path(project), title: project.name } - project_icon(project, :small, width: 24, class: 'logo') %a.margin_left_5{ href: project_path(project) }= truncate(project.name, length: 8) - .pull-left.other_language.other_projects - - if more_pos_count > 0 - - pluaral_term = pluralize(more_pos_count, t('.other_project')) - %a.more_commits_padding{ href: account_positions_path(account) }= t('.and_thing', thing: pluaral_term) - - else - %a.more_commits_padding{ href: account_positions_path(account) }= t('.see_commits_by_project') + .pull-left.other_language.other_projects + - if more_pos_count > 0 + - pluaral_term = pluralize(more_pos_count, t('.other_project')) + %a.more_commits_padding{ href: account_positions_path(account) }= t('.and_thing', thing: pluaral_term) + - else + %a.more_commits_padding{ href: account_positions_path(account) }= t('.see_commits_by_project') - else %p.no_commits No commit data to display - unless only_device? From bbde7f89849ac3c7dc82e85d7fa37132e10ada94 Mon Sep 17 00:00:00 2001 From: Priya Rani Date: Wed, 16 Jul 2025 18:01:52 +0530 Subject: [PATCH 09/12] OTWO-7438 Fix UI of Orgs page --- app/assets/stylesheets/orgs.sass | 13 +++---- app/views/explore/_most_active_orgs.html.haml | 10 ++--- app/views/explore/_newest_orgs.html.haml | 6 +-- .../_orgs_by_30_day_commit_volume.html.haml | 39 ++++++++++--------- app/views/explore/_stats_by_sector.html.haml | 8 ++-- app/views/explore/orgs.html.haml | 12 +++--- 6 files changed, 44 insertions(+), 44 deletions(-) diff --git a/app/assets/stylesheets/orgs.sass b/app/assets/stylesheets/orgs.sass index da69909ae..66cb5663c 100644 --- a/app/assets/stylesheets/orgs.sass +++ b/app/assets/stylesheets/orgs.sass @@ -23,7 +23,7 @@ background-color: #f9f9f9 #newest-orgs - width: 32% + padding: 10px 15px 0 23px .row margin-bottom: 15px margin-left: 0px @@ -40,16 +40,15 @@ #orgs_by_30_days_volume min-height: 260px - width: 64% margin-left: 20px + #sort_by + margin-top: 10px #most-active-orgs - width: 32% - padding: 0px 0px 0px 10px border-radius: 0 - margin-bottom: 0px + padding-bottom: 0 .title - margin-top: 7px + margin-top: 5px margin-bottom: 15px .row margin-bottom: 15px @@ -60,7 +59,7 @@ font-weight: bold font-size: 15px .row#active-org-timestamp - font-size: 9px + font-size: 10px font-style: italic margin-bottom: 0px diff --git a/app/views/explore/_most_active_orgs.html.haml b/app/views/explore/_most_active_orgs.html.haml index b1d3eb16f..8732e4391 100644 --- a/app/views/explore/_most_active_orgs.html.haml +++ b/app/views/explore/_most_active_orgs.html.haml @@ -1,20 +1,20 @@ -.well.col-md-4.margin_left_5#most-active-orgs +.well.margin_left_5#most-active-orgs %h2.title= t('.title') - @most_active_orgs.each do |org_thirty_day_activity| - org = org_thirty_day_activity.organization .row - .col-md-3 + .col-md-3.col-xs-3 = link_to org.decorate.icon(:med), organization_path(org), title: org.name, style: 'text-decoration: none', class: 'logo' - .col-md-9 + .col-md-9.col-xs-9 = link_to h(truncate(org.name, length: 24)), organization_path(org), title: org.name .margin_top_10 = link_to org_thirty_day_activity.commits_per_affiliate, organization_path(org, view: 'affiliated_committers') %i.small= t('.commits_or_affiliates') .row.no_margin_bottom#active-org-timestamp - .col-md-6 + .col-md-6.col-xs-6 %p= t('.within_30_days') - .col-md-6.pull-right + .col-md-6.pull-right.col-xs-6 %p.pull-right.margin_right_10 = t '.last_calculated', duration: time_ago_in_words(@most_active_orgs.first.created_at) if @most_active_orgs.first diff --git a/app/views/explore/_newest_orgs.html.haml b/app/views/explore/_newest_orgs.html.haml index ed45ccd0b..5d2a0ecef 100644 --- a/app/views/explore/_newest_orgs.html.haml +++ b/app/views/explore/_newest_orgs.html.haml @@ -1,10 +1,10 @@ -.col-md-4#newest-orgs +#newest-orgs %h2= t '.title' - @newest_orgs.each do |org| .row - .col-md-3 + .col-md-3.col-xs-3 = link_to org.decorate.icon(:med), organization_path(org), style: 'text-decoration: none', title: org.name - .col-md-9 + .col-md-9.col-xs-9 = link_to h(truncate(org.name, length: 24)), organization_path(org), title: org.name .margin_top_10 = link_to t('.projects_count', count: org.projects_count), diff --git a/app/views/explore/_orgs_by_30_day_commit_volume.html.haml b/app/views/explore/_orgs_by_30_day_commit_volume.html.haml index d020ca4d3..7af2602f5 100644 --- a/app/views/explore/_orgs_by_30_day_commit_volume.html.haml +++ b/app/views/explore/_orgs_by_30_day_commit_volume.html.haml @@ -1,24 +1,25 @@ -.col-md-8.no_padding#orgs_by_30_days_volume - %h2.pull-left= t('.title') - .pull-right.nav-select-container#sort_by - %label.pull-left#filter!= t('.filter') - = select_tag(:org_type, options_for_select(OrgThirtyDayActivity::SORT_TYPES), - class: 'chzn-select pull-right', style: 'width:126px') - .clearfix +.no_padding#orgs_by_30_days_volume + .d-flex.flex-column.flex-md-row.justify-content-between.mb-3 + %h2.pull-left= t('.title') + .pull-right.nav-select-container#sort_by + %label.pull-left#filter!= t('.filter') + = select_tag(:org_type, options_for_select(OrgThirtyDayActivity::SORT_TYPES), + class: 'chzn-select pull-right', style: 'width:126px') #org_filter_no_result{ class: @org_by_30_day_commits.empty? ? '' : 'hidden' } %h5 %i.icon-warning-sign = t '.no_results' .busy.hidden#commit_volume_loader - %table.table.table-condensed{ class: @org_by_30_day_commits.empty? ? 'hidden' : '' } - .margin_top_15 - %thead - %tr#header - %th{ style: 'width:25%' }= t '.org' - %th.center{ style: 'width:15%' }= t '.type' - %th.center{ style: 'width:5%' }= t '.size' - %th.center{ style: 'width:15%' }= t '.projects' - %th.center{ style: 'width:15%' }= t '.affiliates' - %th.center{ style: 'width:20%' }= t '30_day_commits' - %tbody#30_day_commit_volume - = render partial: 'org_30_day_activity', collection: @org_by_30_day_commits + .table-responsive + %table.table.table-condensed{ class: @org_by_30_day_commits.empty? ? 'hidden' : '' } + .margin_top_15 + %thead + %tr#header + %th{ style: 'width:20%' }= t '.org' + %th.center{ style: 'width:20%' }= t '.type' + %th.center{ style: 'width:5%' }= t '.size' + %th.center{ style: 'width:15%' }= t '.projects' + %th.center{ style: 'width:15%' }= t '.affiliates' + %th.center{ style: 'width:20%' }= t '30_day_commits' + %tbody#30_day_commit_volume + = render partial: 'org_30_day_activity', collection: @org_by_30_day_commits diff --git a/app/views/explore/_stats_by_sector.html.haml b/app/views/explore/_stats_by_sector.html.haml index e62d9e6ac..293539b7e 100644 --- a/app/views/explore/_stats_by_sector.html.haml +++ b/app/views/explore/_stats_by_sector.html.haml @@ -1,10 +1,10 @@ :ruby orgs_count = @stats_by_sector.map(&:organization_count).max - scale = scale_to(orgs_count) + scale = scale_to(orgs_count) if orgs_count avg_commits = @stats_by_sector.map(&:average_commits).max - gauge_scale = scale_to(avg_commits, 1000) + gauge_scale = scale_to(avg_commits, 1000) if avg_commits -.col-md-8.margin_left_10#stats-by-sector +.margin_left_10#stats-by-sector %h2.margin_bottom_20= t '.title' %table.table{ style: 'border: 1px solid #ccc' } %thead @@ -19,7 +19,7 @@ %td #commit-gauge{ 'data-gauge' => orgs.average_commits.to_s, 'data-gauge-max' => gauge_scale.to_s, class: "gauge-#{orgs.org_type}" } - %td + %td.center .progress#progress-container #progress-bar{ role: 'progressbar', 'aria-valuemax' => scale.to_s, 'aria-valuenow' => orgs.organization_count.to_s, 'aria-valuemin' => '1' } diff --git a/app/views/explore/orgs.html.haml b/app/views/explore/orgs.html.haml index 03473713d..4296b34ad 100644 --- a/app/views/explore/orgs.html.haml +++ b/app/views/explore/orgs.html.haml @@ -4,9 +4,9 @@ %h1.margin_bottom_20= t('.title') .row - = render partial: 'most_active_orgs' - = render partial: 'orgs_by_30_day_commit_volume' -.margin_bottom_20 -.row - = render partial: 'newest_orgs' - = render partial: 'stats_by_sector' + .col-md-3 + = render partial: 'most_active_orgs' + = render partial: 'newest_orgs' + .col-md-9 + = render partial: 'orgs_by_30_day_commit_volume' + = render partial: 'stats_by_sector' From 59b50558450f37ace139ff39f7f012eb4777ce9f Mon Sep 17 00:00:00 2001 From: Priya Rani Date: Tue, 22 Jul 2025 12:14:08 +0530 Subject: [PATCH 10/12] fix table view of show/index on smaller screen --- app/assets/stylesheets/organizations.sass | 15 ++ app/assets/stylesheets/orgs.sass | 8 +- app/assets/stylesheets/sidebar.sass | 10 ++ app/views/explore/_stats_by_sector.html.haml | 33 ++--- .../layouts/partials/_footer_nav.html.haml | 2 +- app/views/organizations/show.html.haml | 6 +- .../show/_affiliated_committers.html.haml | 135 +++++++++--------- .../organizations/show/_header.html.haml | 10 +- 8 files changed, 123 insertions(+), 96 deletions(-) diff --git a/app/assets/stylesheets/organizations.sass b/app/assets/stylesheets/organizations.sass index aa662895c..b727d8b1f 100644 --- a/app/assets/stylesheets/organizations.sass +++ b/app/assets/stylesheets/organizations.sass @@ -46,6 +46,7 @@ tbody.portfolio-projects-table #org_infographic position: relative height: 290px + width: 1000px .about font-size: 12px color: #80539C @@ -209,3 +210,17 @@ form#new_logo @media print a[href]:after content: none !important + +.org-pictogram + display: flex + justify-content: center + align-items: center + max-width: 100% + margin-left: auto + margin-right: auto + +@media only all and (min-width: 320px) and (max-width: 800px) + .org-quick-reference + margin-top: 25px + #project_header + height: 100px \ No newline at end of file diff --git a/app/assets/stylesheets/orgs.sass b/app/assets/stylesheets/orgs.sass index 66cb5663c..40102e273 100644 --- a/app/assets/stylesheets/orgs.sass +++ b/app/assets/stylesheets/orgs.sass @@ -1,6 +1,4 @@ #explore_orgs_page - h1 - margin-left: -10px #orgs_by_30_days_volume label#filter margin-top: 4px @@ -105,3 +103,9 @@ background-color: color-gradient($SECONDARY_SLATE_BLUE, 120) color: white padding: 0 0 0 3px + +@media only all and (min-width: 320px) and (max-width: 480px) + #explore_orgs_page + #newest-orgs + padding: 10px 15px 0 10px + \ No newline at end of file diff --git a/app/assets/stylesheets/sidebar.sass b/app/assets/stylesheets/sidebar.sass index d8a2f583c..cd2eabe04 100644 --- a/app/assets/stylesheets/sidebar.sass +++ b/app/assets/stylesheets/sidebar.sass @@ -112,3 +112,13 @@ @extend .nav-active margin-left: 0px !important padding-left: 0px !important +@media (max-width: 768px) + .footer-navigation + .footer-sidebar + display: flex + flex-direction: row + flex-wrap: wrap + width: 100% + + .actions + width: 50% \ No newline at end of file diff --git a/app/views/explore/_stats_by_sector.html.haml b/app/views/explore/_stats_by_sector.html.haml index 293539b7e..f92d5f625 100644 --- a/app/views/explore/_stats_by_sector.html.haml +++ b/app/views/explore/_stats_by_sector.html.haml @@ -6,20 +6,21 @@ .margin_left_10#stats-by-sector %h2.margin_bottom_20= t '.title' - %table.table{ style: 'border: 1px solid #ccc' } - %thead - %tr{ style: 'background-color: #ccc' } - %th.strong= t '.sector' - %th.strong.center= t '.average' - %th.strong.center= t '.orgs' - %tbody - - @stats_by_sector.each do |orgs| - %tr{ style: 'background-color: #fff' } - %td.strong= Organization::ORG_TYPES.invert[orgs.org_type] - %td - #commit-gauge{ 'data-gauge' => orgs.average_commits.to_s, 'data-gauge-max' => gauge_scale.to_s, class: "gauge-#{orgs.org_type}" } + .table-responsive + %table.table{ style: 'border: 1px solid #ccc' } + %thead + %tr{ style: 'background-color: #ccc' } + %th.strong= t '.sector' + %th.strong.center= t '.average' + %th.strong.center= t '.orgs' + %tbody + - @stats_by_sector.each do |orgs| + %tr{ style: 'background-color: #fff' } + %td.strong= Organization::ORG_TYPES.invert[orgs.org_type] + %td + #commit-gauge{ 'data-gauge' => orgs.average_commits.to_s, 'data-gauge-max' => gauge_scale.to_s, class: "gauge-#{orgs.org_type}" } - %td.center - .progress#progress-container - #progress-bar{ role: 'progressbar', 'aria-valuemax' => scale.to_s, - 'aria-valuenow' => orgs.organization_count.to_s, 'aria-valuemin' => '1' } + %td.center + .progress#progress-container + #progress-bar{ role: 'progressbar', 'aria-valuemax' => scale.to_s, + 'aria-valuenow' => orgs.organization_count.to_s, 'aria-valuemin' => '1' } diff --git a/app/views/layouts/partials/_footer_nav.html.haml b/app/views/layouts/partials/_footer_nav.html.haml index b5b555825..6710aaf45 100644 --- a/app/views/layouts/partials/_footer_nav.html.haml +++ b/app/views/layouts/partials/_footer_nav.html.haml @@ -11,7 +11,7 @@ .col-md-12 .mezzo.margin_bottom_5 .clearfix - .col-xs-10.col-xs-offset-1 + .col-xs-10.col-xs-offset-1.footer-sidebar = render 'layouts/partials/navigator' - elsif page_context[:footer_menu_list] .clearfix.margin_top_15 diff --git a/app/views/organizations/show.html.haml b/app/views/organizations/show.html.haml index 02c7e33f3..8c5a139fa 100644 --- a/app/views/organizations/show.html.haml +++ b/app/views/organizations/show.html.haml @@ -3,18 +3,18 @@ %h2= t('.title') -.col-md-5.pull_left#org_summary +.col-md-7.pull_left#org_summary - if @organization.description.blank? = t('.no_desc') = link_to t('.add_desc'), edit_organization_path(@organization) - else = simple_format @organization.description.strip_tags = render partial: '/shared/add_this', locals: { text: "#{@organization.name} organization" } -.col-md-6.col-md-offset-1 +.col-md-4.col-md-offset-1.org-quick-reference = render partial: 'organizations/show/quick_reference' .col-md-12 - .mezzo.padding_one_top + .mezzo.padding_one_top.org-pictogram = render partial: '/organizations/show/pictogram', locals: { print_icon: true } .mezzo.padding_one_top .org-data-table.margin_left_10.margin_right_10 diff --git a/app/views/organizations/show/_affiliated_committers.html.haml b/app/views/organizations/show/_affiliated_committers.html.haml index 3fbcef1a5..6d18e3eab 100644 --- a/app/views/organizations/show/_affiliated_committers.html.haml +++ b/app/views/organizations/show/_affiliated_committers.html.haml @@ -2,73 +2,72 @@ - if @affiliated_committers.empty? %p= t('organizations.affiliated_committers.no_committers') - else - %table.table.table-striped.table-condensed#orgs_affiliated_list - %thead - %tr{ id: 'dingus-row' } - %td{ colspan: 14 }   - %tr - %th{ rowspan: 2, style: 'width: 170px;' }= t('organizations.affiliated_committers.contrib_name') - %th.center{ rowspan: 2, style: 'width: 80px;' }= t('organizations.affiliated_committers.kudos') - %th{ rowspan: 2, style: 'width: 96px;' } - = image_tag('icons/foss-no-bg.png') - = t('organizations.affiliated_committers.level') - %th.center{ colspan: 2, style: 'width:200px' } - %strong= t('organizations.affiliated_committers.projects_committed_to') - %th{ rowspan: 2, style: 'width: 20px;' }   - %th.center{ colspan: 2, style: 'width:200px' } - %strong= t('organizations.affiliated_committers.most_commits_to') - %th{ rowspan: 2, style: 'width: 20px;' }   - %th.center{ colspan: 2, style: 'width:200px' } - %strong= t('organizations.affiliated_committers.most_recent_commits_on') - %tr - %th.center= t('organizations.affiliated_committers.portfolio') - %th.center= t('organizations.affiliated_committers.other') - %th.center= t('organizations.affiliated_committers.project') - %th.center= t('organizations.affiliated_committers.num_commits') - %th.center= t('organizations.affiliated_committers.project') - %th.center= t('organizations.affiliated_committers.date') - - %tbody - - @affiliated_committers.each do |a| - - stats = organization_affiliated_committers_stats(@stats_map[a.id]) - - next unless stats - - most_committed_project = stats[:most_committed_project] - - most_recent_project = stats[:most_recent_project] - - account_org = Account::OrganizationCore.new(a) + .table-responsive + %table.table.table-striped.table-condensed#orgs_affiliated_list + %thead + %tr{ id: 'dingus-row' } + %td{ colspan: 14 }   + %tr + %th{ rowspan: 2, style: 'width: 170px;' }= t('organizations.affiliated_committers.contrib_name') + %th.center{ rowspan: 2, style: 'width: 80px;' }= t('organizations.affiliated_committers.kudos') + %th{ rowspan: 2, style: 'width: 96px;' } + = image_tag('icons/foss-no-bg.png') + = t('organizations.affiliated_committers.level') + %th.center{ colspan: 2, style: 'width:200px' } + %strong= t('organizations.affiliated_committers.projects_committed_to') + %th{ rowspan: 2, style: 'width: 20px;' }   + %th.center{ colspan: 2, style: 'width:200px' } + %strong= t('organizations.affiliated_committers.most_commits_to') + %th{ rowspan: 2, style: 'width: 20px;' }   + %th.center{ colspan: 2, style: 'width:200px' } + %strong= t('organizations.affiliated_committers.most_recent_commits_on') %tr - %td - %a.float_left{ href: account_path(a) } - = image_tag avatar_img_path(a, 32), size: '32x32', style: 'margin-right:8px;' - %a{ href: account_path(a), title: h(a.name) } - = a.name.truncate(20) - - if @current_user && @current_user.id == a.id - %span= t('organizations.affiliated_committers.you') - %td.center!= avatar_small_laurels(a.person.kudo_rank) - %td.center - .mini-badges-section{ style: 'margin:0; position:relative;height: 0px' } - = render 'accounts/badges_row', - badges: [BadgeDecorator.new(Badge::FosserBadge.new(a, positions_count: a.positions.count))], - hide_foss_logo: true - - contribs_to_org = account_org.contributions_to_org_portfolio.to_i - - contribs_to_outside = account_org.contributions_outside_org.to_i - %td.center= (contribs_to_org == 0) ? '—'.html_safe : contribs_to_org - %td.center= (contribs_to_outside == 0) ? '—'.html_safe : contribs_to_outside - %td.center   - %td.center - %a.logo-small{ href: project_path(most_committed_project), style: 'display: inline-block', - title: most_committed_project.name } - = most_committed_project.decorate.icon(:small) - %td.center= stats[:max_commits] - %td.center   - %td.center - %a.logo-small{ href: project_path(most_recent_project), title: most_recent_project.name, - style: 'display: inline-block' } - = most_recent_project.decorate.icon(:small) - %td.center= stats[:last_checkin].to_date.to_s(:by) if stats[:last_checkin] - = render partial: 'pagination', locals: { count: @affiliated_committers.total_entries, - text: t('organizations.affiliated_committers.see_all', - num: @organization.affiliators_count), - url: affiliated_committers_organization_path(@organization), - collection: @affiliated_committers } + %th.center= t('organizations.affiliated_committers.portfolio') + %th.center= t('organizations.affiliated_committers.other') + %th.center= t('organizations.affiliated_committers.project') + %th.center= t('organizations.affiliated_committers.num_commits') + %th.center= t('organizations.affiliated_committers.project') + %th.center= t('organizations.affiliated_committers.date') -.clear   + %tbody + - @affiliated_committers.each do |a| + - stats = organization_affiliated_committers_stats(@stats_map[a.id]) + - next unless stats + - most_committed_project = stats[:most_committed_project] + - most_recent_project = stats[:most_recent_project] + - account_org = Account::OrganizationCore.new(a) + %tr + %td + %a.float_left{ href: account_path(a) } + = image_tag avatar_img_path(a, 32), size: '32x32', style: 'margin-right:8px;' + %a{ href: account_path(a), title: h(a.name) } + = a.name.truncate(20) + - if @current_user && @current_user.id == a.id + %span= t('organizations.affiliated_committers.you') + %td.center!= avatar_small_laurels(a.person.kudo_rank) + %td.center + .mini-badges-section{ style: 'margin:0; position:relative;height: 0px' } + = render 'accounts/badges_row', + badges: [BadgeDecorator.new(Badge::FosserBadge.new(a, positions_count: a.positions.count))], + hide_foss_logo: true + - contribs_to_org = account_org.contributions_to_org_portfolio.to_i + - contribs_to_outside = account_org.contributions_outside_org.to_i + %td.center= (contribs_to_org == 0) ? '—'.html_safe : contribs_to_org + %td.center= (contribs_to_outside == 0) ? '—'.html_safe : contribs_to_outside + %td.center   + %td.center + %a.logo-small{ href: project_path(most_committed_project), style: 'display: inline-block', + title: most_committed_project.name } + = most_committed_project.decorate.icon(:small) + %td.center= stats[:max_commits] + %td.center   + %td.center + %a.logo-small{ href: project_path(most_recent_project), title: most_recent_project.name, + style: 'display: inline-block' } + = most_recent_project.decorate.icon(:small) + %td.center= stats[:last_checkin].to_date.to_s(:by) if stats[:last_checkin] + = render partial: 'pagination', locals: { count: @affiliated_committers.total_entries, + text: t('organizations.affiliated_committers.see_all', + num: @organization.affiliators_count), + url: affiliated_committers_organization_path(@organization), + collection: @affiliated_committers } diff --git a/app/views/organizations/show/_header.html.haml b/app/views/organizations/show/_header.html.haml index ce0d35a3b..b866a60f9 100644 --- a/app/views/organizations/show/_header.html.haml +++ b/app/views/organizations/show/_header.html.haml @@ -1,14 +1,12 @@ -.col-md-1.no_padding#org_icon +.col-md-1.col-xs-3.no_padding#org_icon = @organization.decorate.icon(:med) -.col-md-11#project_header - .pull-left - %h1.margin_top_10= link_to h(@organization.name), organization_path(@organization) - .pull-left.margin_left_25.margin_top_15 +.col-md-11.col-xs-9#project_header + %h1.margin_top_10= link_to h(@organization.name), organization_path(@organization) + .settings-link = link_to settings_organization_path(@organization) do %icon.icon-cogs = t('.settings') -.clearfix   .col-md-12 .mezzo = render partial: 'layouts/partials/alert' From 7e6e7fa470a09ad0e93cb3411739a53437fff087 Mon Sep 17 00:00:00 2001 From: Priya Rani Date: Wed, 29 Oct 2025 18:26:52 +0530 Subject: [PATCH 11/12] Fix account reference in kudo_rank --- Gemfile.lock | 2 +- app/views/people/_kudo_rank.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index b7d622f56..9136d0f07 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2002,7 +2002,7 @@ GEM puma (6.6.0) nio4r (~> 2.0) racc (1.8.1) - rack (2.2.19) + rack (2.2.20) rack-session (1.0.2) rack (< 3) rack-test (2.2.0) diff --git a/app/views/people/_kudo_rank.html.haml b/app/views/people/_kudo_rank.html.haml index e20174f82..13c7cf606 100644 --- a/app/views/people/_kudo_rank.html.haml +++ b/app/views/people/_kudo_rank.html.haml @@ -1,4 +1,4 @@ .kudo_rank = claimed_person.kudo_rank || '1' .mini-badges-section.pull-left.kudo_badge - = render 'accounts/badges_row', badges: [BadgeDecorator.new(Badge::KudoRankBadge.new(account))] + = render 'accounts/badges_row', badges: [BadgeDecorator.new(Badge::KudoRankBadge.new(claimed_person.account))] From 9050ef58e245257b5ec31244000a07d2ee01f7db Mon Sep 17 00:00:00 2001 From: Priya R Date: Wed, 19 Nov 2025 15:57:32 +0530 Subject: [PATCH 12/12] OTWO-7470 Make Organization pages responsive for Mobile and Tablet (#1849) * Fix alignment on orgs index page * Fix footer-nav of orgs page * Fix orgs settings page * Fix orgs projects UI * Fix orgs settings basic page * Fix orgs manager UI * Fix orgs permissions page UI * Fix orgs logo page UI * Make the links in org header clickable * Fix orgs projects page UI * Fix orgs edits page UI * Fix test cases --- app/assets/stylesheets/edits.sass | 4 + app/assets/stylesheets/organizations.sass | 86 +++++++++- app/assets/stylesheets/orgs.sass | 10 +- app/assets/stylesheets/search-dingus.sass | 1 - app/assets/stylesheets/sidebar.sass | 10 +- app/views/edits/_edit.html.haml | 15 +- app/views/explore/_stats_by_sector.html.haml | 2 +- .../layouts/partials/_footer_nav.html.haml | 1 - .../layouts/partials/_navigator.html.haml | 3 +- .../logos/_about_organization_logos.html.haml | 17 +- app/views/logos/_fields.html.haml | 58 +++---- .../organization_widgets/index.html.haml | 5 +- .../organizations/_about_basics.html.haml | 8 +- .../organizations/_about_managers.html.haml | 4 +- app/views/organizations/_fields.html.haml | 2 +- .../organizations/_manage_project.html.haml | 6 +- .../_manage_projects_header.html.haml | 6 +- app/views/organizations/edit.html.haml | 2 +- .../organizations/list_managers.html.haml | 41 +++-- .../organizations/manage_projects.html.haml | 27 ++-- app/views/organizations/settings.html.haml | 19 +-- app/views/organizations/show.html.haml | 2 +- .../organizations/show/_header.html.haml | 8 +- .../show/_portfolio_projects.html.haml | 153 +++++++++--------- app/views/permissions/show.html.haml | 4 +- .../_page_entries_info.html.haml | 2 +- .../search_dingus/_search_bar.html.haml | 2 +- .../shared/search_dingus/_sort.html.haml | 11 +- app/views/widgets/_widget.html.haml | 8 +- test/controllers/licenses_controller_test.rb | 2 +- .../organizations_controller_test.rb | 2 +- test/controllers/projects_controller_test.rb | 2 +- 32 files changed, 302 insertions(+), 221 deletions(-) diff --git a/app/assets/stylesheets/edits.sass b/app/assets/stylesheets/edits.sass index 7cc119c7d..03f6b4ece 100644 --- a/app/assets/stylesheets/edits.sass +++ b/app/assets/stylesheets/edits.sass @@ -54,3 +54,7 @@ position: absolute top: 50% left: 50% +@media only all and (min-width: 320px) and (max-width: 800px) + .edit + span.editor_details + display: block diff --git a/app/assets/stylesheets/organizations.sass b/app/assets/stylesheets/organizations.sass index b727d8b1f..ed97e7017 100644 --- a/app/assets/stylesheets/organizations.sass +++ b/app/assets/stylesheets/organizations.sass @@ -46,7 +46,7 @@ tbody.portfolio-projects-table #org_infographic position: relative height: 290px - width: 1000px + min-width: 1000px .about font-size: 12px color: #80539C @@ -187,7 +187,6 @@ tbody.portfolio-projects-table pointer-events: none !important /* ORG -- Infographics -- END */ - form#new_logo input size: 12px @@ -197,16 +196,34 @@ form#new_logo color: black &::-webkit-input-placeholder color: black + a.btn-refresh + height: 43px + display: inline-flex + align-items: center + background-color: #8f908f !important #organizations_create_page, #organizations_new_page h1 margin-bottom: 15px margin-left: -15px +#organizations_edit_page + input#organization_homepage_url, input#organization_name + width: 83% + input#organization_vanity_url + width: 375px + label.availability-preview + display: block + #org_summary p word-wrap: break-word +td + span#average_rating_stars + display: flex + justify-content: center + @media print a[href]:after content: none !important @@ -218,9 +235,72 @@ form#new_logo max-width: 100% margin-left: auto margin-right: auto + overflow-x: auto + +#organizations_settings_page + .settings_module + height: 100px + .settings_content + padding-left: 50px +#organization_widgets_index_page + .row + margin-left: 15px + .project_content_title + height: auto +#organizations_projects_page + #portfolio_projects_list + padding: 0 5px +.row.org_header_row + margin-left: 0 + +#organizations_manage_projects_page + .claim_project + margin-bottom: 10px @media only all and (min-width: 320px) and (max-width: 800px) .org-quick-reference margin-top: 25px #project_header - height: 100px \ No newline at end of file + height: 80px + + #organizations_settings_page + .settings_content + padding-left: 20px + #organization_widgets_index_page + .row + margin-left: 0 + #organizations_manage_projects_page, #edits_index_page + button.btn-refresh + padding: 0 8px + +@media only all and (min-width: 320px) and (max-width: 480px) + #organizations_settings_page, #organization_widgets_index_page, #organizations_projects_page + .mezzo + margin-bottom: 5px + #organizations_edit_page + input#organization_vanity_url + width: 20% + #logos_new_page + #logo_url + width: 95% + #organizations_manage_projects_page, #edits_index_page + #search-dingus .col-md-4 #sort_by + float: none + #search-dingus + .col-md-5, .col-md-4 + width: auto + padding-left: 25px !important + .col-xs-12.no_padding_left > #sort_by + margin-top: 10px + #query + width: 40% + #sort_by + label + width: 125px + #edits_index_page + #human_edits, #enlistment_edits + display: block + float: none !important + margin-right: 0 + span + margin-left: 20px diff --git a/app/assets/stylesheets/orgs.sass b/app/assets/stylesheets/orgs.sass index 40102e273..5da7baf0c 100644 --- a/app/assets/stylesheets/orgs.sass +++ b/app/assets/stylesheets/orgs.sass @@ -1,5 +1,9 @@ #explore_orgs_page #orgs_by_30_days_volume + min-height: 260px + margin-left: 10px + #sort_by + margin-top: 10px label#filter margin-top: 4px td a @@ -36,12 +40,6 @@ font-weight: bold font-size: 15px - #orgs_by_30_days_volume - min-height: 260px - margin-left: 20px - #sort_by - margin-top: 10px - #most-active-orgs border-radius: 0 padding-bottom: 0 diff --git a/app/assets/stylesheets/search-dingus.sass b/app/assets/stylesheets/search-dingus.sass index 6b0bf5eb6..d50a2363f 100644 --- a/app/assets/stylesheets/search-dingus.sass +++ b/app/assets/stylesheets/search-dingus.sass @@ -23,7 +23,6 @@ height: 34px border-top: 10px input - width: 180px color: #000 select width: 150px diff --git a/app/assets/stylesheets/sidebar.sass b/app/assets/stylesheets/sidebar.sass index cd2eabe04..f30f3287b 100644 --- a/app/assets/stylesheets/sidebar.sass +++ b/app/assets/stylesheets/sidebar.sass @@ -13,11 +13,13 @@ .nav-active @include bottom-nav-active-colors margin-left: -3px + width: 75% .nav-hover @include bottom-nav-hover-colors border-radius: 0px margin-left: -3px + width: 75% .navbar-justify border-radius: 0px @@ -30,14 +32,14 @@ padding: 6px margin-top: 2px .footer-nav + li + width: 75% &.nav-active @extend .nav-active - margin-left: 15px - padding-left: 0px .footer-nav &:hover @extend .nav-hover - margin-left: 15px + margin-left: -3px padding-left: 18px border-top: -10px .footer-navbar, h4 @@ -110,8 +112,6 @@ font-size: 12px !important &.nav-active @extend .nav-active - margin-left: 0px !important - padding-left: 0px !important @media (max-width: 768px) .footer-navigation .footer-sidebar diff --git a/app/views/edits/_edit.html.haml b/app/views/edits/_edit.html.haml index 52b1a54d6..48445782e 100644 --- a/app/views/edits/_edit.html.haml +++ b/app/views/edits/_edit.html.haml @@ -14,11 +14,12 @@ - else = avatar_for(edit.account) .inside - %p.strong.nomargin{ class: edit_title_class(edit) } - = link_to edit.id, show_edit_path(edit), class: 'show_edit_btn', remote: true, + %p.nomargin{ class: edit_title_class(edit) } + %span.strong + = link_to edit.id, show_edit_path(edit), class: 'show_edit_btn', remote: true, data: { toggle: 'modal', target: '#edit-details.modal', keyboard: true } - %span - #{edit_show_subject(edit)} - %p - by - = link_to h(edit.account.name), account_path(edit.account) - %span.date= edit_humanize_datetime(edit.created_at) + %span - #{edit_show_subject(edit)} + %span.editor_details + by + = link_to h(edit.account.name), account_path(edit.account) + %span.date= edit_humanize_datetime(edit.created_at) diff --git a/app/views/explore/_stats_by_sector.html.haml b/app/views/explore/_stats_by_sector.html.haml index f92d5f625..a1d54d0b6 100644 --- a/app/views/explore/_stats_by_sector.html.haml +++ b/app/views/explore/_stats_by_sector.html.haml @@ -12,7 +12,7 @@ %tr{ style: 'background-color: #ccc' } %th.strong= t '.sector' %th.strong.center= t '.average' - %th.strong.center= t '.orgs' + %th.strong= t '.orgs' %tbody - @stats_by_sector.each do |orgs| %tr{ style: 'background-color: #fff' } diff --git a/app/views/layouts/partials/_footer_nav.html.haml b/app/views/layouts/partials/_footer_nav.html.haml index 6710aaf45..f9cb386ed 100644 --- a/app/views/layouts/partials/_footer_nav.html.haml +++ b/app/views/layouts/partials/_footer_nav.html.haml @@ -10,7 +10,6 @@ .row .col-md-12 .mezzo.margin_bottom_5 - .clearfix .col-xs-10.col-xs-offset-1.footer-sidebar = render 'layouts/partials/navigator' - elsif page_context[:footer_menu_list] diff --git a/app/views/layouts/partials/_navigator.html.haml b/app/views/layouts/partials/_navigator.html.haml index ecb3ef3be..d63c772a7 100644 --- a/app/views/layouts/partials/_navigator.html.haml +++ b/app/views/layouts/partials/_navigator.html.haml @@ -1,5 +1,6 @@ +- page_column = page_context[:footer_menu_list].count == 2 ? 6 : 3 - page_context[:footer_menu_list].each do |section| - .actions.margin_top_20.margin_bottom_40{ class: ('col-md-3 col-xs-3 no_padding' if page_context[:nav_type].eql?('footer_nav')) } + .actions.margin_top_20.margin_bottom_40{ class: ("col-md-#{page_column} col-xs-#{page_column} no_padding" if page_context[:nav_type].eql?('footer_nav')) } %ul.nav.nav-stacked.nav-pills - header, *links = section - header_class, header_name, header_url, header_type = header diff --git a/app/views/logos/_about_organization_logos.html.haml b/app/views/logos/_about_organization_logos.html.haml index 9ad2cd48a..4a9962d47 100644 --- a/app/views/logos/_about_organization_logos.html.haml +++ b/app/views/logos/_about_organization_logos.html.haml @@ -1,11 +1,12 @@ %h4.nomargin %col-md.soft= t('about') = t('.title') -.col-md-5 - %ul.margin_left_20.margin_top_10 - %li= t('.first') - %li= t('.second') - %li= t('.third') -.col-md-5 - %ul.margin_left_20.margin_top_10 - %li= t('.fourth') +.margin_top_10 + .col-md-5 + %ul.margin_left_20 + %li= t('.first') + %li= t('.second') + .col-md-5 + %ul.margin_left_20 + %li= t('.third') + %li= t('.fourth') diff --git a/app/views/logos/_fields.html.haml b/app/views/logos/_fields.html.haml index 1e3ea72f1..41d1a4965 100644 --- a/app/views/logos/_fields.html.haml +++ b/app/views/logos/_fields.html.haml @@ -1,35 +1,34 @@ .row - .col-md-12 - .col-md-3.col - %h6= t('.title') - = @parent.decorate.icon(:med) + .col-md-3.col.col-sm-3.col-xs-12 + %h6= t('.title') + = @parent.decorate.icon(:med) - .col-md-9.col - - if logged_in? && @parent.edit_authorized? - %h6= t('.head.first') - %p= t('.body.first') - .col-md-10.no_margin_left{ style: 'padding: 0;' } - .col-md-8.no_margin_left.ace-file-input.margin_bottom_5{ style: 'padding: 0;' } - = f.file_field :attachment, class: 'new_file_upload', accept: 'image/*', - 'data_max_size' => Logo::FILE_SIZE_LIMIT.max - %p.margin_bottom_5 - = f.text_field :url, value: @logo.url, placeholder: t('.placeholder'), class: 'col-md-5' - - error_tag @logo, :url - - error_tag @logo, :attachment_content_type if @logo.url.present? && @logo.errors[:url].blank? - - error_tag @logo, :attachment_file_size - %div - - if @logo.attachment.url.blank? - - if @logo.attachment_file_name.blank? - - error_tag @logo, :attachment_file_name - - else - - error_tag @logo, :attachment_content_type - - else - %h6= t('.head.second') - - if logged_in? - %p= t('.message', login: current_user.login) + .col-md-9.col.col-sm-9.col-xs-12 + - if logged_in? && @parent.edit_authorized? + %h6= t('.head.first') + %p= t('.body.first') + .col-md-10.no_margin_left{ style: 'padding: 0;' } + .col-md-8.no_margin_left.ace-file-input.margin_bottom_5{ style: 'padding: 0;' } + = f.file_field :attachment, class: 'new_file_upload', accept: 'image/*', + 'data_max_size' => Logo::FILE_SIZE_LIMIT.max + %p.margin_bottom_5 + = f.text_field :url, value: @logo.url, placeholder: t('.placeholder'), class: 'col-md-5' + - error_tag @logo, :url + - error_tag @logo, :attachment_content_type if @logo.url.present? && @logo.errors[:url].blank? + - error_tag @logo, :attachment_file_size + %div + - if @logo.attachment.url.blank? + - if @logo.attachment_file_name.blank? + - error_tag @logo, :attachment_file_name + - else + - error_tag @logo, :attachment_content_type + - else + %h6= t('.head.second') + - if logged_in? + %p= t('.message', login: current_user.login) .row - .col-md-12{ class: @organization ? 'hidden' : '' } + .col-md-12.col-sm-12.col-xs-12{ class: @organization ? 'hidden' : '' } %h5= t('.head.third') %p = t('.body.second') @@ -51,7 +50,8 @@ %label{ for: 'logo_' + logo.id.to_s }= label .row.margin_top_30 - .col-md-12 + .col-md-3.col-sm-3 + .col-md-9.col-sm-9 .actions - if logged_in? && @parent.edit_authorized? %input.btn.btn-sm.btn-primary{ type: 'submit', value: t('.button.save') } diff --git a/app/views/organization_widgets/index.html.haml b/app/views/organization_widgets/index.html.haml index d255a49ae..9096f2e9b 100644 --- a/app/views/organization_widgets/index.html.haml +++ b/app/views/organization_widgets/index.html.haml @@ -5,6 +5,5 @@ %h2= t('.title') %p= t('.embed') -.clearfix - - @widgets.each do |widget| - = render partial: 'widget', locals: { widget: widget, type: 'organization' } +- @widgets.each do |widget| + = render partial: 'widget', locals: { widget: widget, type: 'organization' } diff --git a/app/views/organizations/_about_basics.html.haml b/app/views/organizations/_about_basics.html.haml index e441b4e0d..233aa5317 100644 --- a/app/views/organizations/_about_basics.html.haml +++ b/app/views/organizations/_about_basics.html.haml @@ -1,7 +1,7 @@ -%h4.nomargin - %span.soft= t('.about') - = t('.basics') -.col-md-6 +.col-md-11 + %h4.nomargin + %span.soft= t('.about') + = t('.basics') %ul.margin_left_25.margin_top_10 %li = t('.info') diff --git a/app/views/organizations/_about_managers.html.haml b/app/views/organizations/_about_managers.html.haml index fde73fe21..18d85cb1e 100644 --- a/app/views/organizations/_about_managers.html.haml +++ b/app/views/organizations/_about_managers.html.haml @@ -1,8 +1,8 @@ -.col-md-12.margin_top_20 +.col-md-12.col-sm-12.margin_top_20 %h4.nomargin %span.soft.margin_left_20= t('.about') = t('.managers') - .col-md-6.margin_left_20 + .col-md-10.margin_left_20 = t('.ability') %ul.margin_left_30 %li= t('.limit') diff --git a/app/views/organizations/_fields.html.haml b/app/views/organizations/_fields.html.haml index 16759848b..ea3b40284 100644 --- a/app/views/organizations/_fields.html.haml +++ b/app/views/organizations/_fields.html.haml @@ -16,7 +16,7 @@ 'data-original-value' => Organization.find_by(id: @organization).try(:vanity_url), 'data-ajax-path' => organization_check_availabilities_path, 'data-preview-base-url' => organizations_url, - autocomplete: 'off', style: 'width: 375px' + autocomplete: 'off' = render 'shared/availability_preview' - error_tag @organization, :vanity_url, class: 'error vanity_url' diff --git a/app/views/organizations/_manage_project.html.haml b/app/views/organizations/_manage_project.html.haml index 805b58a83..455da55d0 100644 --- a/app/views/organizations/_manage_project.html.haml +++ b/app/views/organizations/_manage_project.html.haml @@ -1,14 +1,14 @@ %td %a.logo.med{ href: project_path(p) } = p.decorate.icon(:med, width: 48) -%td= link_to truncate(h(p.name), length: 20), project_path(p), title: p.name +%td.col-md-1= link_to truncate(h(p.name), length: 20), project_path(p), title: p.name %td.center{ style: 'padding-right:15px;' }= p.user_count %td.center{ style: 'padding-right:15px;' }= p.best_analysis.code_total -%td.left +%td.center .project_activity_margin_top{ style: 'position: relative; top: -15px' } - project_activity_level_class(p, :fifteen) %td.center{ style: 'padding-right:15px;' }= p.active_committers -%td.center +%td.center.col-md-1 - if p.rating_average.to_i.zero? = t('.none') - else diff --git a/app/views/organizations/_manage_projects_header.html.haml b/app/views/organizations/_manage_projects_header.html.haml index 006245b05..7109c16b2 100644 --- a/app/views/organizations/_manage_projects_header.html.haml +++ b/app/views/organizations/_manage_projects_header.html.haml @@ -1,8 +1,8 @@ %tr.manage_projects_header %th   - %th.col-md-3.center= t('.name') - %th.col-md-1= t('.i_use') - %th.center= t('.lines_of_code') + %th.col-md-1= t('.name') + %th.col-md-1.center= t('.i_use') + %th.col-md-1.center= t('.lines_of_code') %th.col-md-1.center{ style: 'padding-left:5px;' }   %th.col-md-1.center= t('.committers') %th.col-md-1.center= t('.rating') diff --git a/app/views/organizations/edit.html.haml b/app/views/organizations/edit.html.haml index 674718f11..73b458334 100644 --- a/app/views/organizations/edit.html.haml +++ b/app/views/organizations/edit.html.haml @@ -14,4 +14,4 @@ class: 'center-block', style: 'width:650px' do |f| = render partial: 'fields', locals: { f: f } -= render partial: 'about_basics' + = render partial: 'about_basics' diff --git a/app/views/organizations/list_managers.html.haml b/app/views/organizations/list_managers.html.haml index a16bd07df..01ae23d87 100644 --- a/app/views/organizations/list_managers.html.haml +++ b/app/views/organizations/list_managers.html.haml @@ -14,27 +14,26 @@ = render partial: 'managers/new_button' - else .row - .col-md-1 -   - .col-md-11 + .margin_left_20 - @managers.each do |manager| - .row.padding_one_top - .col-md-11 - .pull-left - = avatar_for(manager.person, size: 60) - .col-md-9.pull-left - %h4.soft.nomargin.no_margin_top - = link_to h(manager.name), account_url(manager) - %p.margin_top_10 - - if logged_in? && @organization.edit_authorized? - - link_values = manager_link(manager, @organization) - = link_to link_values[:path], link_values[:options] do - %i.icon-trash= t('.remove').titleize - - else - = link_to '#', class: "btn btn-mini btn-danger #{logged_in? ? 'disabled' : 'needs_login'}" do - %i.icon-trash= t('.remove') - .clearfix   - = render partial: 'managers/new_button' + .col-md-3.col-sm-6 + .row.padding_one_top + .col-md-11 + .pull-left + = avatar_for(manager.person, size: 60) + .col-md-9.pull-left + %h4.soft.nomargin.no_margin_top + = link_to h(manager.name), account_url(manager) + %p.margin_top_10 + - if logged_in? && @organization.edit_authorized? + - link_values = manager_link(manager, @organization) + = link_to link_values[:path], link_values[:options] do + %i.icon-trash= t('.remove').titleize + - else + = link_to '#', class: "btn btn-mini btn-danger #{logged_in? ? 'disabled' : 'needs_login'}" do + %i.icon-trash= t('.remove') + .clearfix   + .margin_left_20= render partial: 'managers/new_button' -= render partial: 'about_managers' + = render partial: 'about_managers' diff --git a/app/views/organizations/manage_projects.html.haml b/app/views/organizations/manage_projects.html.haml index 693feb397..c5f334b98 100644 --- a/app/views/organizations/manage_projects.html.haml +++ b/app/views/organizations/manage_projects.html.haml @@ -9,18 +9,19 @@ .col-md-12 = render 'shared/search_dingus', collection: @projects, sort_context: :claim_projects_list, no_match_found_type: :none - %table.table.table-striped.table-condensed - %thead - = render partial: 'manage_projects_header' - %tbody - - @projects.each do |p| - %tr - = render partial: 'manage_project', locals: { p: p } - %td.center - - if logged_in? && @organization.edit_authorized? - = render partial: 'active_remove_project_button', locals: { p: p } - - else - = disabled_button(bootstrap_icon('icon-trash', t('.remove')), class: 'btn-danger btn-mini') + .table-responsive + %table.table.table-striped.table-condensed + %thead + = render partial: 'manage_projects_header' + %tbody + - @projects.each do |p| + %tr + = render partial: 'manage_project', locals: { p: p } + %td.center + - if logged_in? && @organization.edit_authorized? + = render partial: 'active_remove_project_button', locals: { p: p } + - else + = disabled_button(bootstrap_icon('icon-trash', t('.remove')), class: 'btn-danger btn-mini') = will_paginate @projects .clearfix @@ -29,7 +30,7 @@ = render partial: 'shared/alert', locals: { message: t('.no_results') } if @projects.empty? && params[:query].present? - if logged_in? && @organization.edit_authorized? - = link_to claim_projects_list_organization_path(@organization), class: 'btn btn-small btn-primary' do + = link_to claim_projects_list_organization_path(@organization), class: 'btn btn-small btn-primary claim_project' do %i.icon-plus-sign = t('.claim_link') - else diff --git a/app/views/organizations/settings.html.haml b/app/views/organizations/settings.html.haml index 3e02fa4c3..b21d59474 100644 --- a/app/views/organizations/settings.html.haml +++ b/app/views/organizations/settings.html.haml @@ -3,43 +3,40 @@ page_context[:select_top_menu_nav] = 'select_organizations' page_context[:select_footer_nav] = :settings -%h2.pull-left= t('settings') -.clearfix +%h2= t('settings') -.row.margin_bottom_20 - .col-md-4.settings_module +.row.margin_bottom_20.settings_content + .col-lg-4.col-sm-6.settings_module %h4.nomargin = link_to t('.basics'), edit_organization_path(@organization) %span.pull-left %a.module_icon.basics{ href: edit_organization_path(@organization) } %span.pull-left.settings_description= t('.name_description_and_url') - .col-md-4.settings_module + .col-lg-4.col-sm-6.settings_module %h4.nomargin = link_to t('managers_link_name'), list_managers_organization_path(@organization) %span.pull-left %a.module_icon.managers{ href: list_managers_organization_path(@organization) } %span.pull-left.settings_description= t('.users_who_manage') - .col-md-4.settings_module + .col-lg-4.col-sm-6.settings_module %h4.nomargin = link_to t('.edit_history'), organization_edits_path(@organization) %span.pull-left %a.module_icon.history{ href: organization_edits_path(@organization) } %span.pull-left.settings_description= t('.list_of_recent_activity') - -.row.margin_bottom_20 - .col-md-4.settings_module + .col-lg-4.col-sm-6.settings_module %h4.nomargin = link_to t('logo'), new_organization_logos_path(@organization) %span.pull-left %a.module_icon.logo{ href: new_organization_logos_path(@organization) } %span.pull-left.settings_description= t('.logo_displayed_for_org') - .col-md-4.settings_module + .col-lg-4.col-sm-6.settings_module %h4.nomargin = link_to t('.manage_projects'), manage_projects_organization_path(@organization) %span.pull-left %a.module_icon.orgs_manage_projects{ href: manage_projects_organization_path(@organization) } %span.pull-left.settings_description= t('.held_projects') - .col-md-4.settings_module + .col-lg-4.col-sm-6.settings_module %h4.nomargin = link_to t('.permissions'), permissions_organization_path(@organization) %span.pull-left diff --git a/app/views/organizations/show.html.haml b/app/views/organizations/show.html.haml index 8c5a139fa..4d441b684 100644 --- a/app/views/organizations/show.html.haml +++ b/app/views/organizations/show.html.haml @@ -3,7 +3,7 @@ %h2= t('.title') -.col-md-7.pull_left#org_summary +.col-md-7#org_summary - if @organization.description.blank? = t('.no_desc') = link_to t('.add_desc'), edit_organization_path(@organization) diff --git a/app/views/organizations/show/_header.html.haml b/app/views/organizations/show/_header.html.haml index b866a60f9..4dd221968 100644 --- a/app/views/organizations/show/_header.html.haml +++ b/app/views/organizations/show/_header.html.haml @@ -1,12 +1,12 @@ -.col-md-1.col-xs-3.no_padding#org_icon +.col-md-1.col-xs-2.no_padding#org_icon = @organization.decorate.icon(:med) -.col-md-11.col-xs-9#project_header +.col-md-11.col-xs-10#project_header %h1.margin_top_10= link_to h(@organization.name), organization_path(@organization) .settings-link = link_to settings_organization_path(@organization) do %icon.icon-cogs = t('.settings') - -.col-md-12 +.clearfix   +.col-md-12.col-xs-12 .mezzo = render partial: 'layouts/partials/alert' diff --git a/app/views/organizations/show/_portfolio_projects.html.haml b/app/views/organizations/show/_portfolio_projects.html.haml index 9bedc8703..42be9256b 100644 --- a/app/views/organizations/show/_portfolio_projects.html.haml +++ b/app/views/organizations/show/_portfolio_projects.html.haml @@ -1,82 +1,83 @@ - if @affiliated_projects.any? %h3= t('organizations.projects.title') - %table.table.table-striped.table-condensed - %thead - %tr{ id: 'dingus-row' } - %td{ colspan: '10' }   - %tr - %th{ rowspan: 2, style: 'width: 190px;' }= t('organizations.projects.name') - %th.center{ rowspan: 2, style: 'width: 50px;' }   - %th.center{ rowspan: 2, style: 'width: 120px;' }= t('organizations.projects.primary_language') - %th.center{ rowspan: 2, style: 'width: 90px;' }= t('organizations.projects.i_use_this') - %th.center{ rowspan: 2, style: 'width: 110px;' }= t('organizations.projects.community_rating') - %th.center{ rowspan: 2, style: 'width: 15px;' } - %th.center{ colspan: 2, style: 'width:250px' } - %strong= t('organizations.projects.twelve_month_activity') - %tr - %th= t('organizations.projects.contributors') - %th= t('organizations.projects.commits') + .table-responsive + %table.table.table-condensed + %thead + %tr{ id: 'dingus-row' } + %td{ colspan: '10' }   + %tr + %th{ rowspan: 2, style: 'width: 190px;' }= t('organizations.projects.name') + %th.center{ rowspan: 2, style: 'width: 50px;' }   + %th.center{ rowspan: 2, style: 'width: 120px;' }= t('organizations.projects.primary_language') + %th.center{ rowspan: 2, style: 'width: 90px;' }= t('organizations.projects.i_use_this') + %th.center{ rowspan: 2, style: 'width: 110px;' }= t('organizations.projects.community_rating') + %th.center{ rowspan: 2, style: 'width: 15px;' } + %th.center{ colspan: 2, style: 'width:250px' } + %strong= t('organizations.projects.twelve_month_activity') + %tr + %th.center= t('organizations.projects.contributors') + %th.center= t('organizations.projects.commits') - %tbody.portfolio-projects-table - - @affiliated_projects.each do |project| - - best_analysis = project.best_analysis - - twelve_month_summary = best_analysis.twelve_month_summary - - previous_twelve_month_summary = best_analysis.previous_twelve_month_summary - - language = best_analysis.main_language + %tbody.portfolio-projects-table + - @affiliated_projects.each do |project| + - best_analysis = project.best_analysis + - twelve_month_summary = best_analysis.twelve_month_summary + - previous_twelve_month_summary = best_analysis.previous_twelve_month_summary + - language = best_analysis.main_language - - best_analysis_decorator = AnalysisDecorator.new(best_analysis) - - affiliated_commits_diff = best_analysis_decorator.affiliated_commits_difference - - affiliated_committers_diff = best_analysis_decorator.affiliated_committers_difference - - outside_commits_diff = best_analysis_decorator.outside_commits_difference - - outside_committers_diff = best_analysis_decorator.outside_committers_difference + - best_analysis_decorator = AnalysisDecorator.new(best_analysis) + - affiliated_commits_diff = best_analysis_decorator.affiliated_commits_difference + - affiliated_committers_diff = best_analysis_decorator.affiliated_committers_difference + - outside_commits_diff = best_analysis_decorator.outside_commits_difference + - outside_committers_diff = best_analysis_decorator.outside_committers_difference - %tr - %td{ rowspan: 3 } - = project.decorate.icon(:small) - = link_to h(truncate(project.name, length: 23)), project_path(project), title: project.name - %td{ rowspan: 3 } - %div{ style: 'margin-top: -25px; position: relative' } - - project_activity_level_class(project, :twenty) - %td.center{ rowspan: 3 } - - if language.nil? - N/A - - else - .lang_bg{ style: "background-color: ##{language_color(language.name)};" } - = link_to language.nice_name, language_path(language), class: 'language_name', - style: "color: ##{language_text_color(language.name)}" - %td.center{ rowspan: 3 } - = project.user_count - %td.center{ rowspan: 3 } - - if project.rating_average.to_i.zero? - none - - else - %span.org_project_rating - != rating_stars('rating_star', project.rating_average, mini: true) - %tr - %td.center   - %td.proj_commit_stats - #{t('organizations.projects.affiliated')}:  - = render partial: 'project_commit_status', locals: { diff: affiliated_committers_diff, - commit_count: twelve_month_summary.affiliated_committers_count, - prev_commit_count: previous_twelve_month_summary.affiliated_committers_count } - %td - = render partial: 'project_commit_status', locals: { diff: affiliated_commits_diff, - commit_count: twelve_month_summary.affiliated_commits_count, - prev_commit_count: previous_twelve_month_summary.affiliated_commits_count } - %tr - %td.center   - %td.proj_committer_stats - #{t('organizations.projects.outside')}:    - = render partial: 'project_commit_status', locals: { diff: outside_committers_diff, - commit_count: twelve_month_summary.outside_committers_count, - prev_commit_count: previous_twelve_month_summary.outside_committers_count } - %td - = render partial: 'project_commit_status', locals: { diff: outside_commits_diff, - commit_count: twelve_month_summary.outside_commits_count, - prev_commit_count: previous_twelve_month_summary.outside_commits_count } - - count = @organization.projects_count - = render partial: 'pagination', locals: { count: count, - text: t('organizations.projects.see_all_projects', num: count), - url: projects_organization_path(@organization), - collection: @affiliated_projects } + %tr + %td{ rowspan: 3 } + = project.decorate.icon(:small) + = link_to h(truncate(project.name, length: 23)), project_path(project), title: project.name + %td{ rowspan: 3 } + %div.margin_right_20{ style: 'margin-top: -25px; position: relative' } + - project_activity_level_class(project, :twenty) + %td.center{ rowspan: 3 } + - if language.nil? + N/A + - else + .lang_bg{ style: "background-color: ##{language_color(language.name)};" } + = link_to language.nice_name, language_path(language), class: 'language_name', + style: "color: ##{language_text_color(language.name)}" + %td.center{ rowspan: 3 } + = project.user_count + %td.center{ rowspan: 3 } + - if project.rating_average.to_i.zero? + none + - else + %span.org_project_rating + != rating_stars('rating_star', project.rating_average, mini: true) + %tr + %td.center   + %td.proj_commit_stats.center + #{t('organizations.projects.affiliated')}:  + = render partial: 'project_commit_status', locals: { diff: affiliated_committers_diff, + commit_count: twelve_month_summary.affiliated_committers_count, + prev_commit_count: previous_twelve_month_summary.affiliated_committers_count } + %td.center + = render partial: 'project_commit_status', locals: { diff: affiliated_commits_diff, + commit_count: twelve_month_summary.affiliated_commits_count, + prev_commit_count: previous_twelve_month_summary.affiliated_commits_count } + %tr + %td.center   + %td.proj_committer_stats.center + #{t('organizations.projects.outside')}:    + = render partial: 'project_commit_status', locals: { diff: outside_committers_diff, + commit_count: twelve_month_summary.outside_committers_count, + prev_commit_count: previous_twelve_month_summary.outside_committers_count } + %td.center + = render partial: 'project_commit_status', locals: { diff: outside_commits_diff, + commit_count: twelve_month_summary.outside_commits_count, + prev_commit_count: previous_twelve_month_summary.outside_commits_count } + - count = @organization.projects_count + = render partial: 'pagination', locals: { count: count, + text: t('organizations.projects.see_all_projects', num: count), + url: projects_organization_path(@organization), + collection: @affiliated_projects } diff --git a/app/views/permissions/show.html.haml b/app/views/permissions/show.html.haml index f9239221f..a71c53dde 100644 --- a/app/views/permissions/show.html.haml +++ b/app/views/permissions/show.html.haml @@ -9,7 +9,7 @@ = project_analysis_timestamp(@project) if @project .row - .col-sm-6.col-sm-offset-2 + .col-sm-6.col-xs-12 .well - url = polymorphic_path([:permissions, @parent]) = form_for @permission, as: :permission, url: url, html: { method: :put, id: 'permission_show' } do |f| @@ -40,7 +40,7 @@ %h4.nomargin %span.soft= t 'permissions.show.about_permissions_1' = t 'permissions.show.about_permissions_2' -.col-sm-6 +.col-sm-12.col-xs-12 %ul - parent_name = @parent.class.name %li= t 'permissions.show.help_1', name: parent_name diff --git a/app/views/shared/search_dingus/_page_entries_info.html.haml b/app/views/shared/search_dingus/_page_entries_info.html.haml index f0bb5827a..46cfeedd6 100644 --- a/app/views/shared/search_dingus/_page_entries_info.html.haml +++ b/app/views/shared/search_dingus/_page_entries_info.html.haml @@ -1,4 +1,4 @@ -.col-md-3.col-sm-3.col-xs-3.padding_left_25 +.col-md-3.col-sm-3.col-xs-12.padding_left_25 - if collection.respond_to?(:current_page) && !collection.length.zero? %label.paginate= t('.pagination_status', current_page: number_with_delimiter(collection.current_page), total_pages: number_with_delimiter(collection.total_pages)) diff --git a/app/views/shared/search_dingus/_search_bar.html.haml b/app/views/shared/search_dingus/_search_bar.html.haml index acc25067e..0660ac39e 100644 --- a/app/views/shared/search_dingus/_search_bar.html.haml +++ b/app/views/shared/search_dingus/_search_bar.html.haml @@ -7,7 +7,7 @@ multiple: true, onchange: 'this.form.submit()' - else - .col-md-5.col-sm-5.col-xs-5.no_padding + .col-md-5.col-sm-5.col-xs-12.no_padding %label #{t('.search_text')}   = text_field_tag :query, params[:query] diff --git a/app/views/shared/search_dingus/_sort.html.haml b/app/views/shared/search_dingus/_sort.html.haml index b3e99c0a7..812a17ea1 100644 --- a/app/views/shared/search_dingus/_sort.html.haml +++ b/app/views/shared/search_dingus/_sort.html.haml @@ -1,11 +1,12 @@ -.col-md-4.col-sm-4.col-xs-4 +.col-md-4.col-sm-4.col-xs-12.no_padding_left - if filter_type == :checkbox - %label.checkbox.pull-right.padding_right_20#human_edits + %label.checkbox.pull-right.margin_right_20#human_edits %input{ type: 'checkbox', checked: params[:human] == 'true' } - = t('.show_only_humans') - %label.checkbox.pull-right.padding_right_15#enlistment_edits + %span= t('.show_only_humans') + %label.checkbox.pull-right.margin_right_20#enlistment_edits %input{ type: 'checkbox', id: 'enlistment_checkbox', checked: params[:enlistment] == 'true'} - = t('.filter_only_enlistment') + %span= t('.filter_only_enlistment') + .clearfix #sort_by %label= t('.sort_by') = select_tag :sort, options_for_select([["updated_at", "updated_at"], ["created_at", "created_at"]], diff --git a/app/views/widgets/_widget.html.haml b/app/views/widgets/_widget.html.haml index 68dc95320..4f00a6383 100644 --- a/app/views/widgets/_widget.html.haml +++ b/app/views/widgets/_widget.html.haml @@ -3,14 +3,14 @@ script = "" .widget_list - .row{ style: 'margin-left: -15px' } - .col-md-10 + .row + .col-md-12 %h3.inset_top.no_padding_top = widget.short_nice_name - .col-md-4.col + .col-md-3 .widget_container.org_widget{ style: widget_iframe_style(widget) } = render template: "#{controller_name}/#{widget.name.underscore}", locals: locals - .col-md-7.col.pull-right + .col-md-9 %h6.no_margin_top HTML %p= t('.embed') %pre.prettyprint diff --git a/test/controllers/licenses_controller_test.rb b/test/controllers/licenses_controller_test.rb index b2ac3ce27..e04bba48b 100644 --- a/test/controllers/licenses_controller_test.rb +++ b/test/controllers/licenses_controller_test.rb @@ -52,7 +52,7 @@ class LicensesControllerTest < ActionController::TestCase get :show, params: { id: @license.vanity_url } - _(assert_select('p')[3].text).must_equal "foo \n " + _(assert_select('p')[1].text).must_equal "foo \n " end end diff --git a/test/controllers/organizations_controller_test.rb b/test/controllers/organizations_controller_test.rb index e59b18bb3..fc1e35bab 100644 --- a/test/controllers/organizations_controller_test.rb +++ b/test/controllers/organizations_controller_test.rb @@ -83,7 +83,7 @@ class OrganizationsControllerTest < ActionController::TestCase get :show, params: { id: @organization.vanity_url } - _(assert_select('p')[3].text).must_equal "foo \n " + _(assert_select('p')[1].text).must_equal "foo \n " end it 'should support show page via xml api' do diff --git a/test/controllers/projects_controller_test.rb b/test/controllers/projects_controller_test.rb index f5af4697c..59f5066ae 100644 --- a/test/controllers/projects_controller_test.rb +++ b/test/controllers/projects_controller_test.rb @@ -292,7 +292,7 @@ class ProjectsControllerTest < ActionController::TestCase get :show, params: { id: project.vanity_url } - _(assert_select('p')[3].text).must_equal "foo \n " + _(assert_select('p')[1].text).must_equal "foo \n " end it 'show accepts being called via api' do