Work in progress: Continue on org view
This commit is contained in:
parent
3a11ea4229
commit
e70f863350
4 changed files with 33 additions and 19 deletions
|
@ -249,6 +249,7 @@ def get_organization(orgname):
|
|||
return {
|
||||
'id': t.id,
|
||||
'name': t.name,
|
||||
'description': t.description,
|
||||
'can_view': view_permission.can()
|
||||
}
|
||||
|
||||
|
@ -407,11 +408,6 @@ def create_repo_api():
|
|||
repo.description = json['description']
|
||||
repo.save()
|
||||
|
||||
repo = model.create_repository(namespace_name, repository_name, owner,
|
||||
visibility)
|
||||
repo.description = json['description']
|
||||
repo.save()
|
||||
|
||||
return jsonify({
|
||||
'namespace': namespace_name,
|
||||
'name': repository_name
|
||||
|
|
|
@ -211,10 +211,6 @@
|
|||
color: #444 !important;
|
||||
}
|
||||
|
||||
.new-repo .new-header span {
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
.new-repo .new-header .popover {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
@ -1391,6 +1387,18 @@ p.editable:hover i {
|
|||
float: right;
|
||||
}
|
||||
|
||||
.org-view .team-listing {
|
||||
margin: 10px;
|
||||
padding: 10px;
|
||||
border-bottom: 1px solid #eee;
|
||||
min-width: 400px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.org-view .team-title {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
/* Overrides for typeahead to work with bootstrap 3. */
|
||||
|
||||
.twitter-typeahead .tt-query,
|
||||
|
|
|
@ -1180,6 +1180,15 @@ function NewRepoCtrl($scope, $location, $http, $timeout, UserService, Restangula
|
|||
function OrgViewCtrl($scope, Restangular, $routeParams) {
|
||||
var orgname = $routeParams.orgname;
|
||||
|
||||
$scope.getDescriptionFirstLine = function(commentString) {
|
||||
return getMarkedDown(getFirstTextLine(commentString));
|
||||
};
|
||||
|
||||
$scope.getMarkedDown = function(string) {
|
||||
if (!string) { return ''; }
|
||||
return getMarkedDown(string);
|
||||
};
|
||||
|
||||
var loadOrganization = function() {
|
||||
var getOrganization = Restangular.one(getRestUrl('organization', orgname));
|
||||
getOrganization.get().then(function(resp) {
|
||||
|
|
|
@ -9,15 +9,16 @@
|
|||
<div class="org-view container" ng-show="!loading && organization">
|
||||
<div class="organization-header" organization="organization"></div>
|
||||
|
||||
<div ng-repeat="team in organization.teams">
|
||||
<i class="fa fa-group"></i>
|
||||
|
||||
<span ng-show="team.can_view">
|
||||
<a href="/organization/{{ organization.name }}/teams/{{ team.name }}">{{ team.name }}</a>
|
||||
</span>
|
||||
|
||||
<span ng-show="!team.can_view">
|
||||
{{ team.name }}
|
||||
</span>
|
||||
<div class="team-listing" ng-repeat="team in organization.teams">
|
||||
<div class="team-title">
|
||||
<i class="fa fa-group"></i>
|
||||
<span ng-show="team.can_view">
|
||||
<a href="/organization/{{ organization.name }}/teams/{{ team.name }}">{{ team.name }}</a>
|
||||
</span>
|
||||
<span ng-show="!team.can_view">
|
||||
{{ team.name }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="team-description" ng-bind-html-unsafe="getCommentFirstLine(team.description)"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Reference in a new issue