N2 CMS - all links are green in tree view - n2

I have an existing ASP.NET MVC 3 website, and I installed N2 CMS using NuGet packages. All links are green in tree view, but in MVC Minimal Example only upload folder is green and all other links are black. Can I change that in code/web.config?
Any help would be greatly appreciated!

If you look at classes applied to site tree, you will see that Upload folder has class "day", defined in a file framed.css to be green color with code 393. In the same file, on the next line, there is definition of class "week", again green color but with different code 363.
Judging by the names, I would say, these two colors represent site tree items modified during last 24hr and during last 7 days.
This means that all your green tree nodes should become black in a week. Of course, this is just a hypothesis, please test it and let me know what are the results.

Related

How can you change the colour of the R background for `exams2moodle` questions?

I'm writing some quizzes for Moodle using R/exams' exams2moodle. The XML file is created fine and I can import the quiz to Moodle ok, however, any question that has R code as part of either the question or the solution has the R code on a dark background making it almost impossible to read. Is there an option somewhere that controls this?
I am using this code to create the XML:
exams2moodle(c("q1.Rmd", "q2b.Rmd", "q3.Rmd", "q4.Rmd", "q5.Rmd", "q6.Rmd"),
name = "GLM_prac1",
iname = FALSE,
converter = "pandoc-mathjax",
cloze = list(cloze_schoice_display = "MULTICHOICE_V"))
And this is an example of the issue:
The color of the R code displayed is not controlled through exams2moodle(), at least not explicitly. What exams2moodle() does, is to put verbatim code input and output into standard HTML tags for this <pre><code> ... </code></pre>. This stands for pre-formatted text with markup for typewriter code. (Actually, this is not even produced by exams2moodle() directly but by pandoc.)
The rendering of these standard HTML tags is then controlled through the CSS styles employed in your Moodle installation. In a vanilla Moodle installation you currently simply get a black font on the same light blueish background as for regular text. In previous versions the background was light gray. Given that you have light orange background for text and dark background for code, I guess that this is a setting in your Moodle installation. Hence I would recommend to reach out to the Moodle team at your university and ask them about this. This seems to be a poor setting that would likely affect others as well.
If you cannot get in touch with the Moodle team or they are unwilling to change their CSS, you can insert your own custom CSS code into your exercises. The advantage is that you have full control over the color then. The disadvantage is that you yourself have to include that style code into every exercise where it is needed. It is not hard but tedious. For example, you can include the following R code chunk in the exercise directly at the beginning of the question section:
Question
========
```{r, echo = FALSE, results = "asis"}
writeLines("<style>
pre {
background: #FFFFFF00
}
</style>")
```
This simply inserts a short HTML snippet with CSS into your Rmd exercise:
<style>
pre {
background: #FFFFFF00
}
</style>
This will instruct the browser to use the background color #FFFFFF00 (fully transparent white) for all <pre>-formatted chunks. Of course, you can also play around with this and use a different color, say #EEEEEE (light gray) or similar.

Creating two blogs on same website (Jekyll GitHub) without altering layout/formatting

