Commit Graph

245 Commits (9ec5d1f09e650e68f43d95e5e1e0c12e7630b2cf)

Author SHA1 Message Date
gstein 1470ccd12f Various UI fixes and tweaks
* viewcvs.py:
  - make "search" param a sticky variable; it should propagate through
    the screens, across column sort changes, etc
  - htmlify() the search expression
  - add a new variable to specify whether a search form is needed on
    the directory page (to select a tag and/or a regex)
  - add [files_shown] since [num_files] isn't "right"; need longer
    term fix for variable w.r.t message when zero files are selected
  - always create form parameters because we may have a search form
    (and now use them in the search form)
  - use new ezt.boolean() where appropriate

* directory.ezt, dir_alternate.ezt:
  - display the current location and selection criteria in one block
  - move selection form to bottom of screen; this emphasizes the
    directory contents rather than how to select/refine the contents
  - tweak the "no_match" message since the search expression could be
    causing the zero-matches
  - use a table to format the various forms of selection criteria
  - use the params for *both* tag selection and regex selection
  - optionally display the "show all files" button, based on whether
    there is current selection criteria or not


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@412 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-22 04:54:38 +00:00
gstein ae049f281b Implement the alternate view: revnum in front, linking to log page;
fname in second column, linking to HEAD.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@408 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-21 12:22:12 +00:00
gstein 70db664ec6 Clean up the mess in directory.ezt
* rather than using [headers] to determine the columns, just display
  them explicitly. use the new [have_logs] to determine whether the
  additional columns are needed.

* fix a bunch of problems in directory.ezt relating to unreadable
  files or errors while reading CVS information (lining up columns and
  whatnot)

* remove the "show_author" config option, favoring removal from the
  templates instead.

* remove the unused "hide_non_readable" option. remove the
  "use_java_script" and "open_extern_window" options; these were
  removed recently, but accidentally left in the .conf file.

* remove the "flip_links_in_dirview" option, favoring a new template
  instead. added a copy of directory.ezt as dir_alternate.ezt. changes
  to actually make the columns flipped are coming in a future commit.

* remove the [rev_in_front], [rows.span], and [rows.cols] options;
  these are now obsolete given the above changes

* add documentation to upgrading.html


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@403 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-21 04:50:33 +00:00
timcera 8432cb1c1d An [end] directive was missing, ViewCVS was throwing the new unclosed block
error.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@397 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-18 06:11:13 +00:00
gstein d71c208540 Big update! Convert the rest of the pages to use templates.
* annotation, human readable diff, CvsGraph, and a marked-up file all
  use a template to generate the basic parts of the page. In many
  cases (annotate, graph, markup), the content is still rendered
  by other code.

* for the diff support, we take advantage of the new list iteration
  support in EZT to "iterate on" a DiffSource object, which parses a
  diff stream into structured object for the template to display.

* for the CvsGraph page, we make use of EZT's new stream support to
  stream in an imagemap from the CvsGraph executable. the graph page
  includes a navigation header now.

* updated the upgrading.html page with some items missing from the 0.7
  instructions, plus new instructions.

* because of the complete conversion, the configuration file no longer
  specifies colors or images -- these are all in the templates now.
  Removed the relevant material from config.py and viewcvs.conf.dist.

* converted html_footer() to use the new footer.ezt template because
  we still have to call that manually in the markup and annotate
  cases.

* add the templates to viewcvs.conf.dist and config.py

* added a handy generate_page() utility for generating pages from a
  template and its input data.

* removed download_link, html_icon, html_option, print_diff_select,
  and navigate_header utility functions. These all printed HTML to the
  output, but are obsolete due to the new templates.

* the new nav_header_data() utility function fills in data used by the
  "header.ezt" template, which replaces the navigate_header() func.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@395 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-18 00:22:14 +00:00
gstein 830c6ba76c Move the footer to its own template, and include it from the others.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@394 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-18 00:09:00 +00:00
gstein e9a4e3bbe2 Minor fix to the diff-selection popup. It tested for "c" when it
should have been "s". (the resulting bug is that a side-by-side diff
would never appear pre-selected in the popup)


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@393 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-18 00:06:53 +00:00
pefu acbf138a6e Add Help buttons.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@386 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-12 20:42:31 +00:00
timcera d59be9459d * Added regular expression search of all files in a directory.
+ created search_files function
  + split view_checkout into view_checkout and process_checkout.
    Wanted the process_checkout code to checkout the files from the
    repository.
  + split get_file_data into get_file_data and get_file_tests.
    Wanted get_file_tests to tell what kind of object was in the repository.
  + Modified directory.ezt to include searches.
    - Moved select by tag function up to the top of the page
    - Included code to return how many files survived the filters
    - The 'Reset' button now says 'Show all files'.
  + Modified viewcvs.conf.dist to include use_re_search option.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@378 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-11 05:19:22 +00:00
