diff --git a/app/assets/javascripts/my_modules/repositories.js b/app/assets/javascripts/my_modules/repositories.js index 98828ba70..897553a4d 100644 --- a/app/assets/javascripts/my_modules/repositories.js +++ b/app/assets/javascripts/my_modules/repositories.js @@ -453,7 +453,8 @@ var MyModuleRepositories = (function() { FULL_VIEW_MODAL.on('show.bs.modal', function() { FULL_VIEW_MODAL.find('.table-container').empty(); - FULL_VIEW_MODAL.find('.repository-name').empty(); + FULL_VIEW_MODAL.find('.repository-title').empty(); + FULL_VIEW_MODAL.find('.repository-version').empty(); updateFullViewRowsCount(''); }); } @@ -518,29 +519,31 @@ var MyModuleRepositories = (function() { function updateFullViewRowsCount(value) { FULL_VIEW_MODAL.data('rows-count', value); - FULL_VIEW_MODAL.find('.repository-name').attr('data-rows-count', value); + FULL_VIEW_MODAL.find('.repository-version').attr('data-rows-count', value); } function renderFullViewRepositoryName(name, snapshotDate, assignMode) { var title; - var repositoryName = name || FULL_VIEW_MODAL.find('.repository-name').data('repository-name'); + var version; + var repositoryName = name || FULL_VIEW_MODAL.find('.repository-title').data('repository-name'); if (assignMode) { title = I18n.t('my_modules.repository.full_view.assign_modal_header', { repository_name: repositoryName }); + version = ''; } else if (snapshotDate) { - title = I18n.t('my_modules.repository.full_view.modal_snapshot_header', { - repository_name: repositoryName, + title = repositoryName; + version = I18n.t('my_modules.repository.full_view.modal_snapshot_header', { snaphot_date: snapshotDate }); } else { - title = I18n.t('my_modules.repository.full_view.modal_live_header', { - repository_name: repositoryName - }); + title = repositoryName; + version = I18n.t('my_modules.repository.full_view.modal_live_header'); } - FULL_VIEW_MODAL.find('.repository-name').data('repository-name', repositoryName); - FULL_VIEW_MODAL.find('.repository-name').html(title); + FULL_VIEW_MODAL.find('.repository-title').data('repository-name', repositoryName); + FULL_VIEW_MODAL.find('.repository-title').html(title); + FULL_VIEW_MODAL.find('.repository-version').html(version); } function initRepoistoryAssignView() { diff --git a/app/assets/stylesheets/my_modules/repositories.scss b/app/assets/stylesheets/my_modules/repositories.scss index 5e218f422..93d6d0dc5 100644 --- a/app/assets/stylesheets/my_modules/repositories.scss +++ b/app/assets/stylesheets/my_modules/repositories.scss @@ -5,21 +5,9 @@ @include font-h3; line-height: 22px; overflow: hidden; - padding-right: 55px; position: relative; text-overflow: ellipsis; white-space: nowrap; - - &::after { - color: $color-alto; - content: '[' attr(data-rows-count) ']'; - display: inline-block; - line-height: 22px; - padding-left: 5px; - position: absolute; - right: 0; - width: 55px; - } } .my-module-inventories { @@ -131,6 +119,16 @@ .assigned-repository-title { @include my-module-repository-title; + padding-right: 2.2em; + + &::after { + color: $color-alto; + content: '[' attr(data-rows-count) ']'; + display: inline-block; + padding-right: .7em; + position: absolute; + right: 0; + } } .action-buttons { @@ -218,11 +216,26 @@ flex-grow: 1; max-width: calc(100% - 20px); - .repository-name { + .repository-name-container { + display: flex; + } + + .repository-title { @include my-module-repository-title; @include font-h2; - display: inline-block; - width: 100%; + } + + .repository-version { + @include font-h2; + flex-shrink: 0; + padding-right: .7em; + + &::after { + color: $color-alto; + content: '[' attr(data-rows-count) ']'; + display: inline-block; + padding-left: .3em; + } } .breadcrumbs { diff --git a/app/views/my_modules/repositories/_full_view_modal.html.erb b/app/views/my_modules/repositories/_full_view_modal.html.erb index 9990f8c35..fb21aa9e6 100644 --- a/app/views/my_modules/repositories/_full_view_modal.html.erb +++ b/app/views/my_modules/repositories/_full_view_modal.html.erb @@ -11,7 +11,8 @@ <%= @my_module.name %>
- + +
diff --git a/config/locales/en.yml b/config/locales/en.yml index a2f4d4a50..d0214b4e4 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -811,8 +811,8 @@ en: head_title: "%{project} | %{module} | Inventory %{repository}" export: 'Export' full_view: - modal_live_header: '%{repository_name}: Live version' - modal_snapshot_header: '%{repository_name}: Snapshot of %{snaphot_date}' + modal_live_header: ': Live version' + modal_snapshot_header: ': Snapshot of %{snaphot_date}' assign_modal_header: 'Assign from %{repository_name} inventory' snapshots: simple_view: