-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
display image if different. Display fn.oc sn of possible merges #1454
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,7 @@ let print_differences conf base branches p1 p2 = | |
Output.print_sstring conf {|>|}; | ||
Output.printf conf {|<label class="custom-control-label" for="|}; | ||
Output.print_sstring conf name; | ||
Output.print_sstring conf (string_of_int i); | ||
Output.print_sstring conf {|">|}; | ||
Output.print_string conf x; | ||
Output.print_sstring conf {|</label></div>|} | ||
|
@@ -95,11 +96,20 @@ let print_differences conf base branches p1 p2 = | |
match Image.get_portrait conf base p with | ||
| Some (`Url url) -> | ||
({|<img src="|} ^<^ escape_html url | ||
^>^ {|" style="max-width:75px;max-height:100px">|} | ||
^>^ {|" style="max-width:75px;max-height:100px">|} ^ url | ||
:> Adef.safe_string) | ||
| Some (`Path path) -> | ||
(* TODO: ?? *) | ||
(escape_html path :> Adef.safe_string) | ||
let k = Image.default_portrait_filename base p in | ||
let s = Unix.stat path in | ||
Printf.sprintf | ||
{|<img src="%sm=IM&d=%s&%s&k=%s" \ | ||
style="max-width:75px;max-height:100px"> %s|} | ||
(commd conf :> string) | ||
(string_of_int | ||
@@ int_of_float (mod_float s.Unix.st_mtime (float_of_int max_int))) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why do we need this information to make src from a path? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is how portraits are displayed. Not sure I remember the reasons for the various parameters |
||
(acces conf base p : Adef.escaped_string :> string) | ||
k path | ||
|> Adef.safe | ||
| None -> Adef.safe ""); | ||
string_field | ||
(transl conf "public name" |> Adef.safe) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we apply
escape_html
tourl
?This print the url as text next to the image?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can probably suppress this escape_url.
The same comment applies to
string_of_image_url
in perso.ml