##// END OF EJS Templates
Summary page downloads limited to zip....
marcink -
r1751:47c2a006 beta
parent child Browse files
Show More
@@ -61,7 +61,8 b' def init_model(engine):'
61 61
62 62
63 63 class BaseModel(object):
64 """Base Model for all RhodeCode models, it adds sql alchemy session
64 """
65 Base Model for all RhodeCode models, it adds sql alchemy session
65 66 into instance of model
66 67
67 68 :param sa: If passed it reuses this session instead of creating a new one
@@ -141,7 +141,7 b' class ScmModel(BaseModel):'
141 141 repos_path = self.repos_path
142 142
143 143 baseui = make_ui('db')
144 repos_list = {}
144 repos = {}
145 145
146 146 for name, path in get_filesystem_repos(repos_path, recursive=True):
147 147
@@ -150,7 +150,7 b' class ScmModel(BaseModel):'
150 150 name = Repository.url_sep().join(name.split(os.sep))
151 151
152 152 try:
153 if name in repos_list:
153 if name in repos:
154 154 raise RepositoryError('Duplicate repository name %s '
155 155 'found in %s' % (name, path))
156 156 else:
@@ -160,15 +160,15 b' class ScmModel(BaseModel):'
160 160 if path[0] == 'hg' and path[0] in BACKENDS.keys():
161 161
162 162 # for mercurial we need to have an str path
163 repos_list[name] = klass(safe_str(path[1]),
163 repos[name] = klass(safe_str(path[1]),
164 164 baseui=baseui)
165 165
166 166 if path[0] == 'git' and path[0] in BACKENDS.keys():
167 repos_list[name] = klass(path[1])
167 repos[name] = klass(path[1])
168 168 except OSError:
169 169 continue
170 170
171 return repos_list
171 return repos
172 172
173 173 def get_repos(self, all_repos=None, sort_key=None):
174 174 """
@@ -2154,6 +2154,9 b' div.browserblock {'
2154 2154 font-size: 100%;
2155 2155 line-height: 125%;
2156 2156 padding: 0;
2157 -webkit-border-radius: 6px 6px 0px 0px;
2158 -moz-border-radius: 6px 6px 0px 0px;
2159 border-radius: 6px 6px 0px 0px;
2157 2160 }
2158 2161
2159 2162 div.browserblock .browser-header {
@@ -2715,12 +2718,18 b' div.gravatar img {'
2715 2718 border: 1px solid #316293;
2716 2719 }
2717 2720
2718 .ui-button-small a:hover {
2719
2720 }
2721
2722 input.ui-button-small,.ui-button-small {
2723 background: #e5e3e3 url("../images/button.png") repeat-x !important;
2721 input.ui-button-small,
2722 .ui-button-small {
2723 background-color: #eedc94;
2724 background-repeat: repeat-x;
2725 background-image: -khtml-gradient(linear, left top, left bottom, from(#F4F4F4),to(#ECECEC) );
2726 background-image: -moz-linear-gradient(top, #F4F4F4, #ECECEC);
2727 background-image: -ms-linear-gradient(top, #F4F4F4, #ECECEC);
2728 background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #F4F4F4),color-stop(100%, #F4F4F4) );
2729 background-image: -webkit-linear-gradient(top, #F4F4F4, #ECECEC) );
2730 background-image: -o-linear-gradient(top, #F4F4F4, #ECECEC) );
2731 background-image: linear-gradient(top, #F4F4F4, #ECECEC);
2732
2724 2733 border-top: 1px solid #DDD !important;
2725 2734 border-left: 1px solid #c6c6c6 !important;
2726 2735 border-right: 1px solid #DDD !important;
@@ -2737,13 +2746,16 b' input.ui-button-small,.ui-button-small {'
2737 2746 padding: 3px 3px 3px 3px;
2738 2747 }
2739 2748
2740 input.ui-button-small.xsmall,.ui-button-small.xsmall{
2749 input.ui-button-small.xsmall,
2750 .ui-button-small.xsmall{
2741 2751 padding: 1px 2px 1px 1px;
2742 2752 }
2743 2753
2744 input.ui-button-small:hover,.ui-button-small:hover {
2745 background: #b4b4b4 url("../images/button_selected.png") repeat-x
2746 !important;
2754 input.ui-button-small:hover,
2755 .ui-button-small:hover,
2756 .ui-button-small.xsmall:hover
2757 {
2758 background: #b4b4b4 url("../images/button_selected.png") repeat-x !important;
2747 2759 border-top: 1px solid #ccc !important;
2748 2760 border-left: 1px solid #bebebe !important;
2749 2761 border-right: 1px solid #b1b1b1 !important;
@@ -2775,7 +2787,11 b' ins,div.options a:hover {'
2775 2787 text-decoration: none;
2776 2788 }
2777 2789
2778 img,#header #header-inner #quick li a:hover span.normal,#header #header-inner #quick li ul li.last,#content div.box div.form div.fields div.field div.textarea table td table td a,#clone_url
2790 img,
2791 #header #header-inner #quick li a:hover span.normal,
2792 #header #header-inner #quick li ul li.last,
2793 #content div.box div.form div.fields div.field div.textarea table td table td a,
2794 #clone_url
2779 2795 {
2780 2796 border: none;
2781 2797 }
@@ -2784,19 +2800,27 b' img.icon,.right .merge img {'
2784 2800 vertical-align: bottom;
2785 2801 }
2786 2802
2787 #header ul#logged-user,#content div.box div.title ul.links,#content div.box div.message div.dismiss,#content div.box div.traffic div.legend ul
2803 #header ul#logged-user,#content div.box div.title ul.links,
2804 #content div.box div.message div.dismiss,
2805 #content div.box div.traffic div.legend ul
2788 2806 {
2789 2807 float: right;
2790 2808 margin: 0;
2791 2809 padding: 0;
2792 2810 }
2793 2811
2794 #header #header-inner #home,#header #header-inner #logo,#content div.box ul.left,#content div.box ol.left,#content div.box div.pagination-left,div#commit_history,div#legend_data,div#legend_container,div#legend_choices
2812 #header #header-inner #home,#header #header-inner #logo,
2813 #content div.box ul.left,#content div.box ol.left,
2814 #content div.box div.pagination-left,div#commit_history,
2815 div#legend_data,div#legend_container,div#legend_choices
2795 2816 {
2796 2817 float: left;
2797 2818 }
2798 2819
2799 #header #header-inner #quick li:hover ul ul,#header #header-inner #quick li:hover ul ul ul,#header #header-inner #quick li:hover ul ul ul ul,#content #left #menu ul.closed,#content #left #menu li ul.collapsed,.yui-tt-shadow
2820 #header #header-inner #quick li:hover ul ul,
2821 #header #header-inner #quick li:hover ul ul ul,
2822 #header #header-inner #quick li:hover ul ul ul ul,
2823 #content #left #menu ul.closed,#content #left #menu li ul.collapsed,.yui-tt-shadow
2800 2824 {
2801 2825 display: none;
2802 2826 }
@@ -155,15 +155,7 b''
155 155 %endif
156 156 %else:
157 157 ${h.select('download_options',c.rhodecode_repo.get_changeset().raw_id,c.download_options)}
158 %for cnt,archive in enumerate(c.rhodecode_repo._get_archives()):
159 %if cnt >=1:
160 |
161 %endif
162 <span class="tooltip" title="${_('Download %s as %s') %('tip',archive['type'])}"
163 id="${archive['type']+'_link'}">${h.link_to(archive['type'],
164 h.url('files_archive_home',repo_name=c.dbrepo.repo_name,
165 fname='tip'+archive['extension']),class_="archive_icon")}</span>
166 %endfor
158 <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-button-small")}</span>
167 159 <span style="vertical-align: bottom">
168 160 <input id="archive_subrepos" type="checkbox" name="subrepos"/> <span class="tooltip" title="${_('Check this to download archive with subrepos')}" >${_('with subrepos')}</span>
169 161 </span>
@@ -250,9 +242,7 b" YUE.on(clone_url,'click',function(e){"
250 242
251 243 var tmpl_links = {};
252 244 %for cnt,archive in enumerate(c.rhodecode_repo._get_archives()):
253 tmpl_links['${archive['type']}'] = '${h.link_to(archive['type'],
254 h.url('files_archive_home',repo_name=c.dbrepo.repo_name,
255 fname='__CS__'+archive['extension'],subrepos='__SUB__'),class_="archive_icon")}';
245 tmpl_links["${archive['type']}"] = '${h.link_to('__NAME__', h.url('files_archive_home',repo_name=c.dbrepo.repo_name, fname='__CS__'+archive['extension'],subrepos='__SUB__'),class_='archive_icon ui-button-small')}';
256 246 %endfor
257 247
258 248 YUE.on(['download_options','archive_subrepos'],'change',function(e){
@@ -261,14 +251,18 b" YUE.on(['download_options','archive_subr"
261 251
262 252 for(k in tmpl_links){
263 253 var s = YUD.get(k+'_link');
264 title_tmpl = "${_('Download %s as %s') % ('__CS_NAME__','__CS_EXT__')}";
265 s.title = title_tmpl.replace('__CS_NAME__',new_cs.text);
266 s.title = s.title.replace('__CS_EXT__',k);
254 if(s){
255 var title_tmpl = "${_('Download %s as %s') % ('__CS_NAME__','__CS_EXT__')}";
256 title_tmpl= title_tmpl.replace('__CS_NAME__',new_cs.text);
257 title_tmpl = title_tmpl.replace('__CS_EXT__',k);
258
267 259 var url = tmpl_links[k].replace('__CS__',new_cs.value);
268 var subrepos = YUD.get('archive_subrepos').checked
260 var subrepos = YUD.get('archive_subrepos').checked;
269 261 url = url.replace('__SUB__',subrepos);
262 url = url.replace('__NAME__',title_tmpl);
270 263 s.innerHTML = url
271 264 }
265 }
272 266 });
273 267 </script>
274 268 %if c.show_stats:
General Comments 0
You need to be logged in to leave comments. Login now