From 9d813352b737e46099c0a0380006a061ee877d09 Mon Sep 17 00:00:00 2001 From: Josh Max Date: Thu, 11 Sep 2014 05:09:38 +0000 Subject: [PATCH 1/2] Show the dominant language of a tip4commit repo --- app/assets/stylesheets/projects.css.scss | 4 ++++ app/views/projects/index.html.haml | 7 ++++++- app/views/projects/show.html.haml | 7 ++++++- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/app/assets/stylesheets/projects.css.scss b/app/assets/stylesheets/projects.css.scss index 6d95023e..e7ed188e 100644 --- a/app/assets/stylesheets/projects.css.scss +++ b/app/assets/stylesheets/projects.css.scss @@ -5,3 +5,7 @@ .commit-sha { font-family: monospace; } + +.repo i { + color:#fff +} \ No newline at end of file diff --git a/app/views/projects/index.html.haml b/app/views/projects/index.html.haml index 95c1a613..f29c2e65 100644 --- a/app/views/projects/index.html.haml +++ b/app/views/projects/index.html.haml @@ -22,7 +22,12 @@ - @projects.each do |project| %tr %td - %strong= link_to project.full_name, pretty_project_path(project) + %strong + - if project.source_full_name.blank? + %span{:class => 'label label-default'}= project.language + - else + %span{:class => 'label label-default'}= glyph(:'code-fork') + ' Forked' + = link_to project.full_name, pretty_project_path(project) - if !project.source_full_name.blank? %br %nobr diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml index adf91c39..ea1ab645 100644 --- a/app/views/projects/show.html.haml +++ b/app/views/projects/show.html.haml @@ -3,9 +3,14 @@ - content_for :description do = @project.description +- if @project.source_full_name.blank? + %small{:class => 'label label-default'}= @project.language +- else + %small{:class => 'label label-default'}= glyph(:'code-fork') + ' Forked' +%small{:class => 'repo label label-default'}= link_to glyph(:github), @project.github_url, target: '_blank' + %h1 = @project.full_name - %small= link_to glyph(:github), @project.github_url, target: '_blank' .pull-right - if can? :update, @project = link_to t('.edit_project'), edit_project_path(@project), class: "btn btn-primary" From 048a41f1c7ff7d414ab4ae7f4accba91655692be Mon Sep 17 00:00:00 2001 From: Josh Max Date: Wed, 10 Sep 2014 23:43:38 -0700 Subject: [PATCH 2/2] Minor CSS style consistency fix --- app/assets/stylesheets/projects.css.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/stylesheets/projects.css.scss b/app/assets/stylesheets/projects.css.scss index e7ed188e..70522c19 100644 --- a/app/assets/stylesheets/projects.css.scss +++ b/app/assets/stylesheets/projects.css.scss @@ -7,5 +7,5 @@ } .repo i { - color:#fff -} \ No newline at end of file + color: #fff +}