Changeset - d99bc0e286b3
[Not reviewed]
Merge beta
0 1 0
Marcin Kuzminski - 14 years ago 2012-01-19 19:22:34
marcin@python-works.com
merge with bitbucket
1 file changed with 5 insertions and 5 deletions:
0 comments (0 inline, 0 general)
rhodecode/templates/summary/summary.html
Show inline comments
 
@@ -115,97 +115,98 @@
 
			  		${_('Email')}: <a href="mailto:${c.dbrepo.user.email}">${c.dbrepo.user.email}</a>
 
			  </div>
 
			 </div>
 

	
 
			 <div class="field">
 
			  <div class="label-summary">
 
			      <label>${_('Clone url')}:</label>
 
			  </div>
 
			  <div class="input ${summary(c.show_stats)}">
 
                  <div  style="display:none" id="clone_by_name" class="ui-btn clone">${_('Show by Name')}</div>
 
                  <div id="clone_by_id" class="ui-btn clone">${_('Show by ID')}</div>
 
			      <input style="width:80%;margin-left:105px" type="text" id="clone_url" readonly="readonly" value="${c.clone_repo_url}"/>
 
                  <input style="display:none;width:80%;margin-left:105px" type="text" id="clone_url_id" readonly="readonly" value="${c.clone_repo_url_id}"/>
 
			  </div>
 
			 </div>
 

	
 
			 <div class="field">
 
			  <div class="label-summary">
 
			      <label>${_('Trending files')}:</label>
 
			  </div>
 
			  <div class="input ${summary(c.show_stats)}">
 
                %if c.show_stats:
 
			    <div id="lang_stats"></div>
 
                %else:
 
                   ${_('Statistics are disabled for this repository')}
 
                   %if h.HasPermissionAll('hg.admin')('enable stats on from summary'):
 
                        ${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name),class_="ui-btn")}
 
                   %endif
 
                %endif
 
			  </div>
 
			 </div>
 

	
 
			 <div class="field">
 
			  <div class="label-summary">
 
			      <label>${_('Download')}:</label>
 
			  </div>
 
			  <div class="input ${summary(c.show_stats)}">
 
		        %if len(c.rhodecode_repo.revisions) == 0:
 
		          ${_('There are no downloads yet')}
 
		        %elif c.enable_downloads is False:
 
		          ${_('Downloads are disabled for this repository')}
 
                    %if h.HasPermissionAll('hg.admin')('enable downloads on from summary'):
 
                        ${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name),class_="ui-btn")}
 
                    %endif
 
		        %else:
 
			        ${h.select('download_options',c.rhodecode_repo.get_changeset().raw_id,c.download_options)}
 
			             <span id="${'zip_link'}">${h.link_to('Download as zip',h.url('files_archive_home',repo_name=c.dbrepo.repo_name,fname='tip.zip'),class_="archive_icon ui-btn")}</span>
 
                    <span style="vertical-align: bottom">
 
                        <input id="archive_subrepos" type="checkbox" name="subrepos"/> <span class="tooltip" title="${_('Check this to download archive with subrepos')}" >${_('with subrepos')}</span>
 
                        <input id="archive_subrepos" type="checkbox" name="subrepos" />
 
                        <label for="archive_subrepos" class="tooltip" title="${_('Check this to download archive with subrepos')}" >${_('with subrepos')}</label>
 
                    </span>
 
			    %endif
 
			  </div>
 
			 </div>
 
	  </div>
 
	</div>
 
</div>
 

	
 
%if c.show_stats:
 
<div class="box box-right"  style="min-height:455px">
 
    <!-- box / title -->
 
    <div class="title">
 
        <h5>${_('Commit activity by day / author')}</h5>
 
    </div>
 

	
 
    <div class="graph">
 
         <div style="padding:0 10px 10px 15px;font-size: 1.2em;">
 
         %if c.no_data:
 
           ${c.no_data_msg}
 
           %if h.HasPermissionAll('hg.admin')('enable stats on from summary'):
 
                ${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name),class_="ui-btn")}
 
           %endif
 
        %else:
 
            ${_('Loaded in')} ${c.stats_percentage} %
 
        %endif
 
        </div>
 
        <div id="commit_history" style="width:450px;height:300px;float:left"></div>
 
        <div style="clear: both;height: 10px"></div>
 
        <div id="overview" style="width:450px;height:100px;float:left"></div>
 

	
 
    	<div id="legend_data" style="clear:both;margin-top:10px;">
 
	    	<div id="legend_container"></div>
 
	    	<div id="legend_choices">
 
				<table id="legend_choices_tables" class="noborder" style="font-size:smaller;color:#545454"></table>
 
	    	</div>
 
    	</div>
 
    </div>
 
