update for adding popup dialog to show all intro about Harbor.

This commit is contained in:
kunw 2016-06-21 14:53:00 +08:00
parent 2b0b4ed003
commit 181f525df7
6 changed files with 42 additions and 16 deletions

View File

@ -110,4 +110,5 @@ body {
.page-content {
margin: 0 20px 0 20px;
text-align: left;
}

View File

@ -1,4 +1,4 @@
<h4 class="page-header title-color underlined">// 'top_10_repositories' | tr //</h4>
<h4 class="page-header title-color underlined">// 'popular_repositories' | tr //</h4>
<div class="col-xs-4 col-md-12 up-table-pane">
<table class="table">
<thead>
@ -9,7 +9,7 @@
<td colspan="5" height="120px" class="empty-hint" ng-if="vm.top10Repositories.length === 0"><h3 class="text-muted">// 'no_top_repositories' | tr //</h3></td>
</tr>
<tr ng-if="vm.top10Repositories.length > 0" ng-repeat="t in vm.top10Repositories">
<td>//t.name//</td><td>//t.count//</td><td>//t.creator//</td>
<td>//t.name//</td><td>//t.count//</td><td>//t.creator === '' ? 'N/A' : t.creator //</td>
</tr>
</tbody>
</table>

View File

@ -6,7 +6,28 @@
.module('harbor.layout.index')
.controller('IndexController', IndexController);
function IndexController() {
IndexController.$inject = ['$filter', 'trFilter'];
function IndexController($filter, trFilter) {
var vm = this;
var indexDesc = $filter('tr')('index_desc', []);
var indexDesc1 = $filter('tr')('index_desc_1', []);
var indexDesc2 = $filter('tr')('index_desc_2', []);
var indexDesc3 = $filter('tr')('index_desc_3', []);
var indexDesc4 = $filter('tr')('index_desc_4', []);
var indexDesc5 = $filter('tr')('index_desc_5', []);
vm.message = '<p class="page-content text-justify">' +
indexDesc +
'</p>' +
'<ul>' +
'<li class="long-line">▪︎ ' + indexDesc1 + '</li>' +
'<li class="long-line">▪︎ ' + indexDesc2 + '</li>' +
'<li class="long-line">▪︎ ' + indexDesc3 + '</li>' +
'<li class="long-line">▪︎ ' + indexDesc4 + '</li>' +
'<li class="long-line">▪︎ ' + indexDesc5 + '</li>' +
'</ul>';
}

View File

@ -14,7 +14,7 @@ var locale_messages = {
'index_desc_3': 'Access Control: RBAC (Role Based Access Control) is provided. User management can be integrated with existing enterprise identity services like AD/LDAP. ',
'index_desc_4': 'Audit: All access to the registry are logged and can be used for audit purpose.',
'index_desc_5': 'GUI: User friendly single-pane-of-glass management console.',
'learn_more': 'Learn more...',
'view_all': 'View all...',
'repositories': 'Repositories',
'project_repo_name': 'Project/Repository Name',
'creation_time': 'Creation Time',
@ -51,8 +51,8 @@ var locale_messages = {
'public_projects': 'Public Projects',
'public': 'Public',
'public_repositories': 'Public Repositories',
'my_project_count': 'Projects',
'my_repo_count': 'Repositories',
'my_project_count': 'My Projects',
'my_repo_count': 'My Repositories',
'public_project_count': 'Public Projects',
'public_repo_count': 'Public Repositories',
'total_project_count': 'Total Projects',
@ -166,5 +166,7 @@ var locale_messages = {
'confirm_to_change_profile': 'Are you sure to change your profile?',
'form_is_invalid': 'Form content is invalid',
'form_is_invalid_message': 'Form content is invalid, please fill the required fields.',
'administrator': 'Administrator'
'administrator': 'Administrator',
'popular_repositories': 'Popular Repositories',
'harbor_intro_title': 'About Harbor'
};

View File

@ -14,7 +14,7 @@ var locale_messages = {
'index_desc_3': '访问控制: 提供基于角色的访问控制,可集成企业目前拥有的用户管理系统(如:AD/LDAP。',
'index_desc_4': '审计: 所有访问Registry服务的操作均被记录便于日后审计。',
'index_desc_5': '管理界面: 具有友好易用图形管理界面。',
'learn_more': '更多...',
'view_all': '显示全部...',
'repositories': '镜像仓库',
'project_repo_name': '项目/镜像仓库名称',
'creation_time': '创建时间',
@ -51,8 +51,8 @@ var locale_messages = {
'public_projects': '公开项目',
'public': '公开',
'public_repositories': '公开镜像仓库',
'my_project_count': '项目',
'my_repo_count': '镜像仓库',
'my_project_count': '我的项目',
'my_repo_count': '我的镜像仓库',
'public_project_count': '公开项目',
'public_repo_count': '公开镜像仓库',
'total_project_count': '全部项目',
@ -165,5 +165,7 @@ var locale_messages = {
'confirm_to_change_profile': '确认要修改个人信息吗?',
'form_is_invalid': '表单内容无效',
'form_is_invalid_message': '表单内容无效,请填写必填字段。',
'administrator': '管理员'
'administrator': '管理员',
'popular_repositories': '热门镜像仓库',
'harbor_intro_title': '关于 Harbor'
};

View File

@ -39,8 +39,9 @@
<div class="col-md-4">
<div class="row">
<div class="down-section">
<h4 class="page-header underlined">// 'why_use_harbor' | tr //</h4>
<p class="page-content text-justify">
<modal-dialog title="// 'harbor_intro_title' | tr //" message='// vm.message //' content-type="text/html"></modal-dialog>
<h4 class="page-header underlined">// 'why_use_harbor' | tr //</h4>
<p class="page-content text-justify">
// 'index_desc' | tr //
</p>
<ul>
@ -51,15 +52,14 @@
<li class="long-line">▪︎ // 'index_desc_5' | tr //</li>
</ul>
<div class="page-content pull-right">
<a href="#"><span class="glyphicon glyphicon-triangle-right"></span> // 'learn_more' | tr //</a>
<a href="javascript:void(0);" data-toggle="modal" data-target="#myModal"><span class="glyphicon glyphicon-triangle-right"></span> // 'view_all' | tr //</a>
</div>
</div>
</div>
</div>
<div class="col-md-8">
<div class="down-section">
<h4 class="page-header title-color underlined">// 'repositories' | tr //</h4>
<search filter-by="repository"></search>
<top-repository></top-repository>
</div>
</div>
</div>