Skip to content

Commit

Permalink
make glossary links local, change deme.stanford to refer to deme.read…
Browse files Browse the repository at this point in the history
…thedocs
  • Loading branch information
mikhuang committed Jul 17, 2013
1 parent b875ba2 commit 5c9ed2f
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 5 deletions.
4 changes: 2 additions & 2 deletions deme_django/cms/templates/help_text/_getting_started.html
Expand Up @@ -19,7 +19,7 @@ <h3>Customizing the Site</h3>
<ul>
<li><a href="{% url 'item_url' viewer='site' action="edit" noun=cur_site.pk %}">Edit the current site</a> to change the website title, logo, and more.</li>
<li>Change the contents of the home page by <a href="/">going to the home page</a>, clicking on the Actions menu, then <i class="glyphicon glyphicon-edit"></i> <b>Edit</b>.</li>
<li>See the <a href="http://deme.stanford.edu/docs">Technical Deme Guide</a> for more details like adding navigation tabs, changing the sidebar, adding custom stylesheets, and more.</li>
<li>See the <a href="http://deme.readthedocs.org">Technical Deme Guide</a> for more details like adding navigation tabs, changing the sidebar, adding custom stylesheets, and more.</li>
</ul>

<h3>Permissions</h3>
Expand Down Expand Up @@ -62,7 +62,7 @@ <h3>Uploading Files</h3>
<h3>More Resources</h3>
<ul>
<li><a href="http://www.youtube.com/watch?v=QDxpfJl8GXE">Setting Up Deme Video</a></li>
<li><a href="http://deme.stanford.edu/docs">Technical Deme Guide</a></li>
<li><a href="http://deme.readthedocs.org">Technical Deme Guide</a></li>
<li><a href="{% url 'item_type_url' viewer='item' action='permissionshelp' %}">Permissions Guide</a></li>
<li><a href="{% url 'item_type_url' viewer='item' action='glossaryhelp' %}">Deme Item Glossary</a></li>
</ul>
Expand Down
29 changes: 28 additions & 1 deletion deme_django/cms/templates/help_text/_glossary.html
Expand Up @@ -3,7 +3,7 @@

{% block content %}
<p>Items represent most of the content on a Deme site. Click on each item type to learn more.</p>
<div class="accordion">
<div class="accordion" id="glossaryAccordion">
{% for x in all_item_types_arr %}
<div class="accordion-group">
<div class="accordion-heading">
Expand All @@ -17,4 +17,31 @@
</div>
</div>
{% endfor %}
</div>

<script>
// change links to /viewer/itemtype to be local
$(function(){
function openSection(name) {
var accordion = $('#item_' + name);
accordion.collapse('show');
$('html, body').animate({
scrollTop: accordion.offset().top - 50
}, 500);
}

var re = /^\/viewing\/(\w+)$/;
$('#glossaryAccordion a').each(function(){
var x = $(this);
var link = x.attr('href');
var matches = link.match(re);
if (matches) {
x.click(function(e){
e.preventDefault();
openSection(matches[1]);
});
}
});
});
</script>
{% endblock %}
2 changes: 1 addition & 1 deletion deme_django/cms/templates/help_text/_help_footer.html
Expand Up @@ -2,5 +2,5 @@
<p>Further reading</p>
<ul>
<li><a href="{% url 'item_type_url' viewer='item' action='gettingstartedhelp' %}">Getting Started with Deme</a></li>
<li><a href="http://deme.stanford.edu/docs/">Technical Deme Guide</a></li>
<li><a href="http://deme.readthedocs.org/">Technical Deme Guide</a></li>
</ul>
3 changes: 2 additions & 1 deletion deme_django/docs/usage.rst
Expand Up @@ -187,4 +187,5 @@ Using a single Deme installation with multiple domains/subdomains

If you have multiple domains or subdomains that point to your Deme installation, you can show different sites for each by using different Site objects.

To see your sites, while logged in as Admin, click Admin in the footer, then All Sites. By default, you'll have one default site. From here, **Create a new site**, then change the ``Hostname`` to whatever domain or subdomain you'd like. This is where you can assign different layouts to your different sites.
To see your sites, while logged in as Admin, click Admin in the footer, then All Sites. By default, you'll have one default site. From here, **Create a new site**, then change the ``Hostname`` to whatever domain or subdomain you'd like. This is where you can assign different layouts to your different sites.

0 comments on commit 5c9ed2f

Please sign in to comment.