</div>
 
%endif
 

	
 
<div class="box">
 
    <div class="title">
 
        <div class="breadcrumbs">
 
        %if c.repo_changesets:
 
            ${h.link_to(_('Shortlog'),h.url('shortlog_home',repo_name=c.repo_name))}
 
        %else:
 
            ${_('Quick start')}
 
         %endif
 
@@ -406,100 +407,99 @@ function SummaryPlot(from,to,dataset,ove
 
        grid: {
 
            hoverable: true,
 
            clickable: true,
 
            autoHighlight:true,
 
            color: "#999"
 
        },
 
        //selection: {mode: "x"}
 
    };
 
    var overview_options = {
 
        legend:{show:false},
 
        bars: {show:true,barWidth: 2,},
 
        shadowSize: 0,
 
        xaxis: {mode: "time", timeformat: "%d/%m/%y",},
 
        yaxis: {ticks: 3, min: 0,tickDecimals:0,},
 
        grid: {color: "#999",},
 
        selection: {mode: "x"}
 
    };
 

	
 
    /**
 
    *get dummy data needed in few places
 
    */
 
    function getDummyData(label){
 
        return {"label":label,
 
         "data":[{"time":0,
 
             "commits":0,
 
                 "added":0,
 
                 "changed":0,
 
                 "removed":0,
 
            }],
 
            "schema":["commits"],
 
            "color":'#ffffff',
 
        }
 
    }
 

	
 
    /**
 
     * generate checkboxes accordindly to data
 
     * @param keys
 
     * @returns
 
     */
 
    function generateCheckboxes(data) {
 
        //append checkboxes
 
        var i = 0;
 
        choiceContainerTable.innerHTML = '';
 
        for(var pos in data) {
 

	
 
            data[pos].color = i;
 
            i++;
 
            if(data[pos].label != ''){
 
                choiceContainerTable.innerHTML += '<tr><td>'+
 
                '<input type="checkbox" name="' + data[pos].label +'" checked="checked" />'
 
                +data[pos].label+
 
                '</td></tr>';
 
                choiceContainerTable.innerHTML +=
 
                    '<tr><td><input type="checkbox" id="id_user_{0}" name="{0}" checked="checked" /> \
 
                     <label for="id_user_{0}">{0}</label></td></tr>'.format(data[pos].label);
 
            }
 
        }
 
    }
 

	
 
    /**
 
     * ToolTip show
 
     */
 
    function showTooltip(x, y, contents) {
 
        var div=document.getElementById('tooltip');
 
        if(!div) {
 
            div = document.createElement('div');
 
            div.id="tooltip";
 
            div.style.position="absolute";
 
            div.style.border='1px solid #fdd';
 
            div.style.padding='2px';
 
            div.style.backgroundColor='#fee';
 
            document.body.appendChild(div);
 
        }
 
        YUD.setStyle(div, 'opacity', 0);
 
        div.innerHTML = contents;
 
        div.style.top=(y + 5) + "px";
 
        div.style.left=(x + 5) + "px";
 

	
 
        var anim = new YAHOO.util.Anim(div, {opacity: {to: 0.8}}, 0.2);
 
        anim.animate();
 
    }
 

	
 
    /**
 
     * This function will detect if selected period has some changesets
 
       for this user if it does this data is then pushed for displaying
 
       Additionally it will only display users that are selected by the checkbox
 
    */
 
    function getDataAccordingToRanges(ranges) {
 

	
 
        var data = [];
 
        var new_dataset = {};
 
        var keys = [];
 
        var max_commits = 0;
 
        for(var key in dataset){
 

	
 
            for(var ds in dataset[key].data){
 
                commit_data = dataset[key].data[ds];
 
                if (commit_data.time >= ranges.xaxis.from && commit_data.time <= ranges.xaxis.to){
 

	
 
                    if(new_dataset[key] === undefined){
 
                        new_dataset[key] = {data:[],schema:["commits"],label:key};
 
                    }
 
                    new_dataset[key].data.push(commit_data);
0 comments (0 inline, 0 general)