Instruction stringlengths 14 778 | input_code stringlengths 0 4.24k | output_code stringlengths 1 5.44k |
|---|---|---|
Update release script to correctly update tag named latest (which points to latest version) | #!/bin/sh
VERSION=$(/usr/libexec/PlistBuddy SwiftiumKit/Info.plist -c "print CFBundleShortVersionString")
TAG=v$VERSION
echo "Have you updated the changelog for version $VERSION ? (ctrl-c to go update it)"
read
set -e
carthage build --no-skip-current && carthage archive SwiftiumKit
echo "Creating tag $TAG and pushing it to github"
git tag $TAG
git tag -f latest
git push --tags
echo "You can now upload SwiftiumKit.framework.zip and edit release notes from https://github.com/openium/SwiftiumKit/releases/edit/$TAG"
| #!/bin/sh
VERSION=$(/usr/libexec/PlistBuddy SwiftiumKit/Info.plist -c "print CFBundleShortVersionString")
TAG=v$VERSION
echo "Have you updated the changelog for version $VERSION ? (ctrl-c to go update it)"
read
set -e
carthage build --no-skip-current && carthage archive SwiftiumKit
echo "Creating tag $TAG and pushing it to github"
git tag $TAG
git push --tags
git tag -f latest
git push --tags -f
echo "You can now upload SwiftiumKit.framework.zip and edit release notes from https://github.com/openium/SwiftiumKit/releases/edit/$TAG"
|
Use the variable in the scan-build install script. | #!/bin/sh -x
CLANG_CHECKER_NAME=checker-278
cd ~
if [ ! -d checker-278 ]
then
curl http://clang-analyzer.llvm.org/downloads/checker-278.tar.bz2 -o ~/$CLANG_CHECKER_NAME.tar.bz2
tar -xf ~/$CLANG_CHECKER_NAME.tar.bz2
fi
export SCAN_BUILD_PATH=~/$CLANG_CHECKER_NAME/bin/scan-build
export PATH=$PATH:$SCAN_BUILD_PATH/bin
cd -
| #!/bin/sh -x
CLANG_CHECKER_NAME=checker-278
cd ~
if [ ! -d ~/$CLANG_CHECKER_NAME ]
then
curl http://clang-analyzer.llvm.org/downloads/$CLANG_CHECKER_NAME.tar.bz2 -o ~/$CLANG_CHECKER_NAME.tar.bz2
tar -xf ~/$CLANG_CHECKER_NAME.tar.bz2
fi
export SCAN_BUILD_PATH=~/$CLANG_CHECKER_NAME/bin/scan-build
cd -
|
Update uhub in test script | #!/usr/bin/env bash
set -eo pipefail
IFS=$'\n\t'
UHUB_VERSION=2.5.1
# Download Uhub
if [ "$(uname)" == "Darwin" ]; then
UHUB_NAME=uhub_darwin_amd64
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
UHUB_NAME=uhub_linux_amd64
elif [ "$(expr substr $(uname -s) 1 10)" == "MINGW32_NT" ]; then
UHUB_NAME=uhub_windows_amd64.exe
fi
if [ -f uhub ];
then
echo "uhub already exist."
else
echo "Downloading uhub"
if [[ -z "$GITHUB_TOKEN" ]]; then
cat <<EOF
To download uhub, you need to provide the following env:
- GITHUB_TOKEN
EOF
exit 1
fi;
github-releases --tag $UHUB_VERSION --filename $UHUB_NAME --token $GITHUB_TOKEN download GitbookIO/uhub
mv $UHUB_NAME uhub
chmod +x uhub
fi
| #!/usr/bin/env bash
set -eo pipefail
IFS=$'\n\t'
UHUB_VERSION=2.5.6
# Download Uhub
if [ "$(uname)" == "Darwin" ]; then
UHUB_NAME=uhub_darwin_amd64
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
UHUB_NAME=uhub_linux_amd64
elif [ "$(expr substr $(uname -s) 1 10)" == "MINGW32_NT" ]; then
UHUB_NAME=uhub_windows_amd64.exe
fi
if [ -f uhub ];
then
echo "uhub already exist."
else
echo "Downloading uhub"
if [[ -z "$GITHUB_TOKEN" ]]; then
cat <<EOF
To download uhub, you need to provide the following env:
- GITHUB_TOKEN
EOF
exit 1
fi;
github-releases --tag $UHUB_VERSION --filename $UHUB_NAME --token $GITHUB_TOKEN download GitbookIO/uhub
mv $UHUB_NAME uhub
chmod +x uhub
fi
|
Make fzf search with ag | # --files: List files that would be searched but do not search
# --no-ignore: Do not respect .gitignore, etc...
# --hidden: Search hidden files and folders
# --follow: Follow symlinks
# --glob: Additional conditions for search (in this case ignore everything in the .git/ folder)
export FZF_DEFAULT_COMMAND='rg --files --hidden --follow '
| export FZF_DEFAULT_COMMAND='ag -l --path-to-ignore ~/.ignore --nocolor --hidden -g ""'
# To install useful keybindings and fuzzy completion:
# $(brew --prefix)/opt/fzf/install
|
Change so windows uploader script renames the file properly | #!/bin/bash
# Move and Upload
COMMIT_SHA=$(git rev-parse HEAD)
TARGET_DIR=/var/www/wordpress/APMPlanner2/daily
TARGET_SUBDIR=${BUILD_ID:0:10}
if [ ! -d ${TARGET_DIR}/${TARGET_SUBDIR} ]; then
mkdir ${TARGET_DIR}/${TARGET_SUBDIR}/
fi
mv apmplanner2-installer-win32.exe ${TARGET_DIR}/${TARGET_SUBDIR}/apm_planner2_${COMMIT_SHA:0:8}_win.exe
#This will eventually contain my rsync line...
rsync -avh --password-file=${RSYNC_PASSFILE} ${TARGET_DIR}/${TARGET_SUBDIR} ${WEBSITE_USER}@firmware.diydrones.com::APMPlanner/daily/
| #!/bin/bash
# Move and Upload
COMMIT_SHA=$(git describe --dirty)
TARGET_DIR=/var/www/wordpress/APMPlanner2/daily
TARGET_SUBDIR=${BUILD_ID:0:10}
if [ ! -d ${TARGET_DIR}/${TARGET_SUBDIR} ]; then
mkdir ${TARGET_DIR}/${TARGET_SUBDIR}/
fi
mv apmplanner2-installer-win32.exe ${TARGET_DIR}/${TARGET_SUBDIR}/apm_planner_${COMMIT_SHA}_win.exe
#This will eventually contain my rsync line...
rsync -avh --password-file=${RSYNC_PASSFILE} ${TARGET_DIR}/${TARGET_SUBDIR} ${WEBSITE_USER}@firmware.diydrones.com::APMPlanner/daily/
|
Add sed for grape's nginx configuration | #!/bin/bash
# We assume single-user installation as
# done in our rvm.sh script and
# in Travis-CI
source $HOME/.rvm/scripts/rvm
sed -i 's| host:.*| host: '"${DBHOST}"'|g' config/database.yml
$NGINX_HOME/sbin/nginx -c $TROOT/config/nginx.conf
rvm ruby-2.0.0-p0 do bundle exec unicorn -E production -c config/unicorn.rb & | #!/bin/bash
# We assume single-user installation as
# done in our rvm.sh script and
# in Travis-CI
source $HOME/.rvm/scripts/rvm
sed -i 's| host:.*| host: '"${DBHOST}"'|g' config/database.yml
sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' config/nginx.conf
$NGINX_HOME/sbin/nginx -c $TROOT/config/nginx.conf
rvm ruby-2.0.0-p0 do bundle exec unicorn -E production -c config/unicorn.rb & |
Exit on any error eg. failure in a pipe | #!/bin/bash -x
#
# Run Tests (post Travis build)
#
# Exit on errors
#
#set -e
#set -u
#set -o pipefail
# Pick up path to testinfra passed in
#
TESTINFRA="${1:-testinfra}"
# Define tests
#
tests="test/test_packages.py \
test/test_services.py \
test/test_files.py \
test/test_http.py \
test/test_commands.py"
# Wait for container to init
#
sleep 30
# Set HTTP End Point for container running on Travis CI
#
export TEST_URL="http://localhost:8080"
# Run test pack
#
"${TESTINFRA}" --sudo --sudo-user=root -v ${tests}
# Exit 0 as if we've got here we're generally all good
#
exit 0
| #!/bin/bash -x
#
# Run Tests (post Travis build)
#
# Exit on errors
#
set -e
set -u
set -o pipefail
# Pick up path to testinfra passed in
#
TESTINFRA="${1:-testinfra}"
# Define tests
#
tests="test/test_packages.py \
test/test_services.py \
test/test_files.py \
test/test_http.py \
test/test_commands.py"
# Wait for container to init
#
sleep 30
# Set HTTP End Point for container running on Travis CI
#
export TEST_URL="http://localhost:8080"
# Run test pack
#
"${TESTINFRA}" --sudo --sudo-user=root -v ${tests}
# Exit 0 as if we've got here we're generally all good
#
exit 0
|
Fix builder script for uxtaf | #!/bin/bash
#install.sh
#
#Configure and install all Git-tracked dependencies for fsnview
#TODO set -e isn't causing an error-out when 'bootstrap' isn't found under deps/sleuthkit.
set -e
set -x
case $1 in
local )
MAKEINSTALL="make install"
if [ -z "$2" ]; then
INSTALLDIR=$HOME/local
else
INSTALLDIR=$2
fi
;;
system )
MAKEINSTALL="sudo make install"
INSTALLDIR=/usr/local
;;
* )
echo "Error: Arguments must be 'local', 'local prefix_dir' or 'system'" >&2
exit 2
;;
esac
REPODIR=`cd $(dirname $(which $0))/..; pwd`
echo "NOTE BEFORE COMPILING: Ensure you have the necessary path augmentations from ./bashrc"; sleep 2
echo "Note: installing sleuthkit" >&2
pushd $REPODIR/deps/sleuthkit
./bootstrap && ./configure --prefix=$INSTALLDIR --without-libewf && make -j && $MAKEINSTALL
popd
echo "Note: installing uxtaf" >&2
pushd $REPODIR/deps/uxtaf
./bootstrap && ./configure --prefix=$INSTALLDIR --without-libewf && make -j && $MAKEINSTALL
popd
echo "Done."
| #!/bin/bash
#install.sh
#
#Configure and install all Git-tracked dependencies for fsnview
#TODO set -e isn't causing an error-out when 'bootstrap' isn't found under deps/sleuthkit.
set -e
set -x
case $1 in
local )
MAKEINSTALL="make install"
if [ -z "$2" ]; then
INSTALLDIR=$HOME/local
else
INSTALLDIR=$2
fi
;;
system )
MAKEINSTALL="sudo make install"
INSTALLDIR=/usr/local
;;
* )
echo "Error: Arguments must be 'local', 'local prefix_dir' or 'system'" >&2
exit 2
;;
esac
REPODIR=`cd $(dirname $(which $0))/..; pwd`
echo "NOTE BEFORE COMPILING: Ensure you have the necessary path augmentations from ./bashrc"; sleep 2
echo "Note: installing sleuthkit" >&2
pushd $REPODIR/deps/sleuthkit
./bootstrap && ./configure --prefix=$INSTALLDIR --without-libewf && make -j && $MAKEINSTALL
popd
echo "Note: installing uxtaf" >&2
pushd $REPODIR/deps/uxtaf
./bootstrap.sh && ./configure --prefix=$INSTALLDIR --without-libewf && make -j && $MAKEINSTALL
popd
echo "Done."
|
Use EPEL for debootstrap on centos | #!/bin/bash
set -eux
set -o pipefail
sudo apt-get update || true
sudo apt-get install -y --force-yes \
apt-transport-https \
bzip2 \
debootstrap \
docker.io \
inetutils-ping \
lsb-release \
kpartx \
python-lzma \
qemu-utils \
rpm \
uuid-runtime \
yum-utils || \
sudo yum -y install \
bzip2 \
debootstrap \
docker \
kpartx \
util-linux \
qemu-img \
policycoreutils-python || \
sudo zypper -n install \
bzip2 \
debootstrap \
docker \
kpartx \
util-linux \
python-pyliblzma \
yum-utils \
qemu-tools || \
sudo emerge \
app-arch/bzip2 \
app-emulation/qemu \
dev-python/pyyaml \
sys-block/parted \
sys-fs/multipath-tools \
qemu-img \
yum-utils
| #!/bin/bash
set -eux
set -o pipefail
sudo apt-get update || true
sudo apt-get install -y --force-yes \
apt-transport-https \
bzip2 \
debootstrap \
docker.io \
inetutils-ping \
lsb-release \
kpartx \
python-lzma \
qemu-utils \
rpm \
uuid-runtime \
yum-utils || \
sudo yum -y install --enablerepo=epel \
bzip2 \
dpkg \
debootstrap \
docker \
kpartx \
util-linux \
qemu-img \
policycoreutils-python || \
sudo zypper -n install \
bzip2 \
debootstrap \
docker \
kpartx \
util-linux \
python-pyliblzma \
yum-utils \
qemu-tools || \
sudo emerge \
app-arch/bzip2 \
app-emulation/qemu \
dev-python/pyyaml \
sys-block/parted \
sys-fs/multipath-tools \
qemu-img \
yum-utils
|
Upgrade to newer mysql-apt-config for travis CI. | echo mysql-apt-config mysql-apt-config/select-server select mysql-5.7 | sudo debconf-set-selections
wget http://dev.mysql.com/get/mysql-apt-config_0.7.3-1_all.deb
sudo dpkg --install mysql-apt-config_0.7.3-1_all.deb
sudo apt-get update -q
sudo apt-get install -q -y -o Dpkg::Options::=--force-confnew -o Dpkg::Options::=--force-bad-verify mysql-server
sudo mysql_upgrade
| echo mysql-apt-config mysql-apt-config/select-server select mysql-5.7 | sudo debconf-set-selections
wget http://dev.mysql.com/get/mysql-apt-config_0.8.1-1_all.deb
sudo dpkg --install mysql-apt-config_0.8.1-1_all.deb
sudo apt-get update -q
sudo apt-get install -q -y -o Dpkg::Options::=--force-confnew -o Dpkg::Options::=--force-bad-verify mysql-server
sudo mysql_upgrade
|
Comment install using port of gcc48 | #!/usr/bin/env bash
. src/misc.sh
echo "Update brew..."
brew update
echo "Install git..."
install_mac_dependency git
echo "Install mercurial..."
install_mac_dependency mercurial
echo "Install python..."
install_mac_dependency python
echo "Install perl..."
install_mac_dependency perl
echo "Install scons..."
install_mac_dependency scons
echo "Install openssl..."
install_mac_dependency openssl
echo "Install postgres..."
install_mac_dependency postgres
echo "Install wget..."
install_mac_dependency wget
echo "Install gcc48..."
sudo port selfupdate
sudo port install gcc48
| #!/usr/bin/env bash
. src/misc.sh
echo "Update brew..."
brew update
echo "Install git..."
install_mac_dependency git
echo "Install mercurial..."
install_mac_dependency mercurial
echo "Install python..."
install_mac_dependency python
echo "Install perl..."
install_mac_dependency perl
echo "Install scons..."
install_mac_dependency scons
echo "Install openssl..."
install_mac_dependency openssl
echo "Install postgres..."
install_mac_dependency postgres
echo "Install wget..."
install_mac_dependency wget
#echo "Install gcc48..."
#sudo port selfupdate
#sudo port install gcc48
|
Test if the initialization creates the right folders | #!/bin/bash
test \
"make init" \
should_raise 0
test \
"cp ../resources/hello.cpp hello.cpp" \
"make standard" \
should_raise 0 | #!/bin/bash
test \
"make init" \
should_raise 0
test \
"make init" \
"ls" \
should_output "Config.mk\nMakefile\ndep\ndoc\ninclude\nsrc"
test \
"cp ../resources/hello.cpp hello.cpp" \
"make standard" \
should_raise 0
test \
"cp ../resources/hello.cpp hello.cpp" \
"make standard" \
"ls" \
should_output "Config.mk\nMakefile\ndep\ndoc\ninclude\nsrc"
test \
"cp ../resources/hello.cpp hello.cpp" \
"make standard" \
"ls src" \
should_output "hello.cpp" |
Move drivers back to master branch | GIT=https://gitlab.redox-os.org/redox-os/drivers.git
BRANCH=redox-unix
CARGOBUILD="build"
CARGOFLAGS="--all"
function recipe_version {
echo "0.1.1"
skip=1
}
function recipe_stage {
mkdir -pv "$1/etc/pcid"
cp -v initfs.toml "$1/etc/pcid/initfs.toml"
cp -v filesystem.toml "$1/etc/pcid/filesystem.toml"
mkdir -pv "$1/etc/pcid.d"
for conf in `find . -maxdepth 2 -type f -name 'config.toml'`; do
driver=$(echo $conf | cut -d '/' -f2)
cp -v $conf "$1/etc/pcid.d/$driver.toml"
done
}
| GIT=https://gitlab.redox-os.org/redox-os/drivers.git
CARGOBUILD="build"
CARGOFLAGS="--all"
function recipe_version {
echo "0.1.1"
skip=1
}
function recipe_stage {
mkdir -pv "$1/etc/pcid"
cp -v initfs.toml "$1/etc/pcid/initfs.toml"
cp -v filesystem.toml "$1/etc/pcid/filesystem.toml"
mkdir -pv "$1/etc/pcid.d"
for conf in `find . -maxdepth 2 -type f -name 'config.toml'`; do
driver=$(echo $conf | cut -d '/' -f2)
cp -v $conf "$1/etc/pcid.d/$driver.toml"
done
}
|
Remove the exit at the end of the script | #!/bin/sh
if test ! $(which brew); then
echo "Installing homebrew"
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
echo "Installing homebrew packages..."
# cli tools
brew install ack
brew install tree
brew install wget
# development server setup
#brew install nginx
#brew install dnsmasq
# development tools
brew install git
brew install git-flow
brew install hub
brew install macvim --override-system-vim
brew install reattach-to-user-namespace
brew install tmux
brew install zsh
brew install highlight
brew install nvm
brew install z
brew install markdown
brew install midnight-commander
brew install vim
# install neovim
brew install neovim/neovim/neovim
# Productivity stuff
brew install Caskroom/cask/alfred
brew install pandoc
brew install htop-osx
brew install sphinx
brew install zsh-completions
exit 0
| #!/bin/sh
if test ! $(which brew); then
echo "Installing homebrew"
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
echo "Installing homebrew packages..."
# cli tools
brew install ack
brew install tree
brew install wget
# development server setup
#brew install nginx
#brew install dnsmasq
# development tools
brew install git
brew install git-flow
brew install hub
brew install macvim --override-system-vim
brew install reattach-to-user-namespace
brew install tmux
brew install zsh
brew install highlight
brew install nvm
brew install z
brew install markdown
brew install midnight-commander
brew install vim
# install neovim
brew install neovim/neovim/neovim
# Productivity stuff
brew install Caskroom/cask/alfred
brew install pandoc
brew install htop-osx
brew install sphinx
brew install zsh-completions
|
Build python on Linux only. | #!/bin/bash
#
# Trigger vars and find information
#
# $Id$
#
######################################################################
######################################################################
#
# Set variables whose change should not trigger a rebuild or will
# by value change trigger a rebuild, as change of this file will not
# trigger a rebuild.
# E.g: version, builds, deps, auxdata, paths, builds of other packages
#
######################################################################
setPythonTriggerVars() {
PYTHON_BLDRVERSION_STD=2.7.3
PYTHON_BLDRVERSION_EXP=2.7.6
computeVersion Python
# Export so available to setinstald.sh
export PYTHON_BLDRVERSION
# Needed?
# PYTHON_MAJMIN=`echo $PYTHON_BLDRVERSION | sed 's/\([0-9]*\.[0-9]*\).*/\1/'`
PYTHON_BUILDS=${PYTHON_BUILDS:-"$FORPYTHON_BUILD"}
PYTHON_BUILD=$FORPYTHON_BUILD
PYTHON_DEPS=chrpath,sqlite,bzip2
}
setPythonTriggerVars
######################################################################
#
# Find python
#
######################################################################
findPython() {
source $BILDER_DIR/bilderpy.sh
addtopathvar PATH $CONTRIB_DIR/python/bin
if test `uname` = Linux; then
addtopathvar LD_LIBRARY_PATH $CONTRIB_DIR/python/lib
fi
}
| #!/bin/bash
#
# Trigger vars and find information
#
# $Id$
#
######################################################################
######################################################################
#
# Set variables whose change should not trigger a rebuild or will
# by value change trigger a rebuild, as change of this file will not
# trigger a rebuild.
# E.g: version, builds, deps, auxdata, paths, builds of other packages
#
######################################################################
setPythonTriggerVars() {
PYTHON_BLDRVERSION_STD=2.7.3
PYTHON_BLDRVERSION_EXP=2.7.6
computeVersion Python
# Export so available to setinstald.sh
export PYTHON_BLDRVERSION
# Needed?
# PYTHON_MAJMIN=`echo $PYTHON_BLDRVERSION | sed 's/\([0-9]*\.[0-9]*\).*/\1/'`
if [[ `uname` =~ Linux ]]; then
PYTHON_BUILDS=${PYTHON_BUILDS:-"$FORPYTHON_BUILD"}
fi
PYTHON_BUILD=$FORPYTHON_BUILD
PYTHON_DEPS=chrpath,sqlite,bzip2
}
setPythonTriggerVars
######################################################################
#
# Find python
#
######################################################################
findPython() {
source $BILDER_DIR/bilderpy.sh
addtopathvar PATH $CONTRIB_DIR/python/bin
if test `uname` = Linux; then
addtopathvar LD_LIBRARY_PATH $CONTRIB_DIR/python/lib
fi
}
|
Remove hg and bzr dependency check | check_deps() {
echo "Phase 0: Checking requirements."
has_deps=1
which bzr || has_deps=0
which git || has_deps=0
which hg || has_deps=0
which go || has_deps=0
if [[ $has_deps == 0 ]]; then
echo "Install bzr, hg, git, and golang."
exit 2
fi
}
test $# -ge 1 || usage
check_deps
| check_deps() {
echo "Phase 0: Checking requirements."
has_deps=1
which git || has_deps=0
which go || has_deps=0
if [[ $has_deps == 0 ]]; then
echo "Install git and golang."
exit 2
fi
}
test $# -ge 1 || usage
check_deps
|
Install just ruby 2.1.3 (for now, at least). | # Opt-out of installing Ruby.
[[ "$no_ruby" ]] && return 1
# Initialize rbenv.
source ~/.dotfiles/source/50_ruby.sh
# Install Ruby.
if [[ "$(type -P rbenv)" ]]; then
versions=(2.1.3 2.0.0-p576 1.9.3-p547)
list="$(to_install "${versions[*]}" "$(rbenv whence ruby)")"
if [[ "$list" ]]; then
e_header "Installing Ruby versions: $list"
for version in $list; do rbenv install "$version"; done
[[ "$(echo "$list" | grep -w "${versions[0]}")" ]] && rbenv global "${versions[0]}"
rbenv rehash
fi
fi
| # Opt-out of installing Ruby.
[[ "$no_ruby" ]] && return 1
# Initialize rbenv.
source ~/.dotfiles/source/50_ruby.sh
# Install Ruby.
if [[ "$(type -P rbenv)" ]]; then
versions=(2.1.3) # 2.0.0-p576 1.9.3-p547)
list="$(to_install "${versions[*]}" "$(rbenv whence ruby)")"
if [[ "$list" ]]; then
e_header "Installing Ruby versions: $list"
for version in $list; do rbenv install "$version"; done
[[ "$(echo "$list" | grep -w "${versions[0]}")" ]] && rbenv global "${versions[0]}"
rbenv rehash
fi
fi
|
Add test for clang-3.8 C++11 support | #!/usr/bin/env bash
#
# Copyright (c) 2019-2020 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
export LC_ALL=C.UTF-8
export CONTAINER_NAME=ci_native_nowallet
export DOCKER_NAME_TAG=ubuntu:16.04 # Use xenial to have one config run the tests in python3.5, see doc/dependencies.md
export PACKAGES="python3-zmq"
export DEP_OPTS="NO_WALLET=1"
export GOAL="install"
export SYSCOIN_CONFIG="--enable-glibc-back-compat --enable-reduce-exports"
| #!/usr/bin/env bash
#
# Copyright (c) 2019-2020 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
export LC_ALL=C.UTF-8
export CONTAINER_NAME=ci_native_nowallet
export DOCKER_NAME_TAG=ubuntu:16.04 # Use xenial to have one config run the tests in python3.5, see doc/dependencies.md
export PACKAGES="python3-zmq clang-3.8 llvm-3.8" # Use clang-3.8 to test C++11 compatibility, see doc/dependencies.md
export DEP_OPTS="NO_WALLET=1"
export GOAL="install"
export SYSCOIN_CONFIG="--enable-glibc-back-compat --enable-reduce-exports CC=clang-3.8 CXX=clang++-3.8"
|
Fix lock removal bug in the worst way possible | #!/bin/bash
set -ex
git config user.name time
git config user.email time@allweretaken.xyz
git config commit.gpgsign false
if [ -e lock ]; then
rm lock
fi
while true; do
date=$(date +"%H %M %Z")
sed -i 's&<p can i put a marker here?.*$&<p can i put a marker here?>'"$date"'</p>&' index.html
echo $date > time.txt
git add index.html time.txt
git commit -m "Can't you see I'm updating the time?"
if ! [ -e lock ]; then
(touch lock; \
git pull --rebase origin master; \
git push origin master; \
rm lock)&
fi
sleep $((60 - $(date +%-S)))
done
| #!/bin/bash
set -ex
git config user.name time
git config user.email time@allweretaken.xyz
git config commit.gpgsign false
if [ -e lock ]; then
rm lock
fi
while true; do
date=$(date +"%H %M %Z")
sed -i 's&<p can i put a marker here?.*$&<p can i put a marker here?>'"$date"'</p>&' index.html
echo $date > time.txt
git add index.html time.txt
git commit -m "Can't you see I'm updating the time?"
if ! [ -e lock ]; then
(touch lock; \
git pull --rebase origin master || rm lock; \
git push origin master || rm lock; \
rm lock)&
fi
sleep $((60 - $(date +%-S)))
done
|
Set default shell to bash | # Copyright (c) 2015, M. Helmy Hemida. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
first_path=$(which $1)
echo command path: $first_path
deps=$(ldd $first_path | grep -oh '/.* ')
echo dependencies paths: $deps
cloned="$first_path $deps $conf_files"
echo paths that will be cloned: $cloned
echo The following files will be cloned: $cloned
for i in $cloned;
do
cp -v --parents $i .
done
| # Copyright (c) 2015, M. Helmy Hemida. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#!/bin/bash
first_path=$(which $1)
echo command path: $first_path
deps=$(ldd $first_path | grep -oh '/.* ')
echo dependencies paths: $deps
cloned="$first_path $deps $conf_files"
echo paths that will be cloned: $cloned
echo The following files will be cloned: $cloned
for i in $cloned;
do
cp -v --parents $i .
done
|
Enable info logging in gradle | #!/usr/bin/env bash
set -e
set -o pipefail
pushd rider
./gradlew buildBackend
./gradlew buildPlugin | #!/usr/bin/env bash
set -e
set -o pipefail
pushd rider
./gradlew buildBackend --info
./gradlew buildPlugin --info
|
Read python version from travis | #!/usr/bin/env bash
set -ex # fail on first error, print commands
command -v conda >/dev/null 2>&1 || {
echo "Requires conda but it is not installed. Run install_miniconda.sh." >&2;
exit 1;
}
if [[ $* != *--global* ]]; then
ENVNAME="testenv"
if conda env list | grep -q ${ENVNAME}
then
echo "Environment ${ENVNAME} already exists, keeping up to date"
else
conda create -n ${ENVNAME} --yes pip python=${TRAVIS_PYTHON_VERSION}
source activate ${ENVNAME}
fi
fi
conda install --yes numpy cython scipy pandas matplotlib pytest pylint sphinx numpydoc ipython xarray mkl-service
pip install --upgrade pip
# Install editable using the setup.py
pip install -e .
pip install -r requirements-dev.txt
| #!/usr/bin/env bash
set -ex # fail on first error, print commands
command -v conda >/dev/null 2>&1 || {
echo "Requires conda but it is not installed. Run install_miniconda.sh." >&2;
exit 1;
}
# if no python specified, use Travis version, or else 3.6
PYTHON_VERSION=${PYTHON_VERSION:-${TRAVIS_PYTHON_VERSION:-3.6}}
if [[ $* != *--global* ]]; then
ENVNAME="testenv"
if conda env list | grep -q ${ENVNAME}
then
echo "Environment ${ENVNAME} already exists, keeping up to date"
else
conda create -n ${ENVNAME} --yes pip python=${PYTHON_VERSION}
source activate ${ENVNAME}
fi
fi
conda install --yes numpy cython scipy pandas matplotlib pytest pylint sphinx numpydoc ipython xarray mkl-service
pip install --upgrade pip
# Install editable using the setup.py
pip install -e .
pip install -r requirements-dev.txt
|
Make deprecation of autoconf/automake more visible | #!/bin/sh
echo "*** Autoconf/automake is deprecated for Openwsman"
echo "*** and might not fully work."
echo "*** Use cmake instead !"
UNAME=`uname`
mkdir -p m4
# Ouch, automake require this
cp README.md README
if [ "$UNAME" = "Darwin" ]; then
LIBTOOLIZE=glibtoolize
else
LIBTOOLIZE=libtoolize
fi
$LIBTOOLIZE --copy --force --automake
aclocal
autoheader
automake --add-missing --copy --foreign
autoconf
| #!/bin/sh
cat <<EOS >&2
*** Autoconf/automake is deprecated for Openwsman and might not fully work.
*** Please use CMake instead!
EOS
if [ "$1" != "--ignore-deprecation-warning" ]; then
cat <<EOS >&2
*** To ignore this warning and proceed regardless, re-run as follows:
*** $0 --ignore-deprecation-warning
EOS
exit 1
fi
UNAME=`uname`
mkdir -p m4
# Ouch, automake require this
cp README.md README
if [ "$UNAME" = "Darwin" ]; then
LIBTOOLIZE=glibtoolize
else
LIBTOOLIZE=libtoolize
fi
$LIBTOOLIZE --copy --force --automake
aclocal
autoheader
automake --add-missing --copy --foreign
autoconf
|
Add git commit version to build number | #!/bin/bash
# Exit on first error
set -e
SERVICE_NAME="weblab/fillo"
DOCKER_REGISTRY="$AWS_ACCOUNT_ID.dkr.ecr.us-east-1.amazonaws.com/$SERVICE_NAME"
# Get Docker Registry login token
eval "$(aws ecr get-login --region us-east-1)"
# Get new version
SERVICE_VERSION=`node -e 'console.log(require("./package.json").version)'`
# Export version
export SERVICE_VERSION=$SERVICE_VERSION
# Build docker image
docker build -t $SERVICE_NAME .
# Tag docker container
docker tag $SERVICE_NAME:latest $DOCKER_REGISTRY:$SERVICE_VERSION
# Push to new tag to private Docker Registry
docker push $DOCKER_REGISTRY:$SERVICE_VERSION
# Remove cached hosts file
rm -f hosts
# Extract deployment servers and create Ansible hosts file
IFS=':'; servers=($SERVERS)
for server in "${servers[@]}"
do
echo "$server" >> hosts
done
# Deploy to servers
ansible-playbook -i hosts bin/deploy-playbook.yml
| #!/bin/bash
# Exit on first error
set -e
SERVICE_NAME="weblab/fillo"
DOCKER_REGISTRY="$AWS_ACCOUNT_ID.dkr.ecr.us-east-1.amazonaws.com/$SERVICE_NAME"
# Get Docker Registry login token
eval "$(aws ecr get-login --region us-east-1)"
# Get new version
GIT_COMMIT_HASH=`git rev-parse --short HEAD`
SERVICE_VERSION=`node -e 'console.log(require("./package.json").version)'`
SERVICE_VERSION="$SERVICE_VERSION-$GIT_COMMIT_HASH"
# Export version
export SERVICE_VERSION=$SERVICE_VERSION
# Build docker image
docker build -t $SERVICE_NAME .
# Tag docker container
docker tag $SERVICE_NAME:latest $DOCKER_REGISTRY:$SERVICE_VERSION
# Push to new tag to private Docker Registry
docker push $DOCKER_REGISTRY:$SERVICE_VERSION
# Remove cached hosts file
rm -f hosts
# Extract deployment servers and create Ansible hosts file
IFS=':'; servers=($SERVERS)
for server in "${servers[@]}"
do
echo "$server" >> hosts
done
# Deploy to servers
ansible-playbook -i hosts bin/deploy-playbook.yml
|
Make cdl function select only directories | # Find lexically last directory that starts with provided parameter and cd into it
cdl () {
local cands=("$1"*)
cd "${cands[-1]}"
}
# Fold text file at spaces to 80 columns
wrap () {
fold --spaces "$1" > "$1".$$ && mv "$1".$$ "$1"
}
# Local function definitions
if [[ -f $HOME/.functions_local.bash ]]; then
. "$HOME/.functions_local.bash"
fi
| # Find lexically last directory that starts with provided parameter and cd into it
cdl () {
local cands=("$1"*/)
cd "${cands[-1]}"
}
# Fold text file at spaces to 80 columns
wrap () {
fold --spaces "$1" > "$1".$$ && mv "$1".$$ "$1"
}
# Local function definitions
if [[ -f $HOME/.functions_local.bash ]]; then
. "$HOME/.functions_local.bash"
fi
|
Make new directory when extracting. | #!/usr/bin/env sh
# This script downloads the Oxford 102 category flower dataset including:
# - jpg images
# - images labels
# - the training/testing/validation splits
mkdir data
cd data
echo "Downloading flower images..."
wget http://www.robots.ox.ac.uk/~vgg/data/flowers/102/102flowers.tgz
tar -xf 102flowers.tgz -C oxford102
echo "Downloading image labels..."
wget http://www.robots.ox.ac.uk/~vgg/data/flowers/102/imagelabels.mat
echo "Downloading data splits..."
wget http://www.robots.ox.ac.uk/~vgg/data/flowers/102/setid.mat
cd ../
| #!/usr/bin/env sh
# This script downloads the Oxford 102 category flower dataset including:
# - jpg images
# - images labels
# - the training/testing/validation splits
mkdir data
cd data
mkdir oxford102
echo "Downloading flower images..."
wget http://www.robots.ox.ac.uk/~vgg/data/flowers/102/102flowers.tgz
tar -xf 102flowers.tgz -C oxford102
echo "Downloading image labels..."
wget http://www.robots.ox.ac.uk/~vgg/data/flowers/102/imagelabels.mat
echo "Downloading data splits..."
wget http://www.robots.ox.ac.uk/~vgg/data/flowers/102/setid.mat
cd ../
|
Reduce the amount of time to wait for autodiscovery | #!/bin/bash
set -e
function run_tests() {
local clusterSize=3
local version=$1
ccm create test -v binary:$version -n $clusterSize -d --vnodes
ccm updateconf 'concurrent_reads: 8' 'concurrent_writes: 32' 'rpc_server_type: sync' 'rpc_min_threads: 2' 'rpc_max_threads: 8' 'write_request_timeout_in_ms: 5000' 'read_request_timeout_in_ms: 5000'
ccm start
ccm status
local proto=2
if [[ $version == 1.2.* ]]; then
proto=1
fi
go test -v -proto=$proto -rf=3 -cluster=$(ccm liveset) -clusterSize=$clusterSize -autowait=5000ms ./...
ccm clear
}
run_tests $1
| #!/bin/bash
set -e
function run_tests() {
local clusterSize=3
local version=$1
ccm create test -v binary:$version -n $clusterSize -d --vnodes
ccm updateconf 'concurrent_reads: 8' 'concurrent_writes: 32' 'rpc_server_type: sync' 'rpc_min_threads: 2' 'rpc_max_threads: 8' 'write_request_timeout_in_ms: 5000' 'read_request_timeout_in_ms: 5000'
ccm start
ccm status
local proto=2
if [[ $version == 1.2.* ]]; then
proto=1
fi
go test -v -proto=$proto -rf=3 -cluster=$(ccm liveset) -clusterSize=$clusterSize -autowait=2000ms ./...
ccm clear
}
run_tests $1
|
Add comments to clarify the steps | #!/bin/bash -l
#SBATCH -N 1
#SBATCH -p regular
#SBATCH -t 00:45:00
#SBATCH -C knl,quad,cache
export KMP_AFFINITY=granularity=fine,compact
export NUM_OF_THREADS=$(grep 'model name' /proc/cpuinfo | wc -l)
export OMP_NUM_THREADS=$(( $NUM_OF_THREADS / 4 ))
export MKL_NUM_THREADS=$(( $NUM_OF_THREADS / 4 ))
export KMP_HW_SUBSET=${OMP_NUM_THREADS}c,1t
export HPL_LARGEPAGE=1
export KMP_BLOCKTIME=800
export TEST=all
export SIZE=large
export OUTPUT_DIR="."
module load python/3.5-anaconda
source $HOME/.conda/envs/wrapped_ibench/bin/activate wrapped_ibench
# Make sure that the transparent huge page is enabled for best performance
module load craype-hugepages2M
#### This is a script for running the benchmark
srun -N 1 python -m ibench run -b $TEST --size $SIZE --file \
$OUTPUT_DIR/${TEST}_${SIZE}_$(date '+%Y-%m-%d_%H:%M:%S').log
| #!/bin/bash -l
#SBATCH -N 1
#SBATCH -p regular
#SBATCH -t 00:45:00
#SBATCH -C knl,quad,cache
# specify threading settings
export KMP_AFFINITY=granularity=fine,compact
export NUM_OF_THREADS=$(grep 'model name' /proc/cpuinfo | wc -l)
export OMP_NUM_THREADS=$(( $NUM_OF_THREADS / 4 ))
export MKL_NUM_THREADS=$(( $NUM_OF_THREADS / 4 ))
export KMP_HW_SUBSET=${OMP_NUM_THREADS}c,1t
export HPL_LARGEPAGE=1
export KMP_BLOCKTIME=800
export TEST=all
export SIZE=large
export OUTPUT_DIR="."
# load the python module on Cori
module load python/3.5-anaconda
# activate the relevant Conda environment
source $HOME/.conda/envs/wrapped_ibench/bin/activate wrapped_ibench
# make sure that the Cray transparent huge page module is loaded for the best performance
module load craype-hugepages2M
# run the benchmark and specify the location and name of the log file
srun -N 1 python -m ibench run -b $TEST --size $SIZE --file \
$OUTPUT_DIR/${TEST}_${SIZE}_$(date '+%Y-%m-%d_%H:%M:%S').log
|
Change the design of the preview button | .comable-page
.comable-main-fixed-top
.comable-page-heading
ul.pull-right.list-inline
li.dropdown
= link_to '#', class: 'btn btn-default', 'data-toggle' => 'dropdown' do
i.fa.fa-bars
ul.dropdown-menu.dropdown-menu-right
li
= link_to comable.page_path(@page) do
span.fa.fa-external-link>
= Comable.t('admin.preview')
li
= link_to_save
h1.page-header
ol.breadcrumb
li>
= link_to Comable.t('admin.nav.page'), comable.admin_pages_path
li.active
= @page.title
.comable-page-body
= render 'form'
hr
.panel.panel-danger
.panel-heading type="button" data-toggle="collapse" data-target="#comable-danger"
strong
span.fa.fa-angle-down>
= Comable.t('admin.actions.destroy')
#comable-danger.collapse
.panel-body
p
= Comable.t('admin.confirmation_to_remove_page')
= link_to Comable.t('admin.actions.destroy'), comable.admin_page_path(@page), method: :delete, class: 'btn btn-danger'
| .comable-page
.comable-main-fixed-top
.comable-page-heading
ul.pull-right.list-inline
li
= link_to comable.page_path(@page), class: 'btn btn-default', target: '_blank' do
i.fa.fa-external-link>
= Comable.t('admin.preview')
li
= link_to_save
h1.page-header
ol.breadcrumb
li>
= link_to Comable.t('admin.nav.page'), comable.admin_pages_path
li.active
= @page.title
.comable-page-body
= render 'form'
hr
.panel.panel-danger
.panel-heading type="button" data-toggle="collapse" data-target="#comable-danger"
strong
span.fa.fa-angle-down>
= Comable.t('admin.actions.destroy')
#comable-danger.collapse
.panel-body
p
= Comable.t('admin.confirmation_to_remove_page')
= link_to Comable.t('admin.actions.destroy'), comable.admin_page_path(@page), method: :delete, class: 'btn btn-danger'
|
Use a different icon for the new skill branch button. | = page_header do
div.btn-group
- if can?(:create, Course::Assessment::Skill.new(course: current_course))
= new_button([current_course, :assessments, :skill])
- if can?(:create, Course::Assessment::SkillBranch.new(course: current_course))
= new_button([current_course, :assessments, :skill_branch])
table.table.skills-list.table-hover
thead
tr
th = Course::Assessment::Skill.human_attribute_name(:title)
th = Course::Assessment::Skill.human_attribute_name(:description)
th
= render partial: 'skill_branch', collection: @skill_branches + [nil],
locals: { skills: @skills.group_by(&:skill_branch) }
| = page_header do
div.btn-group
- if can?(:create, Course::Assessment::Skill.new(course: current_course))
= new_button([current_course, :assessments, :skill])
- if can?(:create, Course::Assessment::SkillBranch.new(course: current_course))
= new_button([current_course, :assessments, :skill_branch]) { fa_icon 'code-fork'.freeze }
table.table.skills-list.table-hover
thead
tr
th = Course::Assessment::Skill.human_attribute_name(:title)
th = Course::Assessment::Skill.human_attribute_name(:description)
th
= render partial: 'skill_branch', collection: @skill_branches + [nil],
locals: { skills: @skills.group_by(&:skill_branch) }
|
Remove extra/missing paragraph in activated unverfied email | - content_for(:title) do
h3= t("promo_mailer.promo_activated_2018q1_unverified.subject")
p.salutation= t("publisher_mailer.shared.salutation", name: @publisher.name)
p = t("promo_mailer.promo_activated_2018q1_unverified.body_one")
= t("promo_mailer.promo_activated_2018q1_unverified.body_two_html")
p = t("promo_mailer.promo_activated_2018q1_unverified.body_two")
div.center= link_to(t("promo_mailer.promo_activated_2018q1_unverified.cta"), new_auth_token_publishers_url, class: "btn-primary btn-login")
p= t("publisher_mailer.shared.signature")
hr | - content_for(:title) do
h3= t("promo_mailer.promo_activated_2018q1_unverified.subject")
p.salutation= t("publisher_mailer.shared.salutation", name: @publisher.name)
p = t("promo_mailer.promo_activated_2018q1_unverified.body_one")
= t("promo_mailer.promo_activated_2018q1_unverified.body_two_html")
div.center= link_to(t("promo_mailer.promo_activated_2018q1_unverified.cta"), new_auth_token_publishers_url, class: "btn-primary btn-login")
p= t("publisher_mailer.shared.signature")
hr |
Clean up function returns markup | h3.doc-item__title
code
= item.context.name
span.doc-item__directive-type
= item.context.type.capitalize
- if item.return.present?
div.doc-item__returns
| Returns: #{ item.return.type }
- if item.since.present?
- item.since.each do |release|
span.doc-item__since
| #{release.version}+
div.doc-item__source-link
= link_to "View Source", github_file_url(item.file.path, version)
- if item.description.present?
div.doc-item__description
= markdown(item.description)
| h3.doc-item__title
code
= item.context.name
span.doc-item__directive-type
= item.context.type.capitalize
- if item.return.present?
span.doc-item__returns
| Returns:
code< #{item.return.type}
- if item.since.present?
- item.since.each do |release|
span.doc-item__since
| #{release.version}+
div.doc-item__source-link
= link_to "View Source", github_file_url(item.file.path, version)
- if item.description.present?
div.doc-item__description
= markdown(item.description)
|
Add title to post submission declaration of corporate responsibility | p
' Congratulations! Your application for the
= award.decorate.award_type
' has been shortlisted.
/ if they answered D1 with complete full declaration later
/- if corp_responsibility_form == "declare_now"
.application-notice.help-notice
p
' You should now complete both the audit certificate and full Declaration of Corporate Responsibility by
= application_deadline "audit_certificates"
' .
p
' Please
= link_to "fill out the full Declaration of Corporate Responsibility", declaration_of_corporate_responsibility_path
' .
/ else
p
' You have already completed the full Declaration of Corporate Responsibility. You can
= link_to "view and edit it here", declaration_of_corporate_responsibility_path
' .
br
h3 Audit Certificate
p
' Please download and complete
= link_to "this audit certificate",
users_form_answer_audit_certificate_url(award, format: :pdf),
target: "_blank"
' . You can then upload your completed certificate below.
= render "users/audit_certificates/upload_block", award: award
| p
' Congratulations! Your application for the
= award.decorate.award_type
' has been shortlisted.
br
h3 Declaration of Corporate Responsibility
/ if they answered D1 with complete full declaration later
/- if corp_responsibility_form == "declare_now"
.application-notice.help-notice
p
' You should now complete both the audit certificate and full Declaration of Corporate Responsibility by
= application_deadline "audit_certificates"
' .
p
' Please
= link_to "fill out the full Declaration of Corporate Responsibility", declaration_of_corporate_responsibility_path
' .
/ else
p
' You have already completed the full Declaration of Corporate Responsibility. You can
= link_to "view and edit it here", declaration_of_corporate_responsibility_path
' .
br
h3 Audit Certificate
p
' Please download and complete
= link_to "this audit certificate",
users_form_answer_audit_certificate_url(award, format: :pdf),
target: "_blank"
' . You can then upload your completed certificate below.
= render "users/audit_certificates/upload_block", award: award
|
Create Work - form centering and help text | h1 Create a New Work
=form_for(@work, { :url => { :action => 'create' }}) do |f|
=validation_summary @work
table.form
tr
th =f.label :title
td.w100 =f.text_field :title
tr
th =f.label :description
td =f.text_area :description
=f.button 'Create Work' | section.signon
h1 Create New Work
p To create a new work please start from entering a title for the work. Although description is not required, it would be nice to describe the work here.
=form_for(@work, { :url => { :action => 'create' }}) do |f|
=validation_summary @work
table.form
tr.big
th =f.label :title
td.w100 =f.text_field :title
tr
th =f.label :description
td =f.text_area :description
p.aright
=f.button 'Create Work' |
Remove informação de tamanho do arquivo CSV no CTA principal da página inicial. | div[ng-controller="IndexController"]
= render 'shared/persistent_header', entity: 'brasil', year_navigation: true
.showcase
.container
.row
.span7
h2
| O portal que visa facilitar o acesso dos cidadãos/ãs e organizações da sociedade civil aos dados do orçamento federal.
a.btn-large.btn[href='http://openspending.org/unidade_orcamentaria.csv' target='_blank']
span.icon-download.icon-large>
span.text
| Baixar planilha com os dados
br
small
| (em formato CSV - XX mb)
.span5
= image_tag 'logo.png'
.home-header
.container
h3
| O Orçamento Federal
.monitor
.container
monitor[entity='brasil' year='year']
.function
.container
h3
| Distribuição do Orçamento Autorizado por Função e Subfunção
funcao-graph.funcao-treemap[year='year'
drilldowns='"funcao","subfuncao"']
.navigation
.container
h3
| Lista de Órgãos e Unidades Orçamentárias
entity-list[class='table' entities='entities' year='year']
| div[ng-controller="IndexController"]
= render 'shared/persistent_header', entity: 'brasil', year_navigation: true
.showcase
.container
.row
.span7
h2
| O portal que visa facilitar o acesso dos cidadãos/ãs e organizações da sociedade civil aos dados do orçamento federal.
a.btn-large.btn[href='http://openspending.org/unidade_orcamentaria.csv' target='_blank']
span.icon-download.icon-large>
span.text
| Baixar planilha com os dados
br
small
| (em formato .CSV)
.span5
= image_tag 'logo.png'
.home-header
.container
h3
| O Orçamento Federal
.monitor
.container
monitor[entity='brasil' year='year']
.function
.container
h3
| Distribuição do Orçamento Autorizado por Função e Subfunção
funcao-graph.funcao-treemap[year='year'
drilldowns='"funcao","subfuncao"']
.navigation
.container
h3
| Lista de Órgãos e Unidades Orçamentárias
entity-list[class='table' entities='entities' year='year']
|
Fix typo in iframe src url for vimeo | div(itemprop="video" itemscope itemtype="http://schema.org/VideoObject")
h4 itemprop="name" #{video.title}
/ TODO Add more metadata
span itemprop="duration" content="#{video.duration_in_seconds}"
span itemprop="thumbnail" content="#{video.thumb_url}"
span itemprop="uploadDate" content="#{video.upload_date_iso8601}"
.flex-video(widescreen vimeo)
iframe(src="//player.vimeo.com/video/#{video.id}\?title=0&byline=0&portrait=0&badge=0&color=2664A2" width="500" height="313" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen)
/ TODO Add this back in once we have identity support
- video.cast.each do |c|
.follow-links
span(class="title")Follow #{first_name(c.display_name)}
a: i.icon-rss
a: i.icon-facebook
a: i.icon-twitter
a: i.icon-linkedin
| div(itemprop="video" itemscope itemtype="http://schema.org/VideoObject")
h4 itemprop="name" #{video.title}
/ TODO Add more metadata
span itemprop="duration" content="#{video.duration_in_seconds}"
span itemprop="thumbnail" content="#{video.thumb_url}"
span itemprop="uploadDate" content="#{video.upload_date_iso8601}"
.flex-video(widescreen vimeo)
iframe(src="//player.vimeo.com/video/#{video.id}?title=0&byline=0&portrait=0&badge=0&color=2664A2" width="500" height="313" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen)
/ TODO Add this back in once we have identity support
- video.cast.each do |c|
.follow-links
span(class="title")Follow #{first_name(c.display_name)}
a: i.icon-rss
a: i.icon-facebook
a: i.icon-twitter
a: i.icon-linkedin
|
Add toolbar link for income calculator | - if current_user
.row
dl.sub-nav
dd
=link_to 'DWP check', new_dwp_checks_path
=link_to t('descriptors.r2_calculator').to_s, calculator_income_path
-if current_user.admin?
dd.right
=link_to 'Users', users_path
dd.right
=link_to 'Offices', offices_path
| - if current_user
.row
dl.sub-nav
dd#dwp-check
=link_to 'DWP check', new_dwp_checks_path
dd#income-calc
=link_to t('descriptors.r2_calculator').to_s, calculator_income_path
-if current_user.admin?
dd.right
=link_to 'Users', users_path
dd.right
=link_to 'Offices', offices_path
|
Change “submit new issue” link style | - title t('.title', issue: @issue)
.featurette.featurette-indigo
.container
h1= yield :title
.featurette
.container
h2= t('.details')
p
b> #{Issue.human_attribute_name(:stars)}:
= @issue.stars
p
b> #{Device.model_name.human}:
= @issue.device.name
p
b= Issue.human_attribute_name(:description)
p= simple_format(@issue.description)
hr
h2= t('.solution_found')
blockquote
p
b> #{Issue.human_attribute_name(:closed_by)}:
= @issue.closed_by
p
b> #{Issue.human_attribute_name(:closed_at)}:
= l(@issue.closed_at, format: :long)
- if @issue.obsolete?
p
span.label.label-default= t('.obsolete_html')
p
em.text-muted= @issue.reason
- elsif @issue.reason == 'contact customer support.'
p.lead
span.label.label-default= t('.wrong_forum_html')
p= simple_format(@issue.reason)
- else
p.lead
span.label.label-warning= t('.restricted_html')
p= simple_format(@issue.reason)
hr
= link_to t('.submit_new_issue'), new_issue_path
| - title t('.title', issue: @issue)
.featurette.featurette-indigo
.container
h1= yield :title
.featurette
.container
h2= t('.details')
p
b> #{Issue.human_attribute_name(:stars)}:
= @issue.stars
p
b> #{Device.model_name.human}:
= @issue.device.name
p
b= Issue.human_attribute_name(:description)
p= simple_format(@issue.description)
hr
h2= t('.solution_found')
blockquote
p
b> #{Issue.human_attribute_name(:closed_by)}:
= @issue.closed_by
p
b> #{Issue.human_attribute_name(:closed_at)}:
= l(@issue.closed_at, format: :long)
- if @issue.obsolete?
p
span.label.label-default= t('.obsolete_html')
p
em.text-muted= @issue.reason
- elsif @issue.reason == 'contact customer support.'
p.lead
span.label.label-default= t('.wrong_forum_html')
p= simple_format(@issue.reason)
- else
p.lead
span.label.label-warning= t('.restricted_html')
p= simple_format(@issue.reason)
hr
= link_to t('.submit_new_issue'), new_issue_path, class: 'btn btn-default btn-sm btn-block'
|
Fix required bug on search form | = simple_form_for search_cache, url: offers_path, html: { method: :get } do |f|
= f.input :query, label: true, required: false, input_html: { placeholder: 'Was? z.B. drogen, schwanger, erziehungshilfe...', spellcheck: false, autocomplete: 'off', autofocus: true, class: 'input-xlg typeahead' }
= f.input :search_location, label: true, input_html: { value: geoloc_to_s, class: 'input-xlg JS-Search-location-display', placeholder: 'Wo? z.B. stadt, straße, plz...', oninvalid: "this.setCustomValidity('Bitte fülle dieses Feld aus')" }
= f.input :generated_geolocation, as: :hidden, input_html: { class: 'JS-Search-location', value: default_geolocation }
= f.input :tags, as: :hidden
button.main-search__submit Suchen
| = simple_form_for search_cache, url: offers_path, html: { method: :get } do |f|
= f.input :query, label: true, required: false, input_html: { placeholder: 'Was? z.B. drogen, schwanger, erziehungshilfe...', spellcheck: false, autocomplete: 'off', autofocus: true, class: 'input-xlg typeahead' }
= f.input :search_location, label: true, input_html: { value: geoloc_to_s, class: 'input-xlg JS-Search-location-display', placeholder: 'Wo? z.B. stadt, straße, plz...', oninvalid: "this.setCustomValidity('Bitte fülle dieses Feld aus')", onchange: "try{setCustomValidity('')}catch(e){}" }
= f.input :generated_geolocation, as: :hidden, input_html: { class: 'JS-Search-location', value: default_geolocation }
= f.input :tags, as: :hidden
button.main-search__submit Suchen
|
Adjust the sidebar responsive view | doctype html
html lang="en"
head
meta charset="utf-8" /
meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport" /
title = [content_for?(:title) ? yield(:title) : nil, site_name].join ' - '
= stylesheet_link_tag "application"
= javascript_include_tag "application"
link rel="icon" type="image/x-icon" href=image_url("favicon.png")
= csrf_meta_tag
body
== render "navbar"
.container
.row.row-offcanvas.row-offcanvas-right
.main.col-12.col-md-9
- flash.each do |type, message|
.alert class=bootstrap_class_for(type) role="alert"
= message
== yield
#sidebar.col-6.col-md-3.sidebar-offcanvas
== render "sidebar"
footer.footer
.container
ul
li
a href="https://github.com/csexton/corporate-tool"
= image_tag 'logo.png', class: 'logo', style: "max-height: 20px;"
li
a href=root_path
| Home
li
a href=pages_path
| List Pages
li
a href=gists_path
| List Gists
| doctype html
html lang="en"
head
meta charset="utf-8" /
meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport" /
title = [content_for?(:title) ? yield(:title) : nil, site_name].join ' - '
= stylesheet_link_tag "application"
= javascript_include_tag "application"
link rel="icon" type="image/x-icon" href=image_url("favicon.png")
= csrf_meta_tag
body
== render "navbar"
.container
.row.row-offcanvas.row-offcanvas-right
.main.col-12.col-md-9
- flash.each do |type, message|
.alert class=bootstrap_class_for(type) role="alert"
= message
== yield
#sidebar.col-12.col-lg-3.sidebar-offcanvas
== render "sidebar"
footer.footer
.container
ul
li
a href="https://github.com/csexton/corporate-tool"
= image_tag 'logo.png', class: 'logo', style: "max-height: 20px;"
li
a href=root_path
| Home
li
a href=pages_path
| List Pages
li
a href=gists_path
| List Gists
|
Make use of title gem | doctype html
html
head
title Discounty
== stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true
== javascript_include_tag 'application', 'data-turbolinks-track' => true
== csrf_meta_tags
body
== yield
| doctype html
html
head
title
= title
== stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true
== javascript_include_tag 'application', 'data-turbolinks-track' => true
== csrf_meta_tags
body
== yield
|
Add date to article layout. | = wrap_layout :layout do
section
article
h1 == link_to current_page.data.title, current_page.url
h2.post-meta by #{data.owner.name} on DATE HERE
== yield
| = wrap_layout :layout do
section
article
h1 == link_to current_page.data.title, current_page.url
h2.post-meta by #{data.owner.name} on #{current_page.data.date.strftime('%B %-d, %Y')}
== yield
|
Add return to docs button | <redoc spec-url='/data/docs/builder-api.json'></redoc>
<script src="https://cdn.jsdelivr.net/npm/redoc/bundles/redoc.standalone.js"> </script>
| <button class="return" style="font-size:16; background-color:#007FAB; height:2.5rem;width:10rem; margin:1rem; border-radius:0.33rem"><a style="color:white; text-decoration:none" href='https://www.habitat.sh/docs/'>Return to Docs</a></button>
<redoc spec-url='/data/docs/builder-api.json'></redoc>
<script src="https://cdn.jsdelivr.net/npm/redoc/bundles/redoc.standalone.js"> </script>
|
Update view to match summary | header
.row
.small-12.medium-12.large-12.columns
h2 =t('processed_applications.detail.title')
=build_section 'Personal details', @overview, %w[full_name date_of_birth ni_number status number_of_children total_monthly_income]
=build_section 'Application details', @overview, %w[fee jurisdiction date_received form_name emergency_reason reference]
=build_section 'Processing details', @processed, %w[processed_on processed_by]
=build_section 'Result', @result, %w[savings income]
=render(partial: 'shared/remission_type', locals: { source: @result })
| header
.row
.small-12.medium-12.large-12.columns
h2 =t('processed_applications.detail.title')
=build_section 'Personal details', @overview, %w[full_name date_of_birth ni_number status number_of_children total_monthly_income]
=build_section 'Application details', @overview, %w[fee jurisdiction date_received form_name case_number deceased_name date_of_death date_fee_paid emergency_reason reference]
=build_section 'Processing details', @processed, %w[processed_on processed_by]
=build_section 'Result', @overview, @overview.savings_investment_params
=render(partial: 'shared/remission_type', locals: { source: @result })
|
Add user icon to Sign In | - if user_signed_in?
ul.nav
li
a bs-dropdown="userMenu"
i.icon-user
= current_user.name
i.icon-chevron-down
li
a
span#loading-gear.animated.flash ng-show="loading()"
img.image.icon-spin src='#{asset_path("gear.svg")}' style="color: #333"
ul.nav ng-controller="AlertCtrl"
li#alerts-container
a pop-up-alerts-dropdown="alertData.alerts" ng-class="{'with-information':alertData.alerts.length}"
span.number-circle.ng-cloak ng-show="alertData.alerts.length" {{alertData.alerts.length}}
- else
ul.nav
li = link_to('Sign in', new_user_session_path, { target: '_self', class: 'btn', id: 'navbarbutton' }) | - if user_signed_in?
ul.nav
li
a bs-dropdown="userMenu"
i.icon-user
= current_user.name
i.icon-chevron-down
li
a
span#loading-gear.animated.flash ng-show="loading()"
img.image.icon-spin src='#{asset_path("gear.svg")}' style="color: #333"
ul.nav ng-controller="AlertCtrl"
li#alerts-container
a pop-up-alerts-dropdown="alertData.alerts" ng-class="{'with-information':alertData.alerts.length}"
span.number-circle.ng-cloak ng-show="alertData.alerts.length" {{alertData.alerts.length}}
- else
ul.nav
li= link_to( '<i class="icon-user"></i> sign in'.html_safe, new_user_session_path, { target: '_self'}) |
Make hovered link color white | .p-profile-header.p-profile-header--low.d-flex
.p-profile-header__cover-image style="background: url(#{profile_background_image_url(user.profile, size: '800x520', size_rate: 2)}) center center /cover no-repeat;"
.p-profile-header__info.align-self-end.py-3
.container
.row
.col.u-flex-grow-0
= link_to user_path(username: user.username) do
= ann_image_tag(user.profile, :tombo_avatar, size: "80x80", class: "p-profile-header__avatar rounded-circle")
.col.pt-2.pl-0
h1
= link_to user.profile.name, user_path(username: user.username), class: "font-weight-bold"
.mt-2
= link_to "@#{user.username}", user_path(username: user.username)
| .p-profile-header.p-profile-header--low.d-flex
.p-profile-header__cover-image style="background: url(#{profile_background_image_url(user.profile, size: '800x520', size_rate: 2)}) center center /cover no-repeat;"
.p-profile-header__info.align-self-end.py-3
.container
.row
.col.u-flex-grow-0
= link_to user_path(username: user.username) do
= ann_image_tag(user.profile, :tombo_avatar, size: "80x80", class: "p-profile-header__avatar rounded-circle")
.col.pt-2.pl-0
h1
= link_to user.profile.name, user_path(username: user.username), class: "font-weight-bold text-white"
.mt-2
= link_to "@#{user.username}", user_path(username: user.username), class: "text-white"
|
Disable Target Params from menu for now | nav.top-bar [data-topbar]
ul.title-area
li.name
h1 = link_to t('app.name'), dashboard_path
li.toggle-topbar.menu-icon
a href="#"
span
a.item.home
section.top-bar-section
// right seciton
ul.right
li = link_to logout_path, class: 'item' do
i.off.icon
= t '.logout'
ul.left
li = link_to ad_campaigns_path, class: 'item' do
= t '.ad_campaigns'
- if @current_user.role.admin?
li = link_to admin_users_path, class: 'item' do
= t '.users'
li = link_to admin_target_params_path, class: 'item' do
= t '.target_params'
li = link_to ad_sizes_path, class: 'item' do
= t '.ad_sizes'
| nav.top-bar [data-topbar]
ul.title-area
li.name
h1 = link_to t('app.name'), dashboard_path
li.toggle-topbar.menu-icon
a href="#"
span
a.item.home
section.top-bar-section
// right seciton
ul.right
li = link_to logout_path, class: 'item' do
i.off.icon
= t '.logout'
ul.left
li = link_to ad_campaigns_path, class: 'item' do
= t '.ad_campaigns'
- if @current_user.role.admin?
li = link_to admin_users_path, class: 'item' do
= t '.users'
/li = link_to admin_target_params_path, class: 'item' do
/ = t '.target_params'
li = link_to ad_sizes_path, class: 'item' do
= t '.ad_sizes'
|
Add ranges to number fields | = simple_nested_form_for ([:orga, conference]) do |f|
- if conference.errors.any?
#error_explanation
h2 = "#{pluralize(conference.errors.count, "error")} prohibited this mailing from being saved:"
ul
- conference.errors.full_messages.each do |message|
li = message
= f.input :name
= f.input :url
= f.input :location
= f.input :twitter
= f.input :starts_on, order: [:day, :month, :year], input_html: { class: 'short' }
= f.input :ends_on, order: [:day, :month, :year], input_html: { class: 'short' }
= f.input :tickets
= f.input :flights
= f.input :round
= f.input :accomodation, label: "Accommodation"
= f.input :lightningtalkslots, label: "Lightning Talk Slots"
h3 Attendees
fieldset.attendees
.header
label Github Handle
= f.simple_fields_for :attendances do |s|
= s.input :github_handle, required: true, label: false
= s.link_to_remove 'Remove'
= f.link_to_add 'Add another attendee', :attendances
.actions
= f.submit 'Save', class: 'btn btn-success'
| = simple_nested_form_for ([:orga, conference]) do |f|
- if conference.errors.any?
#error_explanation
h2 = "#{pluralize(conference.errors.count, "error")} prohibited this mailing from being saved:"
ul
- conference.errors.full_messages.each do |message|
li = message
= f.input :name
= f.input :url
= f.input :location
= f.input :twitter
= f.input :starts_on, order: [:day, :month, :year], input_html: { class: 'short' }
= f.input :ends_on, order: [:day, :month, :year], input_html: { class: 'short' }
= f.input :round, collection: 1..2
= f.input :tickets, default: 0, collection: 0..20
= f.input :flights, default:0, collection: 0..(conference&.tickets || 20)
= f.input :accomodation, label: "Accommodation", default:0, collection: 0..(conference&.tickets || 20)
= f.input :lightningtalkslots, label: "Lightning Talk Slots"
h3 Attendees
fieldset.attendees
.header
label Github Handle
= f.simple_fields_for :attendances do |s|
= s.input :github_handle, required: true, label: false
= s.link_to_remove 'Remove'
= f.link_to_add 'Add another attendee', :attendances
.actions
= f.submit 'Save', class: 'btn btn-success'
|
Clean up styles on signup 2FA prompt | .main-content
.container
.row
.sub-panel.login-panel.col-center.col-xs-12.col-sm-10.col-md-8.col-lg-6
.col.col-xs-12.col-sm-10.col-md-8.col-lg-10.col-center.text-center
p= render "icon_security"
h3= t ".heading"
h4= t ".subheading"
p= t ".intro"
.row
.col.col-md-6
= link_to t(".skip"), home_publishers_path, class: "btn btn-link btn-block"
.col.col-md-6
= link_to t(".setup"), two_factor_registrations_path, class: "btn btn-primary btn-block"
| .main-content
.container
.sub-panel.col-center.col-xs-12.col-sm-10.col-md-8.col-lg-6
.row
.col.col-xs-12.col-sm-10.col-md-9.col-lg-10.col-center.text-center
p= render "icon_security"
h3= t ".heading"
h4= t ".subheading"
p= t ".intro"
.row
.col.col-sm-5.col-sm-offset-1
= link_to t(".skip"), home_publishers_path, class: "btn btn-link btn-block"
.col.col-sm-5
= link_to t(".setup"), two_factor_registrations_path, class: "btn btn-primary btn-block"
|
Use same content in title and og:title | doctype html
html
head
title = page_title(@activity.try(:name))
meta name="description" content= page_description(@activity.try(:description))
- %w{twitter og}.each do |prefix|
meta name="#{prefix}:title" content= page_description(@activity.try(:name))
meta name="#{prefix}:description" content= page_description(@activity.try(:description))
meta name="#{prefix}:image" content= page_image(@activity.try(:logo))
= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true
= javascript_include_tag 'application', 'data-turbolinks-track' => true
= csrf_meta_tags
body data-action="#{action_name}" data-controller="#{controller_name}"
= render 'shared/header'
.container-body
= flash_message
.container
= yield
- if respond_to?(:console)
=console
= render 'shared/footer'
| doctype html
html
head
title = page_title(@activity.try(:name))
meta name="description" content= page_description(@activity.try(:description))
- %w{twitter og}.each do |prefix|
meta name="#{prefix}:title" content= page_title(@activity.try(:name))
meta name="#{prefix}:description" content= page_description(@activity.try(:description))
meta name="#{prefix}:image" content= page_image(@activity.try(:logo))
= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true
= javascript_include_tag 'application', 'data-turbolinks-track' => true
= csrf_meta_tags
body data-action="#{action_name}" data-controller="#{controller_name}"
= render 'shared/header'
.container-body
= flash_message
.container
= yield
- if respond_to?(:console)
=console
= render 'shared/footer'
|
Remove javascript files from devise layout | doctype html
html id="controller_#{controller_name}"
head
meta charset='utf-8'
meta name='viewport' content='width=device-width, initial-scale=1.0'
meta name="robots" content="noindex,nofollow"
title= @page_title || admin_site_name
= stylesheet_link_tag 'ab_admin/devise', media: 'all'
script src='//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js'
= javascript_include_tag 'bootstrap'
= csrf_meta_tags
body.container
= render('admin/shared/flash', flash: flash) if flash
= yield
| doctype html
html id="controller_#{controller_name}"
head
meta charset='utf-8'
meta name='viewport' content='width=device-width, initial-scale=1.0'
meta name="robots" content="noindex,nofollow"
title= @page_title || admin_site_name
= stylesheet_link_tag 'ab_admin/devise', media: 'all'
= csrf_meta_tags
body.container
= render('admin/shared/flash', flash: flash) if flash
= yield
|
Include full name of clients in drop-down in Stay form | = form_for(@stay) do |f|
div.field
= f.label :shelter
= f.collection_select :shelter_id, Shelter.order(:name), :id, :name
div.field
= f.label :user
= f.collection_select :user_id, User.order(:last_name, :first_name), :id, :last_name
div.actions
= f.submit
| = form_for(@stay) do |f|
div.field
= f.label :shelter
= f.collection_select :shelter_id, Shelter.order(:name), :id, :name
div.field
= f.label :user
= f.collection_select :user_id, User.order(:last_name, :first_name), :id, :name
div.actions
= f.submit
|
Format for missing observation results | p
strong Recent Pathology Results
p
- recent_pathology_results[1..-1].each do |observation|
- description, result, date = observation
span #{date}: #{description} #{result};
| p
strong Recent Pathology Results
p
- recent_pathology_results[1..-1].each do |pathology_result|
- description, observation, date = pathology_result
- if observation.result.present?
span #{date}: #{description} #{observation.result};
- else
span #{description};
|
Return payments show page to original state - We need to fix the flow for this as create claim feature will break if no EPDQ form is present. | header.main-header
h3 Page 1 of 11
h1 Your fee
.main-section
aside
h3 Get Help
nav
ul
li
= link_to('Read the guide')
li
= link_to('Sign out', user_sessions_path)
.main-content
.main-column
fieldset
legend Application fee
p = "The standard application fee for your claim is <span class=\"strong\">£#{fee_calculation.application_fee_after_remission}</span>".html_safe
p = "If your case goes to a tribunal, you’ll have to pay a hearing fee of <span class=\"strong\">£#{fee_calculation.hearing_fee}</span>.".html_safe
fieldset
legend Reduce your fee
= f.input :is_applying_for_remission,
as: :gds_check_boxes,
wrapper_class: 'reveal-checkbox',
input_html: {class: 'input-reveal'}
= submit_tag "Start payment", name: nil | h1 Pay your fee
p = "From the information you’ve given us, you have to pay <strong>£#{fee_calculation.application_fee_after_remission}</strong> by debit or credit card.".html_safe
p = "If your case goes to a tribunal, you’ll have to pay a hearing fee of <strong>£#{fee_calculation.hearing_fee}</strong>.".html_safe
= form_tag payment_request.request_url, authenticity_token: false, enforce_utf8: false, name: 'form1' do |f|
- payment_request.form_attributes.each do |k, v|
= hidden_field_tag k, v
= submit_tag "Start payment", name: nil |
Add talk title to speaker list | #ponentes.speakers.widget-content
.row
.columns.small-12.medium-12.large-12
.center-content
h2 Ponentes
div
ul.small-block-grid-1.medium-block-grid-2 class="large-block-grid-#{event.speakers.count}"
- event.speakers.each do |speaker|
li
.avatar
img alt='Avatar1' height='220' src="assets/#{speaker.twitter}.jpeg" width='220' /
.social
/! Speaker profile / blog url
/a href='#' target='_blank'
/i.fa.fa-user
/! Speaker Twitter URL
a href="https://twitter.com/#{speaker.twitter}"
i.fa.fa-twitter
/! Speaker Facebook URL
/a href='#'
/i.fa.fa-facebook
.name
a href='#' target='_blank'
= speaker.name
/.company
/a href='http://tauziet.com/' target='_blank' Facebook
/! View all Speakers Button
/.view-all-speakers
/a.btn-default href='speakers.html' VE A TODOS LOS PONENTES
| #ponentes.speakers.widget-content
.row
.columns.small-12.medium-12.large-12
.center-content
h2 Ponentes
div
ul.small-block-grid-1.medium-block-grid-2 class="large-block-grid-#{event.speakers.count}"
- event.speakers.each do |speaker|
li
.avatar
img alt='Avatar1' height='220' src="assets/#{speaker.twitter}.jpeg" width='220' /
.social
/! Speaker profile / blog url
/a href='#' target='_blank'
/i.fa.fa-user
/! Speaker Twitter URL
a href="https://twitter.com/#{speaker.twitter}"
i.fa.fa-twitter
/! Speaker Facebook URL
/a href='#'
/i.fa.fa-facebook
.name
a href='#' target='_blank'
= speaker.name
.company
= speaker.talks.first.title
/a href='http://tauziet.com/' target='_blank' Facebook
/! View all Speakers Button
/.view-all-speakers
/a.btn-default href='speakers.html' VE A TODOS LOS PONENTES
|
Make sure footer columns don't stack on smaller screen sizes | footer
.container
.row
.col-md-6
ul.links
li = link_to 'About', about_path
li = link_to 'Terms of Service', tos_path
li = link_to 'Privacy Policy', privacy_path
.col-md-6.text-right
' Developed with passion by
= link_to 'Marcin Kulik', 'https://github.com/sickill'
| footer
.container
.row
.col-md-6.col-xs-6
ul.links
li = link_to 'About', about_path
li = link_to 'Terms of Service', tos_path
li = link_to 'Privacy Policy', privacy_path
.col-md-6.col-xs-6.text-right
' Developed with passion by
= link_to 'Marcin Kulik', 'https://github.com/sickill'
|
Add `.markdown-body` to description field | .tweak-title
.d-inline-block.my-3.mx-2
= mega_octicon_for(@tweak)
h3.d-inline-block.my-3 = @tweak.title
.d-inline-block.mx-2
' Created by
a href="#{user_path(@conn, :show, @tweak.user.name)}" = @tweak.user.name
.border.p-2
.pb-2.clearfix
= gettext "Last updated about "
= relative_time(@tweak.updated_at)
= render_if(@current_user && @current_user.name == @tweak.user.name, TweakView, "edit_tweak_button.html", assigns)
= render("copy_tweak_button.html", assigns)
= render_code(@tweak)
.tweak-description
= render_markdown(@tweak.description)
| .tweak-title
.d-inline-block.my-3.mx-2
= mega_octicon_for(@tweak)
h3.d-inline-block.my-3 = @tweak.title
.d-inline-block.mx-2
' Created by
a href="#{user_path(@conn, :show, @tweak.user.name)}" = @tweak.user.name
.border.p-2
.pb-2.clearfix
= gettext "Last updated about "
= relative_time(@tweak.updated_at)
= render_if(@current_user && @current_user.name == @tweak.user.name, TweakView, "edit_tweak_button.html", assigns)
= render("copy_tweak_button.html", assigns)
= render_code(@tweak)
.tweak-description.markdown-body
= render_markdown(@tweak.description)
|
Fix error if user don't have name | nav.navbar.navbar-default.navbar-static-top.main-navbar
.container-fluid
.navbar-header
= link_to "moi", admin_root_path, class: "navbar-brand"
.collapse.navbar-collapse
ul.nav.navbar-nav
= nav_item "dashboard", admin_root_path
- if can? :manage, User
= nav_item "users", admin_users_path
- if can? :read, Neuron
= nav_item "neurons", admin_neurons_path
ul.nav.navbar-nav.navbar-right
li.dropdown
= link_to "#", data: {toggle: "dropdown"} do
= current_user
span.caret
ul.dropdown-menu role="menu"
li
= link_to "Cerrar sesión", destroy_user_session_path, method: :delete
| nav.navbar.navbar-default.navbar-static-top.main-navbar
.container-fluid
.navbar-header
= link_to "moi", admin_root_path, class: "navbar-brand"
.collapse.navbar-collapse
ul.nav.navbar-nav
= nav_item "dashboard", admin_root_path
- if can? :manage, User
= nav_item "users", admin_users_path
- if can? :read, Neuron
= nav_item "neurons", admin_neurons_path
ul.nav.navbar-nav.navbar-right
li.dropdown
= link_to "#", data: {toggle: "dropdown"} do
= current_user.to_s
span.caret
ul.dropdown-menu role="menu"
li
= link_to "Cerrar sesión", destroy_user_session_path, method: :delete
|
Update alert on root page | h1.header
= icon('comments-alt')
span Activities
= link_to '<span>Atom Feed</span>'.html_safe, activities_path(format: :atom), class: 'atom'
- if current_user.try(:supervisor?)
.alert.alert-success
'Hey Supervisor! See the dashboard link in the menu ^ ? That's your new dashboard!
div.selection-box
form.filter.form-inline action=request.url
- public_activities.each do |kind|
label.radio
= radio_button_tag :kind, kind == 'all' ? '' : kind, params[:kind] == kind
= " " + kind == 'feed_entry' ? 'Blog Post' : kind.titleize
label.team_filter
' Team:
= select_tag :team_id, options_for_select(teams.map { |t| [t.display_name, t.id] }, params[:team_id]), include_blank: true, class: 'form-control'
p.pagination-info
= page_entries_info @activities
= render 'activities', object: @activities
= paginate @activities, theme: 'twitter-bootstrap-3', pagination_class: 'pagination-sm'
- content_for :head do
= auto_discovery_link_tag(:atom, {action: "index", format: "atom" }, {title: "Atom Feed"})
| h1.header
= icon('comments-alt')
span Activities
= link_to '<span>Atom Feed</span>'.html_safe, activities_path(format: :atom), class: 'atom'
- if current_user.try(:supervisor?)
.alert.alert-success
'Hey Supervisor! Did you check on your team today? You can do that in your Dashboard now!
div.selection-box
form.filter.form-inline action=request.url
- public_activities.each do |kind|
label.radio
= radio_button_tag :kind, kind == 'all' ? '' : kind, params[:kind] == kind
= " " + kind == 'feed_entry' ? 'Blog Post' : kind.titleize
label.team_filter
' Team:
= select_tag :team_id, options_for_select(teams.map { |t| [t.display_name, t.id] }, params[:team_id]), include_blank: true, class: 'form-control'
p.pagination-info
= page_entries_info @activities
= render 'activities', object: @activities
= paginate @activities, theme: 'twitter-bootstrap-3', pagination_class: 'pagination-sm'
- content_for :head do
= auto_discovery_link_tag(:atom, {action: "index", format: "atom" }, {title: "Atom Feed"})
|
Fix alert form when no checkbox is checked | div
- Alert.available_collections.each do |available_collection|
= render "collection_fields", collection: available_collection
| = hidden_field_tag "alert[categories_ids][]", nil
div
- Alert.available_collections.each do |available_collection|
= render "collection_fields", collection: available_collection
|
Fix bug with width attribute for img tag | footer.footer-container#footer
.row.footer
.small-12.large-4.columns
|
== setting.newsletter(newsletter_user) if @newsletter_module.enabled?
.small-12.large-4.columns.credentials
== setting.credentials
.small-12.large-4.columns.socials
- if setting.show_social? && @social_module.enabled?
h3 Follow me
ul.inline-list
li = link_to fa_icon('rss 2x'), posts_rss_path(format: :atom), target: :blank if @rss_module.enabled?
- unless @socials_share.nil?
- @socials_follow.each do |social_follow|
li
= link_to retina_image_tag(social_follow, :ikon, :small), social_follow.link, target: :_blank
- unless @socials_share.nil?
h4 Share me
= social_share_buttons
.row.lower-footer
.small-12.colunms
p.no-margin-bottom.text-center == t('footer.made_by', amour: fa_icon('heart'), company: link_to(image_tag('logo.png', width: '40px'), 'http://www.lr-agenceweb.fr', target: :blank, title: 'L&R Agence web'))
| footer.footer-container#footer
.row.footer
.small-12.large-4.columns
|
== setting.newsletter(newsletter_user) if @newsletter_module.enabled?
.small-12.large-4.columns.credentials
== setting.credentials
.small-12.large-4.columns.socials
- if setting.show_social? && @social_module.enabled?
h3 Follow me
ul.inline-list
li = link_to fa_icon('rss 2x'), posts_rss_path(format: :atom), target: :blank if @rss_module.enabled?
- unless @socials_share.nil?
- @socials_follow.each do |social_follow|
li
= link_to retina_image_tag(social_follow, :ikon, :small), social_follow.link, target: :_blank
- unless @socials_share.nil?
h4 Share me
= social_share_buttons
.row.lower-footer
.small-12.colunms
p.no-margin-bottom.text-center == t('footer.made_by', amour: fa_icon('heart'), company: link_to(image_tag('logo.png', width: '40'), 'http://www.lr-agenceweb.fr', target: :blank, title: 'L&R Agence web'))
|
Check default currency for nil and BAT, return USD in either case | .modal id="rewards_banner_intro_modal" role="dialog" tabindex="-1"
.modal-dialog
.modal-header id="instant-donation-modal-selection"
center id="intro-container"
= image_tag "icn-donation-jar@1x.png", id: 'icn-donation-jar'
h2.modal-title = t ".headline"
p = t ".intro"
= hidden_field_tag 'preferred_currency', current_publisher.wallet.default_currency
= hidden_field_tag 'conversion_rate', current_publisher.wallet.rates[current_publisher.wallet.default_currency]
= link_to(t(".continue"), "#", class: 'btn btn-primary', id: "open-banner-button")
center
.modal-header style="display: none;" id="rewards-banner-container"
= hidden_field_tag 'publisher_id', current_publisher.id
| .modal id="rewards_banner_intro_modal" role="dialog" tabindex="-1"
.modal-dialog
.modal-header id="instant-donation-modal-selection"
center id="intro-container"
= image_tag "icn-donation-jar@1x.png", id: 'icn-donation-jar'
h2.modal-title = t ".headline"
p = t ".intro"
= link_to(t(".continue"), "#", class: 'btn btn-primary', id: "open-banner-button")
- if !current_publisher.wallet.default_currency.nil? && !current_publisher.wallet.default_currency.eql?('BAT')
= hidden_field_tag 'preferred_currency', current_publisher.wallet.default_currency
= hidden_field_tag 'conversion_rate', current_publisher.wallet.rates[current_publisher.wallet.default_currency]
- else
= hidden_field_tag 'preferred_currency', 'USD'
= hidden_field_tag 'conversion_rate', current_publisher.wallet.rates['USD']
center
.modal-header style="display: none;" id="rewards-banner-container"
= hidden_field_tag 'publisher_id', current_publisher.id
|
Fix erreur 500 sur projet envisagé si l'étape 2 n'a pas été remplie | article.block.projet
h3 Projet envisagé
= link_to t('projets.visualisation.lien_edition'), etape2_description_projet_path(@projet_courant), class: 'edit'
.content-block
= affiche_demande_souhaitee(@projet_courant.demande)
hr/
h4 Organisme qui vous accompagne pour la suite de votre projet :
- operateur = @projet_courant.intervenants.pour_role(:operateur).first
- if operateur.present?
p
strong= operateur
- unless current_agent
br
br
p Vous pouvez à présent dialoguer avec cet intervenant par la messagerie. Vous serez informé par email pour chaque réponse de sa part.
- unless @projet_courant.operateur
= link_to t('projets.visualisation.s_engager_avec_operateur'), new_projet_choix_intervenant_path(@projet_courant, intervenant_id: @projet_courant.intervenants.first), class: 'btn'
- else
p
strong Aucun
- unless current_agent
br
br
= link_to "Choisir un opérateur", etape3_choix_intervenant_path(@projet_courant), class: 'btn'
| article.block.projet
h3 Projet envisagé
= link_to t('projets.visualisation.lien_edition'), etape2_description_projet_path(@projet_courant), class: 'edit'
.content-block
- if @projet_courant.demande.blank?
- if current_agent
p Le demandeur n'a pas encore rempli le projet.
- else
= link_to "Remplir le projet", etape2_description_projet_path(@projet_courant), class: 'btn pen'
- else
= affiche_demande_souhaitee(@projet_courant.demande)
hr/
h4 Organisme qui vous accompagne pour la suite de votre projet :
- operateur = @projet_courant.intervenants.pour_role(:operateur).first
- if operateur.present?
p
strong= operateur
- unless current_agent
br
br
p Vous pouvez à présent dialoguer avec cet intervenant par la messagerie. Vous serez informé par email pour chaque réponse de sa part.
- unless @projet_courant.operateur
= link_to t('projets.visualisation.s_engager_avec_operateur'), new_projet_choix_intervenant_path(@projet_courant, intervenant_id: @projet_courant.intervenants.first), class: 'btn'
- else
p
strong Aucun
- unless current_agent
br
br
= link_to "Choisir un opérateur", etape3_choix_intervenant_path(@projet_courant), class: 'btn'
|
Use developer login config option to determine if Disqus is used in developer mode | #disqus_thread
javascript:
/!* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = '#{config.disqus_id}';
var disqus_developer = #{production? ? 0 : 1};
var disqus_identifier = '#{disqus_identifier}';
/!* * * DON'T EDIT BELOW THIS LINE * * */
disqus = function() {
var dsq = document.createElement('script');
dsq.type = 'text/javascript';
dsq.async = true;
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
}
disqus();
noscript
| Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a
| #disqus_thread
javascript:
/!* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = '#{config.disqus_id}';
var disqus_developer = #{Schnitzelpress.config.developer_login? ? 0 : 1};
var disqus_identifier = '#{disqus_identifier}';
/!* * * DON'T EDIT BELOW THIS LINE * * */
disqus = function() {
var dsq = document.createElement('script');
dsq.type = 'text/javascript';
dsq.async = true;
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
}
disqus();
noscript
| Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a
|
Update alert email sent to customers | p Aloha #{@customer.first_name},
p
| Nous avons rentré des articles qui correspondent à vos critères de recherche.
br
strong
= link_to "Modifier mes critères de recherche", \
"https://www.petitkiwi.be/pages/alertes", \
target: '_blank'
- @collections.each do |collection|
h2
=> collection.last[:title]
- if !collection.last[:parents].nil?
br
small(style="color: #666; font-weight: 300")
= collection.last[:parents].reverse.join(' → ')
br
small
| 🆕
= link_to "#{collection.last[:count]} articles déposés", \
"https://www.petitkiwi.be/collections/#{collection.last[:handle]}"
p
| Bonne journée,
p
| L'équipe de Petit Kiwi
br
= link_to "https://www.petitkiwi.be", "https://www.petitkiwi.be"
| p Aloha #{@customer.first_name},
p
| Nous avons rentré des articles qui correspondent à vos critères de recherche.
br
strong
= link_to 'Modifier mes critères de recherche', \
'https://www.petitkiwi.be/pages/mon-alerte-email', \
target: '_blank'
- @collections.each do |collection|
h2
= link_to collection.last[:title], "https://www.petitkiwi.be/collections/#{collection.last[:handle]}"
- if !collection.last[:parents].nil?
br
small(style="color: #666; font-weight: 300")
= collection.last[:parents].reverse.join(' → ')
p
| Bonne journée,
p
| L'équipe de Petit Kiwi
br
= link_to 'www.petitkiwi.be', 'https://www.petitkiwi.be'
|
Remove hover text on speaker list | - title t('.title')
- breadcrumb :speakers
/ TODO: Set page banner
section.team-area-v2
.container
.sec-title.text-center
.underlay.text-center
h2 = t('.speakers')
h1 = t('.speakers')
- @speakers.in_groups_of(4) do |speakers|
.row
- speakers.compact.each do |speaker|
.col-lg-3.col-md-6.col-sm-6.col-xs-12
.single-team-member
.img-holder
= image_tag speaker.avatar_url(:v1)
.overlay-style-one
.box
.content
.text
p = truncate strip_tags(speaker.description), length: 150
.text-holder.text-center
h3 = link_to speaker.name, speaker
span = speaker.title
| - title t('.title')
- breadcrumb :speakers
/ TODO: Set page banner
section.team-area-v2
.container
.sec-title.text-center
.underlay.text-center
h2 = t('.speakers')
h1 = t('.speakers')
- @speakers.in_groups_of(4) do |speakers|
.row
- speakers.compact.each do |speaker|
.col-lg-3.col-md-6.col-sm-6.col-xs-12
.single-team-member
.img-holder
= link_to speaker do
= image_tag speaker.avatar_url(:v1)
.text-holder.text-center
h3 = link_to speaker.name, speaker
span = speaker.title
|
Remove fake sign out url | .row(ng-app="kassa")
.col-xs-12
.row
nav(ng-controller="NavigationCtrl")
ul
li(ng-repeat="route in routes" ng-class='{active: isCurrent(route)}')
a(ng-href="{{route.href}}") {{route.name}}
li
a(ng-href="/users/{{session.currentUser().id}}" ng-click='session.signOut()') {{session.currentUser().username}}
li
a(ng-href="{{routes[0]}}" ng-click='session.signOut()')= t('navigation.title.sign_out')
.row(ng-view)
| .row(ng-app="kassa")
.col-xs-12
.row
nav(ng-controller="NavigationCtrl")
ul
li(ng-repeat="route in routes" ng-class='{active: isCurrent(route)}')
a(ng-href="{{route.href}}") {{route.name}}
li
a(ng-href="/users/{{session.currentUser().id}}" ng-click='session.signOut()') {{session.currentUser().username}}
li
a(href="" ng-click='session.signOut()')= t('navigation.title.sign_out')
.row(ng-view)
|
Move dashboard video to mithril component | = simple_form_for @project, html: { class: 'project-form w-form' } do |form|
.w-section.section
.w-container
.w-row
.w-col.w-col-10.w-col-push-1
.u-marginbottom-60.u-text-center
.w-inline-block.card.fontsize-small.u-radius
span.fa.fa-fw.fa-lightbulb-o
| Veja exemplos de
a.alt-link href="http://crowdfunding.catarse.me/videomakers?ref=ctrse_dashboard_video" target="_blank" vídeos de sucesso no Catarse!
.w-form
= @project.display_errors(:video)
.w-row.u-marginbottom-30.card.card-terciary.medium
.w-col.w-col-6
label.field-label.fontweight-semibold = t(".#{@project.mode}.video_url").html_safe
label.field-label.fontsize-smallest.fontcolor-secondary = t(".#{@project.mode}.video_url_subtitle").html_safe
- if @project.draft?
label.field-label.fontsize-smallest.fontcolor-secondary.fontweight-bold = t(".#{@project.mode}.video_url_hint")
.w-col.w-col-6
= form.input :video_url, as: :string,
label: '',
hint: false,
input_html: { class: 'positive medium', required: false },
validation_text: false
.w-section.save-draft-btn-section
.w-container
.w-row
.w-col.w-col-4.w-col-push-4
= hidden_field_tag 'anchor', 'video'
= form.hidden_field :project_id, value: @project.id
= form.button :submit, t('.submit'), class:'btn btn-medium', id: 'project-save'
| - parameters = { project_id: @project.id, user_id: @project.user_id, rails_errors: @project.errors.to_json }.to_json
.w-row
.w-col.w-col-10.w-col-push-1
#project-edit-video data-mithril='projectEditVideo' data-parameters=parameters
|
Fix bug with parent_id not set in comment form | = f.hidden_field :lang,
value: params[:locale]
= f.input :comment,
as: :text,
input_html: { class: 'autosize', style: 'height: 120px' }
= f.input :nickname,
label: false,
input_html: { class: 'hide-for-small-up' }
.submit-and-loader
= image_tag(Figaro.env.loader_spinner_img, class: 'submit-loader')
= button_tag(class: 'submit-btn text-right tiny') do
- fa_icon('paper-plane')
| = f.hidden_field :lang,
value: params[:locale]
= f.input :comment,
as: :text,
input_html: { class: 'autosize', style: 'height: 120px' }
= f.input :nickname,
label: false,
input_html: { class: 'hide-for-small-up' }
- if params[:action] == 'reply'
= f.hidden_field :parent_id,
label: false,
input_html: { class: 'hide-for-small-up' }
.submit-and-loader
= image_tag(Figaro.env.loader_spinner_img, class: 'submit-loader')
= button_tag(class: 'submit-btn text-right tiny') do
- fa_icon('paper-plane')
|
Remove "み" not to breaking line | h1 受取確認
table.table.table-hover
thead
tr
th.col-xs-1.text-center = '-'
- Lunchbox.all.each do |lunchbox|
th = "#{lunchbox.name} (#{lunchbox.price}円)"
th.text-center = '-'
tbody
- @order.order_items.each do |item|
tr class=('info' if item.received_at?)
th = item.customer_name
- Lunchbox.all.each do |lunchbox|
td
- if lunchbox.id == item.lunchbox_id
.text-center = '✓'
td
- if item.received_at?
| 受け取り済み
- else
= link_to '受け取る', receive_order_order_item_path(@order, item), method: :patch, class: 'btn btn-primary'
nav
ul.nav.nav-pills.nav-stacked
li = link_to '注文日選択画面へもどる', orders_path
| h1 受取確認
table.table.table-hover
thead
tr
th.col-xs-1.text-center = '-'
- Lunchbox.all.each do |lunchbox|
th = "#{lunchbox.name} (#{lunchbox.price}円)"
th.text-center = '-'
tbody
- @order.order_items.each do |item|
tr class=('info' if item.received_at?)
th = item.customer_name
- Lunchbox.all.each do |lunchbox|
td
- if lunchbox.id == item.lunchbox_id
.text-center = '✓'
td
- if item.received_at?
| 受け取り済
- else
= link_to '受け取る', receive_order_order_item_path(@order, item), method: :patch, class: 'btn btn-primary'
nav
ul.nav.nav-pills.nav-stacked
li = link_to '注文日選択画面へもどる', orders_path
|
Remove payments tab from users | - content_for :title, "Editing: #{@user.display_name}"
- content_for :meta_tags do
-# Meta tags for facebook social graph
meta property="og:title" content=@user.name
meta property="og:url" content=="#{Configuration[:base_url]}#{user_path(@user)}"
meta property="og:image" content==@user.display_image
meta property="og:site_name" content=::Configuration[:company_name]
meta property="og:description" content=@user.bio
meta property="fb:admins" content="#{fb_admins}"
.user-edit-page
.row.page-main-content
section.large-12.columns.main
nav.tabs[data-target-container=".user-edit-page section.content"]
= tab_link_to t('.tabs.edit'), edit_user_path(@user)
- if @user.projects.any?
= tab_link_to t('.tabs.my_campaigns'), user_projects_path(@user)
- if @user.contributions.any?
= tab_link_to t('.tabs.ive_contributed'), user_contributions_path(@user)
= tab_link_to t('.tabs.credits'), credits_user_path(@user)
= tab_link_to t('.tabs.payments'), payments_user_path(@user)
= tab_link_to t('.tabs.settings'), settings_user_path(@user)
section.content
- if content_for? :page_content
= yield :page_content
- else
= render template: 'users/profile', locals: { partial: true }
| - content_for :title, "Editing: #{@user.display_name}"
- content_for :meta_tags do
-# Meta tags for facebook social graph
meta property="og:title" content=@user.name
meta property="og:url" content=="#{Configuration[:base_url]}#{user_path(@user)}"
meta property="og:image" content==@user.display_image
meta property="og:site_name" content=::Configuration[:company_name]
meta property="og:description" content=@user.bio
meta property="fb:admins" content="#{fb_admins}"
.user-edit-page
.row.page-main-content
section.large-12.columns.main
nav.tabs[data-target-container=".user-edit-page section.content"]
= tab_link_to t('.tabs.edit'), edit_user_path(@user)
- if @user.projects.any?
= tab_link_to t('.tabs.my_campaigns'), user_projects_path(@user)
- if @user.contributions.any?
= tab_link_to t('.tabs.ive_contributed'), user_contributions_path(@user)
= tab_link_to t('.tabs.credits'), credits_user_path(@user)
= tab_link_to t('.tabs.settings'), settings_user_path(@user)
section.content
- if content_for? :page_content
= yield :page_content
- else
= render template: 'users/profile', locals: { partial: true }
|
Remove temporal spellcheck in content | - formatted_contents.fetch(level).fetch(kind).each do |content|
.neuron-content
div = content.title
.content-description
= content.description_spellchecked
= content.keywords
= content.source
- if content.can_be_approved?
.neuron-moderate-actions
= content.toggle_approved
= content.media
hr
| - formatted_contents.fetch(level).fetch(kind).each do |content|
.neuron-content
div = content.title
.content-description
= content.description
= content.keywords
= content.source
- if content.can_be_approved?
.neuron-moderate-actions
= content.toggle_approved
= content.media
hr
|
Move payment options to 8 columns | .payment
h3.title = t('.title')
section.row.methods
- PaymentEngine.all.each do |engine|
.large-6.columns[class="payment-method-option-#{engine.name}"]
label.payment-method-option
.left
= radio_button_tag :payment_method, engine.name, false
|
= image_tag("payments/#{engine.name}.png", alt: engine.name.humanize, class: 'payment-method-option-icon')
.left.description
h6 = t(".payment-method.#{engine.name}.title")
small
strong = t('.payment-method.fees')
|
= number_to_currency(engine.fee_calculator(resource.value).fees)
.container
.loading
= image_tag 'logo-icon.png', class: "loader-img"
- PaymentEngine.engines.each do |engine|
div[id="#{engine.name}-payment" class="payment-method hide" data-path=engine.payment_path(resource)]
| .payment
h3.title = t('.title')
.row
.medium-8.columns
section.row.methods
- PaymentEngine.all.each do |engine|
.large-6.columns[class="payment-method-option-#{engine.name}"]
label.payment-method-option
.left
= radio_button_tag :payment_method, engine.name, false
|
= image_tag("payments/#{engine.name}.png", alt: engine.name.humanize, class: 'payment-method-option-icon')
.left.description
h6 = t(".payment-method.#{engine.name}.title")
small
strong = t('.payment-method.fees')
|
= number_to_currency(engine.fee_calculator(resource.value).fees)
.container
.loading
= image_tag 'logo-icon.png', class: "loader-img"
- PaymentEngine.engines.each do |engine|
div[id="#{engine.name}-payment" class="payment-method hide" data-path=engine.payment_path(resource)]
|
Fix up contribute button (and retab template) | .col-md-9#social-content
.contribute
p
|
This project is open source. Please improve the RubyConf 13 Hub and post your talk summaries, photos, videos etc.
a.contribute_link href="https://github.com/ninefold/rubyconf_miami_hub/blob/master/README.md" <i class="fa fa-pencil-square-o"></i> Contribute to The Hub
h1.text-center What's happening at RubyConf 2013?
script type="text/javascript" class="rebelmouse-embed-script" src="https://www.rebelmouse.com/static/js-build/embed/embed.js?site=multifaceted_io&height=1500&flexible=1"
| .col-md-9#social-content
.contribute
p
|
This project is open source. Please improve the RubyConf 13 Hub and post your talk summaries, photos, videos etc.
= link_to "https://github.com/ninefold/rubyconf_miami_hub/blob/master/README.md", :class => "contribute_link btn btn-default" do
i.fa.fa-pencil-square-o
| Contribute to The Hub
h1.text-center What's happening at RubyConf 2013?
script type="text/javascript" class="rebelmouse-embed-script" src="https://www.rebelmouse.com/static/js-build/embed/embed.js?site=multifaceted_io&height=1500&flexible=1"
|
Add class attribute to 'send request' button in 'CONTACT US' page | .row
.col-md-12.page-element
h3.page-title-header Contact Us
div.page-title-body
| Send a message to us using the form below.
hr
- flash.each do |key, value|
= content_tag(:div, value, class: "alert alert-#{key}", role: 'alert')
= simple_form_for @inquiry do |f|
= f.error_notification
= f.input :name
= f.input :email
= f.input :message, as: :text, input_html: {rows: 10}
.form-actions.pull-right
= f.button :submit, :value => 'Send request', class: 'more-button'
| .row
.col-md-12.page-element
h3.page-title-header Contact Us
div.page-title-body
| Send a message to us using the form below.
hr
- flash.each do |key, value|
= content_tag(:div, value, class: "alert alert-#{key}", role: 'alert')
= simple_form_for @inquiry do |f|
= f.error_notification
= f.input :name
= f.input :email
= f.input :message, as: :text, input_html: {rows: 10}
.form-actions.pull-right
= f.button :submit, :value => 'Send request', class: 'see-all-endpoints'
|
Remove even more `try` calls in task show. | h1 = @task.title
p = @task.state
p = @task.milestone.try :name
p = @task.assigned_user.try :name
| h1 = @task.title
p = @task.state
p = @task.milestone_name
p = @task.assigned_user_name
|
Add missing nil guard to _personal_or_ref_time | - effective_time = item.time_for(course_user)
- reference_time = item.reference_time_for(course_user)
- if effective_time.is_a? Course::PersonalTime and effective_time.fixed?
span title=t('course.lesson_plan.items.fixed_desc')
= fa_icon 'lock'
=< format_datetime(effective_time[attribute], datetime_format)
- if effective_time[attribute] != reference_time[attribute]
br
strike
= t('course.lesson_plan.items.ref')
= format_datetime(reference_time[attribute], datetime_format)
| - effective_time = item.time_for(course_user)
- reference_time = item.reference_time_for(course_user)
- if effective_time.is_a? Course::PersonalTime and effective_time.fixed?
span title=t('course.lesson_plan.items.fixed_desc')
= fa_icon 'lock'
=< format_datetime(effective_time[attribute], datetime_format) if effective_time[attribute]
- if effective_time[attribute] != reference_time[attribute]
br
strike
= t('course.lesson_plan.items.ref')
= format_datetime(reference_time[attribute], datetime_format)
|
Remove placeholders from confirmation form | = content_for :title, t('.titles.site')
= render 'devise/shared/header'
.row
.large-5.medium-7.large-centered.columns
.login-box.animated.fadeIn
h3.text-center You're almost done!
hr
.large-11.large-centered.columns
= simple_form_for(resource, as: resource_name, url: confirm_path) do |f|
= devise_error_messages!
= f.input :confirmation_token, as: :hidden
- if resource.bonds_early_adopter?
= f.input :password, input_html: { autofocus: true }
= f.input :password_confirmation
= f.submit t('.form.inputs.submit'), class: [:button, 'large-12', 'columns']
| = content_for :title, t('.titles.site')
= render 'devise/shared/header'
.row
.large-5.medium-7.large-centered.columns
.login-box.animated.fadeIn
h3.text-center You're almost done!
hr
.large-11.large-centered.columns
= simple_form_for(resource, as: resource_name, url: confirm_path) do |f|
= devise_error_messages!
= f.input :confirmation_token, as: :hidden
- if resource.bonds_early_adopter?
= f.input :password, placeholder: false, input_html: { autofocus: true }
= f.input :password_confirmation, placeholder: false
= f.submit t('.form.inputs.submit'), class: [:button, 'large-12', 'columns']
|
Fix speaker description not display as text | - Globalize.with_locale(admin_current_resource_locale) do
= simple_form_for [:admin, @speaker] do |f|
= admin_box_body do
= f.input :name
= f.input :description
= f.input :avatar do
= f.input_field :avatar
-if @speaker.avatar.present?
= image_tag @speaker.avatar
= f.input :remove_avatar, as: :boolean
= f.hidden_field :locale, value: admin_current_resource_locale
= admin_box_footer do
= f.submit class: 'btn btn-primary'
| - Globalize.with_locale(admin_current_resource_locale) do
= simple_form_for [:admin, @speaker] do |f|
= admin_box_body do
= f.input :name
= f.input :description, as: :text, input_html: { data: { editor: true }, rows: 20 }
= f.input :avatar do
= f.input_field :avatar
-if @speaker.avatar.present?
= image_tag @speaker.avatar
= f.input :remove_avatar, as: :boolean
= f.hidden_field :locale, value: admin_current_resource_locale
= admin_box_footer do
= f.submit class: 'btn btn-primary'
|
Add og:description tag for posts. | - content_for :header do
meta property="og:title" content=@post.to_title
meta property="og:type" content="article"
meta property="og:image" content=@post.user.try(:external_image_url)
meta property="og:url" content=post_url(@post)
= render @post
- if @post.replies.any?
section.post-replies
h2 Replies
= render @post.replies.order('published_at DESC'), hide_reply_references: true
| - content_for :header do
meta property="og:title" content=@post.to_title
meta property="og:type" content="article"
meta property="og:image" content=@post.user.try(:external_image_url)
meta property="og:url" content=post_url(@post)
meta property="og:description" content=@post.to_summary
= render @post
- if @post.replies.any?
section.post-replies
h2 Replies
= render @post.replies.order('published_at DESC'), hide_reply_references: true
|
Fix profile links depending on whether profile is blank | ul.nav.navbar-nav.navbar-right
- if user_signed_in?
li.dropdown
a.dropdown-toggle data-toggle="dropdown" href="#"
| Account
b.caret
ul.dropdown-menu
li
a href="#"
| Profile
li
a href="#"
| View schedule
li.divider
li= link_to 'Sign out', destroy_user_session_path, method: :delete
- else
li= link_to "Sign in", "#sign_in", "data-toggle" => "modal"
li= link_to "Register", "#sign_up", "data-toggle" => "modal"
li= link_to "Help", "#"
| ul.nav.navbar-nav.navbar-right
- if user_signed_in?
li.dropdown
a.dropdown-toggle data-toggle="dropdown" href="#"
| Account
b.caret
ul.dropdown-menu
li
= link_to 'Profile', user_profile_path(current_user)
= link_to 'Profile', user_profile_path(current_user) unless current_user.profile.blank?
li
a href="#"
| View schedule
li.divider
li= link_to 'Sign out', destroy_user_session_path, method: :delete
- else
li= link_to "Sign in", "#sign_in", "data-toggle" => "modal"
li= link_to "Register", "#sign_up", "data-toggle" => "modal"
li= link_to "Help", "#"
|
Delete useless lines entered by accident | doctype html
html
head
title NineteenWu
meta name="viewport" content="width=device-width, initial-scale=1.0"
= stylesheet_link_tag "application", media: "all"
= csrf_meta_tags
body.signed_out
header#header
.navbar.navbar-static-top
.navbar-inner
.container
a.btn.btn-navbar data-toggle="collapse" data-target=".nav-collapse"
span.icon-bar
span.icon-bar
span.icon-bar
a.brand href="#"
span.icon-19wu
span= t('layout.19wu')
.nav-collapse.collapse
ul.unstyled.pull-right
li
a.btn href='#'
= t('label.sign_in')
#main role="main"
= yield :before_content
#content
.container
= yield
footer#footer
.container
p.pull-right © #{Date.today.year} 19wu.com
ul.pull-left.horizontal
li
a href="http://github.com/saberma/19wu" Github
li.muted
| /
li
a href="http://github.com/saberma/19wu" = t('layout.contact_us')
= javascript_include_tag "application"
= yield :body_bottom
yi | doctype html
html
head
title NineteenWu
meta name="viewport" content="width=device-width, initial-scale=1.0"
= stylesheet_link_tag "application", media: "all"
= csrf_meta_tags
body.signed_out
header#header
.navbar.navbar-static-top
.navbar-inner
.container
a.btn.btn-navbar data-toggle="collapse" data-target=".nav-collapse"
span.icon-bar
span.icon-bar
span.icon-bar
a.brand href="#"
span.icon-19wu
span= t('layout.19wu')
.nav-collapse.collapse
ul.unstyled.pull-right
li
a.btn href='#'
= t('label.sign_in')
#main role="main"
= yield :before_content
#content
.container
= yield
footer#footer
.container
p.pull-right © #{Date.today.year} 19wu.com
ul.pull-left.horizontal
li
a href="http://github.com/saberma/19wu" Github
li.muted
| /
li
a href="http://github.com/saberma/19wu" = t('layout.contact_us')
= javascript_include_tag "application"
= yield :body_bottom
|
Update home page to indicate the site is under maintainance | .home
.header-spacer.hidden-xs
.row
.col-md-12.text-center
h1 WaniKani to Anki exporter
.row
.col-md-12
img src="images/wanikanitoanki_logo.png" class="center-block img-responsive"
.row
.col-md-12.text-center
h4 Export your WaniKani reviews to Anki decks!
.row
.col-md-12.text-center
p Enter your #{link_to("WaniKani API Version 1 key", "https://www.wanikani.com/settings/account", target: "blank")} to get started.
- if flash[:error]
.row
.col-md-6.col-md-offset-3.alert.alert-danger.text-center= flash[:error]
= form_tag '/login', role: "form" do
.row
.col-md-4.col-md-offset-4.form-group
= text_field_tag :wanikani_api_key, placeholder: "WaniKani API Key", class: "form-control"
.row.text-center
.col-md-12
= submit_tag "Let's Go!", class: "btn btn-default"
.row.text-center
.col-md-12
p
small
em
| (Your API key is never saved anywhere!)
| .home
.header-spacer.hidden-xs
.row
.col-md-12.text-center
h1 WaniKani to Anki exporter
.row
.col-md-12
img src="images/wanikanitoanki_logo.png" class="center-block img-responsive"
.row
.col-md-12.alert.alert-danger.text-center
strong The WaniKani to Anki exporter is currently offline due to WaniKani API v1 no longer functioning. The application is currently getting updated to support the new API, so look for it in the near future!
|
Fix styling for multiple, nested cards | - tip = exercise_tip.tip
.card.mb-2
.card-header.p-2 id="tip-heading-#{exercise_tip.id}" role="tab"
.card-title.mb-0
a.collapsed aria-controls="tip-collapse-#{exercise_tip.id}" aria-expanded="false" data-parent="#tips" data-toggle="collapse" href="#tip-collapse-#{exercise_tip.id}"
.clearfix role="button"
i.fa aria-hidden="true"
span
= t('activerecord.models.tip.one')
=< exercise_tip.rank
= ": #{tip.title}" if tip.title?
.card.card-collapse.collapse id="tip-collapse-#{exercise_tip.id}" aria-labelledby="tip-heading-#{exercise_tip.id}" role="tabpanel" data-exercise-tip-id=exercise_tip.id
.card-body.p-3
h5
= t('exercises.implement.tips.description')
= tip.description
- if tip.example?
h5.mt-2
= t('exercises.implement.tips.example')
pre
code.mh-100 class="language-#{tip.file_type.editor_mode.gsub("ace/mode/", "")}"
= tip.example
.mb-4
= render(partial: 'tips/collapsed_card', collection: exercise_tip.children, as: :exercise_tip)
| - tip = exercise_tip.tip
.card class="#{exercise_tip.parent_exercise_tip_id? ? 'mt-2' : ''}"
.card-header.p-2 id="tip-heading-#{exercise_tip.id}" role="tab"
.card-title.mb-0
a.collapsed aria-controls="tip-collapse-#{exercise_tip.id}" aria-expanded="false" data-parent="#tips" data-toggle="collapse" href="#tip-collapse-#{exercise_tip.id}"
.clearfix role="button"
i.fa aria-hidden="true"
span
= t('activerecord.models.tip.one')
=< exercise_tip.rank
= ": #{tip.title}" if tip.title?
.card.card-collapse.collapse id="tip-collapse-#{exercise_tip.id}" aria-labelledby="tip-heading-#{exercise_tip.id}" role="tabpanel" data-exercise-tip-id=exercise_tip.id
.card-body.p-3
h5
= t('exercises.implement.tips.description')
= tip.description
- if tip.example?
h5.mt-2
= t('exercises.implement.tips.example')
pre
code.mh-100 class="language-#{tip.file_type.editor_mode.gsub("ace/mode/", "")}"
= tip.example
= render(partial: 'tips/collapsed_card', collection: exercise_tip.children, as: :exercise_tip)
|
Add button to create new clinic visit from MDM | .columns.medium-12
article
header
h2 Clinic Visits
.supplemental
span= "#{mdm.clinic_visits.length} of #{mdm.patient.summary.clinic_visits_count}"
span.noprint
= link_to "View All",
patient_clinic_visits_path(mdm.patient),
class: "button secondary"
= render "renalware/clinics/clinic_visits/table",
clinic_visits: mdm.clinic_visits,
patient: mdm.patient
| .columns.medium-12
article
header
h2 Clinic Visits
.supplemental
span= "#{mdm.clinic_visits.length} of #{mdm.patient.summary.clinic_visits_count}"
span.noprint
= link_to "View All",
patient_clinic_visits_path(mdm.patient),
class: "button secondary"
= link_to new_patient_clinic_visit_path(mdm.patient),
class: "button",
target: "_blank" do
i.fa.fa-external-link-square-alt
| Add
= render "renalware/clinics/clinic_visits/table",
clinic_visits: mdm.clinic_visits,
patient: mdm.patient
|
Fix replies form not submitting with ajax | .reply-block.collapse id="#{comment.id}"
= form_for [course, course.comments.build], url: comments_path do |f|
= f.hidden_field :course_id, value: course.id
= f.hidden_field :parent_id, value: comment.id
= f.text_area :content, class: 'form-control', onkeyup: 'autoheight(this)', placeholder: '我想說...'
= f.button :submit, class: 'btn btn-block' do
i.fa.fa-paper-plane
|   提交
| .reply-block.collapse id="#{comment.id}"
= form_for [course, course.comments.build], url: comments_path, remote: :true do |f|
= f.hidden_field :course_id, value: course.id
= f.hidden_field :parent_id, value: comment.id
= f.text_area :content, class: 'form-control', onkeyup: 'autoheight(this)', placeholder: '我想說...'
= f.button :submit, class: 'btn btn-block' do
i.fa.fa-paper-plane
|   提交
|
Put shorter block first for readability | = render layout: "renalware/patients/layout", locals: { title: "Archived Pathology Results" } do
- if rows.present?
p Most recent pathology results (max #{number_of_records} displayed). Hover over row header for investigation name.
table#observations
- rows.each do |row|
- header, *values = row
tr class= header.html_class title= header.title
td
= header
- values.each do |cell|
td= cell
- else
p No results available for this patient.
| = render layout: "renalware/patients/layout", locals: { title: "Archived Pathology Results" } do
- if rows.empty?
p No results available for this patient.
- else
p Most recent pathology results (max #{number_of_records} displayed). Hover over row header for investigation name.
table#observations
- rows.each do |row|
- header, *values = row
tr class= header.html_class title= header.title
td
= header
- values.each do |cell|
td= cell
|
Change blog local to wordpress | ul.navbar-nav.nav
li#alerts-container ng-controller="AlertCtrl"
a.activity pop-up-alerts-dropdown="alertData.alerts" ng-class="{'with-information':alertData.alerts.length}"
span.number-circle.ng-cloak ng-show="alertData.alerts.length" {{alertData.alerts.length}}
ul.navbar-nav.nav.navbar-right
li= link_to('about', '/about', {target: '_self'})
li= link_to('user stories', '/?scrollTo=user_stories_section')
li= link_to('blog', 'http://popuparchive.tumblr.com/', {target: '_blank'})
li= link_to('explore', '/explore')
li= link_to('pricing', '/pricing')
li= link_to('faq', '/faq')
li
form.navbar-form ng-controller="GlobalSearchCtrl" ng-submit="go()"
input.search-query.form-control style="width:150px" ng-model="query.string" placeholder='Search' type='search'
| ul.navbar-nav.nav
li#alerts-container ng-controller="AlertCtrl"
a.activity pop-up-alerts-dropdown="alertData.alerts" ng-class="{'with-information':alertData.alerts.length}"
span.number-circle.ng-cloak ng-show="alertData.alerts.length" {{alertData.alerts.length}}
ul.navbar-nav.nav.navbar-right
li= link_to('about', '/about', {target: '_self'})
li= link_to('user stories', '/?scrollTo=user_stories_section')
li= link_to('blog', 'http://blog.popuparchive.com/', {target: '_blank'})
li= link_to('explore', '/explore')
li= link_to('pricing', '/pricing')
li= link_to('faq', '/faq')
li
form.navbar-form ng-controller="GlobalSearchCtrl" ng-submit="go()"
input.search-query.form-control style="width:150px" ng-model="query.string" placeholder='Search' type='search'
|
Disable average count as this breaks on some exercises... | h1 = t('.headline')
p
== t(".success_#{params[:outcome] ? 'with' : 'without'}_outcome", consumer: @consumer)
==< t(".finished_#{@consumer ? 'with' : 'without'}_consumer", consumer: @consumer, url: params[:url])
h2 = t('shared.statistics')
= row(label: '.score') do
p == t('shared.out_of', maximum_value: @submission.exercise.maximum_score, value: @submission.score)
p = progress_bar(@submission.percentage)
= row(label: '.final_submissions', value: @submission.exercise.submissions.final.distinct.count(:user_id, :user_type) - 1)
= row(label: '.average_score') do
p == t('shared.out_of', maximum_value: @submission.exercise.maximum_score, value: @submission.exercise.average_score.round(2))
p = progress_bar(@submission.exercise.average_percentage)
| h1 = t('.headline')
p
== t(".success_#{params[:outcome] ? 'with' : 'without'}_outcome", consumer: @consumer)
==< t(".finished_#{@consumer ? 'with' : 'without'}_consumer", consumer: @consumer, url: params[:url])
h2 = t('shared.statistics')
= row(label: '.score') do
p == t('shared.out_of', maximum_value: @submission.exercise.maximum_score, value: @submission.score)
p = progress_bar(@submission.percentage)
= row(label: '.final_submissions', value: @submission.exercise.submissions.final.distinct.count(:user_id, :user_type) - 1)
/= row(label: '.average_score') do
/ p == t('shared.out_of', maximum_value: @submission.exercise.maximum_score, value: @submission.exercise.average_score.round(2))
/ p = progress_bar(@submission.exercise.average_percentage)
|
Change styling of related notes list | nav.notes
header
h3 = title ||= t('notes.index.title')
ul
- note.related_notes.notes_and_features.each do |note|
li = link_to note.headline, note_or_feature_path(note)
- note.related_notes.citations.each do |citation|
li = link_to citation.headline, citation_path(citation)
- note.inverse_related_notes.notes_and_features.each do |note|
li = link_to note.headline, note_or_feature_path(note)
- note.inverse_related_notes.citations.each do |citation|
li = link_to citation.headline, citation_path(citation)
| nav.references
header
h3 = title ||= t('notes.index.title')
ul
- note.related_notes.notes_and_features.uniq.each do |note|
li = link_to note.headline, note_or_feature_path(note)
- note.related_notes.citations.uniq.each do |citation|
li = link_to citation.headline, citation_path(citation)
- note.inverse_related_notes.notes_and_features.uniq.each do |note|
li = link_to note.headline, note_or_feature_path(note)
|
Add Google Analytics tracking code | doctype html
html
head
title = title
= stylesheet_link_tag :application
= tag :link, href: feedburner_url, rel: :alternate, title: site_name, type: 'application/atom+xml'
= tag :meta, name: :viewport, content: 'width=device-width'
body
.wrapper
header
= link_to "/" do
h1 = site_name
h2#byline by #{link_to author_name, author_url}
= yield
footer
| Thanks for reading!
= link_to author_url do
.signature -Justin
p
small = link_to "View source on GitHub", github_url
| doctype html
html
head
title = title
= stylesheet_link_tag :application
= tag :link, href: feedburner_url, rel: :alternate, title: site_name, type: 'application/atom+xml'
= tag :meta, name: :viewport, content: 'width=device-width'
body
.wrapper
header
= link_to "/" do
h1 = site_name
h2#byline by #{link_to author_name, author_url}
= yield
footer
| Thanks for reading!
= link_to author_url do
.signature -Justin
p
small = link_to "View source on GitHub", github_url
= google_analytics_universal_tag
|
Allow subtitle to be missing | header data-title="#{ document_title }"
h1 == title
- unless subtitle.nil?
h2 == subtitle
| header data-title="#{ document_title }"
h1 == title
- unless subtitle.blank?
h2 == subtitle
|
Fix cs galery on safari | .Panel
.u-defaultThenLargeMargin
.ContentFormatter.ContentFormatter--center
.cs-Gallery
- %w(america html jobs programadores zuckerberg ironman trabalho ruby).each do |name|
.cs-Gallery-cell
img.cs-Gallery-image(
src="#{image_path("case-studies/creators-school/gallery/#{name}.png")}"
srcset="#{image_path("case-studies/creators-school/gallery/#{name}.png")} 300w, #{image_path("case-studies/creators-school/gallery/#{name}@2x.png")} 600w"
sizes="300px"
)
.u-defaultThenLargeMargin
| .Panel
.u-defaultThenLargeMargin
.ContentFormatter.ContentFormatter--centerHorizontally
.cs-Gallery
- %w(america html jobs programadores zuckerberg ironman trabalho ruby).each do |name|
.cs-Gallery-cell
img.cs-Gallery-image(
src="#{image_path("case-studies/creators-school/gallery/#{name}.png")}"
srcset="#{image_path("case-studies/creators-school/gallery/#{name}.png")} 300w, #{image_path("case-studies/creators-school/gallery/#{name}@2x.png")} 600w"
sizes="300px"
)
.u-defaultThenLargeMargin
|
Add staff badge to show user page | .columns
.one-fourth.column
= avatar(@user, size: 230)
h2 = @user.name
.three-fourths.column
= if !is_nil(@current_user) && @current_user.name == @user.name do
.pb-3.clearfix
a.btn.btn-primary.float-right href="#{style_path(@conn, :new, @user.name)}" = gettext "New tweak"
= if Enum.count(@styles) == 0 do
.blankslate
span.mega-octicon.octicon-pencil
h3 = gettext "This is where your tweaks will be listed"
p = gettext "Click \"New tweak\" to get started!"
- else
h3 = gettext "Styles"
= render_many(@styles, AtomStyleTweaks.StyleView, "table_row.html", conn: @conn)
| .columns
.one-fourth.column
= avatar(@user, size: 230)
h2.d-inline-block = @user.name
= if @user.site_admin do
span.state.bg-blue.d-inline-block.mt-1.float-right
= gettext "Staff"
.three-fourths.column
= if !is_nil(@current_user) && @current_user.name == @user.name do
.pb-3.clearfix
a.btn.btn-primary.float-right href="#{style_path(@conn, :new, @user.name)}" = gettext "New tweak"
= if Enum.count(@styles) == 0 do
.blankslate
span.mega-octicon.octicon-pencil
h3 = gettext "This is where your tweaks will be listed"
p = gettext "Click \"New tweak\" to get started!"
- else
h3 = gettext "Styles"
= render_many(@styles, AtomStyleTweaks.StyleView, "table_row.html", conn: @conn)
|
Update `confirm contribution` email template | - contribution = @notification.contribution
p Olá, <strong>#{contribution.user.decorate.display_name}</strong>!
p Seu apoio para o projeto #{link_to(contribution.project.name, project_by_slug_url(permalink: contribution.project.permalink))} foi confirmado com sucesso.
- if contribution.project.thank_you.present?
p= contribution.project.thank_you.gsub('\n', '<br/>')
p Até o momento você e outras #{contribution.project.total_contributions} pessoas estão tornando esse projeto uma realidade.
p Esse e-mail serve como um <strong>recibo provisório da sua contribuição</strong>.
= render partial: 'contribution_data', locals: {contribution: contribution}
| - contribution = @notification.contribution
p Olá, <strong>#{contribution.user.decorate.display_name}</strong>!
p Seu apoio para o projeto #{link_to(contribution.project.name, project_by_slug_url(permalink: contribution.project.permalink))} foi confirmado com sucesso.
- if contribution.project.thank_you.present?
p= contribution.project.thank_you.gsub('\n', '<br/>')
p Até o momento você e outros #{contribution.project.total_contributions} apoiadores estão tornando esse projeto uma realidade.
p Esse e-mail serve como um <strong>recibo provisório da sua contribuição</strong>.
= render partial: 'contribution_data', locals: {contribution: contribution}
|
Hide phantom staff from instructor container on course show page. | = div_for(current_course) do
h1
= format_inline_text(current_course.title)
- unless current_course_user
= render partial: 'course/user_registrations/registration'
- unless current_course.user?(current_user)
h2 = t('.description')
= format_html(current_course.description)
h2 = t('.instructors')
#users-container
= render partial: 'layouts/user',
collection: current_course.managers.includes(:user).map(&:user)
- if current_course.user?(current_user) || can?(:manage, current_course)
- if @currently_active_announcements && !@currently_active_announcements.empty?
h2 = t('.announcements')
div.message-holder
= render partial: @currently_active_announcements,
spacer_template: 'announcements/announcement_spacer'
- if @todos && !@todos.empty?
h2 = t('.pending_tasks')
table.table.table-hover.pending-tasks
thead
tr
th = t('.pending_tasks_title')
th.text-center = t('.pending_tasks_start_at')
th.text-center = t('.pending_tasks_end_at')
th
tbody
= render @todos
- if @activity_feeds && !@activity_feeds.empty?
h2 = t('.activities')
div.message-holder
- @activity_feeds.each do |notification|
- if notification.activity.object
= render partial: notification_view_path(notification),
locals: { notification: notification }
| = div_for(current_course) do
h1
= format_inline_text(current_course.title)
- unless current_course_user
= render partial: 'course/user_registrations/registration'
- unless current_course.user?(current_user)
h2 = t('.description')
= format_html(current_course.description)
h2 = t('.instructors')
#users-container
= render partial: 'layouts/user',
collection: current_course.managers.without_phantom_users.includes(:user).map(&:user)
- if current_course.user?(current_user) || can?(:manage, current_course)
- if @currently_active_announcements && !@currently_active_announcements.empty?
h2 = t('.announcements')
div.message-holder
= render partial: @currently_active_announcements,
spacer_template: 'announcements/announcement_spacer'
- if @todos && !@todos.empty?
h2 = t('.pending_tasks')
table.table.table-hover.pending-tasks
thead
tr
th = t('.pending_tasks_title')
th.text-center = t('.pending_tasks_start_at')
th.text-center = t('.pending_tasks_end_at')
th
tbody
= render @todos
- if @activity_feeds && !@activity_feeds.empty?
h2 = t('.activities')
div.message-holder
- @activity_feeds.each do |notification|
- if notification.activity.object
= render partial: notification_view_path(notification),
locals: { notification: notification }
|
Fix a bug that caused some game pages to 500 | - title @game.name
.container
h2 = content_for(:title)
h5 a speedgame
= render partial: 'shared/alerts'
.container
- @game.categories.each do |category|
- cache [:category_portrait, :v1, {category: category}] do
.well.col-xl-2.col-lg-3.col-md-4.col-sm-5 style="margin: .5em;"
a href=category_path(@game, category)
h4 = category.name
small
= render partial: 'shared/time', locals: {time: category.best_known_run.time, show_milliseconds: false}
| best on record
| - title @game.name
.container
h2 = content_for(:title)
h5 a speedgame
= render partial: 'shared/alerts'
.container
- @game.categories.each do |category|
- cache [:category_portrait, :v1, {category: category}] do
- if category.best_known_run
.well.col-xl-2.col-lg-3.col-md-4.col-sm-5 style="margin: .5em;"
a href=category_path(@game, category)
h4 = category.name
small
= render partial: 'shared/time', locals: {time: category.best_known_run.time, show_milliseconds: false}
| best on record
|
Hide TOC at small device |
- content_for(:title) { "#{@word.title}" }
.markdown
.page-header
h1 = @word.title
.row
.col-md-9.col-xs12
= raw markdown(add_word_link(@word.body))
.col-md-3.col-xs12
= raw toc(@word.body)
= link_to('Edit', edit_word_path(@word), class: 'btn btn-default') if user_signed_in?
- if has_version?(@word)
ul.pull-right.pagination.versions-nav
li = link_to 0, word_path(@word)
- @word.versions.each do |v|
li = link_to (v.index + 1), word_version_path(@word, v)
|
- content_for(:title) { "#{@word.title}" }
.markdown
.page-header
h1 = @word.title
.row
.col-md-9.col-xs12
= raw markdown(add_word_link(@word.body))
.col-md-3.col-xs12
.hidden-xs.hidden-sm
= raw toc(@word.body)
= link_to('Edit', edit_word_path(@word), class: 'btn btn-default') if user_signed_in?
- if has_version?(@word)
ul.pull-right.pagination.versions-nav
li = link_to 0, word_path(@word)
- @word.versions.each do |v|
li = link_to (v.index + 1), word_version_path(@word, v)
|
Fix student statistics for my students | = page_header
- if current_course_user&.my_students&.any?
ul.nav.nav-tabs.tab-header role="tab-list"
li role="presentation"
a href="#my-students" aria-controls="my-students" role="tab" data-toggle="tab"
= t('.my_students_tab')
li role="presentation"
a href="#all-students" aria-controls="all-students" role="tab" data-toggle="tab"
= t('.all_students_tab')
div.tab-content
div.tab-pane.fade role="tabpanel" id="my-students"
= render 'table', students: current_course_user.my_students
div.tab-pane.fade role="tabpanel" id="all-students"
= render 'course_student_statistics', students: @students, phantom_students: @phantom_students
- else
= render 'course_student_statistics', students: @students, phantom_students: @phantom_students
| = page_header
- if current_course_user&.my_students&.any?
ul.nav.nav-tabs.tab-header role="tab-list"
li role="presentation"
a href="#my-students" aria-controls="my-students" role="tab" data-toggle="tab"
= t('.my_students_tab')
li role="presentation"
a href="#all-students" aria-controls="all-students" role="tab" data-toggle="tab"
= t('.all_students_tab')
div.tab-content
div.tab-pane.fade role="tabpanel" id="my-students"
= render 'course_student_statistics',
students: @students & current_course_user.my_students,
phantom_students: @phantom_students & current_course_user.my_students
div.tab-pane.fade role="tabpanel" id="all-students"
= render 'course_student_statistics',
students: @students,
phantom_students: @phantom_students
- else
= render 'course_student_statistics', students: @students, phantom_students: @phantom_students
|
Fix : add spacing between values | table(cellpadding="0" cellspacing="0" border="0" width="100%")
tr
td
h1(style="font-size:28px;margin-top:20px;margin-bottom:10px") Daily botnbot budget report
ul
- @context.budgets.each do |budget|
li
= "#{budget.page}/#{budget.label} (budget: #{budget.budget}) was"
- if budget.news == "bad"
span(style="color:green") = budget.before_value
= "and is now"
span(style="color:red") = budget.value
- else
span(style="color:red") = budget.before_value
= "and is now"
span(style="color:green") = budget.value
- if budget.delta > 0
= "(#{budget.delta}% increase)."
- else
= "(#{-budget.delta}% decrease)."
| table(cellpadding="0" cellspacing="0" border="0" width="100%")
tr
td
h1(style="font-size:28px;margin-top:20px;margin-bottom:10px") Daily botnbot budget report
ul
- @context.budgets.each do |budget|
li
= "#{budget.page}/#{budget.label} (budget: #{budget.budget}) was "
- if budget.news == "bad"
span(style="color:green") = budget.before_value
= " and is now "
span(style="color:red") = budget.value
- else
span(style="color:red") = budget.before_value
= " and is now "
span(style="color:green") = budget.value
- if budget.delta > 0
= " (#{budget.delta}% increase)."
- else
= " (#{-budget.delta}% decrease)."
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.