aboutsummaryrefslogtreecommitdiff
path: root/rhodecode/templates/journal.html
blob: 4092ddd26bb14001e4a99b90d22d2d61400f070f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
## -*- coding: utf-8 -*-
<%inherit file="base/base.html"/>
<%def name="title()">
    ${_('Journal')} - ${c.rhodecode_name}
</%def>
<%def name="breadcrumbs()">
	${c.rhodecode_name}
</%def>
<%def name="page_nav()">
	${self.menu('home')}
</%def>
<%def name="main()">
	
    <div class="box box-left">
	    <!-- box / title -->
	    <div class="title">
	        <h5>${_('Journal')}</h5>
	    </div>
	    <div>
	    %if c.journal:
            %for entry in c.journal:
            <div style="padding:10px">
                <div class="gravatar">
                    <img alt="gravatar" src="${h.gravatar_url(entry.user.email)}"/>
                </div>
                <div>${entry.user.name} ${entry.user.lastname}</div>
                <div style="padding-left: 45px;padding-top:5px;min-height:20px">${h.action_parser(entry)}</div>
                <div style="float: left; padding-top: 8px;padding-left:18px">
                ${h.action_parser_icon(entry)}
                </div>
                <div style="margin-left: 45px;padding-top: 10px">
                <span style="font-weight: bold;font-size: 1.1em">
		        %if entry.repository:
		          ${h.link_to(entry.repository.repo_name,
		                      h.url('summary_home',repo_name=entry.repository.repo_name))}
		        %else:
		          ${entry.repository_name}
		        %endif             
                </span> - <span title="${entry.action_date}">${h.age(entry.action_date)}</span>
                </div>
            </div>
            <div style="clear:both;border-bottom:1px dashed #DDD;padding:3px 3px;margin:0px 10px 0px 10px"></div>
            %endfor
        %else:
            ${_('No entries yet')}
        %endif   
	    </div>
    </div>
    
    <div class="box box-right">
        <!-- box / title -->
        <div class="title">
            <h5>${_('Following')}</h5>
        </div>
        <div>
        %if c.following:
            %for entry in c.following:
                <div class="currently_following">
                    %if entry.follows_user_id:
                      <img title="${_('following user')}" alt="${_('user')}" src="/images/icons/user.png"/>
                      ${entry.follows_user.full_contact}
                    %endif
                    
                    %if entry.follows_repo_id:
                    
                      %if entry.follows_repository.private:
                        <img class="icon" title="${_('private repository')}" alt="${_('private repository')}" src="/images/icons/lock.png"/>
                      %else:
                        <img class="icon" title="${_('public repository')}" alt="${_('public repository')}" src="/images/icons/lock_open.png"/>
                      %endif
                      
                      ${h.link_to(entry.follows_repository.repo_name,h.url('summary_home',
                        repo_name=entry.follows_repository.repo_name))}
                      
                    %endif
                </div>
            %endfor
        %else:
            ${_('You are not following any users or repositories')}
        %endif               
        </div>
    </div>
    
    <script type="text/javascript">
    YUE.on(YUD.getElementsByClassName('show_more'),'click',function(e){
        var el = e.target;
        YUD.setStyle(YUD.get(el.id.substring(1)),'display','');
        YUD.setStyle(el.parentNode,'display','none');
    });    
    </script>
    
</%def>