Collection of themes/skins for the Fossil SCM

⌈⌋ branch:  Fossil Skins Extra


Check-in [0499e95f66]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Generate link meta for file pages (complements fx_meta), could still be shortened; maybe should include info/CHKIN pages too
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 0499e95f667c7f3cd958acc01d0f1317beb907aa
User & Date: mario 2021-10-14 11:14:32
Context
2021-10-14
12:30
combine sql_bynameci, use JOIN rather than deordered WHERE IN (…), compact cases check-in: 8cab256c8e user: mario tags: trunk
11:14
Generate link meta for file pages (complements fx_meta), could still be shortened; maybe should include info/CHKIN pages too check-in: 0499e95f66 user: mario tags: trunk
2021-10-13
15:00
Add th1-setup,details,csp-default to combined skin editor, wrap all fields in table (css inline-blocks didn't stack) check-in: add1810e37 user: mario tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Added features/file_link.th1.





































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
# output <link> for "file" pages
proc file_link {} {
    upvar 1 current_page current_page
    set name [getParameter name]
    set ci [getParameter ci]%
    set top [globalState top]
    set sql_byname  {
       SELECT uuid         FROM blob LEFT JOIN mlink ON blob.rid=mlink.fid         LEFT JOIN filename ON mlink.fnid=filename.fnid
        WHERE name = $name        ORDER BY rid DESC LIMIT 1
    }
    set sql_bynameci {
       SELECT uuid FROM blob
        WHERE rid IN (
              SELECT fid
                FROM blob LEFT JOIN mlink ON mid=blob.rid
                LEFT JOIN filename on mlink.fnid=filename.fnid
               WHERE uuid LIKE $ci AND name = $name
               ORDER BY rid DESC
        )
    }
    html "<!-- FL($current_page,name=$name,ci=$ci) -->\n"
    if {[regexp  "^doc/(tip|trunk)/.+" $current_page]} {
        # doc/tip/file.txt
        set sql $sql_byname
    } elseif {"$current_page" eq "finfo"} {
        if {"$ci" ne "%"} {
            # finfo?name=file.txt&ci=1234f
            set sql $sql_bynameci
        } else {
            # finfo?name=file.txt
            set sql "$sql_byname"
            #ci LIMIT 1"
        }
    } elseif {[regexp  "^doc/\\w+/.+" $current_page]} {
        if {"$ci" ne "%"} {
            # doc/1234f/file.txt
            set sql $sql_bynameci
        } else {
            # /info/1234f  # should assert that it refers to a file blob?
            set name "$name%"
            set sql {SELECT uuid FROM blob where uuid LIKE $name}
        }
    } else { html "<!--nomatch-->" }
    if {[info exists sql]} {
        html "<!-- = $sql -->"
        query $sql {
            html "<link rel='alternative vcs raw' href='$top/raw/$uuid'>"
        }
    }
}