I have recently tried creating a website using the Jekyll GitHub template here. One major alteration I hope to make to this template is to have two "blogs" in the format provided in the Blog tab of that template specifically shown here.
I (sort of) successfully created two blogs in my website and named the associated tabs (Media) and (Blog). I achieved this by reorganizing the file structure to have a "media" folder and a "blog" folder separately that each contain a _posts folder and index.html file. Now, when I add .md files in the _posts folder, these posts seem to get added to the correct tab (Media or Blog).
Even though that functionality works, both the Blog and Media tab lost their aesthetics compared to the style in the original template blog. Namely, 1) the banner image at the top is now gone; 2) the text formatting with the title in one line followed by the date in the "pretty" format (gray colored and in the format 29 Aug 2016) is now in a less-attractive bullet format with date first and in the format Aug 29, 2016; 3) the introductory excerpt text (in the example: "A pot still is a type of still used in distilling spirits such as whisky or brandy. Heat is applied directly to the pot containing the wash (for whisky) or wine (for brandy).") is now gone.
It is unclear to me why my separation of the _posts folder into two separate folders seems to cause these unwanted layout side effects. Since all three of these layout issues changed at once, I am assuming they can all be solved in the same solution. Whether or not that is true, any advice on how to solve these layout issues could be very helpful. Thank you for sharing any ideas!
You've removed the posts collection from your _config.yml which was setting the default feature_image for all posts. Unless you add that back in or include the overrides in each individual post it will not display the header (it may or may not also affect the rest of the styles):
collections:
media:
title: Media # Needed for Siteleaf
output: true
description: "Recent discussions with the media." # The post list page content
feature_text: |
Sharing our motivations and
opinions with the media.
feature_image: "https://picsum.photos/2560/600?image=866"
You're not actually using a media collection in either blog/index.html nor media/index.html, you're using the post.categories for filtering in the end, which will still causes some weird pagination once you start getting things rolling.
You may want to look at using the separate collections and then pre-building your site using paginator v2 (https://github.com/sverrirs/jekyll-paginate-v2/blob/master/README-GENERATOR.md) which will allow for pagination of different collections.
Edit 2020-01-23
Taking a new look at your repository, you still only have one (posts) collection. Therefore the logic for reading feature_* is being shared. If you look at the include site_feature.html you can see how the feature_image is being parsed out of the collections.
{% assign collectiondata = site.collections | where: "label", page.collectionpage | first %}
Which in your case is why Blog and Media both have the second image ?image=213. Your blog.html and media.html still have the front matter collectionpage: post.
I still think you're going down a slippery slope which will result in things not working exactly as you want them once you get more and more posts by doing it this way.

MS Word, DOCX, Open XML - Apply themes by changing XMLs

Need to apply theme from one word document (DOCX) to another via manipulating the XMLs.
The road I'm going through is -
word/themes folder contains at least one theme#.xml and could have the rels folder containg relationship files. I decided not to touch the rels folder and copy all theme#.xmls (as could be more than one) present in word/theme folder. This is working for me.
I have two concerns over it:
1. Do I need to add theme1.xml.rels file present in word\theme_rels as well? It contains mapping to one image in word\media folder. Do I need to add the image mapping too?
2. For few themes such as "Quotable", the theme1.xml contains one reference in 'a:fmtScheme' node to relationship id, probably for DrawingML and shapes.
for ex:
<a:blipFill rotWithShape="1">
<a:blip xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" r:embed="rId1">
As the "rId1" here refers to styles.xml and maintained in word_rels\document.xml.rels, my concern is the word_rels\document.xml.rels mapping to styles.xml could not be rId1 in the document to which theme is getting applied (for instance this could be rId5 for styles.xml). So, Do I need to change this in theme1.xml while copying to work it properly.
Any help would be greatly appreciated.
If this XML appears in theme1.xml, 'rId1' is a key in theme1.xml.rels, not the document.xml.rels. The relationship ids (rId#) are unique within a 'source' XML document but are not unique within the overall package (.docx file).
Since this one is a <a:blip> element, the relationship will be to an image part, e.g. image1.jpg. I suspect this one is a large-ish quotation mark image that appears in front of a pull-out quote.
If you want it to show up properly, you'll want to make sure those relationships and their target parts are reconstructed in your target package. That would mean "yes", you would want to add the theme1.xml.rels file in the right place, as well as the image file it refers to.

profiled Relationship matrix in html reports in Enterprise Architect

How can i include a profiled Relationship matrix in html reports in Enterprise Architect.
I have a link on each diagram which points to a profiled relationship matrix.
I tried to generate a html report for my project. But all these relation matrix links are disabled.
A relationship matrix can't be directly included in an HTML generation and there's no way to script running it or exporting it to an image file. But you can include it in an RTF document, so here's a sort of workaround based on RTF templates and virtual documents.
Create an RTF template which outputs the relationship matrix image. You might want to include the package name and the current date and time as well.
For each package you want a matrix report for, create a «model document» and add the package to it. Please note that if you've defined multiple relationship matrices for a package, you can't choose which one to report - EA will just pick one.
For each «model document», create an Artifact and draw a «trace» from the «model document» to the Artifact.
Move the Artifacts to a package which is included in the HTML generation. You don't have to place them in any diagrams if you don't want to, but they must reside inside the hierarchy for which HTML is generated.
The «model document»:s should be in a separate package which is not included in the HTML generation. Name them according to the scheme "pkgname - matrixname" or similar.
The Artifacts should be given names which make sense within the generated HTML - call them "Requirement Matrix: pkgname" or similar.
Now, before you run your HTML generation, you must run the matrix reports individually and manually by right-clicking the Artifact in the same diagram as the «model document» and selecting "Create Document to Artifact" (so it's a good idea to include the date and time in the template). Then generate your HTML as usual.
This will output the matrix images into the HTML. You'll have to click the document to see the image and as noted you'll have to run the matrix reports manually, but the result will be there.
You could do something similar by placing hyperlinks to image files in your diagrams and then output the different matrices to these image files. I prefer the Artifact method, because it keeps everything inside EA (no broken links) and it gives you the option of including the report date and time and more stuff if you want it.

Appropriate design of DHTML / multipage CGI form

What is the standard method for implementing a "wizard" using successive web forms?
I'm implementing a CGI that accepts several options, files, etc. But some of these options have dependencies to one another, and allow or require other options to be used.
For example, one type of object that needs to be initialized by the CGI can be created using:
two files of type X
two strings
one file of type Y
In my command line version, I look whether two files of type X, two strings, or one file of type Y is provided, and construct the object in the appropriate manner.
In my CGI, I'd like to do this using multiple pages or DHTML (perhaps a radio button that specifies which arguments the user wishes to provide; changing the radio button will change the form to the right).
Anyway, I have this situation for 3 main groups of arguments. I thought it would be pleasing to the user to create a 6 "page" wizard (think online dating):
Page 1:
"How would you like to specify your proteins of interest?"
radio button:
Two FASTA files
Prefix and suffix strings that match all of my proteins (and match only my proteins)
A text file containing the proteins
Page 2:
"Great! Please choose your (either 'fasta files', 'prefix and suffix strings', or 'text file')."
(appropriate web form)
Unfortunately, if the form is split over different pages, I'm not sure how the 3rd, 4th, etc. pages will know the location of the temporary folder created for the uploaded files from pages 1 and 2.
I'd really appreciate your advice; I have a good command line app, but I am having a difficult time making beautiful interface code that will do what I want. And I'd be shocked if there isn't a very easy standard way to do this with Django or some other framework; it just seems it must come up very frequently.
There's a wizard plugin for jQuery.
http://plugins.jquery.com/project/formwizard
If you don't know jQuery, it is a javascript framework for doing DHTML.
Try the demo at http://thecodemine.org/