pefu d11dffb713 Table header should look left aligned and green similar
to the table headers in directory.ezt and query.ezt


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@361 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-11-27 22:13:30 +00:00
pefu 16281c1db5 A lot of small changes in one commit:
lib/viewcvs.py, templates/directory.ezt:
* Fix SF Bug [ #486085 ] checkout_magic_path uses invalid chars
  Provide backward compatibility for old style URLs.

standalone.py:
* Changed from calling viewcvs.main() to calling viewcvs.runcgi(),
  so that the timing results sampled by debug are displayed in the browser.

* Added two more toggles to the GUI.  Now it is simpler to perform a
  systematic test of several permutations of these config flags.

* Shortened the label text for the query entry field in the standalone GUI.

* Added some comments to this Tkinter GUI setup code, which has grown beyond
  than what I was my first intention.

lib/viewcvs.py, lib/config.py, cgi/viewcvs.conf.dist, standalone.py
and templates/directory.ezt:
* Added a new config flag variable called flip_links_in_dirview, which defaults
  to the classic setting (like cvsweb).  If it is set to 1 instead then the
  file and revision columns are exchanged and at the same time these two columns
  exchange the meaning of their links.  This design should solve the user
  interface design problem brought up first in
    http://www.lyra.org/pipermail/viewcvs-dev/2001-November/000285.html
  which was than than further discussed here:
    http://www.lyra.org/pipermail/viewcvs-dev/2001-November/000288.html
    http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/viewcvs/viewcvs/templates/Attic/direasy.ezt?hideattic=0
    http://www.lyra.org/pipermail/viewcvs/2001q4/000533.html
  Since than I received two personal emails from people sharing my POV.

  Unfortunately the huge [for rows]-block in directory.ezt has grown
  again.  But it is difficult to avoid this with the current design of
  lib/viewcvs.py and the templating engine lib/ezt.py.  I'm open to
  suggestions.

  In lib/viewcvs.py function view_directory I factored out the computation
  of row.span into a new local variable called span, since the number of
  empty trailing columns is decreased by one if the flip_links layout
  is configured.

templates/query.ezt:
* Rearranged the table columns in the commit database query result table,
  so that they match the existing table layouts of directory.ezt and
  log_table.ezt.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@360 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-11-27 21:56:06 +00:00
pefu 6a0c6f2029 Log messages should look like they were
formatted in the first place. (see viewcvs.print_log() last line for
example, how the log message is displayed elsewhere


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@355 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-11-19 14:36:18 +00:00
pefu 889f71f657 Even on the 1600x1200 pixel display of my new DELL Inspiron the table
generated by query.cgi was unacceptable wide.

After I widened the browser window so that it occuoies the whole
screen width, it still required a horizontal scrollbar.
I find this unusable.  So I decided to remove the
Description column and put the Log message blocks on a separate
table row.

But since this may be a matter of taste, I left the original
stuff in, but commented out.  People with really large
screens (2000 pixels and up) might want to revert this change.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@353 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-11-19 12:09:55 +00:00
gstein cef439958f Remove direasy.ezt.
directory.ezt incorporated its cvsgraph icon, so its only difference is
flipping the links around. But the existing definition for the links makes
more sense, so that leaves direasy.ezt without any new or interesting
features.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@347 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-11-19 03:11:21 +00:00
gstein 175d6f0ac4 Updates to the help stuff
* rename ~helppage~ magic path to ~docroot~ with the intent that we might
  serve other content out of there (including users' data if necessary)

* shift Help link down below the logo where it is more visible

* rename g_template_dir to its real semantic: g_install_dir

* rename view_helppage() to view_doc() and use new g_install_dir to find the
  doc root.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@346 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-11-19 02:59:13 +00:00
gstein 983a2c298e Minor tweaks:
- "view annotated" rather than "view annotation" (we don't want to imply
  there is some kind of annotation facility; we really need a better word
  for this; and no... 'blame' isn't it :-)

- use a rowspan on the revision column


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@339 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-11-18 11:45:54 +00:00
gstein 51988428f2 Fix up the diff links:
* put them back on a single line

* restore ordering -- "previous" is the most common, so it goes first

* add the action text into Diff links for larger hit targets
  (idea from Stephen Lamm <slamm@yahoo-inc.com>)


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@338 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-11-18 11:30:27 +00:00
gstein 9a8c28d886 Shift some presentation code out of query.py; do the work in the template.
Also, make sure the result table isn't shown if we haven't run a query.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@337 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-11-18 11:11:38 +00:00
gstein b048907b6d Complete the conversion of the cvsdb query facility over to templates. This
was a "minimal impact" switch. A bit more cleanup is coming separately.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@335 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-11-18 10:34:35 +00:00
gstein 674a2ee494 incorporate the graph icon from direasy (add size params). keep the links
the same. eliminate the border around the image.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@327 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-11-17 09:25:19 +00:00
timcera 9fdfe05d24 * Corrected the colspan option for the 'Log' row.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@324 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-11-15 20:42:25 +00:00
pefu 2bc61a621d direasy.ezt is a simple variation based on directory.ezt.
Recently Stephen Lamm wrote:
> Have file links go to the latest revision instead of the cvs log.
> When I click on the file name, I expect to get that file, and not
> some meta information about it. Another column next the name could
> have a link like "(Log)" to get that information. That would be
> more explicit. I find it strange to click on the revision number
> to get a file because I typically do not think of files in terms
> of revision numbers. (The revision number probably should not have
> a link on it at all.)

In this template the revision number carries a link to the Log
page  (so the meaning of both columns are simply swapped).
Additionally (if you enable cvsgraph) the text string "(graph)" is replaced
by a small 16x16 pixel icon.

I experimented with the suggestion to add the word '(Log)' to each
filename but in the end I think that both (graph) and (log)
waste a lot of valueable horizontal screen space.

If you want to try this template out, you can simply start
	./standalone.py --gui
in the viewcvs directory and select the radio button labeled
with 'direasy.ezt'.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@322 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-11-15 18:12:22 +00:00
pefu eae9e0131f Added the utc date (I missed that)
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@321 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-11-15 18:00:56 +00:00
timcera 7232487cf0 * Combined the 'Branches' and 'Tags' columns.
* Probably fixed the problem of many tags in the table.
* Minor format changes.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@317 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-11-15 02:10:26 +00:00
pefu 18667d725d Open a new browser window to display help pages.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@314 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-11-13 22:32:29 +00:00
timcera c80469ba5e * Moved log to seperate line.
* Changed link text.
* Added 'Diffs' column.
* Removed link from revision number.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@312 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-11-13 20:59:35 +00:00
pefu c8f661e626 * Fixed the links on the help pages to point to the viewcvs website @ SF.
* Finally removed the duplicated text from directory.ezt and replaced it
  with a 'Help' button at the upper right corner.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@311 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-11-13 20:54:07 +00:00
timcera a0503097c0 * Developed a solution for the hanging 'Diff' issue. Rather simple solution
really, which means that I probably overlooked something, but it works.
* Rearranged the diff links.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@302 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-11-09 18:06:11 +00:00
timcera 1e5d9dd974 * Added &nbsp; to the 'Branch' and 'Tag' columns in order to have them
maintain the row color if there aren't any entries.
* Colapsed the 'Branch Path' column into 'Branch'
* Added <br> and &nbps; tags where appropriate to correctly format each entry.
* Diff to branch point works correctly.
* Many misc. changes.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@301 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-11-09 18:01:49 +00:00
timcera 9639a02d25 * Added log_table.ezt as a draft table format for the log page. Need to add
logic for sorting similar to what is available on directory page. Need more
  testing to make sure format is scalable to complex repositories.
* Fixed small bug in log.ezt.  Stray 'Diff' string in the wrong place.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@291 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-11-03 04:17:17 +00:00
pefu 5367f945e7 swapped colors to increase contrast between first line of table and table header.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@289 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-10-29 07:53:01 +00:00
gstein 9a797cdd53 [ this was missed from a previous commit; checking it in... ]
The missing column is not dependent upon the show_subdir_lastmod flag -- we
don't need to propagate that into the template. If that branch of logic in
the template is reached, then we *know* that show_subdir_lastmod is enabled.
Just hard-code the column (for the revision).

Also a minor optimization: shifted the setting of row.graph_href rather than
setting it for every dir in file_data (note that we skip some of them).


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@288 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-10-29 04:35:51 +00:00
timcera 1c26250da7 Patch addresses 2 problems that occurred with certain combinations of the
use_cvsgraph and show_subdir_lastmod options:

* If use_cvsgraph and show_subdir_lastmod were both on, some subdirectory
  entries would get (graph) links.
* Under various combinations of settings, the directory entries would not
  line up in the proper columns.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@283 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-10-26 14:45:47 +00:00
pefu 127d12fd9c Started testing, minor bugfix
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@278 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-10-25 17:34:07 +00:00
gstein bff90274b1 First pass at converting the database query stuff over to use templates. The
new template is templates/query.ezt and is the "query" config option in the
[templates] section.

This converts about half the code. The database results come after the
footer, but that will be fixed in a (near) future revision.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@275 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-10-25 09:21:47 +00:00
pefu 91f6f38ae4 * Removed the Graph column from directory display and changed the File
column to colspan=2, if cfg.options.use_cvsgraph is enabled.  This is
  a very minimal change not solving what Greg called
     """the stupid stuff about table headers in view_directory() and
        directory.ezt needs to be cleaned up. Specifically, the whole
	"show_author" crap should just be an aspect of the template, not the
	code."""
  Although I still believe, that the /icons/small/image2.gif would look
  better, I left the text "(graph)" as represenation of the link in there.
* Added a link to the cvsgraph display to the log.ezt template.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@268 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-10-24 23:26:09 +00:00
gstein d89a788783 Complete the rest of the log template.
CHANGE: the "Long colored diff" format option is now specified with "l"
  rather than "H". This may affect persistent URLs or existing .conf files.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@256 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-10-21 11:06:25 +00:00
gstein 3d81935a92 Shift the log entry generation to the log.ezt template.
This change is focused around augment_entry(), which adds a bunch of
additional information into the entry object. Basically, augment_entry()
contains the logic from print_log() (leaving out the HTML generation).

print_log() also had a bug fix made to it (and these fixes are in the new
augment_entry). Essentially, the "next main" computation was wrong in two
ways: it applied int() to each component of c_rev, but that would make the
later comparison always fail (int != string); the second probably was that
c_work was created by splitting rev, but it should have split next. With
this fix, you can now diff against "next main".

Did a few cleanups/optimizations (rev_order use in print_log, dropping a
separate "filename" variable when computing file_url, use entry.changed
rather than rev_map).


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@254 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-10-21 06:54:51 +00:00
gstein 9e55650c62 *) download_url() now adds request.amp_query to all URLs since all callers
did that anyways (except for one spot -- noted below)

*) In download_link(), open the window initially pointing at about:blank
   rather than an *incorrect* URL (it didn't have amp_query). Using
   about:blank will be faster anyways; and the TARGET stuff in the anchor
   will direct it to the proper URL.

*) Add templates/log.ezt for the file-log page

*) Change view_log() to begin using the new template. It is now used for the
   top portion of the file. (e.g. more work to do on the entries and bottom
   portion of the page)

*) ezt.py now allows '/' in the directives (typically, for quoted stuff)
   (this regex stuff really should be tweaked to allow just about anything
   in the quoted portions)


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@247 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-10-20 22:51:56 +00:00
gstein 1dbc6dcb57 Reversing an incorrect fix. The user is supposed to change the .ezt template
rather than use the .conf to affect the output pages.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@245 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-10-20 19:30:56 +00:00
pefu c870cc4f23 A quick and little bit ugly, but working fix for SF Bug #473129.
'ezt.py', which belongs to the edna project is not changed.
May there is a cleaner solution possible, but I was unable to
figure out how.

