gitprep / templates / user.html.ep /
Newer Older
67 lines | 2.023kb
cleanup
Yuki Kimoto authored on 2012-11-28
1
<%
hide private project from no...
Yuki Kimoto authored on 2013-11-26
2
  # API
3
  my $api = gitprep_api;
4
  
improved messages
Yuki Kimoto authored on 2013-04-11
5
  # Redirect for project delete
6
  if (my $deleted_project = param('deleted_project')) {
7
    flash('deleted_project', $deleted_project);
8
    $self->redirect_to('current');
show deleted repository in u...
Yuki Kimoto authored on 2013-05-15
9
    return;
improved messages
Yuki Kimoto authored on 2013-04-11
10
  }
11
  
cleanup
Yuki Kimoto authored on 2012-11-28
12
  my $user = param('user');
13
  
cleanup user page
Yuki Kimoto authored on 2013-03-11
14
  # Projects
revert encoding support
Yuki Kimoto authored on 2013-11-22
15
  unless (app->manager->exists_user($user)) {
do success xt tests
Yuki Kimoto authored on 2016-03-25
16
    $self->reply->not_found;
add rename project and suppr...
Yuki Kimoto authored on 2013-05-24
17
    return;
18
  }
revert encoding support
Yuki Kimoto authored on 2013-11-22
19
  my $projects = app->manager->projects($user);
show deleted repository in u...
Yuki Kimoto authored on 2013-05-15
20
  my $reps = [];
21
  for my $project (@$projects) {
revert encoding support
Yuki Kimoto authored on 2013-11-22
22
    my $rep = app->git->repository($user, $project->{name}) || {none => 1};
show deleted repository in u...
Yuki Kimoto authored on 2013-05-15
23
    $rep->{name} = $project->{name};
hide private project from no...
Yuki Kimoto authored on 2013-11-26
24
    $rep->{private} = $project->{private};
fixed perl 5.8 compatible bu...
Yuki Kimoto authored on 2013-05-17
25
    push @$reps, $rep;
show deleted repository in u...
Yuki Kimoto authored on 2013-05-15
26
  }
Revert "cleaunup commits ato...
Yuki Kimoto authored on 2014-12-03
27
%>
cleanup
Yuki Kimoto authored on 2012-11-28
28

            
Revert "cleaunup commits ato...
Yuki Kimoto authored on 2014-12-03
29
% layout 'common', title => $user;
30
  %= include '/include/header', title => 'Repositories';
projects page cleanup
Yuki Kimoto authored on 2013-03-11
31

            
Revert "cleaunup commits ato...
Yuki Kimoto authored on 2014-12-03
32
  <div class="container">
improve repositories page de...
Yuki Kimoto authored on 2015-12-29
33
    %= include '/include/message', message => flash('message');
projects page cleanup
Yuki Kimoto authored on 2013-03-11
34

            
improve repositories page de...
Yuki Kimoto authored on 2015-12-29
35
    <div class="topic1">Repositories</div>
36
    
37
    <ul class="repositories">
38
      % for my $rep (sort { $a->{age} <=> $b->{age} } @$reps) {
39
        % if (!$rep->{private} || $api->can_access_private_project($user, $rep->{name})) {
40
          <li>
41
            % my $pname = $rep->{name};
42
            <div class="repositories-name">
43
              <a href="<%= url_for("/$user/$pname") %>">
44
                <%= $rep->{name} %>
45
              </a>
46
              % if ($rep->{private}) {
47
                <i class="icon icon-lock"></i>
48
              % }
49
            </div>
50
            <div class="repositories-description">
51
              <%= $rep->{description} %>
52
            </div>
53
            <div class="repositories-age">
Revert "cleaunup commits ato...
Yuki Kimoto authored on 2014-12-03
54
              % my $age = $rep->{age_string};
improve repositories page de...
Yuki Kimoto authored on 2015-12-29
55
              % if ($rep->{none}) {
56
                <span style="color:red">Repository not exists</span>
57
                <a href="<%= "/$user/$rep->{name}/settings" %>" class="btn btn-mini">Settings</a>
58
              % } else {
59
                <%= $age ? "last updated $age" : 'new repository' %>
60
              % }
61
            </div>
62
          </li>
Revert "cleaunup commits ato...
Yuki Kimoto authored on 2014-12-03
63
        % }
improve repositories page de...
Yuki Kimoto authored on 2015-12-29
64
      % }
65
    </ul>
Revert "cleaunup commits ato...
Yuki Kimoto authored on 2014-12-03
66
  </div>
67
  %= include '/include/footer';