diff -r 13ec43cec79774164afaf7205165d0113de6d338 -r 0d35b479f0dfd864c5a82cdc885f530efa9d05ba indefero/src/IDF/FileUtil.php --- a/indefero/src/IDF/FileUtil.php Mon Mar 10 22:34:32 2014 -0500 +++ b/indefero/src/IDF/FileUtil.php Tue Mar 11 21:01:25 2014 -0500 @@ -65,12 +65,15 @@ } $table = array(); $i = 1; - foreach (self::splitIntoLines($content) as $line) { + /*foreach (self::splitIntoLines($content) as $line) { $table[] = ''.$i.'' .''.self::emphasizeControlCharacters(Pluf_esc($line)).''; $i++; } - return Pluf_Template::markSafe(implode("\n", $table)); + return Pluf_Template::markSafe(implode("\n", $table));*/ + //var_dump($fileinfo); + $content = ''; + return Pluf_Template::markSafe($content); } /** diff -r 13ec43cec79774164afaf7205165d0113de6d338 -r 0d35b479f0dfd864c5a82cdc885f530efa9d05ba indefero/src/IDF/Views/Source.php --- a/indefero/src/IDF/Views/Source.php Mon Mar 10 22:34:32 2014 -0500 +++ b/indefero/src/IDF/Views/Source.php Tue Mar 11 21:01:25 2014 -0500 @@ -380,10 +380,11 @@ $props = $scm->getProperties($commit, $request_file); $cache = Pluf_Cache::factory(); $key = sha1($request_file.$commit); - if (null === ($content=$cache->get($key))) { - $content = IDF_FileUtil::highLight($extra['mime'], $scm->getFile($request_file_info)); + $content = IDF_FileUtil::highLight($extra['mime'], $scm->getFile($request_file_info)); + /*if (null === ($content=$cache->get($key))) { + $cache->set($key, $content); - } + }*/ return Pluf_Shortcuts_RenderToResponse('idf/source/'.$scmConf.'/file.html', array( 'page_title' => $page_title, diff -r 13ec43cec79774164afaf7205165d0113de6d338 -r 0d35b479f0dfd864c5a82cdc885f530efa9d05ba indefero/src/IDF/Views/User.php --- a/indefero/src/IDF/Views/User.php Mon Mar 10 22:34:32 2014 -0500 +++ b/indefero/src/IDF/Views/User.php Tue Mar 11 21:01:25 2014 -0500 @@ -56,11 +56,11 @@ $form = new IDF_Form_ProjectRequest(null, $params); } return Pluf_Shortcuts_RenderToResponse('idf/user/projectrequest.html', - array('page_title' => $title, - 'form' => $form, - 'success' => $success, - 'error' => $error), - $request); + array('page_title' => $title, + 'form' => $form, + 'success' => $success, + 'error' => $error), + $request); } /** @@ -114,24 +114,24 @@ $pag->sort_order = array('modif_dtime', 'ASC'); // will be reverted $pag->sort_reverse_order = array('modif_dtime'); $list_display = array( - 'id' => __('Id'), - array('project', 'Pluf_Paginator_FkToString', __('Project')), - array('summary', 'IDF_Views_IssueSummaryAndLabels', __('Summary')), - array('status', 'IDF_Views_Issue_ShowStatus', __('Status')), - array('modif_dtime', 'Pluf_Paginator_DateAgo', __('Last Updated')), + 'id' => __('Id'), + array('project', 'Pluf_Paginator_FkToString', __('Project')), + array('summary', 'IDF_Views_IssueSummaryAndLabels', __('Summary')), + array('status', 'IDF_Views_Issue_ShowStatus', __('Status')), + array('modif_dtime', 'Pluf_Paginator_DateAgo', __('Last Updated')), ); $pag->configure($list_display, array(), array('status', 'modif_dtime')); $pag->items_per_page = 10; $pag->no_results_text = ($working) ? __('No issues are assigned to you, yeah!') : __('All the issues you submitted are fixed, yeah!'); $pag->setFromRequest($request); return Pluf_Shortcuts_RenderToResponse('idf/user/dashboard.html', - array( - 'page_title' => $title, - 'nb_submit' => $nb_submit, - 'nb_owner' => $nb_owner, - 'issues' => $pag, - ), - $request); + array( + 'page_title' => $title, + 'nb_submit' => $nb_submit, + 'nb_owner' => $nb_owner, + 'issues' => $pag, + ), + $request); } /** @@ -147,9 +147,9 @@ $params = array('user' => $request->user); if ($request->method == 'POST') { $form = new IDF_Form_UserAccount(array_merge( - (array)$request->POST, - (array)$request->FILES - ), $params); + (array)$request->POST, + (array)$request->FILES + ), $params); if ($form->isValid()) { $user = $form->save(); $url = Pluf_HTTP_URL_urlForView('IDF_Views_User::myAccount'); @@ -166,13 +166,13 @@ $mailaddrs = Pluf::factory('IDF_EmailAddress')->get_email_addresses_for_user($request->user); return Pluf_Shortcuts_RenderToResponse('idf/user/myaccount.html', - array('page_title' => __('Your Account'), - 'api_key' => $api_key, - 'ext_pass' => $ext_pass, - 'keys' => $keys, - 'mailaddrs' => $mailaddrs, - 'form' => $form), - $request); + array('page_title' => __('Your Account'), + 'api_key' => $api_key, + 'ext_pass' => $ext_pass, + 'keys' => $keys, + 'mailaddrs' => $mailaddrs, + 'form' => $form), + $request); } /** @@ -233,9 +233,9 @@ $form = new IDF_Form_UserChangeEmail(); } return Pluf_Shortcuts_RenderToResponse('idf/user/changeemail.html', - array('page_title' => __('Confirm The Email Change'), - 'form' => $form), - $request); + array('page_title' => __('Confirm The Email Change'), + 'form' => $form), + $request); } @@ -286,22 +286,24 @@ $user = $users[0]; $user_data = IDF_UserData::factory($user); - $ownedprojects = IDF_Views::getOwnedProjects($request->user); + $ownedprojects = IDF_Views::getOwnedProjects($user); $pubprojects = array(); $privprojects = 0; - foreach($ownedprojects as $proj) + if ($ownedprojects != null && count($ownedprojects) > 0 ) { - if ($proj->private == 1) + foreach($ownedprojects as $proj) { - $privprojects += 1; - continue; - } else { - $pubprojects[] = $proj; + if ($proj->private == 1) + { + $privprojects += 1; + continue; + } else { + $pubprojects[] = $proj; + } } } - $projectstats = IDF_Views::getProjectsStatistics($pubprojects); //print_r($projectstats); //echo $privprojects; @@ -311,10 +313,10 @@ $pag = new Pluf_Paginator(new IDF_Issue()); $pag->model_view = "project_find_private"; $pag->class = 'recent-issues'; - $pag->item_extra_props = array('current_user' => $request->user); + $pag->item_extra_props = array('current_user' => $user); $pag->summary = __('This table shows the open issues.'); - $pag->forced_where = new Pluf_SQL("owner = " . $request->user->id); - $pag->action = 'idf_dashboard'; + $pag->forced_where = new Pluf_SQL("owner = " . $user->id); + $pag->action = array('idf_user_view', array($user->login)); $pag->sort_order = array('modif_dtime', 'ASC'); // will be reverted $pag->sort_reverse_order = array('modif_dtime'); $list_display = array( @@ -326,16 +328,17 @@ array('modif_dtime', 'Pluf_Paginator_DateAgo', __('Last Updated')), ); $pag->configure($list_display, array(), array('status', 'modif_dtime')); - $pag->items_per_page = 10; + $pag->items_per_page = 20; $pag->no_results_text = __('This user has no issues assigned to them!'); $pag->setFromRequest($request); $pag2 = new Pluf_Paginator(new IDF_Commit()); - $pag->model_view = "project_find_private"; + $pag2->nb_items = 20; + $pag2->model_view = "project_find_private"; $pag2->class = 'recent-issues'; $pag2->summary = __('This table shows the latest commits of this user.'); - $pag2->forced_where = new Pluf_SQL("author = " . $request->user->id); - $pag2->action = 'idf_dashboard'; + $pag2->forced_where = new Pluf_SQL("author = " . $user->id); + $pag2->action = array('idf_user_view', array($user->login)); $pag2->sort_order = array('creation_dtime', 'ASC'); // will be reverted $pag2->sort_reverse_order = array('creation_dtime'); $list_display = array( @@ -349,18 +352,18 @@ $pag2->no_results_text = __('This user has not made any commits yet!'); $pag2->setFromRequest($request); - $projects = IDF_Views::getOwnedProjects($user); - return Pluf_Shortcuts_RenderToResponse('idf/user/public.html', - array('page_title' => (string) $user, - 'member' => $user, - 'user_data' => $user_data, - 'projects' => $projects, - 'issues' => $pag, - 'commits' => $pag2, - 'stats' => new Pluf_Template_ContextVars($projectstats), - 'privatecount' => $privprojects - ), - $request); + $projects = IDF_Views::getOwnedProjects($user); + return Pluf_Shortcuts_RenderToResponse('idf/user/public.html', + array('page_title' => (string) $user, + 'member' => $user, + 'user_data' => $user_data, + 'projects' => $projects, + 'issues' => $pag, + 'commits' => $pag2, + 'stats' => new Pluf_Template_ContextVars($projectstats), + 'privatecount' => $privprojects + ), + $request); } } @@ -384,11 +387,11 @@ { $project = $issue->get_project(); $edit = Pluf_HTTP_URL_urlForView('IDF_Views_Issue::view', - array($project->shortname, $issue->id)); + array($project->shortname, $issue->id)); $tags = array(); foreach ($issue->get_tags_list() as $tag) { $url = Pluf_HTTP_URL_urlForView('IDF_Views_Issue::listLabel', - array($project->shortname, $tag->id, 'open')); + array($project->shortname, $tag->id, 'open')); $tags[] = sprintf('%s', $url, Pluf_esc((string) $tag)); } $out = ''; @@ -397,3 +400,4 @@ } return sprintf('%s', $edit, Pluf_esc($issue->summary)).$out; } + diff -r 13ec43cec79774164afaf7205165d0113de6d338 -r 0d35b479f0dfd864c5a82cdc885f530efa9d05ba indefero/src/IDF/templates/idf/base.html --- a/indefero/src/IDF/templates/idf/base.html Mon Mar 10 22:34:32 2014 -0500 +++ b/indefero/src/IDF/templates/idf/base.html Tue Mar 11 21:01:25 2014 -0500 @@ -133,6 +133,28 @@ return result }; +function gotoline() +{ + if ($('.number' + window.location.hash.substring(1)).first().offset() == null) + { + window.setTimeout(gotoline, 100); + return; + } + $('html, body').animate({ + scrollTop: ($('.number' + window.location.hash.substring(1)).first().offset().top) +},500); + changegutter(); + } + function changegutter() + { + if ($('.gutter > [class*=number]').first().offset() == null) + { + window.setTimeout(changegutter, 100); + return; + } + $(".gutter > [class*=number]").each(function(){ $(this).html('' + $(this).html() + ''); }); + + } $(function() { @@ -164,7 +186,17 @@ )); SyntaxHighlighter.all(); + if(window.location.hash) + { + window.setTimeout(gotoline, 100); + } else { + window.setTimeout(changegutter, 100); + } + + + }); + {/literal} diff -r 13ec43cec79774164afaf7205165d0113de6d338 -r 0d35b479f0dfd864c5a82cdc885f530efa9d05ba indefero/src/IDF/templates/idf/user/myaccount.html --- a/indefero/src/IDF/templates/idf/user/myaccount.html Mon Mar 10 22:34:32 2014 -0500 +++ b/indefero/src/IDF/templates/idf/user/myaccount.html Tue Mar 11 21:01:25 2014 -0500 @@ -194,7 +194,7 @@ for(var i = 0; i < 32; i++) key += chars[Math.floor(Math.random() * 32)]; $("#id_otpkey").val(key); - var url = "https://chart.googleapis.com/chart?chs=300x300&cht=qr&chl=otpauth%3A%2F%2Ftotp%srchub:" + user + "?secret=" + $("#id_otpkey").val().toUpperCase() + "%26issuer=srchub&choe=UTF-8"; + var url = "https://chart.googleapis.com/chart?chs=300x300&cht=qr&chl=otpauth%3A%2F%2Ftotp%2Fsrchub:" + user + "?secret=" + $("#id_otpkey").val().toUpperCase() + "%26issuer=srchub&choe=UTF-8"; $("#QRcode").html('') return false; });