The []-template macros available in directory.ezt should be documented
somewhere, but where?


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@244 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-10-20 15:57:33 +00:00
timcera ca3e52b05b This is the 'fix' for the problem that occurs when you have both use_cvsgraph
and show_subdir_lastmod.  Viewcvs was not putting data from directory entries
in the correct columns.  Need to decide as a group how to handle a directory
with only subdirectories because currently has blank 'Rev' and 'Graph' columns.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@228 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-10-16 12:24:08 +00:00
gstein 0d62e2c0c9 Convert the rest of view_directory() over to use the directory.ezt template.
Directory pages (including the top-level root/module selection page) can now
be completely customized, without code changes.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@221 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-09-25 09:24:11 +00:00
gstein ec99cb429b Shift more output generation from the code (viewcvs.py) into the template
(directory.ezt)


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@218 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-09-24 12:02:01 +00:00
gstein b8582e57c7 Begin introduction of templates. For now, just the top portion of the
directory page is generated via template.

* viewcvs.conf.dist, config.py: remove [text] options and defaults; those
    values are now simply text within the template.

* viewcvs.py: load the template, define information to pass to it, and
    invoke it.

* directory.ezt: template for the directory page (and top-level root
    selection and module page).

* ezt.py: templating library from the "edna" project. no changes from the
    HEAD in edna's cvs.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@213 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-09-23 12:07:32 +00:00