Showing 22 changed files with 37 additions and 30 deletions
+1 -1
templates/auto/_admin.html.ep
... ...
@@ -1,4 +1,4 @@
1
-% layout 'common';
1
+% layout 'common', title => 'Admin';
2 2
   
3 3
   %= include '/include/header';
4 4
   <div class="container" style="min-heigth:500px">
+1 -1
templates/auto/_admin/user/create.html.ep
... ...
@@ -54,7 +54,7 @@
54 54
   }
55 55
 %>
56 56
 
57
-% layout 'common';
57
+% layout 'common', title => 'Create User';
58 58
 
59 59
   %= include '/include/header';
60 60
 
+1 -1
templates/auto/_admin/users.html.ep
... ...
@@ -45,7 +45,7 @@
45 45
   my $users = app->manager->users;
46 46
 %>
47 47
 
48
-% layout 'common';
48
+% layout 'common', title => 'Admin Users';
49 49
 
50 50
   %= javascript begin
51 51
     $(document).ready(function () {
+1 -1
templates/auto/_login.html.ep
... ...
@@ -79,7 +79,7 @@
79 79
   }
80 80
 %>
81 81
 
82
-% layout 'common';
82
+% layout 'common', title => 'Sign in';
83 83
 
84 84
   <!-- Login Page -->
85 85
   
+1 -1
templates/auto/_new.html.ep
... ...
@@ -76,7 +76,7 @@
76 76
   }
77 77
 %>
78 78
 
79
-% layout 'common';
79
+% layout 'common', title => 'Create a New Repository';
80 80
 
81 81
   %= include '/include/header';
82 82
   
+1 -1
templates/auto/_start.html.ep
... ...
@@ -56,7 +56,7 @@
56 56
   }
57 57
 %>
58 58
 
59
-% layout 'common';
59
+% layout 'common', title => 'Start page';
60 60
 
61 61
   %= include '/include/header';
62 62
 
+1 -1
templates/auto/reset-password.html.ep
... ...
@@ -90,7 +90,7 @@
90 90
   }
91 91
 %>
92 92
 
93
-% layout 'common';
93
+% layout 'common', title => 'Reset password';
94 94
 
95 95
   %= include '/include/header';
96 96
 
+3 -1
templates/blob.html.ep
... ...
@@ -34,8 +34,10 @@
34 34
   stash(id => $rev, project => $project, rev => $rev);
35 35
 %>
36 36
 
37
-% layout 'common' , stylesheets => ['/js/google-code-prettify/prettify.css'];
37
+<% layout 'common' , title => "$project/$file at $rev \x{30fb} $user/$project",
38
+     stylesheets => ['/js/google-code-prettify/prettify.css']; %>
38 39
 
40
+%
39 41
   %= include '/include/header';
40 42
 
41 43
   <div class="container">
+1 -1
templates/branches.html.ep
... ...
@@ -73,7 +73,7 @@
73 73
   stash(rev => $base_branch_name);
74 74
 %>
75 75
 
76
-% layout 'common';
76
+% layout 'common', title => "branches  \x{30fb} $user/$project";
77 77
 
78 78
   %= javascript begin
79 79
     $('document').ready(function () {
+3 -2
templates/commit.html.ep
... ...
@@ -25,6 +25,7 @@
25 25
   $commit->{author_date} = $git->timestamp($author_date);
26 26
   $commit->{committer_date} = $git->timestamp($committer_date);
27 27
   $from_rev = $commit->{parent} unless defined $from_rev;
28
+  my $commit_short_id = substr($commit->{id}, 0, 7, );
28 29
   
29 30
   # Branches
30 31
   my $branch_refs = $git->references($user, $project, 'heads');
... ...
@@ -43,9 +44,9 @@
43 44
   );
44 45
 %>
45 46
 
46
-% layout 'common';
47
+% layout 'common', title => "$commit->{title_short} \x{30fb} $commit_short_id";
47 48
 
48
-  %= include '/include/header', title => 'Commit diff';
49
+  %= include '/include/header';
49 50
 
50 51
   <div class="container">
51 52
     %= include '/include/project_header';
+1 -1
templates/commits.html.ep
... ...
@@ -37,7 +37,7 @@
37 37
   stash(user => $user, project => $project, rev => $rev);
38 38
 %>
39 39
 
40
-% layout 'common';
40
+% layout 'common', title => "Commit History \x{30fb} $user/$project";
41 41
   
42 42
   %= include '/include/header';
43 43
 
+1 -1
templates/compare.html.ep
... ...
@@ -50,7 +50,7 @@
50 50
   );
51 51
 %>
52 52
 
53
-% layout 'common';
53
+% layout 'common', title => "Comparing $rev1...$rev2 \x{30fb} $user/$project";
54 54
 
55 55
   %= javascript begin
