##// END OF EJS Templates
fixed journal look & feel
marcink -
r1052:c96651ae beta
parent child Browse files
Show More
@@ -480,7 +480,6 b' def action_parser(user_log):'
480 repo_name=repo_name, revision=rev),
480 repo_name=repo_name, revision=rev),
481 title=message(rev), class_='tooltip')
481 title=message(rev), class_='tooltip')
482 for rev in revs[revs_limit:revs_top_limit]]))
482 for rev in revs[revs_limit:revs_top_limit]]))
483 cs_links += _(' into')
484 if len(revs) > 1:
483 if len(revs) > 1:
485 cs_links += compare_view
484 cs_links += compare_view
486 return cs_links
485 return cs_links
@@ -498,8 +497,8 b' def action_parser(user_log):'
498 'admin_created_repo':(_('[created] repository'), None),
497 'admin_created_repo':(_('[created] repository'), None),
499 'admin_forked_repo':(_('[forked] repository'), None),
498 'admin_forked_repo':(_('[forked] repository'), None),
500 'admin_updated_repo':(_('[updated] repository'), None),
499 'admin_updated_repo':(_('[updated] repository'), None),
501 'push':(_('[pushed]'), get_cs_links),
500 'push':(_('[pushed] into'), get_cs_links),
502 'pull':(_('[pulled]'), None),
501 'pull':(_('[pulled] into'), None),
503 'started_following_repo':(_('[started following] repository'), None),
502 'started_following_repo':(_('[started following] repository'), None),
504 'stopped_following_repo':(_('[stopped following] repository'), None),
503 'stopped_following_repo':(_('[stopped following] repository'), None),
505 }
504 }
@@ -507,10 +506,12 b' def action_parser(user_log):'
507 action_str = map.get(action, action)
506 action_str = map.get(action, action)
508 action = action_str[0].replace('[', '<span class="journal_highlight">')\
507 action = action_str[0].replace('[', '<span class="journal_highlight">')\
509 .replace(']', '</span>')
508 .replace(']', '</span>')
509 action_params_func = lambda :""
510
510 if action_str[1] is not None:
511 if action_str[1] is not None:
511 action = action + " " + action_str[1]()
512 action_params_func = action_str[1]
512
513
513 return literal(action)
514 return [literal(action), action_params_func]
514
515
515 def action_parser_icon(user_log):
516 def action_parser_icon(user_log):
516 action = user_log.action
517 action = user_log.action
@@ -1413,6 +1413,16 b' margin-left:10px;'
1413 margin-right:10px;
1413 margin-right:10px;
1414 }
1414 }
1415
1415
1416 #journal .journal_container{
1417 padding:5px;
1418 clear:both;
1419 margin:0px 5px 0px 10px;
1420 }
1421
1422 #journal .journal_action_container{
1423 padding-left:38px;
1424 }
1425
1416 #journal .journal_user{
1426 #journal .journal_user{
1417 color: #747474;
1427 color: #747474;
1418 font-size: 14px;
1428 font-size: 14px;
@@ -1422,7 +1432,6 b' height: 30px;'
1422 #journal .journal_icon{
1432 #journal .journal_icon{
1423 clear: both;
1433 clear: both;
1424 float: left;
1434 float: left;
1425 padding-left: 36px;
1426 padding-right: 4px;
1435 padding-right: 4px;
1427 padding-top: 3px;
1436 padding-top: 3px;
1428 }
1437 }
@@ -1431,6 +1440,10 b' padding-top:4px;'
1431 min-height:2px;
1440 min-height:2px;
1432 float:left
1441 float:left
1433 }
1442 }
1443 #journal .journal_action_params{
1444 clear: left;
1445 padding-left: 22px;
1446 }
1434 #journal .journal_repo{
1447 #journal .journal_repo{
1435 float: left;
1448 float: left;
1436 margin-left: 6px;
1449 margin-left: 6px;
@@ -1440,14 +1453,14 b' padding-top: 3px;'
1440 clear: both;
1453 clear: both;
1441 color: #777777;
1454 color: #777777;
1442 font-size: 11px;
1455 font-size: 11px;
1443 padding-left: 56px;
1456 padding-left: 22px;
1444 }
1457 }
1445 #journal .journal_repo .journal_repo_name{
1458 #journal .journal_repo .journal_repo_name{
1446 font-weight: bold;
1459 font-weight: bold;
1447 font-size: 1.1em;
1460 font-size: 1.1em;
1448 }
1461 }
1449 #journal .compare_view{
1462 #journal .compare_view{
1450 padding: 5px 0px 5px 3px;
1463 padding: 5px 0px 5px 0px;
1451 width: 95px;
1464 width: 95px;
1452 }
1465 }
1453 .journal_highlight{
1466 .journal_highlight{
@@ -4,28 +4,30 b''
4 %for day,items in c.journal_day_aggreagate:
4 %for day,items in c.journal_day_aggreagate:
5 <div class="journal_day">${day}</div>
5 <div class="journal_day">${day}</div>
6 % for user,entries in items:
6 % for user,entries in items:
7 <div style="padding:10px">
7 <div class="journal_container">
8 <div class="gravatar">
8 <div class="gravatar">
9 <img alt="gravatar" src="${h.gravatar_url(user.email,24)}"/>
9 <img alt="gravatar" src="${h.gravatar_url(user.email,24)}"/>
10 </div>
10 </div>
11 <div class="journal_user">${user.name} ${user.lastname}</div>
11 <div class="journal_user">${user.name} ${user.lastname}</div>
12 % for entry in entries:
12 <div class="journal_action_container">
13 <div class="journal_icon"> ${h.action_parser_icon(entry)}</div>
13 % for entry in entries:
14 <div class="journal_action">${h.action_parser(entry)}</div>
14 <div class="journal_icon"> ${h.action_parser_icon(entry)}</div>
15 <div class="journal_repo">
15 <div class="journal_action">${h.action_parser(entry)[0]}</div>
16 <span class="journal_repo_name">
16 <div class="journal_repo">
17 %if entry.repository is not None:
17 <span class="journal_repo_name">
18 ${h.link_to(entry.repository.repo_name,
18 %if entry.repository is not None:
19 h.url('summary_home',repo_name=entry.repository.repo_name))}
19 ${h.link_to(entry.repository.repo_name,
20 %else:
20 h.url('summary_home',repo_name=entry.repository.repo_name))}
21 ${entry.repository_name}
21 %else:
22 %endif
22 ${entry.repository_name}
23 </span>
23 %endif
24 </div>
24 </span>
25 <div class="date"><span class="tooltip" title="${entry.action_date}">${h.age(entry.action_date)}</span></div>
25 </div>
26 %endfor
26 <div class="journal_action_params">${h.literal(h.action_parser(entry)[1]())}</div>
27 </div>
27 <div class="date"><span class="tooltip" title="${entry.action_date}">${h.age(entry.action_date)}</span></div>
28 <div style="clear:both;border-bottom:1px dashed #DDD;padding:3px 3px;margin:0px 10px 0px 10px"></div>
28 %endfor
29 </div>
30 </div>
29 %endfor
31 %endfor
30 %endfor
32 %endfor
31
33
General Comments 0
You need to be logged in to leave comments. Login now