diff options
-rw-r--r-- | app/assets/stylesheets/generic/common.scss | 9 | ||||
-rw-r--r-- | app/assets/stylesheets/sections/commits.scss | 4 | ||||
-rw-r--r-- | app/assets/stylesheets/sections/tree.scss | 4 | ||||
-rw-r--r-- | app/views/dashboard/_project.html.haml | 13 | ||||
-rw-r--r-- | app/views/groups/_projects.html.haml | 5 | ||||
-rw-r--r-- | app/views/projects/commits/_commit.html.haml | 3 | ||||
-rw-r--r-- | app/views/projects/issues/_issue.html.haml | 3 | ||||
-rw-r--r-- | app/views/projects/tree/_blob_item.html.haml | 3 | ||||
-rw-r--r-- | app/views/projects/tree/_tree_commit_column.html.haml | 5 | ||||
-rw-r--r-- | app/views/projects/tree/_tree_item.html.haml | 3 |
10 files changed, 38 insertions, 14 deletions
diff --git a/app/assets/stylesheets/generic/common.scss b/app/assets/stylesheets/generic/common.scss index a692628534b..ee3764c2c0e 100644 --- a/app/assets/stylesheets/generic/common.scss +++ b/app/assets/stylesheets/generic/common.scss @@ -119,3 +119,12 @@ pre.well-pre { padding: 0; color: #666; } + +.str-truncated { + display: inline-block; + overflow: hidden; + text-overflow: ellipsis; + vertical-align: top; + white-space: nowrap; + max-width: 82%; +} diff --git a/app/assets/stylesheets/sections/commits.scss b/app/assets/stylesheets/sections/commits.scss index 7b1b0ea4723..ff293bc4a00 100644 --- a/app/assets/stylesheets/sections/commits.scss +++ b/app/assets/stylesheets/sections/commits.scss @@ -481,6 +481,10 @@ li.commit { font-family: $monospace_font; } + .str-truncated { + max-width: 70%; + } + .commit-row-message { color: #333; font-weight: 500; diff --git a/app/assets/stylesheets/sections/tree.scss b/app/assets/stylesheets/sections/tree.scss index ef4546d3066..00561a4d0f9 100644 --- a/app/assets/stylesheets/sections/tree.scss +++ b/app/assets/stylesheets/sections/tree.scss @@ -61,6 +61,10 @@ top:-1px; } } + + .tree_time_ago { + min-width: 135px; + } } .tree_author { diff --git a/app/views/dashboard/_project.html.haml b/app/views/dashboard/_project.html.haml index db445eed233..e326bee53ab 100644 --- a/app/views/dashboard/_project.html.haml +++ b/app/views/dashboard/_project.html.haml @@ -1,11 +1,12 @@ = link_to project_path(project), class: dom_class(project) do .dash-project-access-icon = visibility_level_icon(project.visibility_level) - %span.namespace-name - - if project.namespace - = project.namespace.human_name - \/ - %span.project-name.filter-title - = truncate(project.name, length: 25) + %span.str-truncated + %span.namespace-name + - if project.namespace + = project.namespace.human_name + \/ + %span.project-name.filter-title + = project.name %span.arrow %i.icon-angle-right diff --git a/app/views/groups/_projects.html.haml b/app/views/groups/_projects.html.haml index 98b7b88865b..029d6cb0efa 100644 --- a/app/views/groups/_projects.html.haml +++ b/app/views/groups/_projects.html.haml @@ -14,7 +14,8 @@ = link_to project_path(project), class: dom_class(project) do .dash-project-access-icon = visibility_level_icon(project.visibility_level) - %span.project-name - = truncate(project.name, length: 25) + %span.str-truncated + %span.project-name + = truncate(project.name, length: 25) %span.arrow %i.icon-angle-right diff --git a/app/views/projects/commits/_commit.html.haml b/app/views/projects/commits/_commit.html.haml index b6527558275..9772d3ef2ef 100644 --- a/app/views/projects/commits/_commit.html.haml +++ b/app/views/projects/commits/_commit.html.haml @@ -2,7 +2,8 @@ .commit-row-title = link_to commit.short_id(8), project_commit_path(project, commit), class: "commit_short_id" - = link_to_gfm truncate(commit.title, length: 70), project_commit_path(project, commit.id), class: "commit-row-message" + %span.str-truncated + = link_to_gfm commit.title, project_commit_path(project, commit.id), class: "commit-row-message" = link_to "Browse Code ยป", project_tree_path(project, commit), class: "pull-right" .notes_count - notes = project.notes.for_commit_id(commit.id) diff --git a/app/views/projects/issues/_issue.html.haml b/app/views/projects/issues/_issue.html.haml index 8b9433f04a5..1bd93b774f1 100644 --- a/app/views/projects/issues/_issue.html.haml +++ b/app/views/projects/issues/_issue.html.haml @@ -5,7 +5,8 @@ .issue-title %span.light= "##{issue.iid}" - = link_to_gfm truncate(issue.title, length: 100), project_issue_path(issue.project, issue), class: "row_title" + %span.str-truncated + = link_to_gfm issue.title, project_issue_path(issue.project, issue), class: "row_title" - if issue.closed? %small.pull-right = "CLOSED" diff --git a/app/views/projects/tree/_blob_item.html.haml b/app/views/projects/tree/_blob_item.html.haml index b179ad7d245..92dfd7537ca 100644 --- a/app/views/projects/tree/_blob_item.html.haml +++ b/app/views/projects/tree/_blob_item.html.haml @@ -1,7 +1,8 @@ %tr{ class: "tree-item #{tree_hex_class(blob_item)}" } %td.tree-item-file-name = tree_icon(type) - %span= link_to truncate(blob_item.name, length: 40), project_blob_path(@project, tree_join(@id || @commit.id, blob_item.name)) + %span.str-truncated + = link_to blob_item.name, project_blob_path(@project, tree_join(@id || @commit.id, blob_item.name)) %td.tree_time_ago.cgray %span.log_loading.hide Loading commit data... diff --git a/app/views/projects/tree/_tree_commit_column.html.haml b/app/views/projects/tree/_tree_commit_column.html.haml index 67b5b2b96e2..bd50dd4d9a2 100644 --- a/app/views/projects/tree/_tree_commit_column.html.haml +++ b/app/views/projects/tree/_tree_commit_column.html.haml @@ -1,2 +1,3 @@ -%span.tree_author= commit_author_link(commit, avatar: true, size: 16) -= link_to_gfm truncate(commit.title, length: 80), project_commit_path(@project, commit.id), class: "tree-commit-link" +%span.str-truncated + %span.tree_author= commit_author_link(commit, avatar: true, size: 16) + = link_to_gfm commit.title, project_commit_path(@project, commit.id), class: "tree-commit-link" diff --git a/app/views/projects/tree/_tree_item.html.haml b/app/views/projects/tree/_tree_item.html.haml index f8856afc866..b4dd6f48b62 100644 --- a/app/views/projects/tree/_tree_item.html.haml +++ b/app/views/projects/tree/_tree_item.html.haml @@ -1,7 +1,8 @@ %tr{ class: "tree-item #{tree_hex_class(tree_item)}" } %td.tree-item-file-name = tree_icon(type) - %span= link_to truncate(tree_item.name, length: 40), project_tree_path(@project, tree_join(@id || @commit.id, tree_item.name)) + %span.str-truncated + = link_to tree_item.name, project_tree_path(@project, tree_join(@id || @commit.id, tree_item.name)) %td.tree_time_ago.cgray %span.log_loading.hide Loading commit data... |