56 56
     $(document).ready(function () {
+2 -1
templates/layouts/common.html.ep
... ...
@@ -6,7 +6,8 @@
6 6
   <head>
7 7
     <meta charset="UTF-8">
8 8
     <meta name="robots" content="index, nofollow" >
9
-    <title>GitPrep</title>
9
+    % my $title = stash('title');
10
+    <title><%= $title ? "$title \x{30fb} Gitprep" : 'Gitprep' %></title>
10 11
     %= stylesheet '/css/bootstrap.min.css', rel => 'stylesheet', media => 'screen';
11 12
     % for my $stylesheet (@$stylesheets) {
12 13
       %= stylesheet $stylesheet;
+1 -1
templates/network.html.ep
... ...
@@ -20,7 +20,7 @@
20 20
   my $default_branch = app->manager->default_branch($user, $project);
21 21
 %>
22 22
 
23
-% layout 'common';
23
+% layout 'common', title => "Network \x{30fb} $user/$project";
24 24
 
25 25
   %= javascript begin
26 26
     $(document).ready(function () {
+1 -1
templates/network/graph.html.ep
... ...
@@ -47,7 +47,7 @@
47 47
   }
48 48
 %>
49 49
 
50
-% layout 'common';
50
+% layout 'common', title => "Network Graph $user/$project/$branch...$rev2_abs";
51 51
   %= include 'include/header';
52 52
   
53 53
   %= javascript begin
+1 -1
templates/project.html.ep
... ...
@@ -54,7 +54,7 @@
54 54
     . ($ssh_port ? ":$ssh_port" : '') . "$rep_home/$user/$project.git";
55 55
 %>
56 56
 
57
-% layout 'common';
57
+% layout 'common', title => "$user/$project";
58 58
 
59 59
   % my $logined = $api->logined;
60 60
 
+1 -1
templates/settings.html.ep
... ...
@@ -109,7 +109,7 @@
109 109
   }
110 110
 %>
111 111
 
112
-% layout 'common';
112
+% layout 'common', title => 'Options';
113 113
   
114 114
   %= javascript begin
115 115
     
+1 -1
templates/tags.html.ep
... ...
@@ -23,7 +23,7 @@
23 23
   my $tags_count = $git->tags_count($user, $project);
24 24
 %>
25 25
 
26
-% layout 'common';
26
+% layout 'common', title => "Tags \x{30fb} $user/$project";
27 27
   
28 28
   %= include '/include/header';
29 29
 
+1 -1
templates/tree.html.ep
... ...
@@ -31,7 +31,7 @@
31 31
   );
32 32
 %>
33 33
 
34
-% layout 'common';
34
+% layout 'common', title => "$project/$dir at $rev \x{30fb} $user/$project";
35 35
   
36 36
   %= include '/include/header';
37 37
 
+9 -6
templates/user-settings.html.ep
... ...
@@ -14,7 +14,7 @@
14 14
   }
15 15
 %>
16 16
 
17
-% layout 'common';
17
+% layout 'common', title => 'Your Profile';
18 18
   
19 19
   %= include '/include/header';
20 20
   
... ...
@@ -24,11 +24,14 @@
24 24
       /
25 25
       <li><a href="<%= url_for("/$user") %>"><%= $user %></a></li>
26 26
     </ul>
27
-    <h4>
28
-      User Account Settings
29
-    </h4>
30
-    <div style="margin-bottom:30px">
31
-      <a class="btn" href="<%= url_for("/reset-password")->query(user => $user) %>">Reset Password</a>
27
+    <div class="border-gray bk-gray-light" style="padding:5px;font-weight:bold;font-size:17px">
28
+      Profile
29
+    </div>
30
+    <div class="border-gray" style="margin-bottom:30px;border-top:none;padding:10px">
31
+      <div style="margin-bottom:10px;font-size:15px">
32
+        <b>ID</b>: <%= $user %>
33
+      </div>
34
+      <a class="btn btn-small" href="<%= url_for("/reset-password")->query(user => $user) %>">Reset Password</a>
32 35
     </div>
33 36
   </div>
34 37
   
+1 -1
templates/user.html.ep
... ...
@@ -24,7 +24,7 @@
24 24
   }
25 25
 %>
26 26
 
27
-% layout 'common';
27
+% layout 'common', title => $user;
28 28
   %= include '/include/header', title => 'Repositories';
29 29
 
30 30
   <div class="container">
+3 -3
xt/user.t
... ...
@@ -260,7 +260,7 @@ note 'Reset password';
260 260
   $t->get_ok('/')->content_like(qr/kimoto1/);
261 261
 }
262 262
 
263
-note 'User Account Settings';
263
+note 'Profile';
264 264
 {
265 265
   unlink $db_file;
266 266
   rmtree $rep_home;
... ...
@@ -285,9 +285,9 @@ note 'User Account Settings';
285 285
   # Login as kimoto1
286 286
   $t->post_ok('/_login?op=login', form => {id => 'kimoto1', password => 'a'});
287 287
 
288
-  # User account settings
288
+  # Profile
289 289
   $t->get_ok('/kimoto1/_settings');
290
-  $t->content_like(qr/User Account Settings/);
290
+  $t->content_like(qr/Profile/);
291 291
   
292 292
   # Other user can't access
293 293
   $t->get_ok('/kimoto2/_settings');