diff options
| author | Christian Weiske <cweiske@cweiske.de> | 2015-07-06 23:10:18 +0200 |
|---|---|---|
| committer | Christian Weiske <cweiske@cweiske.de> | 2015-07-06 23:10:18 +0200 |
| commit | 69e4391bfb53ce2d7a3a42f69e37bbf136d3ee09 (patch) | |
| tree | dbb36cdd1bec92858baa91b557a43790e744a778 /data | |
| parent | a1e6e4c154727f30aaa2e406eb5afb3810d4b398 (diff) | |
| download | phorkie-69e4391bfb53ce2d7a3a42f69e37bbf136d3ee09.tar.gz phorkie-69e4391bfb53ce2d7a3a42f69e37bbf136d3ee09.zip | |
Add "add file" button to display page
Diffstat (limited to 'data')
| -rw-r--r-- | data/templates/display-foot.htm | 9 | ||||
| -rw-r--r-- | data/templates/edit.htm | 6 |
2 files changed, 13 insertions, 2 deletions
diff --git a/data/templates/display-foot.htm b/data/templates/display-foot.htm index 3a53adf..6324509 100644 --- a/data/templates/display-foot.htm +++ b/data/templates/display-foot.htm @@ -1,5 +1,12 @@ <div class="row-fluid" style="margin-top: 5ex"> - <div class="span12"> + <div class="span4"></div> + <div class="span4" style="text-align: center"> + <a class="btn" href="{{repo.getLink('edit', 'newfile')}}" id="add-button"> + <i class="icon-plus"></i> + Add file + </a> + </div> + <div class="span4"> <a class="btn pull-right" href="{{repo.getLink('delete')}}"> <i class="icon-trash"></i> Delete paste </a> diff --git a/data/templates/edit.htm b/data/templates/edit.htm index 870ef23..912a073 100644 --- a/data/templates/edit.htm +++ b/data/templates/edit.htm @@ -7,7 +7,7 @@ {% block content %} <div class="content-padding-fix"></div> -<form method="post" action="{{repo.getLink('edit', singlefile.getFilename)}}" enctype="multipart/form-data" class="form-horizontal"> +<form method="post" action="{{formaction}}" enctype="multipart/form-data" class="form-horizontal"> <div class="control-group"> <label class="control-label" for="description">Description</label> <div class="controls"> @@ -21,6 +21,10 @@ {% endif %} {% endfor %} + {% if singlefile == "newfile" %} + {% include 'edit-file.htm' with {'file': null, 'fileid': 'newfile', 'newfile': true} %} + {% endif %} + {% include 'edit-add.htm' %} <div class="row-fluid formbuttons"> |
